mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +00:00
Restore home navbar (#90)
* Center the navbar again on the home page * Favor the project page for listing projects The project listing has its own page we can link to instead of going back to the (potentially fading in) home page each time.
This commit is contained in:
parent
04f47b3377
commit
563cf77fe1
2 changed files with 5 additions and 5 deletions
|
@ -165,6 +165,9 @@ hr
|
|||
background-color: $background
|
||||
font-size: 1.5rem
|
||||
|
||||
.has-content-centered
|
||||
justify-content: center
|
||||
|
||||
.markdown
|
||||
p
|
||||
margin-bottom: 1em
|
||||
|
@ -244,4 +247,4 @@ hr
|
|||
img
|
||||
display: block
|
||||
margin: 2rem auto
|
||||
max-width: 100%
|
||||
max-width: 100%
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<div class="navbar-menu {{ if $isHome }}has-content-centered{{ end }}" id="navMenu">
|
||||
<!-- look for custom menu and include it -->
|
||||
{{ if .Site.Menus.main }}
|
||||
{{ range .Site.Menus.main }}
|
||||
|
@ -52,11 +52,8 @@
|
|||
{{ if not (and $pageIsInProjects (eq .Page.Kind "section")) }}
|
||||
{{ with .Site.GetPage "/projects" }}
|
||||
{{ $totalProjects := (len .Pages) }}
|
||||
{{ $numberOfProjectsToShow := .Site.Params.home.numberOfProjectsToShow | default $totalProjects }}
|
||||
{{ if $isHome }}
|
||||
<a class="navbar-item" href="{{ printf "#%s" (.Title | urlize) }}">{{ .Title }}</a>
|
||||
{{ else if le $totalProjects $numberOfProjectsToShow }}
|
||||
<a class="navbar-item" href="{{ printf "/#%s" (.Title | urlize) | relLangURL }}">{{ .Title }}</a>
|
||||
{{ else }}
|
||||
<a class="navbar-item" href="{{ .Permalink }}">
|
||||
{{ if $pageIsInProjects }}
|
||||
|
|
Loading…
Reference in a new issue