Zebra/themes/casper/layouts/partials/header.html

108 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html lang="{{.Site.LanguageCode}}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{ partial "twitter_card.html" . }}
<meta property="og:title" content="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{if .Params.image }}
<meta property="og:image" content="{{ .Params.image | relURL}}"/>
{{else}}
{{if .Site.Params.cover}}
<meta property="og:image" content="{{ .Site.Params.cover | relURL}}"/>
{{end}}
{{end}}
{{ if .IsPage }}
<meta property="og:description" content="{{ .Description }}" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ range .Params.tags }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ else }}
<meta property="og:type" content="website" />
<meta property="og:description" content="{{ .Site.Params.description }}" />
{{ end }}
<title>{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}</title>
{{ if .IsPage }}
<meta name="description" content="{{ .Description | default (substr .Summary 0 160) }}" />
{{ else }}
<meta name="description" content="{{ .Site.Params.metadescription | default .Site.Params.description }}" />
{{ end }}
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="{{ "images/favicon.ico" | relURL}}">
<link rel="apple-touch-icon" href="{{ "images/apple-touch-icon.png" | relURL}}" />
<link rel="stylesheet" type="text/css" href="{{ "css/screen.css" | relURL}}" />
<link rel="stylesheet" type="text/css" href="{{ "css/nav.css" | relURL}}" />
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{ end }}
{{ if .Site.Params.hjsStyle }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/{{ .Site.Params.hjsStyle }}.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
{{ if or .Site.Params.hjsExtraLanguages .Params.hjsExtraLanguages }}
{{ range $index, $language := (union .Site.Params.hjsExtraLanguages .Params.hjsExtraLanguages) }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/{{ $language }}.min.js"></script>
{{ end }}
{{ end }}
<script>hljs.initHighlightingOnLoad();</script>
{{end}}
{{ if .Site.Params.RSSLink}}
<link href="{{.Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{else}}
{{ if ne .Permalink "/" }}
<link href="{{ "index.xml" | relURL}}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{if .IsNode}}
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
{{end}}
{{end}}
{{ hugo.Generator }}
<link rel="canonical" href="{{ .Permalink }}" />
{{ if .Params.customSemanticPartial }}
{{ partial .Params.customSemanticPartial . }}
{{ else }}
{{ partial "semantic.html" . }}
{{end}}
{{with .Site.Params.googleAnalyticsUserID }}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{.}}', 'auto');
ga('send', 'pageview');
</script>
{{end}}
{{ if .Site.Params.customHeaderPartial }}
{{ partial .Site.Params.customHeaderPartial . }}
{{ end }}
</head>
<body class="{{ if .IsHome }}{{ if eq .Paginator.PageNumber 1 }}home-template {{ else }}archive-template {{ end }}{{ else }}post-template {{ end }}nav-closed">
{{ partial "navigation.html" . }}
<div class="site-wrapper">