From 9dc4f5773c19b73d7524c1586f63a24307d5ea9f Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Tue, 6 Aug 2024 04:26:43 -0700 Subject: [PATCH] update promo bar --- src/lib/util/promos/August2024.svelte | 54 ++++++++++++++++++++++++++ src/lib/util/promos/Holiday2023.svelte | 7 ---- src/lib/util/promos/Jan2024.svelte | 25 ------------ src/lib/util/promos/promo.ts | 15 ++----- tailwind.config.cjs | 17 +++++++- 5 files changed, 74 insertions(+), 44 deletions(-) create mode 100644 src/lib/util/promos/August2024.svelte delete mode 100644 src/lib/util/promos/Holiday2023.svelte delete mode 100644 src/lib/util/promos/Jan2024.svelte diff --git a/src/lib/util/promos/August2024.svelte b/src/lib/util/promos/August2024.svelte new file mode 100644 index 00000000..7a9b54e1 --- /dev/null +++ b/src/lib/util/promos/August2024.svelte @@ -0,0 +1,54 @@ + + +{#key currentTagline} + + {currentTagline.label} + + +{/key} diff --git a/src/lib/util/promos/Holiday2023.svelte b/src/lib/util/promos/Holiday2023.svelte deleted file mode 100644 index b723ac3e..00000000 --- a/src/lib/util/promos/Holiday2023.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - Get AI, team collaboration, storage, and more with - Mermaid Chart Pro. Start free trial today & get 25% off. - diff --git a/src/lib/util/promos/Jan2024.svelte b/src/lib/util/promos/Jan2024.svelte deleted file mode 100644 index 3d3a662c..00000000 --- a/src/lib/util/promos/Jan2024.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - - - {tagline} - - diff --git a/src/lib/util/promos/promo.ts b/src/lib/util/promos/promo.ts index 20e540a8..45630714 100644 --- a/src/lib/util/promos/promo.ts +++ b/src/lib/util/promos/promo.ts @@ -1,7 +1,6 @@ import { writable, type Writable, get } from 'svelte/store'; import { persist, localStorage } from '../persist'; -import Holiday2023 from './Holiday2023.svelte'; -import Jan2024 from './Jan2024.svelte'; +import August2024 from './August2024.svelte'; interface Promotion { id: string; @@ -12,16 +11,10 @@ interface Promotion { const promotions: Promotion[] = [ { - id: 'holiday-2023', - startDate: new Date('2023-11-27'), - endDate: new Date('2024-01-09'), - component: Holiday2023 - }, - { - id: 'jan-2024', - startDate: new Date('2024-01-10'), + id: 'promo-2024', + startDate: new Date('2024-08-01'), endDate: new Date('2024-12-31'), - component: Jan2024 + component: August2024 } ]; diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 18cb32c1..d2b0cd08 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -2,7 +2,22 @@ module.exports = { plugins: [require('daisyui')], content: ['./src/**/*.{html,js,svelte,ts}'], theme: { - extend: {} + extend: { + keyframes: { + fadeIn: { + '0%': { opacity: '0' }, + '100%': { opacity: '1' } + }, + fadeOut: { + '0%': { opacity: '1' }, + '100%': { opacity: '0' } + } + }, + animation: { + fadeIn: 'fadeIn 1s ease-in', + fadeOut: 'fadeOut 1s ease-in' + } + } }, variants: { extend: {}