Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 33ba7859eee6
Choose a base ref
...
head repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b72c09dda924
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jan 25, 2021

  1. Remove the defunct "burger menu" and always expand the navigation (#273)

    I commonly run into a situation where the burger menu button is being
    showed to me but it broke some time ago and doesn't expand the menu
    anymore.
    
    Since the snipped was probably mostly 1:1 translated from the old
    nixos.org page (where we had more links than just the three we have now)
    we can probably just remove it now. It is a net win as the feature was
    broken and at least now you can use the website on mobile again.
    andir authored Jan 25, 2021
    1
    Copy the full SHA
    e9bdeae View commit details
  2. Copy the full SHA
    9500d0b View commit details
  3. Copy the full SHA
    b72c09d View commit details
Showing with 23 additions and 30 deletions.
  1. +2 −12 src/Main.elm
  2. +11 −9 src/Page/Options.elm
  3. +10 −9 src/index.less
14 changes: 2 additions & 12 deletions src/Main.elm
Original file line number Diff line number Diff line change
@@ -306,20 +306,10 @@ view model =
[ div [ class "navbar navbar-static-top" ]
[ div [ class "navbar-inner" ]
[ div [ class "container" ]
[ button
[ type_ "button"
, class "btn btn-navbar"
, attribute "data-toggle" "collapse"
, attribute "data-target" ".nav-collapse"
]
[ span [ class "icon-bar" ] []
, span [ class "icon-bar" ] []
, span [ class "icon-bar" ] []
]
, a [ class "brand", href "https://nixos.org" ]
[ a [ class "brand", href "https://nixos.org" ]
[ img [ src "https://nixos.org/logo/nix-wiki.png", class "logo" ] []
]
, div [ class "nav-collapse collapse" ]
, div [ ]
[ ul [ class "nav pull-left" ]
(viewNavigation model.route)
]
20 changes: 11 additions & 9 deletions src/Page/Options.elm
Original file line number Diff line number Diff line change
@@ -152,13 +152,12 @@ viewResultItem :
viewResultItem channel _ show item =
let
showHtml value =
div [] <|
case Html.Parser.run value of
Ok nodes ->
Html.Parser.Util.toVirtualDom nodes
case Html.Parser.run value of
Ok nodes ->
Html.Parser.Util.toVirtualDom nodes

Err _ ->
[]
Err _ ->
[]

default =
"Not given"
@@ -215,6 +214,12 @@ viewResultItem channel _ show item =
div [ Html.Attributes.map SearchMsg Search.trapClick ]
[ div [] [ text "Name" ]
, div [] [ wrapped asPreCode item.source.name ]
, div [] [ text "Description" ]
, div [] <|
(item.source.description
|> Maybe.map showHtml
|> Maybe.withDefault []
)
, div [] [ text "Default value" ]
, div [] [ withEmpty (wrapped asPreCode) item.source.default ]
, div [] [ text "Type" ]
@@ -249,9 +254,6 @@ viewResultItem channel _ show item =
, href ""
]
[ text item.source.name ]
, Maybe.map showHtml item.source.description
, Just <|
Search.showMoreButton toggle isOpen
, showDetails
]

19 changes: 10 additions & 9 deletions src/index.less
Original file line number Diff line number Diff line change
@@ -339,16 +339,16 @@ header .navbar.navbar-static-top {
display: block;
}

// Description
& > :nth-child(2) {
font-size: 1.2em;
margin-bottom: 0.5em;
text-align: left;
}

&.package {
.search-result-item();

// Description
& > :nth-child(2) {
font-size: 1.2em;
margin-bottom: 0.5em;
text-align: left;
}

// short details of a pacakge
& > :nth-child(3) {
color: #666;
@@ -418,10 +418,11 @@ header .navbar.navbar-static-top {
}

&.option {
.search-result-item();
margin-bottom: 1em;
padding-bottom: 1em;

// short details of a pacakge
& > :nth-child(4) {
& > :nth-child(2) {
margin: 2em 0 1em 1em;
display: grid;
grid-template-columns: 100px 1fr;