+
+
+
+
+
+
+
diff --git a/src/components/calendar/CalendarMenuSearchResults.vue b/src/components/calendar/CalendarMenuSearchResults.vue
new file mode 100644
index 0000000..82dc363
--- /dev/null
+++ b/src/components/calendar/CalendarMenuSearchResults.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/src/stores/calendar.ts b/src/stores/calendar.ts
index 292e1ed..cfc2ea2 100644
--- a/src/stores/calendar.ts
+++ b/src/stores/calendar.ts
@@ -296,10 +296,14 @@ export const useCalendar = defineStore('calendar', () => {
return JSON.stringify({ ...date1 }) === JSON.stringify({ ...date2 })
}
+ function jumpToDate(date: LeimDate) {
+ params.day = date.day.toString()
+ params.month = date.month.toString()
+ params.year = date.year.toString()
+ }
+
function jumpToDefaultDate() {
- params.day = defaultDay.toString()
- params.month = defaultMonth.toString()
- params.year = defaultYear.toString()
+ jumpToDate(defaultDate.value)
currentConfig.value.viewType = 'month'
}
@@ -316,6 +320,7 @@ export const useCalendar = defineStore('calendar', () => {
setMonth,
incrementYear,
decrementYear,
+ jumpToDate,
jumpToDefaultDate,
compareTwoDates,
getFormattedDateTitle,
diff --git a/src/stores/events.ts b/src/stores/events.ts
index ef6ce0b..7599a72 100644
--- a/src/stores/events.ts
+++ b/src/stores/events.ts
@@ -73,6 +73,10 @@ export const useCalendarEvents = defineStore('calendar-events', () => {
})
})
+ const allEvents = computed(() => {
+ return [...characterBirthEvents.value, ...characterDeathEvents.value, ...baseEvents.value]
+ })
+
// Gets all current event in its default state
const currentEvents: Ref
= ref(computeCurrentEvents())
@@ -123,14 +127,8 @@ export const useCalendarEvents = defineStore('calendar-events', () => {
* @returns A list of events that can appear in the current view
*/
function computeCurrentEvents(): CalendarEvent[] {
- const allEvents = [
- ...characterBirthEvents.value,
- ...characterDeathEvents.value,
- ...baseEvents.value
- ]
-
- return allEvents.filter((event) => shouldEventBeDisplayed(event))
+ return allEvents.value.filter((event) => shouldEventBeDisplayed(event))
}
- return { currentEvents }
+ return { allEvents, currentEvents }
})
diff --git a/tailwind.config.js b/tailwind.config.js
index d803171..09d66fc 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,93 +1,93 @@
-const animate = require("tailwindcss-animate")
+const animate = require('tailwindcss-animate')
/** @type {import('tailwindcss').Config} */
module.exports = {
- darkMode: ["class"],
- safelist: ["dark"],
- prefix: "",
-
+ darkMode: ['class'],
+ safelist: ['dark'],
+ prefix: '',
+
content: [
'./pages/**/*.{ts,tsx,vue}',
'./components/**/*.{ts,tsx,vue}',
'./app/**/*.{ts,tsx,vue}',
- './src/**/*.{ts,tsx,vue}',
- ],
-
+ './src/**/*.{ts,tsx,vue}'
+ ],
+
theme: {
container: {
center: true,
- padding: "2rem",
+ padding: '2rem',
screens: {
- "2xl": "1400px",
- },
+ '2xl': '1400px'
+ }
},
extend: {
colors: {
- border: "hsl(var(--border))",
- input: "hsl(var(--input))",
- ring: "hsl(var(--ring))",
- background: "hsl(var(--background))",
- foreground: "hsl(var(--foreground))",
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
primary: {
- DEFAULT: "hsl(var(--primary))",
- foreground: "hsl(var(--primary-foreground))",
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))'
},
secondary: {
- DEFAULT: "hsl(var(--secondary))",
- foreground: "hsl(var(--secondary-foreground))",
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))'
},
destructive: {
- DEFAULT: "hsl(var(--destructive))",
- foreground: "hsl(var(--destructive-foreground))",
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))'
},
muted: {
- DEFAULT: "hsl(var(--muted))",
- foreground: "hsl(var(--muted-foreground))",
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))'
},
accent: {
- DEFAULT: "hsl(var(--accent))",
- foreground: "hsl(var(--accent-foreground))",
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))'
},
popover: {
- DEFAULT: "hsl(var(--popover))",
- foreground: "hsl(var(--popover-foreground))",
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))'
},
card: {
- DEFAULT: "hsl(var(--card))",
- foreground: "hsl(var(--card-foreground))",
- },
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))'
+ }
},
borderRadius: {
- xl: "calc(var(--radius) + 4px)",
- lg: "var(--radius)",
- md: "calc(var(--radius) - 2px)",
- sm: "calc(var(--radius) - 4px)",
+ xl: 'calc(var(--radius) + 4px)',
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)'
},
keyframes: {
- "accordion-down": {
+ 'accordion-down': {
from: { height: 0 },
- to: { height: "var(--radix-accordion-content-height)" },
+ to: { height: 'var(--radix-accordion-content-height)' }
},
- "accordion-up": {
- from: { height: "var(--radix-accordion-content-height)" },
- to: { height: 0 },
+ 'accordion-up': {
+ from: { height: 'var(--radix-accordion-content-height)' },
+ to: { height: 0 }
},
- "collapsible-down": {
+ 'collapsible-down': {
from: { height: 0 },
- to: { height: 'var(--radix-collapsible-content-height)' },
+ to: { height: 'var(--radix-collapsible-content-height)' }
},
- "collapsible-up": {
+ 'collapsible-up': {
from: { height: 'var(--radix-collapsible-content-height)' },
- to: { height: 0 },
- },
+ to: { height: 0 }
+ }
},
animation: {
- "accordion-down": "accordion-down 0.2s ease-out",
- "accordion-up": "accordion-up 0.2s ease-out",
- "collapsible-down": "collapsible-down 0.2s ease-in-out",
- "collapsible-up": "collapsible-up 0.2s ease-in-out",
- },
- },
+ 'accordion-down': 'accordion-down 0.2s ease-out',
+ 'accordion-up': 'accordion-up 0.2s ease-out',
+ 'collapsible-down': 'collapsible-down 0.2s ease-in-out',
+ 'collapsible-up': 'collapsible-up 0.2s ease-in-out'
+ }
+ }
},
- plugins: [animate],
-}
\ No newline at end of file
+ plugins: [animate]
+}