hugo-theme-relearn/layouts/partials/header.html

127 lines
5.6 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ hugo.Generator -}}
{{ partial "meta.html" . }}
{{ partial "favicon.html" . }}
<title>{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }}</title>
2018-02-19 16:09:45 +00:00
2017-08-16 21:14:58 +00:00
{{ $assetBusting := not .Site.Params.disableAssetsBusting }}
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
2018-02-19 16:09:45 +00:00
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/featherlight.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/tabs.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<link href="{{"css/hugo-theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
{{with .Site.Params.themeVariant}}
<link href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
{{end}}
{{ range .Site.Params.custom_css -}}
<link href="{{(printf "%s" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
{{- end }}
<script src="{{"js/jquery.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
2018-02-19 16:09:45 +00:00
2019-06-04 11:14:37 +00:00
<style>
2018-02-19 16:09:45 +00:00
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
{{ if .Site.Params.disableInlineCopyToClipBoard }}
:not(pre) > code + span.copy-to-clipboard {
display: none;
}
{{ end }}
</style>
2017-08-01 20:25:17 +00:00
{{ partial "custom-header.html" . }}
</head>
2016-05-23 20:18:57 +00:00
<body class="" data-url="{{ .RelPermalink }}">
{{ partial "menu.html" . }}
<section id="body">
<div id="overlay"></div>
<div class="padding highlightable">
{{if not .IsHome}}
<div>
2017-08-20 16:19:36 +00:00
<div id="top-bar">
{{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
{{ $File := .File }}
{{ $Site := .Site }}
{{with $File.Path }}
<div id="top-github-link">
<a class="github-link" title='{{T "Edit-this-page"}}' href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
2018-02-19 11:10:41 +00:00
<i class="fas fa-code-branch"></i>
<span id="top-github-link-text">{{T "Edit-this-page"}}</span>
2017-08-20 16:19:36 +00:00
</a>
</div>
{{ end }}
2016-03-17 13:10:43 +00:00
{{ end }}
2017-08-20 16:19:36 +00:00
{{$toc := (and (not .Params.disableToc) (not .Params.chapter))}}
<div id="breadcrumbs">
2017-08-20 16:19:36 +00:00
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
2018-02-19 11:10:41 +00:00
<i class="fas fa-bars"></i>
2017-08-20 16:19:36 +00:00
</a>
</span>
{{ if $toc }}
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
2017-08-20 16:19:36 +00:00
{{ end }}
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
{{if $showBreadcrumb}}
<ol class="links" itemscope itemtype="http://schema.org/BreadcrumbList">
<meta itemprop="itemListOrder" content="Descending" />
{{ template "breadcrumb" dict "page" . "depth" 0 }}
</ol>
{{ else }}
<span class="links">
{{ .Title }}
</span>
{{ end }}
</div>
{{ if $toc }}
2017-08-20 16:19:36 +00:00
{{ partial "toc.html" . }}
2016-03-17 20:05:42 +00:00
{{ end }}
</div>
</div>
{{ end }}
<div id="head-tags">
{{ partial "tags.html" . }}
</div>
{{ if .Params.chapter }}
<div id="chapter">
{{ end }}
<div id="body-inner">
{{if and (not .IsHome) (not .Params.chapter) }}
<h1>
2021-08-23 23:48:48 +00:00
{{ if eq .Kind "term" }}
{{.Data.Singular}} ::
{{ end }}
{{.Title}}
</h1>
{{end}}
{{define "breadcrumb"}}
{{$parent := .page.Parent }}
{{$depth := add .depth 1 }}
{{ if $parent }}
{{ template "breadcrumb" dict "page" $parent "depth" $depth }}
{{end}}
{{ if .depth }}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
<meta itemprop="position" content="{{ $depth }}" />
<a itemprop="item" href="{{ .page.RelPermalink }}">
<span itemprop="name">{{ .page.Title }}</span>
</a>
</li> >
{{else}}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
<meta itemprop="position" content="{{ $depth }}" />
<span itemprop="item">
<span itemprop="name">{{ .page.Title }}</span>
</span>
</li>
{{end}}
{{end}}