From 70e35b8bd7a7c5af580800075926523e3bf58fd8 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 26 May 2025 21:28:46 +0100 Subject: [PATCH] list: fix activities sort, css improvements fixed activities sorting. less oddities from me not knowing how to use flex boxes. Also kinda standardised a button-inside-input thing, so added a .gap- > .inside-input selector which works on gap-1 and gap-2. --- css/base.css | 16 ++++++++ html/admin.html | 84 +++++++++++++++++++++--------------------- ts/crash.ts | 1 - ts/modules/accounts.ts | 45 ++++++++++++++-------- ts/modules/activity.ts | 14 +++++-- ts/modules/list.ts | 2 +- ts/modules/login.ts | 2 +- ts/modules/search.ts | 25 +++++++++---- ts/user.ts | 2 +- 9 files changed, 119 insertions(+), 72 deletions(-) diff --git a/css/base.css b/css/base.css index d9b53e6..2c084c2 100644 --- a/css/base.css +++ b/css/base.css @@ -470,3 +470,19 @@ section.section:not(.\~neutral) { } } +:root { + /* seems to be the sweet spot */ + --inside-input-base: -2.6rem; + + /* thought --spacing would do the trick but apparently not */ + --tailwind-spacing: 0.25rem; +} + +/* places buttons inside a sibling input element (hopefully), based on the flex gap of the parent. */ +.gap-1 > .button.inside-input { + margin-left: calc(var(--inside-input-base) - 1.0*var(--tailwind-spacing)); +} + +.gap-2 > .button.inside-input { + margin-left: calc(var(--inside-input-base) - 2.0*var(--tailwind-spacing)); +} diff --git a/html/admin.html b/html/admin.html index 23e70e9..b2dda34 100644 --- a/html/admin.html +++ b/html/admin.html @@ -715,7 +715,7 @@
-
+