Skip to content

Commit d818da4

Browse files
committed
🎉 feat: gradient
1 parent cd6da8e commit d818da4

File tree

3 files changed

+961
-695
lines changed

3 files changed

+961
-695
lines changed

components/midori/hero.vue

Lines changed: 3 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,7 @@
33
id="splash"
44
class="pointer-events-none absolute top-[-70vh] max-w-full flex justify-center w-full h-screen opacity-50"
55
>
6-
<svg
7-
v-if="!isDark"
8-
class="filter blur-3xl"
9-
xmlns="http://www.w3.org/2000/svg"
10-
version="1.1"
11-
xmlns:xlink="http://www.w3.org/1999/xlink"
12-
xmlns:svgjs="http://svgjs.dev/svgjs"
13-
width="1100"
14-
height="1100"
15-
viewBox="0 0 1100 1100"
16-
>
17-
<defs>
18-
<radialGradient id="ffflux-gradient">
19-
<stop offset="0%" stop-color="hsl(236, 100%, 72%)"></stop>
20-
<stop offset="100%" stop-color="hsl(0, 0%, 100%)"></stop>
21-
</radialGradient>
22-
<filter
23-
id="ffflux-filter"
24-
x="-20%"
25-
y="-20%"
26-
width="140%"
27-
height="140%"
28-
filterUnits="objectBoundingBox"
29-
primitiveUnits="userSpaceOnUse"
30-
color-interpolation-filters="sRGB"
31-
>
32-
<feTurbulence
33-
type="fractalNoise"
34-
baseFrequency="0.005 0.003"
35-
numOctaves="1"
36-
seed="2"
37-
stitchTiles="stitch"
38-
x="0%"
39-
y="0%"
40-
width="100%"
41-
height="100%"
42-
result="turbulence"
43-
></feTurbulence>
44-
<feGaussianBlur
45-
stdDeviation="23 14"
46-
x="0%"
47-
y="0%"
48-
width="100%"
49-
height="100%"
50-
in="turbulence"
51-
edgeMode="duplicate"
52-
result="blur"
53-
></feGaussianBlur>
54-
<feBlend
55-
mode="color-dodge"
56-
x="0%"
57-
y="0%"
58-
width="100%"
59-
height="100%"
60-
in="SourceGraphic"
61-
in2="blur"
62-
result="blend"
63-
></feBlend>
64-
</filter>
65-
</defs>
66-
<rect
67-
width="1100"
68-
height="1100"
69-
fill="url(#ffflux-gradient)"
70-
filter="url(#ffflux-filter)"
71-
></rect>
72-
</svg>
73-
<div v-else class="block dark-light" />
6+
<div :class="(isDark ? 'block gradient -dark' : 'block gradient -light')" />
747
</div>
758
<header
769
class="relative flex flex-col justify-center items-center font-sans w-full px-6 pt-20 mb-16 md:mb-8 overflow-hidden"
@@ -154,7 +87,7 @@
15487
>, unified type system and outstanding developer experience
15588
</h3>
15689
<section
157-
class="flex flex-col sm:flex-row items-start gap-4 mt-10 mb-12"
90+
class="flex flex-col sm:flex-row items-start w-full md:w-auto gap-4 mt-10 mb-12"
15891
>
15992
<a
16093
class="text-white font-medium text-lg bg-blue-500 px-6 py-2.5 rounded-full"
@@ -193,7 +126,7 @@
193126
import { onMounted, ref } from 'vue'
194127
195128
const isDark = ref(false)
196-
129+
const safari =
197130
onMounted(() => {
198131
// @ts-ignore
199132
isDark.value = document.documentElement.classList.contains('dark')

components/midori/midori.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
.dark-light {
1+
.gradient {
22
width: 1100px;
33
height: 1100px;
4+
}
5+
6+
.gradient.-light {
7+
background: radial-gradient(ellipse at center, #d7e0ff 0%, #eaecff 35%, transparent 70%);
8+
}
9+
10+
.gradient.-dark {
411
background: radial-gradient(ellipse at center, #797ee199 0%, transparent 70%);
512
}

0 commit comments

Comments
 (0)