Skip to content

Commit

Permalink
hide some header options on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkSake committed Sep 15, 2024
1 parent 94b256b commit eaa0e66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
{{ $section := lower .Section }}
{{ range .Site.Menus.main }}
{{ $name := lower .Name }}
<li class="pull-left {{ if eq $name $title }}current{{ else if eq $section $name }}current{{ else if eq $title (pluralize $name) }}current{{ end }}">
<li class="pull-left {{ if eq $name $title }}hide-on-mobile{{ else if eq $section $name }}current{{ else if eq $title (pluralize $name) }}current{{ end }}">
<a href="{{ absLangURL .URL }}">~/{{ lower .Name }}</a>
</li>
{{end}}

{{ range .Site.Menus.feed }}
{{ $name := lower .Name}}
<li class="pull-right">
<li class="pull-right hide-on-mobile">
<a href="{{ absLangURL .URL }}">~/{{ lower .Name}}</a>
</li>
{{end}}
Expand Down
11 changes: 11 additions & 0 deletions static/css/theme-override.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,14 @@ li {

}

/* For devices larger than a phablet */
@media (min-width: 550px) {
}

/* For devices smaller than a phablet */
@media (max-width: 550px) {
.hide-on-mobile {
display: none;
}
}

0 comments on commit eaa0e66

Please sign in to comment.