Skip to content

Commit

Permalink
frontend adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Apr 1, 2024
1 parent e37949d commit 003a7a8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
23 changes: 9 additions & 14 deletions frontend/src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Html
( Html
, a
, div
, h1
, footer
, header
, img
Expand Down Expand Up @@ -384,8 +385,8 @@ view model =
[ div [ class "navbar navbar-static-top" ]
[ div [ class "navbar-inner" ]
[ div [ class "container" ]
[ a [ class "brand", href "https://nixos.org" ]
[ img [ alt "NixOS logo", src "/images/nix-logo.png", class "logo" ] []
[ a [ class "brand", href "https://mgit.at" ]
[ img [ alt "mgit logo", src "https://mgit.at/img/logo.png", class "logo" ] []
]
, div []
[ ul [ class "nav pull-left" ]
Expand All @@ -402,17 +403,11 @@ view model =
[ div []
[ span [] [ text "Please help us improve the search by " ]
, a
[ href "https://github.com/NixOS/nixos-search/issues"
[ href "https://github.com/mgit-at/nixos-search/issues"
]
[ text "reporting issues" ]
, span [] [ text "." ]
]
, div []
[ span [] [ text "❤️ " ]
, span [] [ text "Elasticsearch instance graciously provided by " ]
, a [ href "https://bonsai.io" ] [ text "Bonsai" ]
, span [] [ text ". Thank you! ❤️ " ]
]
]
]
]
Expand All @@ -439,12 +434,12 @@ viewNavigation route =
_ ->
Route.SearchArgs Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
in
li [] [ a [ href "https://nixos.org" ] [ text "Back to nixos.org" ] ]
li [] [ a [ href "https://mgit.at" ] [ text "Back to mgit.at" ] ]
:: List.map
(viewNavigationItem route)
[ ( Route.Packages searchArgs, text "Packages" )
, ( Route.Options searchArgs, text "NixOS options" )
, ( Route.Flakes searchArgs, span [] [ text "Flakes", sup [] [ span [ class "label label-info" ] [ small [] [ text "Experimental" ] ] ] ] )
[ ( Route.Packages searchArgs, text "NixOS Packages" )
, ( Route.Options searchArgs, text "NixOS Options" )
, ( Route.Flakes searchArgs, text "mgit Options & Packages" )
]


Expand All @@ -462,7 +457,7 @@ viewPage : Model -> Html Msg
viewPage model =
case model.page of
NotFound ->
div [] [ text "Not Found" ]
h1 [] [ text "Not Found" ]

Packages packagesModel ->
Html.map (\m -> PackagesMsg m) <| Page.Packages.view model.nixosChannels packagesModel
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Page/Flakes.elm
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ view nixosChannels model =
[ text "Search packages and options of "
, strong []
[ a
[ href "https://github.com/NixOS/nixos-search/blob/main/flakes/manual.toml" ]
[ text "public flakes" ]
[ href "https://github.com/mgit-at/nixos-search/blob/main/flakes/manual.toml" ]
[ text "mgit flakes" ]
]
]

Expand Down
20 changes: 14 additions & 6 deletions frontend/src/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
--text-color: #333;
--background-color: #fff;
--text-color: rgba(2, 81, 141, 0.9);
--background-color: rgba(2, 81, 141, 0.1);
--terminal-background: #333;
--terminal-color: #fff;
--result-item-show-more-background: #fff;
Expand Down Expand Up @@ -29,6 +29,10 @@
--badge-background: #757575;
}

.logo {
filter: invert(1);
}

/* ------------------------------------------------------------------------- */
/* -- Darkmode specific styles --------------------------------------------- */
/* ------------------------------------------------------------------------- */
Expand All @@ -40,9 +44,9 @@
--text-color: rgba(255, 255, 255, 0.85);
--text-color-light: rgba(255, 255, 255, 0.5);
--text-color-warning: #f8e45c;
--background-color: #242424;
--background-color: rgba(2, 81, 141, 0.9);
--hover-background: #ffffff13;
--button-background: #393939;
--button-background: rgba(2, 81, 141, 1);
--button-hover-background: #454545;
--button-active-background: #656565;
--button-active-hover-background: #707070;
Expand Down Expand Up @@ -85,6 +89,10 @@
--headerbar-background-color: #303030;
}

.logo {
filter: none;
}

// Override bootstrap styles for some common things.
code {
background-color: var(--terminal-background);
Expand Down Expand Up @@ -277,7 +285,7 @@
filter: brightness(0) invert(1);
}

background: var(--headerbar-background-color);
background: var(--headerbar-background-color) !important;
border-bottom: none;

li>a {
Expand Down Expand Up @@ -943,4 +951,4 @@ a:focus-visible {

.badge {
background-color: var(--badge-background)
}
}

0 comments on commit 003a7a8

Please sign in to comment.