Add styling on links

This commit is contained in:
2024-08-04 17:41:39 +02:00
commit d35c46078f
533 changed files with 1299486 additions and 0 deletions
.gitattributes.gitignore
archetypes
assets
content
hugo.toml
static/assets
ansible
as8298
asr9006
asr920
bucketlist
clearfog
colo
coloclue-ipng
coloclue-loadtest
coloclue-vpp
css
debian-vpp
dwdm.png
fiber7-litexchange
fiber7-x
fitlet2
freebsd-vpp
freeix
fs-switch
geofeed
gowin-n305
ipng-frontends
lab
logo
main.scss
mastodon
minima-social-icons.svg
mlxsw
mpls-core
nat64
netgate-6100
network
oem-switch
pcengines-apu6
pdf
pdu19.png
pixelfed
r86s
sixxs-sunset
smtp
supermicro.png
syslog-telegram
vpp-babel
vpp-ixp-gateway
vpp-mpls
vpp-ospf
vpp-papi
vpp-proto
vpp-stats
vpp
vppcfg
themes/hugo-theme-notrack

@ -0,0 +1,70 @@
<header class="page-header">
<div class="myname">
<h2><a href="{{ default .Site.Home .Site.BaseURL }}">{{ default .Site.Params.Author .Site.Params.siteHeading }}</a></h2>
</div>
<nav>
<ul class="navbar">
{{- /* info about current page */ -}}
{{- $currentPage := . -}}
{{- $currentPagesParent := $currentPage.Parent -}}
{{- $currentPageInTags := eq $currentPage.Section "tags" -}}
{{- $currentPageInCategories := eq $currentPage.Section "categories" -}}
{{- $currentPageNotHome := ne $currentPage.IsHome true -}}
{{- range .Site.Menus.main -}}
{{- if .HasChildren -}}
{{- /* info about current menu */ -}}
{{- $currentMenusPage := .Page -}}
{{- $currentMenuHasTags := false -}}
{{- $currentMenuHasCategories := false -}}
{{- range .Children -}}
{{- $childMenuSection := .Page.Section -}}
{{- if eq $childMenuSection "categories" -}}{{- $currentMenuHasCategories = true -}}{{- end -}}
{{- if eq $childMenuSection "tags" -}}{{- $currentMenuHasTags = true -}}{{- end -}}
{{- end -}}
{{- /* comparison of current menu and current page */ -}}
{{- $active := eq $currentMenusPage $currentPagesParent -}}
{{- $active = and $active $currentPageNotHome -}}
{{- $active = or $active (and $currentMenuHasTags $currentPageInTags) -}}
{{- $active = or $active (and $currentMenuHasCategories $currentPageInCategories) }}
<li class="dropdown {{ if or $active ($currentPage.IsMenuCurrent "main" . ) ($currentPage.HasMenuCurrent "main" .)}}activetab{{ end }}">
<a href ="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
<div class=sub-menu>
{{- range .Children }}
{{- $currentMenuSection := .Page.Section }}
{{- $active := and $currentPageInTags (eq $currentMenuSection "tags") }}
{{- $active = or $active (and $currentPageInCategories (eq $currentMenuSection "categories") ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<a class="{{- if $active -}}activetab{{- end -}}" href="{{- .URL -}}">{{ .Name }}</a>
{{- end }}
</div>
</li>
{{- else -}}
{{- $currentMenusPage := .Page }}
{{- $currentMenuInMainSections := false }}
{{- with $currentMenusPage }}
{{- $currentMenuInMainSections = in site.Params.mainSections .Type }}
{{- end }}
{{- $active := eq $currentMenusPage $currentPagesParent }}
{{- $active = and $active (eq $currentPage.RelPermalink .URL ) }}
{{- $active = or $active (eq $currentPage.Title .Name ) }}
{{- $active = or $active ($currentPage.IsMenuCurrent "main" . ) }}
<li class="{{- if $active -}} activetab {{- end -}}">
<a href="{{ .URL }}">
{{- .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{- end }}
{{- end }}
</ul>
</nav>
</header>