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

66 lines
2.1 KiB
HTML
Raw Normal View History

2017-03-13 09:14:02 +00:00
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer">
{{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }}
<base href="{{ .Site.BaseURL }}">
<title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }}
{{ .Site.Title }}
{{ else }}
{{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ end }}
{{ end }}
</title>
<link rel="canonical" href="{{ .Permalink }}">
<!-- HTTPS -->
2017-07-25 00:37:04 +00:00
{{ if .Site.Params.enforce_ssl }}
2017-03-13 09:14:02 +00:00
<script type="text/javascript">
var baseURL = '{{ .Site.BaseURL }}';
var host = baseURL.substring(0, baseURL.length - 1).replace(/\//g, '');
if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
window.location.protocol = 'https:';
}
</script>
{{ end }}
<!-- jQuery -->
2018-06-09 23:30:15 +00:00
<script type="text/javascript" src="{{ "/js/jquery-3.3.1.min.js" | relURL }}"></script>
2017-03-13 09:14:02 +00:00
<!-- Fonts and icon CSS -->
2018-06-09 23:30:15 +00:00
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
<link rel="stylesheet" href="{{ "/css/nunito_sans.css" | relURL }}">
2017-03-13 09:14:02 +00:00
2018-01-27 01:10:03 +00:00
{{ if .Site.Params.cacheBuster }}
2018-06-09 21:23:55 +00:00
<link rel="stylesheet" href="{{ (printf "css/%s-style.css?t=%d" (.Site.Params.themeStyle | default "dark") now.Unix) |relURL }}">
2017-03-13 09:14:02 +00:00
{{ else }}
2018-06-09 23:30:15 +00:00
<link rel="stylesheet" href="{{ (printf "css/%s-style.css" .Site.Params.themeStyle | default "dark") | relURL }}">
2017-03-13 09:14:02 +00:00
{{ end }}
2018-03-25 15:09:30 +00:00
<!-- Custom css -->
{{ range .Site.Params.customCSS -}}
2018-06-09 23:30:15 +00:00
<link rel="stylesheet" href="{{ . | relURL }}">
2018-03-25 15:09:30 +00:00
{{- end }}
2017-03-13 09:14:02 +00:00
<!-- Icon -->
2018-06-09 23:30:15 +00:00
<link rel="shortcut icon" href="{{ .Site.Params.faviconFile | default "img/favicon.ico" | relURL }}">
2017-03-13 09:14:02 +00:00
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
<!-- RSS -->
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
</head>