diff --git a/components/Nav/Navbar.vue b/components/Nav/Navbar.vue index adc65b3cf866536f7f5c3c3220e341a046bd8679..1d807fa7006b88d7acbdfa98668ee0d90532c016 100644 --- a/components/Nav/Navbar.vue +++ b/components/Nav/Navbar.vue @@ -58,17 +58,21 @@ const sections = ref([ const drawer = ref(true); const computedNavigation = computed(() => { - return navigation.value.map((navItem) => { - if (navItem._path === "/") { - return { ...navItem, icon: "md:home" }; - } - if (navItem._path === "/defense-systems") { - return { ...navItem, icon: "md:list" }; - } - if (navItem._path === "/general-concepts") { - return { ...navItem, icon: "md:history_edu" }; - } - return navItem; - }); + return navigation.value + .filter(({ _path }) => { + return _path !== "/refseq"; + }) + .map((navItem) => { + if (navItem._path === "/") { + return { ...navItem, icon: "md:home" }; + } + if (navItem._path === "/defense-systems") { + return { ...navItem, icon: "md:list" }; + } + if (navItem._path === "/general-concepts") { + return { ...navItem, icon: "md:history_edu" }; + } + return navItem; + }); }); </script> diff --git a/content/3.refseq/index.md b/content/3.refseq/index.md new file mode 100644 index 0000000000000000000000000000000000000000..a341d1ed3dde2033d4c77c7d3801f87c119c9fca --- /dev/null +++ b/content/3.refseq/index.md @@ -0,0 +1,11 @@ +--- +title: RefSeq +layout: article + +--- + + + +# test + +bal bala \ No newline at end of file diff --git a/pages/refseq.vue b/pages/refseq.vue index 62472f24f6f99f7f464ace2237707d59e1e6107d..275f38fe9057501be7ecd6f238f383dcb5f774f0 100644 --- a/pages/refseq.vue +++ b/pages/refseq.vue @@ -6,16 +6,24 @@ import { useDisplay } from "vuetify"; const { width, lgAndDown } = useDisplay(); const drawer = ref(true); +// const { data } = await useAsyncData("refseq", () => +// queryContent("/refseq").find() +// ); -const { data, error, pending } = await useAsyncData("refseq", () => +// console.log(data.value); +const { + data: refseqData, + error, + pending, +} = await useAsyncData("refseq-data", () => queryContent("/_partial/refseq").where({ _partial: true }).findOne() ); -console.log(data); +console.log(refseqData); const sanitizedRefseq = computed(() => { - if (data.value?.body) { - return data.value.body; + if (refseqData.value?.body) { + return refseqData.value.body; } else { return []; } @@ -55,106 +63,85 @@ watchEffect(async () => {}); </script> <template> - <VApp> - <v-main> - <v-container fluid> - <v-row justify="center"> - <v-col cols="12"> - <v-card flat color="transparent"> - <v-toolbar><v-toolbar-title> REFSEQ</v-toolbar-title> </v-toolbar> - <v-card-content> - <v-data-table-virtual - v-model="selected" - :headers="headers" - :items="sanitizedRefseq" - :item-value="itemValue" - height="800" - show-select - class="elevation-1" - ></v-data-table-virtual> - </v-card-content> - <v-card-text> - <v-row> - <v-col :cols="12"> - <PlotFigure - :options="{ - style: { - width: '100%', - 'max-width': '100%', - }, - marginBottom: 100, - x: { label: null, tickRotate: 50 }, - y: { grid: true }, - color: { legend: true }, - width: computedWidth, - height, - marks: [ - Plot.barY( - unref(selectedRefSeq), - Plot.groupX( - { y: 'count' }, - { - x: 'type', - fill: 'species', - tip: true, - sort: { x: '-y' }, - } - ) - ), - ], - }" - defer - ></PlotFigure> - </v-col> - </v-row> - <v-row> - <v-col :cols="12"> - <PlotFigure - defer - :options="{ - style: { - width: '100%', - 'max-width': '100%', - }, - marginBottom: 100, - x: { label: null, tickRotate: 90 }, - y: { grid: true }, - color: { legend: true }, - width: computedWidth, - height, - marks: [ - Plot.barY( - unref(selectedRefSeq), - Plot.groupX( - { y: 'count' }, - { - x: 'species', - fill: 'type', - tip: true, - } - ) - ), - ], - }" - ></PlotFigure> - </v-col> - </v-row> - </v-card-text> - </v-card> - </v-col> - </v-row> - </v-container> - <Footer></Footer> - </v-main> - <v-app-bar :elevation="0" border> - <template #prepend> - <v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon> - <!-- <Logo height="45px" /> --> - </template> - <v-app-bar-title></v-app-bar-title - ></v-app-bar> - <v-navigation-drawer v-model="drawer" :border="1"> - <v-list nav density="compact" :lines="false"> </v-list> - </v-navigation-drawer> - </VApp> + <v-card flat color="transparent"> + <v-toolbar><v-toolbar-title> REFSEQ</v-toolbar-title> </v-toolbar> + <v-card-content> + <v-data-table-virtual + v-model="selected" + :headers="headers" + :items="sanitizedRefseq" + :item-value="itemValue" + height="800" + show-select + class="elevation-1" + ></v-data-table-virtual> + </v-card-content> + <v-card-text> + <v-row> + <v-col :cols="12"> + <PlotFigure + :options="{ + style: { + width: '100%', + 'max-width': '100%', + }, + marginBottom: 100, + x: { label: null, tickRotate: 50 }, + y: { grid: true }, + color: { legend: true }, + width: computedWidth, + height, + marks: [ + Plot.barY( + unref(selectedRefSeq), + Plot.groupX( + { y: 'count' }, + { + x: 'type', + fill: 'species', + tip: true, + sort: { x: '-y' }, + } + ) + ), + ], + }" + defer + ></PlotFigure> + </v-col> + </v-row> + <v-row> + <v-col :cols="12"> + <PlotFigure + defer + :options="{ + style: { + width: '100%', + 'max-width': '100%', + }, + marginBottom: 100, + x: { label: null, tickRotate: 90 }, + y: { grid: true }, + color: { legend: true }, + width: computedWidth, + height, + marks: [ + Plot.barY( + unref(selectedRefSeq), + Plot.groupX( + { y: 'count' }, + { + x: 'species', + fill: 'type', + tip: true, + } + ) + ), + ], + }" + ></PlotFigure> + </v-col> + </v-row> + </v-card-text> + </v-card> </template> \ No newline at end of file