Make sure that we dont trap users on search.nixos.org (#87)
and that there is a nice way back to main website also the navigation is now the same hight as on nixos.org fixes #59
This commit is contained in:
parent
7f2ed39fef
commit
007eee127e
16
src/Main.elm
16
src/Main.elm
|
@ -238,10 +238,13 @@ view model =
|
||||||
[ div [ class "navbar navbar-static-top" ]
|
[ div [ class "navbar navbar-static-top" ]
|
||||||
[ div [ class "navbar-inner" ]
|
[ div [ class "navbar-inner" ]
|
||||||
[ div [ class "container" ]
|
[ div [ class "container" ]
|
||||||
[ a [ class "brand", href "https://search.nixos.org" ]
|
[ a [ class "brand", href "https://nixos.org" ]
|
||||||
[ img [ src "https://nixos.org/logo/nix-wiki.png", class "logo" ] []
|
[ img [ src "https://nixos.org/logo/nix-wiki.png", class "logo" ] []
|
||||||
]
|
]
|
||||||
, viewNavigation model.page model.url
|
, div [ class "nav-collapse collapse" ]
|
||||||
|
[ ul [ class "nav pull-left" ]
|
||||||
|
(viewNavigation model.page model.url)
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -263,7 +266,7 @@ view model =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewNavigation : Page -> Url.Url -> Html Msg
|
viewNavigation : Page -> Url.Url -> List (Html Msg)
|
||||||
viewNavigation page url =
|
viewNavigation page url =
|
||||||
let
|
let
|
||||||
preserveSearchOptions =
|
preserveSearchOptions =
|
||||||
|
@ -288,13 +291,12 @@ viewNavigation page url =
|
||||||
|> List.append preserveSearchOptions
|
|> List.append preserveSearchOptions
|
||||||
|> Url.Builder.absolute [ path ]
|
|> Url.Builder.absolute [ path ]
|
||||||
in
|
in
|
||||||
ul [ class "nav" ]
|
List.map
|
||||||
(List.map
|
|
||||||
(viewNavigationItem url)
|
(viewNavigationItem url)
|
||||||
[ ( createUrl "packages", "Packages" )
|
[ ( "https://nixos.org", "Back to nixos.org" )
|
||||||
|
, ( createUrl "packages", "Packages" )
|
||||||
, ( createUrl "options", "Options" )
|
, ( createUrl "options", "Options" )
|
||||||
]
|
]
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
viewNavigationItem :
|
viewNavigationItem :
|
||||||
|
|
|
@ -14,16 +14,18 @@ footer {
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .navbar {
|
header .navbar.navbar-static-top {
|
||||||
a.brand {
|
.brand {
|
||||||
line-height: 1.5em;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
img.logo {
|
img.logo {
|
||||||
height: 1.5em;
|
margin-top: -5px;
|
||||||
margin-right: 0.5em;
|
padding-right: 5px;
|
||||||
|
line-height: 25px;
|
||||||
|
height: 25px;
|
||||||
}
|
}
|
||||||
ul.nav > li > a {
|
ul.nav > li {
|
||||||
line-height: 2.5em;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue