Skip to content
Snippets Groups Projects
Commit bfbc586f authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

make refseq work with generate

parent 94e90379
No related branches found
No related tags found
No related merge requests found
Pipeline #112477 passed with stages
in 5 minutes and 52 seconds
......@@ -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>
---
title: RefSeq
layout: article
---
# test
bal bala
\ No newline at end of file
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment