From ab27ddb4e256e2096c4b9ab267409ab455a50cc9 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Mon, 20 Nov 2023 15:19:54 +0100 Subject: [PATCH] remove background for references --- components/content/ArticleDoi.vue | 37 +++++++----------------- components/content/ArticleReference.vue | 22 ++++---------- components/content/References.vue | 2 +- components/content/RelevantAbstracts.vue | 2 +- 4 files changed, 19 insertions(+), 44 deletions(-) diff --git a/components/content/ArticleDoi.vue b/components/content/ArticleDoi.vue index 9cc73e48..c2bfa9e3 100644 --- a/components/content/ArticleDoi.vue +++ b/components/content/ArticleDoi.vue @@ -26,13 +26,8 @@ const articleAbstract = computed(() => { }); </script> <template> - <v-list-item - :href="article?.href" - :id="props.doi" - :target="article?.target" - density="compact" - class="px-1" - > + <v-list-item :href="article?.href" :id="props.doi" :target="article?.target" density="compact" color="transparent" + class="px-1"> <template #prepend v-if="!mobile && enumerate"> <v-avatar color="primary" size="small" density="compact" variant="tonal"> {{ props?.index ?? "#" }} @@ -44,30 +39,20 @@ const articleAbstract = computed(() => { </v-avatar> </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-item density="compact" :class="mobile ? 'px-0 py-1' : 'py-1'"> + <v-card-title><span class="text-subtitle-1 font-weight-bold">{{ + articleTitle + }}</span></v-card-title> <v-card-subtitle> - {{ article?.subtitle ?? "no authors" }}</v-card-subtitle - > + {{ article?.subtitle ?? "no authors" }}</v-card-subtitle> <v-card-subtitle> {{ article?.containerTitle ?? "no containerTitle" }} ({{ article?.year - }})</v-card-subtitle - > + }})</v-card-subtitle> </v-card-item> - <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-item v-if="articleAbstract" density="compact" :class="mobile ? 'px-0' : 'py-1'"> + <v-btn size="x-small" variant="outlined" :append-icon="show ? 'mdi-chevron-up' : 'mdi-chevron-down'" + @click.stop.prevent="show = !show">Abstract</v-btn> </v-card-item> <v-expand-transition> <v-card v-show="show" flat color="transparent"> diff --git a/components/content/ArticleReference.vue b/components/content/ArticleReference.vue index 6a65d794..4c18ab75 100644 --- a/components/content/ArticleReference.vue +++ b/components/content/ArticleReference.vue @@ -24,12 +24,13 @@ const articleTitle = computed(() => { const articleAuthorsString = computed(() => { // console.log(article.value) // console.log(props.doi) - return article.value?.author?.length > 0 ? `${article.value.author[0].family} ${article.value.author[0].given} & al` : null + return article.value?.author?.length > 0 ? `${article.value.author[0].family} & al` : null }) </script> <template> - <v-list-item v-if="article" :href="article?.href" :id="`ref-${props.doi}`" :target="article?.target" density="compact" class="px-1"> + <v-list-item v-if="article" :href="article?.href" :id="`ref-${props.doi}`" :target="article?.target" density="compact" + class="px-1"> <template #prepend v-if="!mobile && enumerate"> <v-avatar color="primary" size="small" density="compact" variant="tonal"> {{ props?.index ?? "#" }} @@ -39,27 +40,16 @@ const articleAuthorsString = computed(() => { <template #title> <span class="text-subtitle-1 font-weight-bold">{{ articleTitle - }}</span> <span class="text-caption">{{ articleAuthorsString }}</span> + }} </span> </template> + <template #subtitle><span class="text-caption">{{ articleAuthorsString }}</span></template> <template #append v-if="!mobile"> <span> {{ article?.containerTitle ?? "no containerTitle" }} ({{ article?.year }})</span> </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 authors" }}</v-card-subtitle> - <v-card-subtitle> - {{ article?.containerTitle ?? "no containerTitle" }} ({{ - article?.year - }})</v-card-subtitle> - </v-card-item> - </v-card> --> + </v-list-item> <v-divider v-if="props.divider" inset></v-divider> </template> \ No newline at end of file diff --git a/components/content/References.vue b/components/content/References.vue index 03d40f96..8f864421 100644 --- a/components/content/References.vue +++ b/components/content/References.vue @@ -15,7 +15,7 @@ const computedDois = computed(() => { <div v-if="computedDois?.length > 0"> <ProseH2 id="references">References</ProseH2> - <v-list density="compact"> + <v-list density="compact" bg-color="transparent"> <ArticleReference v-for="(item, index) in computedDois" :key="item.doi" :index="index + 1" :doi="item.doi" :title="item?.title" :divider="item.divider" :abstract="item?.abstract" /> </v-list> diff --git a/components/content/RelevantAbstracts.vue b/components/content/RelevantAbstracts.vue index dbc571c1..f39e5611 100644 --- a/components/content/RelevantAbstracts.vue +++ b/components/content/RelevantAbstracts.vue @@ -17,7 +17,7 @@ const computedDois = computed(() => { <div v-if="computedDois?.length > 0"> <ProseH2 id="relevant-abstracts">Relevant abstracts</ProseH2> - <v-list density="compact"> + <v-list density="compact" bg-color="transparent"> <ArticleDoi v-for="(item, index) in computedDois" :key="item.doi" :index="index + 1" :doi="item.doi" :title="item?.title" :divider="item.divider" :abstract="item?.abstract" /> </v-list> -- GitLab