added gitea activity for fun
This commit is contained in:
@@ -151,6 +151,19 @@ function initialiseGeolocation() {
|
||||
document.addEventListener('DOMContentLoaded', initialiseGeolocation);
|
||||
htmx.on('htmx:afterSwap', initialiseGeolocation);
|
||||
|
||||
function initialiseNtfyForm() {
|
||||
document.querySelectorAll('[data-ntfy-form]').forEach((form) => {
|
||||
if (form.dataset.ready) return;
|
||||
form.dataset.ready = 'true';
|
||||
form.querySelector('[name="ntfy_url"]')?.addEventListener('input', () => {
|
||||
form.querySelector('#ntfy-test-result')?.replaceChildren();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialiseNtfyForm);
|
||||
htmx.on('htmx:afterSwap', initialiseNtfyForm);
|
||||
|
||||
|
||||
function initialiseCategoryPickers() {
|
||||
document.querySelectorAll("[data-category-picker]").forEach((picker) => {
|
||||
|
||||
@@ -385,8 +385,12 @@ body[data-theme="dark"] .brushing-control__mark { color: #9adab0; }
|
||||
body[data-theme="dark"] .checkin-form--bowel .field textarea { border-color: #536159; color: #edf5ef; background: #161d19; }
|
||||
.checkin-calendar__exports { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
|
||||
.checkin-calendar__exports .button:focus-visible { outline: 2px solid $forest; outline-offset: 2px; }
|
||||
.health-layout { max-width: 920px; margin: 0 auto; }
|
||||
.health-layout { display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:24px; max-width:1180px; margin:0 auto; align-items:start; }
|
||||
.health-layout__main { min-width:0; }
|
||||
.health-layout__sidebar { position:sticky; top:96px; display:grid; gap:16px; }
|
||||
.health-layout__sidebar .hydration-widget { margin-bottom:0; }
|
||||
.health-layout .checkin-panel { margin-top: 24px; }
|
||||
@media (max-width:820px) { .health-layout { grid-template-columns:1fr; }.health-layout__sidebar { position:static; } }
|
||||
.mobile-weather-slot { display: none; }
|
||||
@media (max-width: 820px) {
|
||||
.mobile-weather-slot { display: block; }
|
||||
@@ -420,3 +424,102 @@ body[data-theme="dark"] .checkin-form--bowel .field textarea { border-color: #53
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.js-nav-ready .primary-nav { transition: none; }
|
||||
}
|
||||
|
||||
.hydration-widget { margin-bottom:16px; padding:18px; border:1px solid #557261; border-radius:18px; background:#242d27; color:#edf5ef; box-shadow:0 0 20px rgba(71,119,82,.12); }
|
||||
.hydration-widget .eyebrow { margin:0; color:#acc5af; }
|
||||
.hydration-widget h2 { margin:0 0 8px; font-size:1.35rem; color:#f6f4e9; }
|
||||
.hydration-widget__main { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
|
||||
.hydration-widget__stats { flex:1; min-width:0; }
|
||||
.hydration-widget__stats p { margin:0 0 8px; font-size:.78rem; color:#b8cbbd; }
|
||||
.hydration-widget__total { font-size:1.38rem !important; font-weight:700; color:#fff !important; white-space:nowrap; }
|
||||
.hydration-widget__total span { font-size:.8rem; color:#b8cbbd; }
|
||||
.hydration-widget__track { height:8px; overflow:hidden; border-radius:10px; background:#45554a; }
|
||||
.hydration-widget__track span { display:block; height:100%; border-radius:10px; background:#dcae61; transition:width .35s ease; }
|
||||
.hydration-bottle { flex:none; max-width:42%; --bottle-stroke:#8da99a; --bottle-fill:#dcae61; --bottle-shell:#253c34; --bottle-cap:#597468; }
|
||||
.hydration-bottle__water { transition:transform .35s ease; }
|
||||
.hydration-widget__actions { display:flex; align-items:flex-start; flex-wrap:wrap; gap:6px; margin-top:7px; }
|
||||
.hydration-widget__actions form { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
|
||||
.hydration-widget__actions button, .hydration-widget__other summary { display:inline-block; padding:7px 9px; border:1px solid #6f795d; border-radius:8px; background:#39463b; color:#f9edce; font-size:.76rem; font-weight:700; cursor:pointer; }
|
||||
.hydration-widget__other summary { list-style:none; }
|
||||
.hydration-widget__other summary::-webkit-details-marker { display:none; }
|
||||
.hydration-widget__other[open] { width:100%; }
|
||||
.hydration-widget__other form { align-items:center; margin-top:8px; }
|
||||
.hydration-widget__other label { font-size:.75rem; }
|
||||
.hydration-widget__other input { width:88px; padding:6px; border:1px solid #738678; border-radius:7px; background:#17231c; color:#fff; }
|
||||
.hydration-widget__info { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:12px 0; font-size:.73rem; color:#b8cbbd; }
|
||||
.hydration-widget__info button { padding:0; border:0; background:none; color:#efc27d; text-decoration:underline; font-size:.73rem; }
|
||||
.hydration-widget__error { color:#ffd1bd; font-size:.78rem; }
|
||||
.hydration-widget__week { border-top:1px solid #40574a; padding-top:10px; }
|
||||
.hydration-widget__week p { margin:0 0 7px; color:#b8cbbd; font-size:.72rem; }
|
||||
.hydration-widget__days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
|
||||
.hydration-widget__day { display:grid; place-items:center; min-height:27px; border-radius:6px; font-size:.7rem; font-weight:700; }
|
||||
.hydration-widget__day--none { color:#ffc7bc; background:#633d3a; }
|
||||
.hydration-widget__day--partial { color:#fff0cf; background:#805e31; }
|
||||
.hydration-widget__day--goal { color:#e1ffe6; background:#326c48; }
|
||||
.hydration-widget__day--today { outline:1px solid #e8d9a7; outline-offset:2px; }
|
||||
.hydration-widget button:focus-visible, .hydration-widget summary:focus-visible, .hydration-widget input:focus-visible { outline:2px solid #efc27d; outline-offset:2px; }
|
||||
@media (prefers-reduced-motion:reduce) { .hydration-widget__track span, .hydration-bottle__water { transition:none; } }
|
||||
|
||||
body[data-theme="light"] .hydration-widget { border-color:#cbded0; background:#f7faf5; color:#253a2d; box-shadow:0 12px 30px rgba(36,89,55,.08); }
|
||||
body[data-theme="light"] .hydration-widget .eyebrow { color:#437053; }
|
||||
body[data-theme="light"] .hydration-widget h2 { color:#213a2b; }
|
||||
body[data-theme="light"] .hydration-widget__stats p, body[data-theme="light"] .hydration-widget__total span, body[data-theme="light"] .hydration-widget__info, body[data-theme="light"] .hydration-widget__week p { color:#526758; }
|
||||
body[data-theme="light"] .hydration-widget__total { color:#213a2b !important; }
|
||||
body[data-theme="light"] .hydration-widget__track { background:#dce8dc; }
|
||||
body[data-theme="light"] .hydration-widget__track span { background:#b9802c; }
|
||||
body[data-theme="light"] .hydration-bottle { --bottle-stroke:#557964; --bottle-fill:#d5a24f; --bottle-shell:#e8f1e9; --bottle-cap:#a7c3ad; }
|
||||
body[data-theme="light"] .hydration-widget__actions button, body[data-theme="light"] .hydration-widget__other summary { border-color:#abc5af; background:#e3f0e4; color:#24543a; }
|
||||
body[data-theme="light"] .hydration-widget__other input { border-color:#abc5af; background:#fff; color:#213a2b; }
|
||||
body[data-theme="light"] .hydration-widget__info button { color:#875819; }
|
||||
body[data-theme="light"] .hydration-widget__error { color:#a33d2e; }
|
||||
body[data-theme="light"] .hydration-widget__week { border-color:#d2e2d4; }
|
||||
body[data-theme="light"] .hydration-widget__day--none { color:#783b34; background:#f2d9d5; }
|
||||
body[data-theme="light"] .hydration-widget__day--partial { color:#704915; background:#f4e1b9; }
|
||||
body[data-theme="light"] .hydration-widget__day--goal { color:#245537; background:#d2ead7; }
|
||||
body[data-theme="light"] .hydration-widget__day--today { outline-color:#537c60; }
|
||||
body[data-theme="light"] .hydration-widget button:focus-visible, body[data-theme="light"] .hydration-widget summary:focus-visible, body[data-theme="light"] .hydration-widget input:focus-visible { outline-color:#376e49; }
|
||||
.ntfy-check { display: flex; align-items: center; gap: .6rem; }
|
||||
.ntfy-check label { margin: 0; }
|
||||
#ntfy-url { width: 100%; box-sizing: border-box; min-height: 2.8rem; }
|
||||
.ntfy-result { margin: 0; padding: .75rem; border-radius: .55rem; }
|
||||
.ntfy-result--success { color: #14532d; background: #d1fae5; }
|
||||
.ntfy-result--error { color: #7f1d1d; background: #fee2e2; }
|
||||
|
||||
.gitea-activity {
|
||||
margin-top: 30px;
|
||||
padding: 25px 29px;
|
||||
border: 1px solid $line;
|
||||
border-radius: 20px;
|
||||
background: $surface;
|
||||
box-shadow: $shadow;
|
||||
}
|
||||
.gitea-activity__header { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
|
||||
.gitea-activity__header h2 { margin: 0; font-size: 1.7rem; }
|
||||
.gitea-activity__header .eyebrow { margin-bottom: 4px; }
|
||||
.gitea-activity__summary, .gitea-activity__message { margin: 8px 0 20px; color: $muted; font-size: .9rem; }
|
||||
.gitea-activity__summary strong { color: $forest; font-size: 1.1rem; }
|
||||
.gitea-activity__scroller { max-width: 100%; overflow-x: auto; padding-bottom: 8px; }
|
||||
.gitea-activity__chart { display: flex; gap: 3px; width: max-content; }
|
||||
.gitea-activity__week, .gitea-activity__day-labels { display: grid; grid-template-rows: 17px repeat(7, 10px); gap: 3px; }
|
||||
.gitea-activity__week { width: 10px; }
|
||||
.gitea-activity__day-labels { width: 27px; margin-right: 2px; color: $muted; font-size: .65rem; line-height: 10px; }
|
||||
.gitea-activity__month { height: 17px; white-space: nowrap; color: $muted; font-size: .69rem; line-height: 14px; }
|
||||
.gitea-activity__cell { display: block; width: 10px; height: 10px; border-radius: 2px; background: #e9eee9; }
|
||||
.gitea-activity__cell--1 { background: #b7dfc2; }
|
||||
.gitea-activity__cell--2 { background: #77bd8d; }
|
||||
.gitea-activity__cell--3 { background: #3f9564; }
|
||||
.gitea-activity__cell--4 { background: #1f6544; }
|
||||
.gitea-activity__cell--future { background: transparent; }
|
||||
.gitea-activity__legend { display: flex; align-items: center; justify-content: end; gap: 4px; margin-top: 12px; color: $muted; font-size: .7rem; }
|
||||
.gitea-activity__legend span:first-child { margin-right: 3px; }
|
||||
.gitea-activity__legend span:last-child { margin-left: 3px; }
|
||||
body[data-theme="dark"] .gitea-activity { border-color: #38443d; background: #202923; box-shadow: 0 18px 45px rgba(0, 0, 0, .22); }
|
||||
body[data-theme="dark"] .gitea-activity__summary,
|
||||
body[data-theme="dark"] .gitea-activity__message,
|
||||
body[data-theme="dark"] .gitea-activity__month,
|
||||
body[data-theme="dark"] .gitea-activity__day-labels,
|
||||
body[data-theme="dark"] .gitea-activity__legend { color: #b8c3bb; }
|
||||
body[data-theme="dark"] .gitea-activity__summary strong { color: #9bd5ae; }
|
||||
body[data-theme="dark"] .gitea-activity__cell--0 { background: #303a33; }
|
||||
body[data-theme="dark"] .gitea-activity__cell--future { background: transparent; }
|
||||
@media (max-width: 560px) { .gitea-activity { padding: 22px; }.gitea-activity__header { align-items: start; }.gitea-activity__header h2 { font-size: 1.45rem; } }
|
||||
|
||||
Reference in New Issue
Block a user