+
diff --git a/src/components/calendar/CalendarMenu.vue b/src/components/calendar/CalendarMenu.vue
new file mode 100644
index 0000000..57498b7
--- /dev/null
+++ b/src/components/calendar/CalendarMenu.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+ {{ currentDate.currentDateTitle }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/calendar/CalendarTile.vue b/src/components/calendar/CalendarTile.vue
new file mode 100644
index 0000000..f5660a5
--- /dev/null
+++ b/src/components/calendar/CalendarTile.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/state/Century.vue b/src/components/calendar/state/Century.vue
similarity index 100%
rename from src/components/state/Century.vue
rename to src/components/calendar/state/Century.vue
diff --git a/src/components/state/Decade.vue b/src/components/calendar/state/Decade.vue
similarity index 100%
rename from src/components/state/Decade.vue
rename to src/components/calendar/state/Decade.vue
diff --git a/src/components/calendar/state/Monthly.vue b/src/components/calendar/state/Monthly.vue
new file mode 100644
index 0000000..6d5fa89
--- /dev/null
+++ b/src/components/calendar/state/Monthly.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+ {{ day }}
+
+
+
+ {{ nextMonthDay }}
+
+
+
diff --git a/src/components/state/Year.vue b/src/components/calendar/state/Year.vue
similarity index 100%
rename from src/components/state/Year.vue
rename to src/components/calendar/state/Year.vue
diff --git a/src/components/state/Monthly.vue b/src/components/state/Monthly.vue
deleted file mode 100644
index 6a1ce67..0000000
--- a/src/components/state/Monthly.vue
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Monthly
-
diff --git a/src/components/ui/button/Button.vue b/src/components/ui/button/Button.vue
new file mode 100644
index 0000000..5cfd668
--- /dev/null
+++ b/src/components/ui/button/Button.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/button/index.ts b/src/components/ui/button/index.ts
new file mode 100644
index 0000000..e18f26b
--- /dev/null
+++ b/src/components/ui/button/index.ts
@@ -0,0 +1,34 @@
+import { type VariantProps, cva } from 'class-variance-authority'
+
+export { default as Button } from './Button.vue'
+
+export const buttonVariants = cva(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+ {
+ variants: {
+ variant: {
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
+ destructive:
+ 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
+ outline:
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
+ secondary:
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
+ },
+ size: {
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'h-10 w-10',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default',
+ },
+ },
+)
+
+export type ButtonVariants = VariantProps
diff --git a/src/components/ui/select/Select.vue b/src/components/ui/select/Select.vue
new file mode 100644
index 0000000..adc42fd
--- /dev/null
+++ b/src/components/ui/select/Select.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectContent.vue b/src/components/ui/select/SelectContent.vue
new file mode 100644
index 0000000..4fe234b
--- /dev/null
+++ b/src/components/ui/select/SelectContent.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectGroup.vue b/src/components/ui/select/SelectGroup.vue
new file mode 100644
index 0000000..407d8ad
--- /dev/null
+++ b/src/components/ui/select/SelectGroup.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectItem.vue b/src/components/ui/select/SelectItem.vue
new file mode 100644
index 0000000..b102a81
--- /dev/null
+++ b/src/components/ui/select/SelectItem.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectItemText.vue b/src/components/ui/select/SelectItemText.vue
new file mode 100644
index 0000000..a0bb5c2
--- /dev/null
+++ b/src/components/ui/select/SelectItemText.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectLabel.vue b/src/components/ui/select/SelectLabel.vue
new file mode 100644
index 0000000..3d45cdb
--- /dev/null
+++ b/src/components/ui/select/SelectLabel.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectScrollDownButton.vue b/src/components/ui/select/SelectScrollDownButton.vue
new file mode 100644
index 0000000..54b6c6a
--- /dev/null
+++ b/src/components/ui/select/SelectScrollDownButton.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectScrollUpButton.vue b/src/components/ui/select/SelectScrollUpButton.vue
new file mode 100644
index 0000000..5535f1c
--- /dev/null
+++ b/src/components/ui/select/SelectScrollUpButton.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectSeparator.vue b/src/components/ui/select/SelectSeparator.vue
new file mode 100644
index 0000000..5ae593d
--- /dev/null
+++ b/src/components/ui/select/SelectSeparator.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/src/components/ui/select/SelectTrigger.vue b/src/components/ui/select/SelectTrigger.vue
new file mode 100644
index 0000000..cfac8eb
--- /dev/null
+++ b/src/components/ui/select/SelectTrigger.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/SelectValue.vue b/src/components/ui/select/SelectValue.vue
new file mode 100644
index 0000000..4bc37dd
--- /dev/null
+++ b/src/components/ui/select/SelectValue.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/src/components/ui/select/index.ts b/src/components/ui/select/index.ts
new file mode 100644
index 0000000..b1d89ee
--- /dev/null
+++ b/src/components/ui/select/index.ts
@@ -0,0 +1,11 @@
+export { default as Select } from './Select.vue'
+export { default as SelectValue } from './SelectValue.vue'
+export { default as SelectTrigger } from './SelectTrigger.vue'
+export { default as SelectContent } from './SelectContent.vue'
+export { default as SelectGroup } from './SelectGroup.vue'
+export { default as SelectItem } from './SelectItem.vue'
+export { default as SelectItemText } from './SelectItemText.vue'
+export { default as SelectLabel } from './SelectLabel.vue'
+export { default as SelectSeparator } from './SelectSeparator.vue'
+export { default as SelectScrollUpButton } from './SelectScrollUpButton.vue'
+export { default as SelectScrollDownButton } from './SelectScrollDownButton.vue'
diff --git a/src/main.ts b/src/main.ts
index 615f001..5dcad83 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,4 @@
import './assets/main.css'
-import './assets/theme.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
diff --git a/src/stores/calendar.ts b/src/stores/calendar.ts
index a28a897..9f7b09b 100644
--- a/src/stores/calendar.ts
+++ b/src/stores/calendar.ts
@@ -24,6 +24,7 @@ type CalendarCurrentDate = {
currentYear: ComputedRef
currentPeriod: Ref
currentPeriodAbbr: Ref
+ currentDateTitle: ComputedRef
}
export const useCalendar = defineStore('calendar', () => {
@@ -63,6 +64,12 @@ export const useCalendar = defineStore('calendar', () => {
const currentConfig: Ref = ref({
viewType: 'month'
})
+ const viewTypeOptions: Set = new Set([
+ 'month',
+ 'year',
+ 'decade',
+ 'century'
+ ])
// Get date from URL params
const params = useUrlSearchParams('history', {
@@ -105,6 +112,25 @@ export const useCalendar = defineStore('calendar', () => {
return currentPeriod.value === 'ante' ? 'A.R' : 'N.R'
})
+ const currentDateTitle = computed(() => {
+ switch (currentConfig.value.viewType) {
+ case 'month':
+ return `${currentMonthName.value} ${currentYear.value} ${currentPeriodAbbr.value}`
+
+ case 'year':
+ return `Année ${currentYear.value} ${currentPeriodAbbr.value}`
+
+ case 'decade':
+ return `Années ${Number(currentYear.value)} ${getPeriodOfYear(Number(currentYear.value)).short} - ${Number(currentYear.value) + 10} ${getPeriodOfYear(Number(currentYear.value) + 10).short}`
+
+ case 'century':
+ return `Années ${Number(currentYear.value)} ${getPeriodOfYear(Number(currentYear.value)).short} - ${Number(currentYear.value) + 100} ${getPeriodOfYear(Number(currentYear.value) + 100).short}`
+
+ default:
+ return 'Date inconnue'
+ }
+ })
+
// Create base config
const currentDate: CalendarCurrentDate = {
currentDay,
@@ -112,7 +138,8 @@ export const useCalendar = defineStore('calendar', () => {
currentMonthName,
currentYear,
currentPeriod,
- currentPeriodAbbr
+ currentPeriodAbbr,
+ currentDateTitle
}
/**
@@ -198,6 +225,7 @@ export const useCalendar = defineStore('calendar', () => {
return {
staticConfig,
+ viewTypeOptions,
currentConfig,
currentDate,
params,
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 401a6c1..d739af9 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,9 +1,9 @@
-
+