diff --git a/components/content/ArticleDoi.vue b/components/content/ArticleDoi.vue index fdfe831ede385401632c101204cfa4cf9c24c296..0ddc52a5f5c0e3ddf0410868299015a0b356b969 100644 --- a/components/content/ArticleDoi.vue +++ b/components/content/ArticleDoi.vue @@ -1,13 +1,16 @@ <script setup lang="ts"> +import { useDisplay } from 'vuetify' + const props = defineProps<{ - doi: string; + index: number + doi: string divider: boolean title?: string abstract?: string }>(); const { article } = useFetchArticle(props.doi) - +const { mobile } = useDisplay() const show = ref(false) console.log(article) @@ -16,26 +19,30 @@ const articleAbstract = computed(() => { return props.abstract ?? article.value? </script> <template> - <v-list-item :href="article?.href" :target="article?.target"> - <template #prepend> + <v-list-item :href="article?.href" :target="article?.target" density="compact" class="px-0"> + <template #prepend v-if="!mobile"> + <v-avatar color="primary" size="small" density="compact" variant="tonal"> + {{ props.index }} + </v-avatar> + </template> + <!-- <template #append v-if="!mobile"> <v-avatar> <v-icon>{{ article?.prependIcon }}</v-icon> </v-avatar> - </template> - <v-card flat color="transparent" density="compact"> - - <v-card-item density="compact"> + </template> --> + <v-card flat color="transparent" density="compact" class="my-0"> + <v-card-item density="compact" :class="mobile ? 'px-0' : null"> <v-card-title><span class="text-subtitle-1 font-weight-bold">{{ articleTitle }}</span></v-card-title> <v-card-subtitle> {{ article?.subtitle ?? "no subtitle" }}</v-card-subtitle> <v-card-subtitle> {{ article?.containerTitle ?? "no containerTitle" }} ({{ article?.year }})</v-card-subtitle> </v-card-item> - <v-card-actions v-if="articleAbstract" density="compact"> - <v-btn size="x-small" variant="outlined" :append-icon="show ? 'mdi-chevron-up' : 'mdi-chevron-down'" + <v-card-item density="compact" :class="mobile ? 'px-0' : null"> + <v-btn v-if="articleAbstract" size="x-small" variant="outlined" + :append-icon="show ? 'mdi-chevron-up' : 'mdi-chevron-down'" @click.stop.prevent="show = !show">Abstract</v-btn> - </v-card-actions> - + </v-card-item> <v-expand-transition> <v-card v-show="show" flat color="transparent"> <v-card-text> diff --git a/components/content/ArticleDoiList.vue b/components/content/ArticleDoiList.vue index 9f9eef6a0fd594cf140421fbadc93994643b693a..fe7727a672fbe67a3741e520b42d97b36550dc03 100644 --- a/components/content/ArticleDoiList.vue +++ b/components/content/ArticleDoiList.vue @@ -4,9 +4,8 @@ const props = defineProps<{ }>(); </script> <template> - <v-list> - <ArticleDoi v-for="item in props.items" :key="item.doi" :doi="item.doi" :title="item?.title" - :divider="item.divider" :abstract="item?.abstract" /> - + <v-list density="compact"> + <ArticleDoi v-for="item, index in props.items" :key="item.doi" :index="index + 1" :doi="item.doi" + :title="item?.title" :divider="item.divider" :abstract="item?.abstract" /> </v-list> </template> \ No newline at end of file diff --git a/layouts/article.vue b/layouts/article.vue index 46805b472cd8a1c1b6a294279710b8abac8be3ec..78da292c847a3528361b4b4a7e8142d9cf18400a 100644 --- a/layouts/article.vue +++ b/layouts/article.vue @@ -1,8 +1,10 @@ <script setup lang="ts"> const { page, surround } = useContent(); import { useCustomTheme } from '~/composables/useCustomTheme' +import { useDisplay } from 'vuetify' const { isDark } = useCustomTheme() +const { mobile } = useDisplay() </script> <template> @@ -17,10 +19,10 @@ const { isDark } = useCustomTheme() </v-card> --> <EditGitlab /> <v-row justify="space-between"> - <v-col v-for="(surroundPage, i) in surround" :key="surroundPage?._id" cols="auto"> + <v-col v-for="(surroundPage, i) in surround" :key="surroundPage?._id" :cols="mobile ? '12' : 'auto'"> <v-btn v-if="surroundPage" :prepend-icon="i === 0 ? 'mdi-arrow-left' : undefined" - :append-icon="i === 1 ? 'mdi-arrow-right' : undefined" variant="outlined" color="primary" - :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn> + :append-icon="i === 1 ? 'mdi-arrow-right' : undefined" :block="mobile ? true : false" variant="outlined" + color="primary" :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn> </v-col> </v-row> </v-container> diff --git a/pages/defense-systems.vue b/pages/defense-systems.vue index a417b5f1ea4b0e0ad01694761279570f95b01bb2..fb37b86a549ea585ea0dc2f0c335d326fac18b6c 100644 --- a/pages/defense-systems.vue +++ b/pages/defense-systems.vue @@ -44,10 +44,8 @@ const systems = computed(() => { </script> <template> - <v-card> + <v-card flat color="transparent"> <v-card-title>List systems</v-card-title> - <v-card-text> - <ListSystems :headers=headers :systems="systems"></ListSystems> - </v-card-text> + <ListSystems :headers=headers :systems="systems"></ListSystems> </v-card> </template> \ No newline at end of file