@@ -41,8 +41,9 @@ html data-theme="light"
4141 - if user_signed_in? && current_user.username.blank?
4242 .global-warning
4343 span Please set a username in Settings.
44+ - starred_active = controller_name == " topics" && action_name == " index" && params[:filter ].to_s == " starred_by_me"
4445 nav .main-navigation
45- .nav-container
46+ .nav-container data-controller = " nav-overflow " data-nav-overflow-target = " container "
4647 .nav-brand
4748 - if content_for?(:sidebar )
4849 button .nav-burger type =" button" aria-label =" Toggle sidebar" data-action =" click->sidebar#toggleMobile"
@@ -56,6 +57,13 @@ html data-theme="light"
5657 i .fa-solid .fa-caret-down
5758 .mobile-nav-menu data-action =" click->sidebar#closeMenuOnNavigate"
5859 = link_to " Topics" , topics_path, class : " nav-link"
60+ - if user_signed_in?
61+ - icon_class = starred_active ? " fa-solid fa-star" : " fa-regular fa-star"
62+ - link_classes = [" nav-link" ]
63+ - link_classes << " is-active" if starred_active
64+ = link_to topics_path(filter: " starred_by_me" ), class : link_classes.join(" " ), title: " Starred by me" , aria: { label: " Starred by me" } do
65+ i class =icon_class aria-hidden =" true"
66+ span .sr-only Starred
5967 = link_to " Search" , topics_path(anchor: " search" ), class : " nav-link"
6068 = link_to " Statistics" , stats_path, class : " nav-link"
6169 = link_to " Reports" , reports_path, class : " nav-link"
@@ -76,37 +84,47 @@ html data-theme="light"
7684 span .tagline PostgreSQL Hackers Archive
7785 - if user_signed_in?
7886 - unread = activity_unread_count
87+ - starred_href = starred_active ? topics_path : topics_path(filter: " starred_by_me" )
88+ - starred_title = starred_active ? " All topics" : " Starred by me"
89+ = link_to starred_href, class : " nav-link nav-mobile-star#{ ' is-active' if starred_active} " , title: starred_title, aria: { label: starred_title } do
90+ i class =(starred_active ? " fa-solid fa-star" : " fa-regular fa-star" ) aria-hidden =" true"
91+ span .sr-only Starred
7992 = link_to activities_path, class : " nav-link nav-link-activity nav-mobile-bell" , title: " Activity" do
8093 i .fa-regular .fa-bell
8194 - if unread.positive?
8295 span .nav-badge = unread
83- .nav-links
84- = link_to " Topics" , topics_path, class : " nav-link"
85- - search_link = content_for?(:search_sidebar ) ? " #search" : topics_path(anchor: " search" )
86- = link_to " Search" , search_link, class : " nav-link"
87- = link_to " Statistics" , stats_path, class : " nav-link"
88- = link_to " Reports" , reports_path, class : " nav-link"
89- = link_to " Help" , help_index_path, class : " nav-link"
90- .nav-right
91- button .nav-link .theme-toggle type =" button" aria-label =" Toggle theme" data-controller =" theme" data-action =" click->theme#toggle"
92- i .fas .fa-moon data-theme-target =" icon"
93- span data-theme-target =" label" Theme
94- .nav-auth
95- - if user_signed_in?
96- - if current_user&.person&.default_alias
97- = link_to current_user.person.default_alias.name, person_path(current_user.person.default_alias.email), class : " nav-link nav-user"
98- - unread = activity_unread_count
99- = link_to activities_path, class : " nav-link nav-link-activity" , title: " Activity" do
100- i .fa-regular .fa-bell
101- - if unread.positive?
102- span .nav-badge = unread
103- = link_to " Settings" , settings_root_path, class : " nav-link"
104- - if current_admin?
105- = link_to " Admin" , admin_root_path, class : " nav-link"
106- = button_to " Sign out" , session_path, method: :delete , class : " nav-link" , form: { style: ' display:inline' }, data: { turbo: false }
107- - else
108- = link_to " Sign in" , new_session_path, class : " nav-link"
109- = link_to " Register" , new_registration_path, class : " nav-link"
96+ .nav-menu data-nav-overflow-target =" menu"
97+ .nav-links
98+ = link_to " Topics" , topics_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
99+ - search_link = content_for?(:search_sidebar ) ? " #search" : topics_path(anchor: " search" )
100+ = link_to " Search" , search_link, class : " nav-link" , data: { " nav-overflow-target" : " item" }
101+ = link_to " Statistics" , stats_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
102+ = link_to " Reports" , reports_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
103+ = link_to " Help" , help_index_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
104+ .nav-right
105+ button .nav-link .theme-toggle type =" button" aria-label =" Toggle theme" data-controller =" theme" data-action =" click->theme#toggle" data-nav-overflow-target =" item"
106+ i .fas .fa-moon data-theme-target =" icon"
107+ span data-theme-target =" label" Theme
108+ .nav-auth
109+ - if user_signed_in?
110+ - if current_user&.person&.default_alias
111+ = link_to current_user.person.default_alias.name, person_path(current_user.person.default_alias.email), class : " nav-link nav-user" , data: { " nav-overflow-target" : " item" }
112+ - unread = activity_unread_count
113+ = link_to activities_path, class : " nav-link nav-link-activity" , title: " Activity" , data: { " nav-overflow-target" : " item" } do
114+ i .fa-regular .fa-bell
115+ - if unread.positive?
116+ span .nav-badge = unread
117+ = link_to " Settings" , settings_root_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
118+ - if current_admin?
119+ = link_to " Admin" , admin_root_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
120+ = button_to " Sign out" , session_path, method: :delete , class : " nav-link" , form: { style: ' display:inline' , data: { " nav-overflow-target" : " item" } }, data: { turbo: false }
121+ - else
122+ = link_to " Sign in" , new_session_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
123+ = link_to " Register" , new_registration_path, class : " nav-link" , data: { " nav-overflow-target" : " item" }
124+ details .nav-overflow-dropdown data-nav-overflow-target =" overflow"
125+ summary .nav-link .nav-overflow-toggle aria-label =" More" data-action =" click->sidebar#closeMenuOnNavigate"
126+ i .fa-solid .fa-bars
127+ .nav-overflow-menu data-nav-overflow-target =" overflowMenu"
110128
111129 - if content_for?(:sidebar )
112130 .page-layout .with-sidebar data-sidebar-target =" layout"
0 commit comments