diff --git a/public/sticky-holidays/day1.png b/public/sticky-holidays/day1.png new file mode 100644 index 00000000..a249d14c Binary files /dev/null and b/public/sticky-holidays/day1.png differ diff --git a/src/app/harbor/signpost/signpost.tsx b/src/app/harbor/signpost/signpost.tsx index 9f946816..c9f1cd99 100644 --- a/src/app/harbor/signpost/signpost.tsx +++ b/src/app/harbor/signpost/signpost.tsx @@ -6,6 +6,7 @@ import { motion } from 'framer-motion' import Verification from './verification' import Platforms from '@/app/utils/wakatime-setup/platforms' import JaggedCard from '../../../components/jagged-card' +import JaggedCardSmall from '@/components/jagged-card-small' import Cookies from 'js-cookie' import FeedItems from './feed-items' import { getWakaSessions } from '@/app/utils/waka' @@ -41,6 +42,7 @@ export default function Signpost() { const [wakaSessions, setWakaSessions] = useState<{ key: string; total: number }[]>() + const [unlockString, setUnlockString] = useState('00:00:00') useEffect(() => { getWakaSessions().then((s) => { @@ -49,6 +51,23 @@ export default function Signpost() { hasHb = true } }) + + setInterval(() => { + const now = new Date() + const tomorrow = new Date( + now.getFullYear(), + now.getMonth(), + now.getDate() + 1, + ) + const diff = tomorrow - now + const hours = Math.floor(diff / 3600000) + const minutes = Math.floor((diff % 3600000) / 60000) + const seconds = Math.floor((diff % 60000) / 1000) + + setUnlockString( + `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`, + ) + }, 1_000) }, []) const wakaDuration = wakaSessions?.reduce((a, p) => (a += p.total), 0) @@ -135,6 +154,35 @@ export default function Signpost() { )} + + sticky holidays banner +

+ Confused? Click to see the #announcements post ^^ +

+
+ +
+
+ +

Day 1

+

Unlocks in {unlockString}

+
+ +
+
+
+
+