Skip to content

Commit

Permalink
feat: add link to changelog in app footer. (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
n1k0 authored Sep 12, 2024
1 parent de12137 commit efe88f5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Views/Page.elm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mainMenuLinks { enableFoodSection } =

secondaryMenuLinks : List MenuLink
secondaryMenuLinks =
[ Internal "Changelog" Route.Changelog Changelog
[ Internal "Versions" Route.Changelog Changelog
, Internal "Statistiques" Route.Stats Stats
, External "Documentation" Env.gitbookUrl
, External "Communauté" Env.communityUrl
Expand Down Expand Up @@ -263,7 +263,12 @@ pageFooter session =
|> List.map (List.singleton >> li [])
|> List.intersperse (li [ attribute "aria-hidden" "true", class "text-muted" ] [ text "|" ])
|> ul [ class "FooterLegal d-flex justify-content-start flex-wrap gap-2 list-unstyled mt-3 pt-2 border-top" ]
, versionLink session.currentVersion
, div [ class "d-flex align-items-center gap-1 fs-9 mb-2" ]
[ versionLink session.currentVersion
, text "("
, Link.internal [ Route.href Route.Changelog ] [ text "changelog" ]
, text ")"
]
]
]

Expand All @@ -274,13 +279,11 @@ versionLink version =
Version versionData ->
let
displayLink url linkText =
p [ class "fs-9 text-muted" ]
[ Link.external
[ class "text-decoration-none"
, href url
]
[ text <| "Version\u{00A0}: " ++ linkText ]
Link.external
[ class "text-decoration-none"
, href url
]
[ text <| "Version\u{00A0}: " ++ linkText ]
in
case ( versionData.hash, versionData.tag ) of
-- If we have a tag provided, display it by default
Expand Down

0 comments on commit efe88f5

Please sign in to comment.