From 8308151500cbbb6bbf2466107231cf2fb1d7d54f Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 26 Jun 2025 14:54:27 -0500 Subject: [PATCH] Use header component everywhere --- .../stylesheets/{nav.css => header.css} | 11 +++++++++- app/views/accounts/settings/show.html.erb | 20 ++++++++++--------- app/views/cards/index/_header.html.erb | 2 +- app/views/collections/edit.html.erb | 12 +++++------ app/views/collections/new.html.erb | 7 +++++-- app/views/events/index.html.erb | 4 ++-- app/views/notifications/index.html.erb | 16 +++++++++------ .../notifications/settings/show.html.erb | 10 ++++++---- app/views/searches/show.html.erb | 12 +++++------ app/views/users/edit.html.erb | 7 +++++-- app/views/users/new.html.erb | 11 ++++++---- app/views/users/show.html.erb | 18 ++++++++++------- app/views/workflows/index.html.erb | 20 ++++++++++--------- app/views/workflows/new.html.erb | 12 +++++++---- 14 files changed, 99 insertions(+), 63 deletions(-) rename app/assets/stylesheets/{nav.css => header.css} (82%) diff --git a/app/assets/stylesheets/nav.css b/app/assets/stylesheets/header.css similarity index 82% rename from app/assets/stylesheets/nav.css rename to app/assets/stylesheets/header.css index f73f42fdb..bcbb90662 100644 --- a/app/assets/stylesheets/nav.css +++ b/app/assets/stylesheets/header.css @@ -14,6 +14,14 @@ &:has(.header__actions > *:nth-child(1)) { --header-button-count: 1; } &:has(.header__actions > *:nth-child(2)) { --header-button-count: 2; } &:has(.header__actions > *:nth-child(3)) { --header-button-count: 3; } + + &:not(:has(.header__title)) { + grid-template-columns: repeat(2, 1fr); + } + + &:not(:has(.header__actions)) { + grid-template-columns: 1fr; + } } .header__actions { @@ -28,6 +36,7 @@ .header__title { font-size: var(--text-large); font-weight: 900; - margin: 0; + margin: 0 auto; + text-align: center; } } diff --git a/app/views/accounts/settings/show.html.erb b/app/views/accounts/settings/show.html.erb index 7df94999c..9614946e0 100644 --- a/app/views/accounts/settings/show.html.erb +++ b/app/views/accounts/settings/show.html.erb @@ -1,17 +1,19 @@ <% @page_title = "Account Settings" %> <% content_for :header do %> -