Skip to content
Snippets Groups Projects

Optional title abstract

Merged Remi PLANEL requested to merge optional-title-abstract into dev
2 files
+ 10
6
Compare changes
  • Side-by-side
  • Inline
Files
2
<script setup lang="ts">
import { useDisplay } from 'vuetify'
const props = defineProps<{
export interface Props {
index: number
doi: string
divider: boolean
enumerate: boolean
title?: string
abstract?: string
}>();
}
const props = withDefaults(defineProps<Props>(), {
enumerate: true,
})
const { article } = useFetchArticle(props.doi)
const { mobile } = useDisplay()
const show = ref(false)
console.log(article)
const articleTitle = computed(() => { return props?.title ?? article.value?.title ?? props.doi })
const articleAbstract = computed(() => { return props.abstract ?? article.value?.abstract })
@@ -20,7 +23,7 @@ const articleAbstract = computed(() => { return props.abstract ?? article.value?
</script>
<template>
<v-list-item :href="article?.href" :target="article?.target" density="compact" class="px-0">
<template #prepend v-if="!mobile">
<template #prepend v-if="!mobile && enumerate">
<v-avatar color="primary" size="small" density="compact" variant="tonal">
{{ props.index }}
</v-avatar>
@@ -34,7 +37,7 @@ const articleAbstract = computed(() => { return props.abstract ?? article.value?
<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?.subtitle ?? "no authors" }}</v-card-subtitle>
<v-card-subtitle> {{ article?.containerTitle ?? "no containerTitle" }} ({{ article?.year
}})</v-card-subtitle>
</v-card-item>
Loading