planblog/layouts/partials/header.html

95 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content="{{ if ne .URL "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}" />
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}"/>
{{ end }}
{{ with .Site.Params.themecolor }}
<meta name="theme-color" content="{{ . }}" />
{{ end }}
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.images }}{{ range first 5 . }}
<meta property="og:image" content="{{ . }}" />
{{ end }}{{ end }}
{{ if .IsPage }}
<meta property="og:type" content="article" />
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ range .Params.tags }}
<meta property="og:article:tag" content="{{ . }}" />
{{ end }}
{{ else }}
<meta property="og:type" content="website" />
{{ end }}
<title>
{{ if ne .URL "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}
</title>
<link rel="canonical" href=" {{ .Permalink }}" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/bootstrap.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.png" />
{{ if eq .URL "/" }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ with .Site.Params.google_adsense }}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "{{ . }}",
enable_page_level_ads: true
});
</script>
{{ end }}
{{ with .Site.Params.google_tag_manager }}
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
}
)(window,document,'script','dataLayer','GTM-5CXGJPJ');
</script>
{{ end }}
</head>
<body>
{{ with .Site.Params.google_tag_manager }}
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5CXGJPJ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
{{ end }}
<header class="global-header" style="background-image:url({{ if isset .Params "image" }}{{ .Params.image }} {{ else }} /images/bg.svg {{ end }})">
<section class="header-text">
{{ partial "social.html" . }}
<h1>
<a href="{{ .Site.BaseURL }}">
{{ with .Site.Params.avatar }}
<img src="{{ . }}" alt="PLANTROON"/>
{{ end }}
{{ with .Site.Params.heading }}
{{ . }}
{{ end }}
</a>
</h1>
{{ with .Site.Params.subtitle }}
<div class="tag-line">
{{ . }}
</div>
{{ end }}
</section>
</header>
<main class="container">
{{ with .Site.Params.google_adsense }}
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ . }}"
data-ad-slot="8599575024"
data-ad-format="auto">
</ins>
<script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
{{ end }}