48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
|
{{- $config := site.Params }}
|
||
|
{{- $context := . }}
|
||
|
{{- $item_type := "http://schema.org/WebPage" }}
|
||
|
{{- $lang := site.Language.Lang }}
|
||
|
{{- $is_dark := $config.enableDarkMode }}
|
||
|
{{- $default_mode := $config.defaultLightingMode -}}
|
||
|
<!doctype html>
|
||
|
<html lang={{ $lang }}{{ with $is_dark }} class=dark{{ end }}{{ with $default_mode }} data-mode={{ . }}{{ end }} itemscope itemtype={{ $item_type }}>
|
||
|
<head>
|
||
|
{{- partial "head/index" . }}
|
||
|
</head>
|
||
|
<body class="page-{{ .Kind }}" id="pagetop">
|
||
|
<header class="nav_header">
|
||
|
{{- partial "nav" . }}
|
||
|
</header>
|
||
|
{{- if or (eq .Section $config.blogDir) (eq .Type "search" ) }}
|
||
|
{{- block "main" . }}{{ end }}
|
||
|
{{- else }}
|
||
|
<div class="main wrap pt-4">
|
||
|
{{- $docSections := $config.docSections }}
|
||
|
{{- with $docSections }}{{- else }}
|
||
|
{{- $docSections = "docs" }}
|
||
|
{{- end }}
|
||
|
{{- $uniqueHomepage := .IsHome }}
|
||
|
{{- if $config.uniqueHomepage }}
|
||
|
{{- if .IsHome }}
|
||
|
{{- $uniqueHomepage = true }}
|
||
|
{{- end }}
|
||
|
{{- else }}
|
||
|
{{- $uniqueHomepage = false }}
|
||
|
{{- end }}
|
||
|
{{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
|
||
|
{{- partial "document" . }}
|
||
|
{{- else }}
|
||
|
<div class="content">
|
||
|
{{- block "main" . }}{{ end }}
|
||
|
</div>
|
||
|
{{- end -}}
|
||
|
</div>
|
||
|
{{- end }}
|
||
|
{{- partial "scripts/translations" . -}}
|
||
|
{{- partialCached "footer" . -}}
|
||
|
{{- partialCached "sprites" . -}}
|
||
|
{{- partial "scripts/bundle" . -}}
|
||
|
{{- partial "scripts/mermaid" . -}}
|
||
|
</body>
|
||
|
</html>
|