Updated list style

This commit is contained in:
Alexis
2025-04-25 17:25:01 +02:00
parent e634cc8127
commit f502f80341
11 changed files with 22 additions and 22 deletions

View File

@@ -265,10 +265,10 @@ function handleCategoryUnselect(e: Category) {
<template> <template>
<UiDialog v-model:open="isAdvancedSearchOpen" @update:open="resetSearch()"> <UiDialog v-model:open="isAdvancedSearchOpen" @update:open="resetSearch()">
<UiDialogContent <UiDialogContent
class="flex flex-col flex-nowrap top-10 -translate-y-0 data-[state=closed]:slide-out-to-top-[5%] data-[state=open]:slide-in-from-top-[5%]" class="flex flex-col flex-nowrap top-10 -translate-y-0 data-[state=closed]:slide-out-to-top-[5%] data-[state=open]:slide-in-from-top-[5%] max-md:rounded-none"
:class="{ :class="cn({
'bottom-10': searchResults.length > 0 'max-md:w-full bottom-0 md:bottom-10 top-0 md:top-10': searchResults.length > 0
}" })"
> >
<VisuallyHidden> <VisuallyHidden>
<UiDialogTitle> {{ $t('entity.advancedSearch.title') }} </UiDialogTitle> <UiDialogTitle> {{ $t('entity.advancedSearch.title') }} </UiDialogTitle>
@@ -447,7 +447,7 @@ function handleCategoryUnselect(e: Category) {
as-child as-child
> >
<UiButton <UiButton
class="w-10 h-10 p-0" class="size-8 md:size-10 p-0"
:variant="item.value === currentPage ? 'default' : 'outline'" :variant="item.value === currentPage ? 'default' : 'outline'"
> >
{{ item.value }} {{ item.value }}

View File

@@ -21,7 +21,7 @@ const dateDuration = computed<string | null>(() => props.event.endDate ? getRela
<template> <template>
<button <button
class="event-callout group relative block w-full text-left py-3 px-4 cursor-pointer transition-colors" class="event-callout group relative block w-full text-left py-2 px-3 md:py-3 md:px-4 cursor-pointer transition-colors"
:class="cn( :class="cn(
event.category ? `element-${event.category.color}` : '', event.category ? `element-${event.category.color}` : '',
{ {
@@ -30,7 +30,7 @@ const dateDuration = computed<string | null>(() => props.event.endDate ? getRela
@click="$emit('query:date-jump', event.startDate)" @click="$emit('query:date-jump', event.startDate)"
> >
<div class="flex gap-2 items-center mb-1"> <div class="flex gap-2 items-center mb-1">
<h2 class="font-bold text-lg underline-offset-4 group-hover:underline"> <h2 class="font-semibold md:font-bold md:text-lg underline-offset-4 group-hover:underline">
{{ event.title }} {{ event.title }}
</h2> </h2>
<div v-if="event.wiki"> <div v-if="event.wiki">
@@ -43,7 +43,7 @@ const dateDuration = computed<string | null>(() => props.event.endDate ? getRela
</div> </div>
</div> </div>
<div class="flex gap-2 items-center justify-between mb-1"> <div class="flex gap-2 items-center justify-between mb-2 md:mb-1">
<template v-if="!event.endDate"> <template v-if="!event.endDate">
<p class="font-semibold text-sm opacity-75"> <p class="font-semibold text-sm opacity-75">
{{ getFormattedDateTitle(event.startDate, true) }} {{ getFormattedDateTitle(event.startDate, true) }}
@@ -81,15 +81,15 @@ const dateDuration = computed<string | null>(() => props.event.endDate ? getRela
<div class="mb-1 flex gap-x-2 items-center"> <div class="mb-1 flex gap-x-2 items-center">
<template v-if="event.location"> <template v-if="event.location">
<p class="w-fit text-sm italic opacity-75 flex items-center gap-1"> <p class="w-fit text-xs md:text-sm italic opacity-75 flex items-center gap-1">
<PhMapPinArea size="16" weight="fill" /> {{ event.location }} <PhMapPinArea size="16" weight="fill" /> {{ event.location }}
</p> </p>
</template> </template>
<p class="w-fit text-sm italic opacity-75 flex items-center gap-1"> <p class="w-fit text-xs md:text-sm italic opacity-75 flex items-center gap-1">
<PhAlarm size="16" weight="fill" /> {{ dateDifference }} <PhAlarm size="16" weight="fill" /> {{ dateDifference }}
</p> </p>
<template v-if="dateDuration"> <template v-if="dateDuration">
<p class="w-fit text-sm italic opacity-75 flex items-center gap-1"> <p class="w-fit text-xs md:text-sm italic opacity-75 flex items-center gap-1">
<PhHourglassMedium size="16" weight="fill" /> {{ $t('entity.calendar.date.while', { duration: dateDuration } )}} <PhHourglassMedium size="16" weight="fill" /> {{ $t('entity.calendar.date.while', { duration: dateDuration } )}}
</p> </p>
</template> </template>
@@ -111,8 +111,8 @@ const dateDuration = computed<string | null>(() => props.event.endDate ? getRela
</ul> </ul>
</div> </div>
<div v-if="event.description" class="text-sm"> <div v-if="event.description" class="text-xs md:text-sm">
<hr class="my-2 border-white opacity-50" > <hr class="my-3 md:my-2 border-white opacity-50" >
<span class="opacity-75"> <span class="opacity-75">
{{ event.description }} {{ event.description }}
</span> </span>

View File

@@ -60,7 +60,7 @@ const pagedResults = computed(() => sortedResults.value.slice(props.startAt, pro
</script> </script>
<template> <template>
<ul class="grid gap-4 pl-8 pr-12"> <ul class="grid gap-3 md:gap-4 pl-4 pr-6 md:pl-8 md:pr-12">
<li v-for="r in pagedResults" :key="isCalendarEvent(r) ? r.title : r.name"> <li v-for="r in pagedResults" :key="isCalendarEvent(r) ? r.title : r.name">
<EventCallout v-if="isCalendarEvent(r)" :event="r" @query:date-jump="handleJumpToDate" /> <EventCallout v-if="isCalendarEvent(r)" :event="r" @query:date-jump="handleJumpToDate" />

View File

@@ -31,7 +31,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
v-bind="forwarded" v-bind="forwarded"
:class=" :class="
cn( cn(
'fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-3xl -translate-x-1/2 -translate-y-1/2 gap-4 border border-indigo-200 bg-background dark:bg-slate-950 dark:border-indigo-950 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-50% data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-50% data-[state=open]:slide-in-from-top-48% sm:rounded-lg', 'fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-3xl -translate-x-1/2 -translate-y-1/2 gap-4 border border-indigo-200 bg-background dark:bg-slate-950 dark:border-indigo-950 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-50% data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-50% data-[state=open]:slide-in-from-top-48% rounded-lg',
props.class, props.class,
) )
" "

View File

@@ -33,7 +33,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
v-bind="forwarded" v-bind="forwarded"
:class=" :class="
cn( cn(
'fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-4xl -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background border-indigo-200 dark:bg-slate-950 dark:border-indigo-950 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-50% data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-50% data-[state=open]:slide-in-from-top-48% sm:rounded-lg', 'fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-4xl -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background border-indigo-200 dark:bg-slate-950 dark:border-indigo-950 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-50% data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-50% data-[state=open]:slide-in-from-top-48% rounded-lg',
props.class props.class
) )
" "

View File

@@ -32,7 +32,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<DialogContent <DialogContent
:class=" :class="
cn( cn(
'relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full', 'relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 rounded-lg md:w-full',
props.class props.class
) )
" "

View File

@@ -16,7 +16,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationEllipsis <PaginationEllipsis
v-bind="delegatedProps" v-bind="delegatedProps"
:class="cn('size-9 flex items-center justify-center', props.class)" :class="cn('size-8 md:size-10 flex items-center justify-center', props.class)"
> >
<slot> <slot>
<PhArrowsHorizontal /> <PhArrowsHorizontal />

View File

@@ -21,7 +21,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationFirst v-bind="delegatedProps"> <PaginationFirst v-bind="delegatedProps">
<Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline"> <Button :class="cn('size-8 md:size-10 p-0', props.class)" variant="outline">
<slot> <slot>
<PhCaretDoubleLeft class="size-4" /> <PhCaretDoubleLeft class="size-4" />
</slot> </slot>

View File

@@ -21,7 +21,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationLast v-bind="delegatedProps"> <PaginationLast v-bind="delegatedProps">
<Button :class="cn('size-10 p-0', props.class)" variant="outline"> <Button :class="cn('size-8 md:size-10 p-0', props.class)" variant="outline">
<slot> <slot>
<PhCaretDoubleRight class="size-4" /> <PhCaretDoubleRight class="size-4" />
</slot> </slot>

View File

@@ -21,7 +21,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationNext v-bind="delegatedProps"> <PaginationNext v-bind="delegatedProps">
<Button :class="cn('size-10 p-0', props.class)" variant="outline"> <Button :class="cn('size-8 md:size-10 p-0', props.class)" variant="outline">
<slot> <slot>
<PhCaretRight class="size-4" /> <PhCaretRight class="size-4" />
</slot> </slot>

View File

@@ -21,7 +21,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationPrev v-bind="delegatedProps"> <PaginationPrev v-bind="delegatedProps">
<Button :class="cn('size-10 p-0', props.class)" variant="outline"> <Button :class="cn('size-8 md:size-10 p-0', props.class)" variant="outline">
<slot> <slot>
<PhCaretLeft class="size-4" /> <PhCaretLeft class="size-4" />
</slot> </slot>