styles
This commit is contained in:
parent
815ef5c23f
commit
e35f46003b
8 changed files with 97 additions and 27 deletions
3
Makefile
3
Makefile
|
@ -6,7 +6,8 @@ MEDIA = \
|
||||||
$(wildcard media/flags/*) $(wildcard media/buttons/*) \
|
$(wildcard media/flags/*) $(wildcard media/buttons/*) \
|
||||||
$(wildcard media/icons/*) $(wildcard media/bg/*) 8831.png 8831-quox.png \
|
$(wildcard media/icons/*) $(wildcard media/bg/*) 8831.png 8831-quox.png \
|
||||||
$(wildcard rainbow-quox/front/*) $(wildcard rainbow-quox/back/*) \
|
$(wildcard rainbow-quox/front/*) $(wildcard rainbow-quox/back/*) \
|
||||||
rainbow-quox/palette.svg
|
rainbow-quox/palette.svg rainbow-quox/bright-squares.png \
|
||||||
|
rainbow-quox/back.svg
|
||||||
SCRIPTS = $(patsubst %.ts,%.js,$(wildcard script/*.ts rainbow-quox/*.ts))
|
SCRIPTS = $(patsubst %.ts,%.js,$(wildcard script/*.ts rainbow-quox/*.ts))
|
||||||
MISC = $(shell find .well-known -type f)
|
MISC = $(shell find .well-known -type f)
|
||||||
ALL = $(CSS) $(PAGES) $(MEDIA) $(SCRIPTS) $(MISC)
|
ALL = $(CSS) $(PAGES) $(MEDIA) $(SCRIPTS) $(MISC)
|
||||||
|
|
25
fonts/pragmatapro/pragmatapro.css
Normal file
25
fonts/pragmatapro/pragmatapro.css
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: PrgmataPro;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(r.woff2) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: PrgmataPro;
|
||||||
|
font-weight: 500;
|
||||||
|
src: url(b.woff2) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: PrgmataPro;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: italic;
|
||||||
|
src: url(i.woff2) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: PrgmataPro;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: italic;
|
||||||
|
src: url(bi.woff2) format('woff2');
|
||||||
|
}
|
7
rainbow-quox/back.svg
Normal file
7
rainbow-quox/back.svg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="70" height="70" viewBox="0 15 70 85">
|
||||||
|
<path stroke="white" stroke-width="10" fill="transparent"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
d="M 35,20 L 5,50 L 35,80 M 5,50 H 65" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 295 B |
BIN
rainbow-quox/bright-squares.png
(Stored with Git LFS)
Normal file
BIN
rainbow-quox/bright-squares.png
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -144,6 +144,7 @@ function message(msg: string, ctx: CanvasRenderingContext2D) {
|
||||||
|
|
||||||
function startAnim(name: string) {
|
function startAnim(name: string) {
|
||||||
document.documentElement.dataset.running = name;
|
document.documentElement.dataset.running = name;
|
||||||
|
document.getElementById('buttons')?.style.removeProperty('z-index');
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRunning(): boolean {
|
function isRunning(): boolean {
|
||||||
|
@ -152,6 +153,7 @@ function isRunning(): boolean {
|
||||||
|
|
||||||
function finishAnim() {
|
function finishAnim() {
|
||||||
delete document.documentElement.dataset.running;
|
delete document.documentElement.dataset.running;
|
||||||
|
document.getElementById('buttons')?.style.setProperty('z-index', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
type SideName = 'front' | 'back';
|
type SideName = 'front' | 'back';
|
||||||
|
@ -238,7 +240,7 @@ async function animateReroll(ctx1: CanvasRenderingContext2D,
|
||||||
side: Side, done: () => void) {
|
side: Side, done: () => void) {
|
||||||
const duration = 200;
|
const duration = 200;
|
||||||
const [oklch, rgb] = await side.recolorOn(ctx2, buf);
|
const [oklch, rgb] = await side.recolorOn(ctx2, buf);
|
||||||
ctx2.canvas.style.animation = `${duration}ms ease fade-in`;
|
ctx2.canvas.style.animation = `${duration}ms ease forwards fade-in`;
|
||||||
setBg(oklch.outer.h);
|
setBg(oklch.outer.h);
|
||||||
setPalette(oklch, rgb);
|
setPalette(oklch, rgb);
|
||||||
setTimeout(finish, duration);
|
setTimeout(finish, duration);
|
||||||
|
@ -310,6 +312,8 @@ document.addEventListener('DOMContentLoaded', async function() {
|
||||||
|
|
||||||
addListeners();
|
addListeners();
|
||||||
|
|
||||||
|
document.documentElement.dataset.ready = '1';
|
||||||
|
|
||||||
type Done = (finish: () => void) => void;
|
type Done = (finish: () => void) => void;
|
||||||
|
|
||||||
function handleReroll(e: Event) {
|
function handleReroll(e: Event) {
|
||||||
|
|
|
@ -30,5 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav id=back>
|
<nav id=back>
|
||||||
<a href=/>back</a>
|
<a href=/>
|
||||||
|
<img src=back.svg>
|
||||||
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -10,8 +10,12 @@ my $doc = q:to/EOP/;
|
||||||
|
|
||||||
<style><![CDATA[
|
<style><![CDATA[
|
||||||
@import url(../fonts/muller/muller.css);
|
@import url(../fonts/muller/muller.css);
|
||||||
|
@import url(../fonts/pragmatapro/pragmatapro.css);
|
||||||
|
|
||||||
:root { --hue: 300; }
|
:root {
|
||||||
|
--hue: 300;
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
|
|
||||||
rect, .textbg {
|
rect, .textbg {
|
||||||
filter: drop-shadow(6px 6px 2px oklch(0.4 0.2 var(--hue) / 0.45));
|
filter: drop-shadow(6px 6px 2px oklch(0.4 0.2 var(--hue) / 0.45));
|
||||||
|
@ -19,6 +23,10 @@ my $doc = q:to/EOP/;
|
||||||
fill: lightgray;
|
fill: lightgray;
|
||||||
stroke: black;
|
stroke: black;
|
||||||
stroke-width: 1;
|
stroke-width: 1;
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
filter: drop-shadow(6px 6px 2px oklch(0.1 0.15 var(--hue) / 0.45));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
|
@ -47,8 +55,8 @@ sub make-item($layer, :$display = $layer, :$use-vit?, :$vit?) { ... }
|
||||||
make-item 'outer', upper => 'vitiligo1';
|
make-item 'outer', upper => 'vitiligo1';
|
||||||
make-item 'spines', use => 'vitiligo1';
|
make-item 'spines', use => 'vitiligo1';
|
||||||
make-item 'stripes', upper => 'cuffs', display => 'socks';
|
make-item 'stripes', upper => 'cuffs', display => 'socks';
|
||||||
make-item 'belly1', upper => 'vitiligo2';
|
make-item 'belly1', upper => 'vitiligo3';
|
||||||
make-item 'belly2', upper => 'vitiligo3';
|
make-item 'belly2', upper => 'vitiligo2';
|
||||||
make-item 'fins1', upper => 'vitiligo4';
|
make-item 'fins1', upper => 'vitiligo4';
|
||||||
make-item 'fins2', use => 'vitiligo4';
|
make-item 'fins2', use => 'vitiligo4';
|
||||||
make-item 'fins3', use => 'vitiligo4';
|
make-item 'fins3', use => 'vitiligo4';
|
||||||
|
|
|
@ -30,30 +30,48 @@
|
||||||
to { opacity: 1 }
|
to { opacity: 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root, body {
|
||||||
|
min-height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--hue: 300;
|
--hue: 300;
|
||||||
--c-hue: calc(180 + var(--hue));
|
--c-hue: calc(180 + var(--hue));
|
||||||
min-height: 100vh;
|
|
||||||
align-items: center; justify-content: center;
|
align-items: center; justify-content: center;
|
||||||
|
|
||||||
--font: Muller, sans-serif;
|
--font: Muller, sans-serif;
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
|
|
||||||
|
--shadow-color: 6px 6px 2px oklch(0.4 0.2 var(--hue) / 0.45);
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
--shadow-color: 6px 6px 2px oklch(0.1 0.15 var(--hue) / 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
color-scheme: light dark;
|
color-scheme: light dark;
|
||||||
background: oklch(0.9 0.08 var(--hue));
|
background:
|
||||||
transition: background 0.4s ease;
|
url(bright-squares.png),
|
||||||
|
linear-gradient(to bottom in oklch,
|
||||||
|
oklch(0.9 0.08 var(--hue)),
|
||||||
|
oklch(0.7 0.10 var(--hue)));
|
||||||
|
background-blend-mode: screen;
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
background:
|
||||||
|
url(bright-squares.png),
|
||||||
|
linear-gradient(to bottom in oklch,
|
||||||
|
oklch(0.3 0.08 var(--hue)),
|
||||||
|
oklch(0.2 0.09 var(--hue)));
|
||||||
|
}
|
||||||
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root { background: oklch(0.3 0.12 var(--hue)); }
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pic-holder, #pic, #pic2 {
|
#pic-holder, #pic, #pic2 {
|
||||||
|
@ -69,13 +87,16 @@ body {
|
||||||
#pic2 {
|
#pic2 {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttons {
|
#buttons {
|
||||||
flex: none;
|
flex: none;
|
||||||
display: flex; gap: 20px;
|
display: flex;
|
||||||
max-width: 40em;
|
margin: 0 2rem 2.5rem;
|
||||||
margin: 1.5rem auto 2.5rem;
|
align-items: start;
|
||||||
|
z-index: 1;
|
||||||
|
translate: -2em -6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
@ -85,26 +106,25 @@ button {
|
||||||
background: oklch(0.5 0.2 var(--bg));
|
background: oklch(0.5 0.2 var(--bg));
|
||||||
color: oklch(0.95 0.075 var(--fg));
|
color: oklch(0.95 0.075 var(--fg));
|
||||||
border: 3px solid oklch(0.2 0.05 var(--bg));
|
border: 3px solid oklch(0.2 0.05 var(--bg));
|
||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 4em 0.2em 0.5em;
|
||||||
box-shadow: 6px 6px 2px oklch(0.4 0.2 var(--bg) / 0.45);
|
transform-origin: center right;
|
||||||
transition:
|
box-shadow: var(--shadow-color);
|
||||||
color 0.4s ease,
|
transition: all 0.4s ease;
|
||||||
background 0.4s ease,
|
|
||||||
border 0.4s ease,
|
[data-ready] & { transform: rotate(-60deg); }
|
||||||
translate 0.015s linear,
|
|
||||||
box-shadow 0.015s linear;
|
|
||||||
|
|
||||||
:root:not([data-running]) &:active,
|
:root:not([data-running]) &:active,
|
||||||
[data-running=swap] &#swap,
|
[data-running=swap] &#swap,
|
||||||
[data-running=reroll] &#reroll {
|
[data-running=reroll] &#reroll {
|
||||||
translate: 6px 6px;
|
transform: rotate(-60deg) translate(-1em);
|
||||||
box-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ button { margin-left: -6.5em; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#back {
|
#back {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 15px; left: 22px;
|
top: 22px; left: 22px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: oklch(0.4 0.15 var(--c-hue));
|
color: oklch(0.4 0.15 var(--c-hue));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue