From 82b6fd55fd5aec53455f8bc631b9d7be21d81ff2 Mon Sep 17 00:00:00 2001 From: eti Date: Thu, 7 May 2026 13:33:02 +0200 Subject: [PATCH] appview: add reusable btn-group component aligned with design system ver Active items use @apply btn so border, shadow, and color tokens stay in sync with the base component automatically. Signed-off-by: eti --- .../templates/fragments/tabSelector.html | 8 +- .../pages/templates/repo/fragments/diff.html | 2 +- .../templates/repo/fragments/diffOpts.html | 10 +- .../repo/pulls/fragments/pullStepDetails.html | 13 +- .../repo/pulls/fragments/pullStepReview.html | 4 +- .../templates/user/settings/profile.html | 4 +- input.css | 2009 +++++++++-------- 7 files changed, 1109 insertions(+), 941 deletions(-) diff --git a/appview/pages/templates/fragments/tabSelector.html b/appview/pages/templates/fragments/tabSelector.html index 889526ba..666ef02f 100644 --- a/appview/pages/templates/fragments/tabSelector.html +++ b/appview/pages/templates/fragments/tabSelector.html @@ -4,9 +4,7 @@ {{ $active := .Active }} {{ $include := .Include }} {{ $form := .Form }} -
- {{ $activeTab := "bg-white dark:bg-gray-700 shadow-sm" }} - {{ $inactiveTab := "bg-gray-100 dark:bg-gray-800 shadow-inner" }} +
{{ range $index, $value := $all }} {{ $isActive := eq $value.Key $active }} {{ if $form }} @@ -18,7 +16,7 @@ hx-push-url="true" hx-target="body" hx-on:htmx:config-request="if(!event.detail.parameters.q) delete event.detail.parameters.q" - class="p-2 whitespace-nowrap flex justify-center items-center gap-2 text-sm w-full hover:no-underline text-center {{ if $isActive }} {{$activeTab }} {{ else }} {{ $inactiveTab }} {{ end }}"> + class="btn-group-item {{ if $isActive }}active{{ end }}"> {{ if $value.Icon }} {{ i $value.Icon "size-4" }} {{ end }} @@ -38,7 +36,7 @@ hx-target="body" hx-on:htmx:config-request="if(!event.detail.parameters.q) delete event.detail.parameters.q" {{ end }} - class="p-2 whitespace-nowrap flex justify-center items-center gap-2 text-sm w-full block hover:no-underline text-center {{ if $isActive }} {{$activeTab }} {{ else }} {{ $inactiveTab }} {{ end }}"> + class="btn-group-item {{ if $isActive }}active{{ end }}"> {{ if $value.Icon }} {{ i $value.Icon "size-4" }} {{ end }} diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html index 6ea77ac0..1ee4dcdc 100644 --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -231,7 +231,7 @@