mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-07 06:14:00 +00:00
`highlight_active_link` and `show_language` added to `main_menu` in `params.toml`:
`main_menu = {align = "l", show_logo = true, highlight_active_link = true, show_language = false}`
For example, enables disabling highlighting active main menu links on scroll if it's found to be inaccurate in a certain case, such as towards the end of a homepage with lots of very short widgets that are linked in the menu.
29 lines
921 B
HTML
29 lines
921 B
HTML
<!DOCTYPE html>
|
|
{{- $language_code := site.LanguageCode | default "en-us" -}}
|
|
<html lang="{{$language_code}}" {{ if in site.Data.i18n.rtl.rtl $language_code }}dir="rtl"{{end}}>
|
|
|
|
{{ partial "site_head" . }}
|
|
|
|
{{- $highlight_active_link := site.Params.main_menu.highlight_active_link | default true -}}
|
|
<body id="top" data-spy="scroll" data-offset="70" data-target="{{ if or .IsHome (eq .Type "widget_page") | and $highlight_active_link }}#navbar-main{{else}}#TableOfContents{{end}}" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
|
|
|
|
{{ partial "search" . }}
|
|
|
|
{{ partial "navbar" . }}
|
|
|
|
{{ block "main" . }}{{ end }}
|
|
|
|
{{ partial "site_js" . }}
|
|
|
|
{{/* Docs and Updates layouts include the site footer in a different location. */}}
|
|
{{ if not (in (slice "docs" "updates") .Type) }}
|
|
<div class="container">
|
|
{{ partial "site_footer" . }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ partial "citation" . }}
|
|
|
|
</body>
|
|
</html>
|