Skip to content

Commit

Permalink
[NO-ISSUE] Add documentation link to navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri committed Mar 24, 2024
1 parent 6764e64 commit b435905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Add `exe:` search modifier to look up packages by executable name ([#529](/~https://github.com/flora-pm/flora-server/pull/529))
* Add a link to the search documentation under the main search bar ([#532](/~https://github.com/flora-pm/flora-server/pull/532))
* Add a link to the general documentation in the navbar ([#537](/~https://github.com/flora-pm/flora-server/pull/537))

## 1.0.16 -- 2024-02-26

Expand Down
8 changes: 4 additions & 4 deletions src/web/FloraWeb/Components/Navbar.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ navbar = do
div_ [class_ "navbar-right"] $ do
navBarLink "navbar-menu-button" "/" "Search on Flora" False
navBarLink' "/about" "About" aboutNav
a_ [href_ "/documentation", class_ "navbar-link", target_ "_blank"] (text "Documentation")
navBarLink' "/categories" "Categories" packagesNav
navBarLink' "/packages" "Packages" packagesNav
userMenu
Expand Down Expand Up @@ -88,10 +89,9 @@ navBarLink
-- ^ is the element active
-> FloraHTML
navBarLink additionalClasses href label isActive' =
let baseClasses = "navbar-link "
in a_
[href_ href, class_ (baseClasses <> " " <> additionalClasses <> " " <> isActive isActive')]
(text label)
a_
[href_ href, class_ ("navbar-link " <> additionalClasses <> " " <> isActive isActive')]
(text label)

navBarLink' :: Text -> Text -> Bool -> FloraHTML
navBarLink' = navBarLink ""
Expand Down

0 comments on commit b435905

Please sign in to comment.