Skip to content

Commit

Permalink
Use params.sections (if present) for sections (#23)
Browse files Browse the repository at this point in the history
Add a basic nav bar with section types
  • Loading branch information
olehermanse authored and ribice committed Apr 17, 2018
1 parent 985c552 commit 93e6aa4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ if .Site.Params.Info.enableSocial }}
{{- partial "social/opengraph" . -}}
{{ end }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css"/>
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}"/>
{{- range .Site.Params.Assets.customCSS -}}
<link rel='stylesheet' href='{{ . | absURL }}'>
{{- end -}}
Expand Down
14 changes: 14 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,19 @@
</nav>
</div>
</nav>

{{ if (isset .Site.Params "sections" ) }}
<nav class="nav">
<div class="nav-left">
{{- range $section, $printable := .Site.Params.sections -}}
{{- if $printable -}}
<a class="nav-item" href="{{$section}}">
<h2 class="title is-5">{{$printable}}</h2>
</a>
{{- end -}}
{{- end -}}
</div>
</nav>
{{ end }}
</div>
</section>

0 comments on commit 93e6aa4

Please sign in to comment.