Style navigation a bit
This commit is contained in:
parent
32557190bd
commit
fbcea15e35
3 changed files with 29 additions and 4 deletions
|
@ -21,6 +21,29 @@ h4 {
|
||||||
padding: 6rem 4rem;
|
padding: 6rem 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-link {
|
||||||
|
word-break: keep-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: black;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 1rem 0.5rem;
|
||||||
|
line-height: 2.125rem;
|
||||||
|
text-underline-offset: 0.25rem;
|
||||||
|
text-decoration-line: none;
|
||||||
|
text-decoration-thickness: 0.125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-link-active {
|
||||||
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.title-card-grid {
|
.title-card-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
|
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
|
||||||
allow_browser versions: :modern
|
# allow_browser versions: :modern
|
||||||
|
|
||||||
before_action :require_authorization
|
before_action :require_authorization
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<% content_for(:header) do %>
|
<% content_for(:header) do %>
|
||||||
<% @sections.each do |section| %>
|
<div class="section-links">
|
||||||
<%= link_to section.title, section_url(section) %>
|
<% @sections.each do |section| %>
|
||||||
<% end %>
|
<%= link_to section.title, section_url(section), html_options = { class: { "section-link": true, "section-link-active": current_page?(section_url(section)) } } %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<h4><%= @section.title %></h4>
|
<h4><%= @section.title %></h4>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue