mirror of
https://github.com/tomfran/typo.git
synced 2025-04-26 05:29:54 +03:00

This is a common pattern found in many sites. I've also added styling to remove the underline.
28 lines
648 B
HTML
28 lines
648 B
HTML
{{/* Header */}}
|
|
|
|
<div class="header">
|
|
|
|
{{ if or (not (.Param "hideHeader")) .IsHome }}
|
|
|
|
<h1 class="header-title">
|
|
<a href="{{ site.BaseURL }}">{{ site.Title }}</a>
|
|
</h1>
|
|
|
|
<div class="flex">
|
|
{{ $currentPage := . }}
|
|
|
|
{{ with site.Params.menu }}
|
|
{{ range . }}
|
|
|
|
<p class="small {{ if eq .name (lower $currentPage.Name) }} bold {{end}}">
|
|
<a href="{{ .url }}" {{ if and (isset . "newTab") .newTab }}target="_blank" rel="noopener noreferrer"{{ end }}>
|
|
/{{.name }}
|
|
</a>
|
|
</p>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|