feat: add seasonal logo colors

This commit is contained in:
Xyphyn committed 2023-10-02 17:11:03 -07:00
1 parent 37ff0e9603
commit abd50ab16c
2 files changed
+30 -22

No files matched your search

+29 -16
View File
@@ -1,5 +1,13 @@
<script lang="ts"> <script lang="ts">
export let width = 48 export let width = 48
const monthColors: {
[x: number]: string
} = {
9: '--hover-color-1: #ff3f00; --hover-color-2: #7b2cbf;',
}
const getMonthColor = () => monthColors[new Date().getMonth()]
</script> </script>
<svg <svg
@@ -9,6 +17,7 @@
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
class="inline" class="inline"
style={getMonthColor()}
> >
<linearGradient <linearGradient
gradientTransform="rotate(315, 0.5, 0.5)" gradientTransform="rotate(315, 0.5, 0.5)"
@@ -18,8 +27,8 @@
y2="100%" y2="100%"
id="gradient" id="gradient"
> >
<stop stop-color="black" stop-opacity="1" offset="0%" /> <stop stop-color="var(--color-1)" stop-opacity="1" offset="0%" />
<stop stop-color="black" stop-opacity="1" offset="100%" /> <stop stop-color="var(--color-2)" stop-opacity="1" offset="100%" />
</linearGradient> </linearGradient>
<path <path
id="hexagon" id="hexagon"
@@ -29,20 +38,24 @@
</svg> </svg>
<style> <style>
svg {
--color-1: black;
--color-2: black;
--hover-color-1: #7f27c7;
--hover-color-2: #f30386;
}
:global(.dark) svg {
--color-1: white;
--color-2: white;
}
:global(.logo:hover) svg {
--color-1: var(--hover-color-1);
--color-2: var(--hover-color-2);
}
stop { stop {
transition: stop-color 200ms; transition: stop-color 200ms ease-out;
stop-color: black;
}
:global(.dark) stop {
stop-color: white;
}
:global(.logo:hover) svg stop:first-child {
stop-color: #7f27c7;
}
:global(.logo:hover) svg stop:last-child {
stop-color: #f30386;
} }
</style> </style>
+1 -6
View File
@@ -87,12 +87,7 @@
<Logo width={40} /> <Logo width={40} />
<div class="flex flex-row items-center gap-2 max-[1000px]:hidden"> <div class="flex flex-row items-center gap-2 max-[1000px]:hidden">
<span class="opacity-30 text-xl">/</span> <span class="opacity-30 text-xl">/</span>
<span <span class="text-sm font-bold grid place-items-start">
class="text-sm font-bold group-hover:bg-gradient-to-r
group-hover:text-transparent group-hover:bg-clip-text
group-hover:from-violet-500 group-hover:to-pink-600 transition-colors
grid place-items-start"
>
{#key title || $instance} {#key title || $instance}
<span <span
in:fly={{ y: -12 }} in:fly={{ y: -12 }}