move programs to the top of the metadata display (#620)

* move programs to the top of the metadata display

rename to "programs provided", since where they are provided
is an implementation detail irrelevant to users of `nix-shell -p`.

* Fix CSS

---------

Co-authored-by: Naïm Favier <n@monade.li>
This commit is contained in:
Valentin Gagarin 2023-02-16 10:18:09 +01:00 committed by GitHub
parent ad5fab6ce5
commit 3a42ce9545
Failed to generate hash of commit
2 changed files with 7 additions and 3 deletions

View file

@ -504,7 +504,7 @@ viewResultItem nixosChannels channel showInstallDetails show item =
programs = programs =
div [] div []
[ h4 [] [ text "Programs in ", code [] [ text "/bin" ] ] [ h4 [] [ text "Programs provided" ]
, if List.isEmpty item.source.programs then , if List.isEmpty item.source.programs then
p [] [ text "This package provides no programs." ] p [] [ text "This package provides no programs." ]
@ -733,8 +733,8 @@ viewResultItem nixosChannels channel showInstallDetails show item =
<| <|
Maybe.map Tuple.first item.source.flakeUrl Maybe.map Tuple.first item.source.flakeUrl
] ]
:: maintainersAndPlatforms
:: programs :: programs
:: maintainersAndPlatforms
:: [] :: []
) )
] ]

View file

@ -423,8 +423,12 @@ header .navbar.navbar-static-top {
} }
// maintainers and platforms // programs
& > :nth-child(3) { & > :nth-child(3) {
}
// maintainers and platforms
& > :nth-child(4) {
margin-top: 1em; margin-top: 1em;
display: grid; display: grid;
grid-template-columns: auto auto; grid-template-columns: auto auto;