mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-09 18:12:27 +00:00
port to gitlab.
This commit is contained in:
35
themes/custom/layouts/partials/header.html
Normal file
35
themes/custom/layouts/partials/header.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="logo-wrapper">
|
||||
<a href="{{ "/" | relLangURL }}" class="logo">
|
||||
{{- if .Site.Params.logoTitle -}}
|
||||
{{ .Site.Params.logoTitle }}
|
||||
{{- else -}}
|
||||
{{ .Site.Title }}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<nav class="site-navbar">
|
||||
<ul id="menu" class="menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ $menus := .Site.Params.icons }}
|
||||
{{ range .Site.Menus.main -}}
|
||||
<li class="menu-item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
||||
<a class="menu-item-link" href="{{ .URL | safeURL }}">
|
||||
{{ $id := .Identifier }}
|
||||
{{- range $menus -}}
|
||||
{{- if eq $id .id -}}
|
||||
<i class="fa fa-fw fa-{{.icon}}"></i>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{ .Name }}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
<!-- <li class="menu-item">
|
||||
<a class="menu-item-link" href="javascript:void(0);" id="search">
|
||||
<i class="fa fa-fw fa-search"></i>
|
||||
搜索
|
||||
</a>
|
||||
</li> -->
|
||||
</ul>
|
||||
</nav>
|
Reference in New Issue
Block a user