Skip to content
Snippets Groups Projects
Select Git revision
  • 3d3ffabbd7e791b027ee39561da9d76bce85ef76
  • master default protected
  • dev_nanopore
  • 2.0_beta
  • V_3.0
  • v_2.1
  • V_2.0
  • V_1.9.6
  • v_1.9.6
  • v_1.9.5
  • v_1.9.4
  • V_1.9.3
  • V_1.9.2
  • V_1.9.1
  • V_1.9
  • V_1.8
  • V_1.6
  • 1.5.1
  • V_1.5
  • V1.4
  • V1.3
21 results

unit_test_read_utils.cpp

Blame
  • Main.vue 1.29 KiB
    <script lang="ts" setup>
    import { useDisplay } from 'vuetify'
    
    const { smAndDown, width } = useDisplay()
    export interface Props {
      fluid?: boolean
    }
    const props = withDefaults(defineProps<Props>(), {
      fluid: true
    });
    const maxWidth = ref(1300)
    const minWidth = ref(900)
    const computedMinWidth = computed(() => {
      if (toValue(smAndDown)) return undefined
      if (toValue(width) - 450 > toValue(maxWidth)) return toValue(maxWidth)
      if (toValue(width) - 300 > toValue(minWidth)) return toValue(minWidth)
      return undefined
    })
    
    
    const scrollThreshold = ref(200)
    const density = ref<'compact' | 'prominent'>("prominent")
    
    function onScroll() {
      if (window.scrollY > scrollThreshold.value) {
        density.value = "compact"
      }
      else { density.value = "prominent" }
    }
    
    </script>
    
    <template>
      <v-card>
        <VApp>
          <Navbar :density="density" />
          <v-main style="min-height: 300px">
    
            <v-container v-scroll="onScroll" :fluid="props.fluid">
              <v-row justify="center">
                <v-col cols="auto">
                  <v-card flat color="transparent" :min-width="computedMinWidth"
                    :max-width="props.fluid ? undefined : maxWidth">
                    <slot />
                  </v-card>
                </v-col>
              </v-row>
            </v-container>
          </v-main>
        </VApp>
      </v-card>
    </template>