diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-21 15:36:30 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-21 15:36:30 +0530 |
| commit | 28aa04ddb662bce5f9cabd43985419b9a12cd40c (patch) | |
| tree | 007fd372d0aa5dd73060996f2a6c7a894d1369a7 /layouts/partials/header.html | |
| parent | 118bf1345e7756a1739d0f52d21f9600accf5698 (diff) | |
baseof: separate into header, footer
Diffstat (limited to 'layouts/partials/header.html')
| -rw-r--r-- | layouts/partials/header.html | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c1cc59e..a72672a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,16 +1,28 @@ -<nav class="nav"> - {{- if .IsHome }} - <h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1> - {{- else }} - <p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p> - {{- end }} - {{- if .Site.Menus.main }} - <ul class="menu"> - {{- range .Site.Menus.main }} - <li> - <a href="{{ .URL }}">{{ .Name }}</a> - </li> +{{- if $.Site.Params.SetThemeAuto -}} +<script> + setTheme(); +</script> +{{- end -}} +<header class="header"> + {{- if $.Site.Params.SetThemeAuto -}} + <script> + setTheme(); + </script> + {{- end -}} + <nav class="nav"> + {{- if .IsHome }} + <h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1> + {{- else }} + <p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p> {{- end }} - </ul> - {{- end }} -</nav>
\ No newline at end of file + {{- if .Site.Menus.main }} + <ul class="menu"> + {{- range .Site.Menus.main }} + <li> + <a href="{{ .URL }}">{{ .Name }}</a> + </li> + {{- end }} + </ul> + {{- end }} + </nav> +</header>
\ No newline at end of file |
