Skip to content

Commit

Permalink
Display link to notice file if found
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Sep 24, 2024
1 parent d1fc03d commit ff7fdf5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/whimsy/asf/themes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'wunderbar'

require 'whimsy/asf/status'

# Define common page features for whimsy tools using bootstrap styles
class Wunderbar::HtmlMarkup

Expand Down Expand Up @@ -64,6 +66,7 @@ def _whimsy_panel_table(title: 'Table Title', style: 'panel-primary', header: 'h

# Emit a bootstrap navbar with required ASF links
def _whimsy_nav
noticetext, noticepath = Status.notice # is there a notice file?
_nav.navbar.navbar_default do
_div.container_fluid do
_div.navbar_header do
Expand All @@ -87,6 +90,11 @@ def _whimsy_nav
_li do
_a 'About Whimsy', href: '/technology'
end
if noticetext
_li.bg_warning do
_a noticetext, href: noticepath
end
end
end
_ul.nav.navbar_nav.navbar_right do
_li.dropdown do
Expand Down

0 comments on commit ff7fdf5

Please sign in to comment.