about summary refs log tree commit diff stats
path: root/layouts/_default
diff options
context:
space:
mode:
authorAlan Pearce2018-06-17 19:23:18 +0200
committerAlan Pearce2018-06-17 19:23:18 +0200
commit743253f995d352f51fc7b7681948b20c79609060 (patch)
treee7992e69cff8aabd1f8c3e571a74d6ecbb130477 /layouts/_default
parent61b24805867fc6d2aa67ede189d43faf86220ad4 (diff)
parent8cab2d27e2b7727e632d817dbdd41a97cc99af00 (diff)
downloadhyde-743253f995d352f51fc7b7681948b20c79609060.tar.lz
hyde-743253f995d352f51fc7b7681948b20c79609060.tar.zst
hyde-743253f995d352f51fc7b7681948b20c79609060.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html10
-rw-r--r--layouts/_default/list.html27
-rw-r--r--layouts/_default/single.html72
3 files changed, 57 insertions, 52 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..0c87c3f
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,10 @@
+{{ partial "head.html" . }}
+  <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
+  {{ partial "sidebar.html" . }}
+    <div class="content container">
+    {{ block "main" . -}}{{- end }}
+    </div>
+
+    {{ template "_internal/google_analytics_async.html" . }}
+  </body>
+</html>
\ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 6aa2a7d..cae4c08 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,16 +1,11 @@
-{{ partial "head.html" . }}
-  <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
-		<main class="content container" role="main">
-			<h1 class="page-title">{{ .Title }}</h1>
-			<ul class="posts">
-				{{ range .Data.Pages }}
-				<li>
-					<a class="post-title u-url" href="{{ .RelPermalink | replaceRE "/$" "" }}">{{ .Title }}</a>
-					<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
-				</li>
-				{{ end }}
-			</ul>
-		</main>
-{{ partial "sidebar.html" . }}
-	</body>
-</html>
+{{ define "main" -}}
+<h1 class="page-title">{{ .Title }}</h1>
+<ul class="posts">
+{{ range .Data.Pages -}}
+  <li>
+    <a class="post-title u-url" href="{{ .RelPermalink }}">{{ .Title }}</a>
+    <time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
+  </li>
+{{- end }}
+</ul>
+{{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 1f48df8..fb048a2 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,37 +1,37 @@
-{{ partial "head.html" . }}
-  <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}} h-entry">
-		<main class="content container" role="main">
-			<article class="post">
-				<header>
-					<a class="u-url" href="{{ .Permalink | replaceRE "/$" "" }}">
-						<h1 class="post-title p-name">{{ .Title }}</h1>
-					</a>
-					<time class="post-date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
-				</header>
-				<main class="post-content e-content">
-					{{ .Content }}
-				</main>
-				<footer class="footer">
-					{{ if .Params.categories }}
-					<span>
-						Category:
-						{{ range .Params.categories }}
-						<a class="p-category" href="/categories/{{ . | lower | urlize }}/">{{ . }}</a>
-						{{ end }}
-					</span>
-					{{ end }}
-					{{ if .Params.tags }}
-					<p>
-						Tags:
-						{{ range .Params.tags }}
-						<a class="p-category" href="/tags/{{ . | urlize }}/">{{ . }}</a>
-						{{ end }}
+{{ define "main" -}}
+<article class="post h-entry">
+  <header>
+    <a class="u-url" href="{{ .Permalink | replaceRE "/$" "" }}">
+      <h1 class="post-title p-name">{{ .Title }}</h1>
+    </a>
+    <time class="post-date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
+  </header>
+  <main class="post-content e-content">
+    {{ .Content }}
+  </main>
+  <footer class="footer">
+    {{ if .Params.categories }}
+    <span>
+      Category:
+      {{ range .Params.categories }}
+      <a class="p-category" href="/categories/{{ . | lower | urlize }}/">{{ . }}</a>
+      {{ end }}
+    </span>
+    {{ end }}
+    {{ if .Params.tags }}
+    <p>
+      Tags:
+      {{ range .Params.tags }}
+      <a class="p-category" href="/tags/{{ . | urlize }}/">{{ . }}</a>
+      {{ end }}
 
-					</p>
-					{{ end }}
-				</footer>
-			</article>
-		</main>
-{{ partial "sidebar.html" . }}
-	</body>
-</html>
+    </p>
+    {{ end }}
+  </footer>
+</article>
+
+{{ if .Site.DisqusShortname -}}
+<h2>Comments</h2>
+{{ template "_internal/disqus.html" . }}
+{{- end }}
+{{- end }}