Define Base Template (baseof.html)
This commit is contained in:
parent
39e9d944a6
commit
896326481e
7 changed files with 93 additions and 95 deletions
|
@ -1,9 +1,7 @@
|
||||||
{{ partial "header.html" . }}
|
{{ define "main" }}
|
||||||
<div class="main">
|
|
||||||
<div class="page404 block center">
|
<div class="page404 block center">
|
||||||
<h1 class="page404__title">{{ T "page404_title" }}</h1>
|
<h1 class="page404__title">{{ T "page404_title" }}</h1>
|
||||||
<p class="page404__lead">{{ T "page404_lead" }}</p>
|
<p class="page404__lead">{{ T "page404_lead" }}</p>
|
||||||
<a class="page404__link" href="">{{ T "page404_link" }}</a>
|
<a class="page404__link" href="">{{ T "page404_link" }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
|
39
layouts/_default/baseof.html
Normal file
39
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="h" lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
|
||||||
|
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
|
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
|
||||||
|
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
||||||
|
{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
|
||||||
|
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
|
||||||
|
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
|
||||||
|
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
|
||||||
|
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
|
||||||
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
|
||||||
|
{{ if not .Site.IsServer }}{{ template "_internal/google_analytics_async.html" . }}{{ end }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ partial "header" . }}
|
||||||
|
<div class="main">
|
||||||
|
{{ block "main" . }}
|
||||||
|
{{- if or .Title .Content }}
|
||||||
|
<div class="page block">
|
||||||
|
{{ with .Title }}<h1 class="page__title">{{ . }}</h1>{{ end }}
|
||||||
|
{{ with .Content }}<div class="page__content{{ if not $.Title }} page__content--notitle{{ end }}">{{ . }}</div>{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ partial "footer" . }}
|
||||||
|
<script src="{{ "js/modernizr.js" | relURL }}"></script>
|
||||||
|
<script src="{{ "js/menu.js" | relURL }}"></script>
|
||||||
|
{{- partial "mathjax.html" . -}}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,11 +1,4 @@
|
||||||
{{ partial "header.html" . }}
|
{{ define "main" }}
|
||||||
<div class="main">
|
|
||||||
{{- if or .Title .Content }}
|
|
||||||
<div class="page block">
|
|
||||||
{{ with .Title }}<h1 class="page__title">{{ . }}</h1>{{ end }}
|
|
||||||
{{ with .Content }}<div class="page__content{{ if not $.Title }} page__content--notitle{{ end }}">{{ . }}</div>{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
{{ range .Paginator.Pages }}
|
{{ range .Paginator.Pages }}
|
||||||
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
||||||
|
@ -14,5 +7,4 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
|
|
@ -1,5 +1,4 @@
|
||||||
{{ partial "header.html" . }}
|
{{ define "main" }}
|
||||||
<div class="main">
|
|
||||||
<div class="single block">
|
<div class="single block">
|
||||||
<article class="post">
|
<article class="post">
|
||||||
{{- partial "post_thumbnail.html" (dict "page" . ) }}
|
{{- partial "post_thumbnail.html" (dict "page" . ) }}
|
||||||
|
@ -17,5 +16,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{ partial "related.html" . }}
|
{{ partial "related.html" . }}
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
</div>
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
|
|
@ -1,5 +1,4 @@
|
||||||
{{ partial "header.html" . }}
|
{{ define "main" }}
|
||||||
<div class="main">
|
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||||
{{ $paginator := .Paginate ( where .Data.Pages "Section" "in" $mainSections ) }}
|
{{ $paginator := .Paginate ( where .Data.Pages "Section" "in" $mainSections ) }}
|
||||||
|
@ -18,5 +17,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
|
|
@ -2,8 +2,3 @@
|
||||||
{{- partial "footer_social.html" . }}
|
{{- partial "footer_social.html" . }}
|
||||||
<div class="footer__copyright">© {{ now.Format "2006" }} {{ .Site.Title }}. <span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span></div>
|
<div class="footer__copyright">© {{ now.Format "2006" }} {{ .Site.Title }}. <span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span></div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="{{ "js/modernizr.js" | relURL }}"></script>
|
|
||||||
<script src="{{ "js/menu.js" | relURL }}"></script>
|
|
||||||
{{- partial "mathjax.html" . -}}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,25 +1,3 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html class="h" lang="{{ .Site.LanguageCode | default "en-us" }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
|
|
||||||
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
|
||||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
|
|
||||||
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
|
||||||
{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
|
|
||||||
{{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
|
|
||||||
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
|
|
||||||
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
|
|
||||||
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
|
|
||||||
{{ with .OutputFormats.Get "rss" -}}
|
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
|
||||||
{{ end -}}
|
|
||||||
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
|
|
||||||
{{ if not .Site.IsServer }}{{ template "_internal/google_analytics_async.html" . }}{{ end }}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<a class="logo" href="{{ "" | relURL }}">{{ .Site.Title }}</a>
|
<a class="logo" href="{{ "" | relURL }}">{{ .Site.Title }}</a>
|
||||||
{{ partial "menu.html" . }}
|
{{ partial "menu.html" . }}
|
||||||
|
|
Loading…
Reference in a new issue