Newer
Older
<template>
<VizSection
id="authors"
:figures="false"
:fig-caption="false"
>
<!-- HEADING -->
<template #heading>
<hr role="presentation" aria-hidden="true">
<h1 v-if="titleLevel === '1'" v-html="title" />
<h2 v-if="titleLevel === '2'" v-html="title" />
<h3 v-if="titleLevel === '3'" v-html="title" />
</template>
<template #aboveExplanation>
<div
v-if="showAuthors"
id="author-container"
class="text-content"
>
<p>
This visualization was developed by the <a href='https://labs.waterdata.usgs.gov/visualizations/' target='_blank'>USGS Vizlab</a>
and led by
:id="`initial-${author.initials}`"
:key="`${author.initials}-attribution`"
:class="'author first'"
>
<a
:href="author.profile_link"
target="_blank"
v-text="author.fullName"
/>
<span v-if="index != Object.keys(authors).length - 1 && Object.keys(authors).length > 2">, </span>
<span v-if="index == Object.keys(authors).length - 2"> and </span>
</span>.
</span>
</p>
</div>
</template>
</VizSection>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import VizSection from '@/components/VizSection.vue';
// define props
const props = defineProps({
title: {
type: String,
},
titleLevel: {
type: String,
},
// Turn on or off attribution for all authors
const showAuthors = ref(null);
onMounted(() => {
#authors {
font-style: italic;
font-weight: 300;
}