diff --git a/assets/main.css b/assets/main.css index a480816..98cf58b 100644 --- a/assets/main.css +++ b/assets/main.css @@ -22,7 +22,7 @@ --primary: 245 58% 51%; --primary-foreground: 0 0% 100%; - --secondary: 210 40% 96.1%; + --secondary: 210 50% 95%; --secondary-foreground: 222.2 47.4% 11.2%; --accent: 210 40% 96.1%; @@ -338,6 +338,81 @@ --border-color: color-mix(in srgb, var(--base-color), var(--color-slate-800) 50%); } +.bgc { + display: flex; + align-items: center; + flex-wrap: nowrap; +} + +.bgc::before { + content: ""; + display: inline-block; + width: .75rem; + aspect-ratio: 1; + margin-right: 0.5em; + border-radius: .25rem; + background-color: red; + border: 1px solid transparent; +} + +.bgc-red::before { + @apply bg-red-500; +} +.bgc-orange::before { + @apply bg-orange-500; +} +.bgc-amber::before { + @apply bg-amber-500; +} +.bgc-yellow::before { + @apply bg-yellow-500; +} +.bgc-lime::before { + @apply bg-lime-500; +} +.bgc-green::before { + @apply bg-green-500; +} +.bgc-emerald::before { + @apply bg-emerald-600; +} +.bgc-teal::before { + @apply bg-teal-600; +} +.bgc-cyan::before { + @apply bg-cyan-600; +} +.bgc-sky::before { + @apply bg-sky-600; +} +.bgc-blue::before { + @apply bg-blue-600; +} +.bgc-indigo::before { + @apply bg-indigo-600; +} +.bgc-violet::before { + @apply bg-violet-600; +} +.bgc-purple::before { + @apply bg-purple-600; +} +.bgc-fuchsia::before { + @apply bg-fuchsia-600; +} +.bgc-pink::before { + @apply bg-pink-600; +} +.bgc-rose::before { + @apply bg-rose-600; +} +.bgc-black::before { + @apply bg-black dark:border-[1px] dark:border-slate-300; +} +.bgc-white::before { + @apply bg-white border-[1px] border-slate-700; +} + .fade-enter-active, .fade-leave-active { transition: all .5s ease; diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 07234d7..d39f995 100644 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -8,17 +8,6 @@ import CenturyLayout from "./state/centennially/Layout.vue" import DecadeLayout from "./state/decennially/Layout.vue" import YearLayout from "./state/yearly/Layout.vue" -import type { Calendar } from "~/models/CalendarConfig" -import type { Category } from "~/models/Category" - -const props = defineProps<{ - calendarData: Calendar, - categories: Category[] -}>() - -const { setActiveCalendar } = useCalendar() -setActiveCalendar(props.calendarData, props.categories) - const { currentConfig, jumpToDate, selectedDate } = useCalendar() const { isReadOnly } = storeToRefs(useCalendar()) @@ -52,6 +41,7 @@ onMounted(() => { + diff --git a/components/calendar/CalendarMenuNav.vue b/components/calendar/CalendarMenuNav.vue deleted file mode 100644 index 5e969e4..0000000 --- a/components/calendar/CalendarMenuNav.vue +++ /dev/null @@ -1,200 +0,0 @@ - - - diff --git a/components/calendar/CalendarMenuSubnav.vue b/components/calendar/CalendarMenuSubnav.vue deleted file mode 100644 index 5e35569..0000000 --- a/components/calendar/CalendarMenuSubnav.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/components/calendar/CalendarSwitch.vue b/components/calendar/CalendarSwitch.vue deleted file mode 100644 index 4937c81..0000000 --- a/components/calendar/CalendarSwitch.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/components/calendar/CategoriesCTA.vue b/components/calendar/CategoriesCTA.vue new file mode 100644 index 0000000..17f1066 --- /dev/null +++ b/components/calendar/CategoriesCTA.vue @@ -0,0 +1,23 @@ + + + diff --git a/components/calendar/CalendarCurrentDate.vue b/components/calendar/CurrentDate.vue similarity index 54% rename from components/calendar/CalendarCurrentDate.vue rename to components/calendar/CurrentDate.vue index 279e514..bdb88cc 100644 --- a/components/calendar/CalendarCurrentDate.vue +++ b/components/calendar/CurrentDate.vue @@ -4,26 +4,29 @@ import { computed } from "vue" import { PhMapPin } from "@phosphor-icons/vue" -const { defaultDate, getFormattedDateTitle, getRelativeString } = useCalendar() +const { defaultDate, getFormattedDateTitle, getRelativeString, getDifferenceInDays } = useCalendar() const { selectedDate } = storeToRefs(useCalendar()) const mainDateTitle = computed(() => getFormattedDateTitle(selectedDate.value, true)) // const mainDateTitle = computed(() => convertDateToDays(selectedDate.value)) const dateDifference = computed(() => getRelativeString(defaultDate, selectedDate.value)) +const isToday = computed(() => getDifferenceInDays(defaultDate, selectedDate.value) === 0)