blob: adeea7e90be29b17ca56ed3af7cb6fde5a385349 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<!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 }} · {{ end }} {{ .Site.Title }}" />
{{ 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" />
{{ with .Site.Params.facebook }}
<meta property="og:article:author" content="https://facebook.com/{{ . }}" />
{{ end }}
<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 }} · {{ end }} {{ .Site.Title }}
</title>
<link rel="alternative stylesheet" href="{{ .Site.BaseURL }}css/bootstrap.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/github.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/color-theme.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.ico" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}images/apple-touch-icon.png" />
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ (print "css/" . ) | absURL }}">
{{ end }}
{{ if eq .URL "/" }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
</head>
<body>
{{ if isset .Params "image" }}
<header class="global-header" style="background-image:url({{ .Params.image }})">
{{ else }}
<header class="global-header" style="background-image:url({{ "images/bg.jpg" | absURL }})">
{{ end }}
<section class="header-text">
<h1><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></h1>
{{ with .Site.Params.subtitle }}
<h3 class="tag-line">
{{ . }}
</h3>
{{ end }}
{{ if ne ( trim .URL "/" ) .Site.Language.Lang }}
<a class="btn btn-default btn-home" href="{{ "/" | absLangURL }}">
<i class="fa fa-angle-left" aria-hidden="true"></i>
{{ i18n "home" }}
</a>
{{ end }}
<!-- sites -->
<div class="navbar-container">
{{ range .Site.Menus.main }}
<a class="btn btn-default navbar-item" href="{{ .URL | absLangURL | safeURL }}">
{{ .Name }}
</a>
{{ end }}
</div>
<!-- Languages -->
{{ $url := urls.Parse .Permalink }}
<!-- The url.Host has only the domain in it -->
{{ $address := print $url.Scheme "://" $url.Host }}
<!-- Dirrerence between address and base URL. This could result in "" or "/beta/" or similar. -->
{{ $i18nBasePath := strings.TrimPrefix $address .Site.BaseURL }}
<!-- Path like "/beta/" attached with the language code. E.g. "/beta/de" -->
{{ $pathPrefix := print $i18nBasePath .Language }}
<!-- This will get the path to the resource from the language code and beyond -->
{{ $path := strings.TrimPrefix $pathPrefix $url.Path }}
{{ if .IsTranslated }}
<div class="language-container">
{{ range .Site.Home.AllTranslations }}
<a class="btn btn-default language-button" href="{{ .URL }}{{ strings.TrimPrefix "/" $path }}">{{ .Language.LanguageName }}</a>
{{ end }}
</div>
{{ end }}
</section>
</header>
<main class="container">
|