all repos — www @ 50df4dae3fccac8b3eb9f154fac676be9a6bc788

deserthorns.net content + generator

(do) fix timezone offset, (index) styling tweaks
sageclove
Sun, 05 Jan 2025 21:13:48 -0700
commit

50df4dae3fccac8b3eb9f154fac676be9a6bc788

parent

21c0adb90a362f03a033ed4efe841261a6378f2d

2 files changed, 30 insertions(+), 8 deletions(-)

jump to
M etc/do.htmletc/do.html

@@ -119,8 +119,10 @@ "play",

"study", "read" ]; - const now = Date.now(); - const index = Math.floor((now / 1000 / 60 / 60 / 24) % 10); + const now = new Date(); + const daysSinceEpoch = now / 1000 / 60 / 60 / 24; + const timezoneOffsetDays = now.getTimezoneOffset() / 60 / 24; + const index = Math.floor((daysSinceEpoch - timezoneOffsetDays) % 10); document.querySelector("#today > #action").innerText = rotation[index]; document.querySelector("#plus-1 > #action").innerText = rotation[(index + 1) % 10]; document.querySelector("#plus-2 > #action").innerText = rotation[(index + 2) % 10];
M index.htmlindex.html

@@ -15,13 +15,15 @@ }

body { -webkit-text-size-adjust: 100%; + margin: 0; } h1 { letter-spacing: 0.5rem; font-family: monospace; text-align: center; - color: var(--f_low); + color: var(--f_high); + margin: 0; } a {

@@ -40,21 +42,39 @@ padding-bottom: 1rem;

} hr { - border: 1px solid var(--b_med); + border: 2px solid var(--f_low); } .logo { display: block; - margin: 5rem auto; + margin: 0 auto; max-width: 15rem; + padding-top: 5rem; + padding-bottom: 5rem; + } + + .stripes { + height: 5rem; + background: linear-gradient( + to bottom, + var(--b_high) 25%, + var(--b_med) 25%, + var(--b_med) 50%, + var(--b_low) 50%, + var(--b_low) 75%, + var(--background) 75% + ); + border-bottom: 4px solid var(--f_low); } </style> </head> <body> - <img class="logo" src="/assets/svg/logo-block-mono.svg"> - <h1>deserthorns</h1> - <hr> + <div style="background: var(--b_high)"> + <img class="logo" src="/assets/svg/logo-block-mono.svg"> + <h1>deserthorns</h1> + </div> + <div class="stripes"></div> <ul> <li> <a href="/wiki">wiki</a>