Skip to content

Commit

Permalink
fix: lint/format
Browse files Browse the repository at this point in the history
  • Loading branch information
ctot-nondef committed May 17, 2024
1 parent 11ed767 commit af29986
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
10 changes: 5 additions & 5 deletions components/app-footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ const links = computed(() => {
<nav :aria-label="t('AppFooter.navigation-secondary')" class="w-full">
<ul class="flex items-center gap-8" role="list">
<li v-for="(link, key) of links" :key="key" :class="link.image ? '' : 'ml-auto'">
<a v-if="link.image" :href="link.href.path" target="_blank"
><NuxtImg :src="link.image" :alt="link.label" placeholder class="h-10 w-auto">{{
link.label
}}</NuxtImg></a
>
<a v-if="link.image" :href="link.href.path" target="_blank">
<NuxtImg :src="link.image" :alt="link.label" placeholder class="h-10 w-auto">
{{ link.label }}
</NuxtImg>
</a>
<NavLink v-else :href="link.href">
{{ link.label }}
</NavLink>
Expand Down
13 changes: 7 additions & 6 deletions components/color-scheme-switcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ const colorSchemes = computed(() => {
<ClientOnly>
<Listbox v-model="colorMode.preference">
<div class="relative">
<ListboxButton
><Sun class="inline dark:hidden"></Sun> <Moon class="hidden dark:inline"></Moon
><span class="sr-only">{{
t(`ColorSchemeToggle.color-schemes.${colorMode.preference}`)
}}</span></ListboxButton
>
<ListboxButton>
<Sun class="inline dark:hidden"></Sun>
<Moon class="hidden dark:inline"></Moon>
<span class="sr-only">
{{ t(`ColorSchemeToggle.color-schemes.${colorMode.preference}`) }}
</span>
</ListboxButton>
<ListboxOptions
class="absolute -left-2 z-10 mt-3 overflow-auto rounded-md border bg-neutral-50 text-sm dark:bg-zinc-900"
>
Expand Down
14 changes: 8 additions & 6 deletions components/detail-disclosure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ const groupedRelations = computed(() => {
:disabled="rels.length === 0 && !customSlot"
:class="borderColors[model]"
>
<span class="flex gap-2 align-baseline"
><component :is="icons[model]" class="inline" /> {{ title }}</span
>
<span class="flex gap-2 align-baseline">
<component :is="icons[model]" class="inline" />
{{ title }}
</span>
<ChevronDown class="size-5 transition ui-open:-rotate-180" />
</DisclosureButton>
<DisclosurePanel
Expand Down Expand Up @@ -76,7 +77,8 @@ const groupedRelations = computed(() => {
as="tr"
class="group table w-full table-fixed cursor-pointer hover:bg-primary-50 active:bg-primary-50 dark:hover:bg-primary-950 dark:active:bg-primary-950"
tabindex="0"
><td
>
<td
v-for="(header, idx) in headers"
:key="rel[0]?.to?.name + header"
class="p-2 text-start"
Expand Down Expand Up @@ -107,8 +109,8 @@ const groupedRelations = computed(() => {
<td v-for="header in headers" :key="hit + header" class="p-2 text-start">
{{ String(get(hit, header, "")).replace(/\<.*?\>/g, "") }}
</td>
</NuxtLink></component
>
</NuxtLink>
</component>
</component>
</tbody>
</table>
Expand Down
6 changes: 3 additions & 3 deletions components/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ onMounted(() => {
<div ref="mapContainer" class="absolute size-full"></div>
<div class="absolute bottom-0 right-0 bg-neutral-50/70 p-1 text-xs dark:bg-neutral-900/70">
1450,
<a href="https://www.openhistoricalmap.org/copyright" target="_blank" class="hover:underline"
>&copy; OpenHistoricalMap</a
>
<a href="https://www.openhistoricalmap.org/copyright" target="_blank" class="hover:underline">
&copy; OpenHistoricalMap
</a>
</div>
</div>
</template>
12 changes: 7 additions & 5 deletions components/timeline-entry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ const itemClass = computed(() => {
zIndex: dimensions.zIndex,
}"
:class="[bgColors[itemClass], Array.isArray(item) ? 'size-6' : 'size-3']"
>{{ Array.isArray(item) ? item.length : "" }}</PopoverButton
>
{{ Array.isArray(item) ? item.length : "" }}
</PopoverButton>
<Transition
enter-active-class="transition duration-200 ease-out"
enter-from-class="translate-y-1 opacity-0"
Expand All @@ -91,16 +92,17 @@ const itemClass = computed(() => {
? item[0].start_date_written
: item.start_date_written
).replace(/\<.*?\>/g, "")
}}</span
><span v-if="endDate && startDate != endDate">
}}
</span>
<span v-if="endDate && startDate != endDate">
-
{{
(Array.isArray(item) ? item[0].end_date_written : item.end_date_written).replace(
/\<.*?\>/g,
"",
)
}}</span
>
}}
</span>
</div>
<div v-if="Array.isArray(item)">
<NuxtLink
Expand Down

0 comments on commit af29986

Please sign in to comment.