diff --git a/src/_components/shared/nav/item.css b/src/_components/shared/nav/item.css index 926d62e5..2d958797 100644 --- a/src/_components/shared/nav/item.css +++ b/src/_components/shared/nav/item.css @@ -1,3 +1,7 @@ +nav-item.active { + text-decoration: underline; +} + nav-item :is(a, a:visited, a:focus) { border-radius: var(--border-radius-medium); color: var(--text-color); diff --git a/src/_components/shared/nav/item.erb b/src/_components/shared/nav/item.erb index 53458d8d..d5aeb58c 100644 --- a/src/_components/shared/nav/item.erb +++ b/src/_components/shared/nav/item.erb @@ -1,3 +1,3 @@ - + class="active"<% end %>> <%= @title %> diff --git a/src/_components/shared/nav/item.rb b/src/_components/shared/nav/item.rb index a5ab892b..d88733d4 100644 --- a/src/_components/shared/nav/item.rb +++ b/src/_components/shared/nav/item.rb @@ -1,5 +1,5 @@ class Shared::Nav::Item < Bridgetown::Component - def initialize(title:, link:) - @title, @link = title, link + def initialize(title:, link:, active: false) + @title, @link, @active = title, link, active end end diff --git a/src/_components/shared/navbar.erb b/src/_components/shared/navbar.erb index 03fff807..e1937b40 100644 --- a/src/_components/shared/navbar.erb +++ b/src/_components/shared/navbar.erb @@ -7,7 +7,7 @@