Add ULLI weather easter egg to falling background particles
This commit is contained in:
1 parent
955f47ccd6
commit
98182c179f
11 files changed
+399
-21
No files matched your search
+2
-13
@@ -9,18 +9,6 @@
|
||||
:root { color-scheme: light; font-family: "Trebuchet MS", ui-sans-serif, sans-serif; --ink:#2d2924; --muted:#675c50; --paper:#fffdf7; --ground:#f5efe3; --line:#ded3c2; --accent:#b56824; --gold:#d89a28; --leaf:#c96f25; --focus:#a9541d; --error:#8e3630; }
|
||||
* { box-sizing: border-box; } html, body { max-width: 100%; } body { margin: 0; background: var(--ground); color: var(--ink); }
|
||||
body::before { content:""; position:fixed; inset:0; pointer-events:none; z-index:-1; opacity:.42; background: radial-gradient(circle at 12% 8%, #fff8e7 0 0.7rem, transparent 13rem), radial-gradient(circle at 88% 24%, #ead8bd 0 0.45rem, transparent 15rem); }
|
||||
.leaf-field { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
|
||||
.leaf { position:absolute; top:-3rem; width:1.1rem; height:1.65rem; border-radius:100% 0 100% 0; background:var(--leaf); box-shadow:inset .18rem -.12rem 0 #8e431d; opacity:.74; transform:rotate(35deg); animation:leaf-fall 15s linear infinite; }
|
||||
.leaf:nth-child(2n) { background:#e0a02f; width:.82rem; height:1.3rem; animation-duration:19s; }
|
||||
.leaf:nth-child(3n) { background:#a84e22; width:1.35rem; height:1.85rem; animation-duration:22s; }
|
||||
.leaf:nth-child(1) { left:7%; animation-delay:-4s; }
|
||||
.leaf:nth-child(2) { left:18%; animation-delay:-12s; }
|
||||
.leaf:nth-child(3) { left:32%; animation-delay:-7s; }
|
||||
.leaf:nth-child(4) { left:49%; animation-delay:-16s; }
|
||||
.leaf:nth-child(5) { left:64%; animation-delay:-2s; }
|
||||
.leaf:nth-child(6) { left:78%; animation-delay:-10s; }
|
||||
.leaf:nth-child(7) { left:91%; animation-delay:-18s; }
|
||||
@keyframes leaf-fall { 0% { transform:translate3d(0,-4rem,0) rotate(20deg); } 45% { transform:translate3d(3.5rem,48vh,0) rotate(170deg); } 100% { transform:translate3d(-4rem,112vh,0) rotate(330deg); } }
|
||||
main { position:relative; z-index:1; width: min(1060px, calc(100% - 32px)); margin: 48px auto 72px; }
|
||||
h1 { margin: 0 0 6px; font: 500 clamp(2.25rem, 5vw, 4rem)/1 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
|
||||
h2 { font: 500 1.55rem/1.15 Georgia, "Times New Roman", serif; } .muted { color: var(--muted); line-height: 1.55; }
|
||||
@@ -96,8 +84,9 @@
|
||||
input, select, textarea { font-size: 16px; }
|
||||
.site-footer { margin-top: 32px; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) { .leaf { animation: none; top: 8vh; opacity: .18; } }
|
||||
</style>
|
||||
<link rel="stylesheet" href="/api/weather/effect.css">
|
||||
<script src="/api/weather/effect.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="leaf-field" aria-hidden="true"><span class="leaf"></span><span class="leaf"></span><span class="leaf"></span><span class="leaf"></span><span class="leaf"></span><span class="leaf"></span><span class="leaf"></span></div>
|
||||
|
||||
Reference in new issue
Block a user