Added commerce category

This commit is contained in:
Alexis
2024-05-01 15:51:02 +02:00
parent 29ecaec59c
commit eedecdfddf
5 changed files with 16 additions and 8 deletions

View File

@@ -32,7 +32,8 @@ defineProps<{
'text-white bg-amber-600 hover:bg-amber-700': event.category === 'construction',
'text-slate-900 bg-violet-200 hover:bg-violet-300': event.category === 'arcanologie',
'text-white bg-rose-600 hover:bg-rose-700': event.category === 'criminalité',
'text-white bg-stone-600 hover:bg-stone-700': event.category === 'scandale'
'text-white bg-stone-600 hover:bg-stone-700': event.category === 'scandale',
'text-slate-900 bg-yellow-500 hover:bg-yellow-600': event.category === 'commerce'
}"
>
{{ event.title }}

View File

@@ -23,7 +23,7 @@ const dateDifference: string = getRelativeString(defaultDate, props.event.startD
:class="{
'border-slate-800': !event.category,
'border-lime-800': event.category === 'naissance',
'border-stone-800': event.category === 'mort',
'border-stone-600': event.category === 'mort',
'border-orange-800': event.category === 'catastrophe',
'border-pink-800': event.category === 'catastrophe naturelle',
'border-sky-800': event.category === 'législation',
@@ -38,7 +38,8 @@ const dateDifference: string = getRelativeString(defaultDate, props.event.startD
'border-amber-700': event.category === 'construction',
'border-violet-700': event.category === 'arcanologie',
'border-rose-800': event.category === 'criminalité',
'border-stone-700': event.category === 'scandale'
'border-stone-700': event.category === 'scandale',
'border-yellow-600': event.category === 'commerce'
}"
>
<div class="grid gap-1">
@@ -91,8 +92,8 @@ const dateDifference: string = getRelativeString(defaultDate, props.event.startD
.border-lime-800 {
background-color: color-mix(in srgb, var(--color-lime-800), var(--color-slate-950) 85%);
}
.border-stone-800 {
background-color: color-mix(in srgb, var(--color-stone-800), var(--color-slate-950) 85%);
.border-stone-600 {
background-color: color-mix(in srgb, var(--color-stone-600), var(--color-slate-950) 85%);
}
.border-orange-800 {
background-color: color-mix(in srgb, var(--color-orange-800), var(--color-slate-950) 85%);
@@ -139,4 +140,7 @@ const dateDifference: string = getRelativeString(defaultDate, props.event.startD
.border-stone-700 {
background-color: color-mix(in srgb, var(--color-stone-700), var(--color-slate-950) 85%);
}
.border-yellow-600 {
background-color: color-mix(in srgb, var(--color-yellow-600), var(--color-slate-950) 85%);
}
</style>

View File

@@ -39,7 +39,8 @@ const { defaultDate, getFormattedDateTitle } = useCalendar()
'text-white bg-amber-600 hover:bg-amber-700': event.category === 'construction',
'text-slate-900 bg-violet-200 hover:bg-violet-300': event.category === 'arcanologie',
'text-white bg-rose-600 hover:bg-rose-700': event.category === 'criminalité',
'text-white bg-stone-600 hover:bg-stone-700': event.category === 'scandale'
'text-white bg-stone-600 hover:bg-stone-700': event.category === 'scandale',
'text-slate-900 bg-yellow-500 hover:bg-yellow-600': event.category === 'commerce'
}"
@click="$emit('query:date-jump', event.startDate)"
>

View File

@@ -172,6 +172,7 @@ export const regularEvents: CalendarEvent[] = [
description:
'Les artisans et mineurs de Rougefer se réunissent à Cantane pour vendre le fruit de leur dur labeur.',
startDate: { day: 23, month: 8, year: 3209 },
category: 'inauguration'
endDate: { day: 26, month: 8, year: 3209 },
category: 'commerce'
}
]

View File

@@ -28,7 +28,8 @@ export const calendarEventCategories = [
'construction',
'arcanologie',
'criminalité',
'scandale'
'scandale',
'commerce'
] as const
export type CalendarEventCategory = (typeof calendarEventCategories)[number]