Skip to content

Commit

Permalink
[NO-ISSUE] Don't replace the Homepagee link with th flora page
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri committed Mar 27, 2024
1 parent 4da86c8 commit 2d118d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/web/FloraWeb/API/Routes/Packages/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ toPackageDTO package release releaseComponents =
synopsis = release.synopsis
description = release.description
releaseDeprecated =
fromMaybe False (release.deprecated)
fromMaybe False release.deprecated
repository = release.repository
uploadedAt = fromJust release.uploadedAt
flags = release.flags
Expand Down
6 changes: 4 additions & 2 deletions src/web/FloraWeb/Pages/Templates/Packages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@ displayCategories categories =
ul_ [class_ "categories"] $ foldMap renderCategory categories

displayLinks :: Namespace -> PackageName -> Text -> Release -> FloraHTML
displayLinks namespace packageName packageIndexURL release =
displayLinks namespace packageName packageIndexURL release = do
li_ [class_ ""] $ do
h3_ [class_ "package-body-section links"] "Links"
ul_ [class_ "links"] $ do
li_ [class_ "package-link"] $ a_ [href_ (getHomepage release)] "Homepage"
when (release.homepage /= Just "") $
li_ [class_ "package-link"] $
a_ [href_ (getHomepage release)] "Homepage"
li_ [class_ "package-link"] $ a_ [href_ (packageIndexURL <> "/package/" <> display packageName <> "-" <> display release.version)] "Documentation"

li_ [class_ "package-link"] $ displaySourceRepos release.sourceRepos
Expand Down
5 changes: 2 additions & 3 deletions src/web/FloraWeb/Pages/Templates/Screens/Packages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Lucid.Orphans ()
import Flora.Model.Category.Types (Category (..))
import Flora.Model.Package.Types
import Flora.Model.Release.Types (Release (..))
import FloraWeb.Components.Icons
import FloraWeb.Components.Icons (chevronRightOutline)
import FloraWeb.Pages.Templates.Packages
( displayCategories
, displayDependencies
Expand All @@ -27,7 +27,6 @@ import FloraWeb.Pages.Templates.Packages
, displayPackageFlags
, displayReadme
, displayReleaseDeprecation
, displayReleaseVersion
, displayTestedWith
, displayVersions
)
Expand Down Expand Up @@ -80,7 +79,7 @@ presentationHeader release namespace name synopsis =
chevronRightOutline
toHtml name
let versionClass = "version" <> if Just True == release.deprecated then " release-deprecated" else ""
span_ [class_ versionClass] $ displayReleaseVersion release.version
span_ [class_ versionClass] $ toHtml release.version
div_ [class_ "synopsis"] $
p_ [class_ ""] (toHtml synopsis)

Expand Down

0 comments on commit 2d118d7

Please sign in to comment.