all repos — searchix @ 1b8b6b506b0855afc282bc1cc7b631f02e97b8e3

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: hide description table on smaller screens

Alan Pearce
commit

1b8b6b506b0855afc282bc1cc7b631f02e97b8e3

parent

852f563e22a1c3a257fdc58af2d427872e8beefe

M frontend/static/style.cssfrontend/static/style.css
@@ -49,17 +49,6 @@ margin: unset;
font-size: 1.15rem; } -@media only screen and (max-width: 600px) { - header > nav { - display: unset; - } -} -@media only screen and (max-width: 720px) { - header > nav { - padding: 1.5ex 0; - } -} - main { padding-top: unset; }
@@ -216,3 +205,19 @@ .open-sibling-dialog {
cursor: pointer; text-decoration: underline; } + +@media only screen and (max-width: 600px) { + header > nav { + display: unset; + } + .description, + .score { + display: none; + } +} +@media only screen and (max-width: 768px) { + header > nav { + padding: 1ch; + padding-right: 0; + } +}
M internal/components/combined.gointernal/components/combined.go
@@ -29,7 +29,7 @@ return Table(
THead( Tr( Th(Scope("col"), g.Text("Attribute")), - Th(Scope("col"), g.Text("Description")), + Th(Scope("col"), Class("description"), g.Text("Description")), g.If(config.DevMode, Th(Scope("col"), Class("score"), g.Text("Score")), ),
@@ -45,7 +45,7 @@ Td(Class("description"),
CombinedData(hit.Data), ), g.If(config.DevMode, - Td( + Td(Class("score"), Score(hit), ), ),
M internal/components/options.gointernal/components/options.go
@@ -42,7 +42,7 @@ firstSentence(o.Description),
Dialog(ID(o.Name)), ), g.If(config.DevMode, - Td( + Td(Class("score"), Score(hit), ), ),
M internal/components/packages.gointernal/components/packages.go
@@ -45,7 +45,7 @@ Td(Class("description"),
g.Text(p.Description), ), g.If(config.DevMode, - Td( + Td(Class("score"), Score(hit), ), ),