diff --git a/app/assets/stylesheets/nav.css b/app/assets/stylesheets/nav.css new file mode 100644 index 000000000..f73f42fdb --- /dev/null +++ b/app/assets/stylesheets/nav.css @@ -0,0 +1,33 @@ +@layer components { + /* Centered title with space for two buttons on either side */ + .header { + --header-gap: 0.5rem; + --header-btn-size: 2.65em; + --header-button-count: 0; + --header-actions-width: calc((var(--header-btn-size) + var(--header-gap)) * var(--header-button-count)); + + display: grid; + grid-template-columns: var(--header-actions-width) 1fr var(--header-actions-width); + padding: var(--block-space-half) var(--inline-space); + + /* Change the grid size depending on how many buttons are present */ + &: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; } + } + + .header__actions { + display: flex; + gap: var(--header-gap); + } + + .header__actions--end { + justify-content: flex-end; + } + + .header__title { + font-size: var(--text-large); + font-weight: 900; + margin: 0; + } +} diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index 33a2d752e..c8ea07668 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -6,10 +6,26 @@ <%= render "cards/index/header", filter: @filter %> <% end %> -
- +
+
+ <%= link_to_home %> +
+ +

<%= filter_title @filter %> - +

+ +
+ <% if collection = @filter.single_collection %> + <%= access_involvement_advance_button collection, Current.user %> + + <%= link_to edit_collection_path(collection), class: "btn" do %> + <%= icon_tag "settings" %> + Settings for <%= collection.name %> + <% end %> + <% end %> +
+ <%= render "filters/settings", filter: @filter %>
diff --git a/app/views/cards/index/_header.html.erb b/app/views/cards/index/_header.html.erb index 7f4d0f08c..1376e3667 100644 --- a/app/views/cards/index/_header.html.erb +++ b/app/views/cards/index/_header.html.erb @@ -1,8 +1,4 @@