aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/header
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/header')
-rw-r--r--layouts/partials/header/avatar.html7
-rw-r--r--layouts/partials/header/nav.html10
-rw-r--r--layouts/partials/header/title.html7
3 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/header/avatar.html b/layouts/partials/header/avatar.html
new file mode 100644
index 0000000..e3c1021
--- /dev/null
+++ b/layouts/partials/header/avatar.html
@@ -0,0 +1,7 @@
+{{ $avatar := resources.GetMatch .Site.Params.avatar }}
+{{ $tiny := ($avatar.Fill "80x80 q90") }}
+<div class="flex-none w-20 h-20 rounded-full overflow-hidden" >
+ <a href="{{ .Site.BaseURL }}">
+ <img srcset="{{- with $tiny.RelPermalink -}}{{.}} 80w{{- end -}}" src="{{ $avatar.RelPermalink }}" width="{{ $avatar.Width }}" height="{{ $avatar.Height }}" alt="{{ .Site.Title }}">
+ </a>
+</div>
diff --git a/layouts/partials/header/nav.html b/layouts/partials/header/nav.html
new file mode 100644
index 0000000..c0c20b3
--- /dev/null
+++ b/layouts/partials/header/nav.html
@@ -0,0 +1,10 @@
+<nav>
+ <ul class="flex flex-wrap justify-center uppercase text-xs font-semibold gap-7 text-gray-500 ">
+ {{ $currentPage := . }}
+ {{ range site.Menus.main }}
+ {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
+ {{- $page_url:= $currentPage.Permalink | absLangURL }}
+ <li class="{{- if eq $menu_item_url $page_url }}text-gray-900{{else}}hover:text-gray-500{{ end -}}"><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+</nav> \ No newline at end of file
diff --git a/layouts/partials/header/title.html b/layouts/partials/header/title.html
new file mode 100644
index 0000000..d6e6ba3
--- /dev/null
+++ b/layouts/partials/header/title.html
@@ -0,0 +1,7 @@
+<a href="{{ .Site.BaseURL }}">
+ {{ if .IsHome }}
+ <h1 class="text-center sm:text-left text-4xl font-extrabold text-gray-800 ">{{ .Site.Title }}</h1>
+ {{ else }}
+ <h3 class="text-center sm:text-left text-4xl font-extrabold text-gray-800 ">{{ .Site.Title }}</h3>
+ {{ end }}
+</a> \ No newline at end of file