added instructions and icons to menu entries

This commit is contained in:
Nuno Coração
2022-10-04 16:41:55 +01:00
parent eb07f33687
commit 2f67a8dfd5
4 changed files with 34 additions and 7 deletions

View File

@@ -26,13 +26,14 @@
{{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
<a href="{{ .URL }}" class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">{{
.Name | markdownify | emojify }}</a>
<a href="{{ .URL }}" class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
{{ partial "icon.html" .Pre }}
{{ if and .Pre .Name }} &nbsp; {{ end }}
{{ .Name | markdownify | emojify }}
</a>
{{ end }}
{{ end }}
<span></span>
{{ partial "translations.html" . }}
{{ if .Site.Params.enableSearch | default false }}
@@ -107,7 +108,11 @@
{{ range .Site.Menus.main }}
<li class="mb-1">
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
href="{{ .URL }}" title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a>
href="{{ .URL }}" title="{{ .Title }}">
{{ partial "icon.html" .Pre }}
{{ if and .Pre .Name }} &nbsp; {{ end }}
{{ .Name | markdownify | emojify }}
</a>
</li>
{{ end }}
{{ end }}