Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/toryanderson/hugo-icarus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordigitalcraftsman <digitalcraftsman@protonmail.com>2017-05-19 22:19:06 +0300
committerdigitalcraftsman <digitalcraftsman@protonmail.com>2017-05-19 22:25:29 +0300
commit62d00ff27ab2e4b363cd1a3aecd8da2fa0ef9bd7 (patch)
treef1789f0a77a223d1183673892cd76e4af056505f
parent95a28dc9882712e3fdbf3fdb36e8154df5998e9e (diff)
Switch to block templates
Fixes #88
-rw-r--r--layouts/404.html49
-rw-r--r--layouts/_default/baseof.html21
-rw-r--r--layouts/_default/list.html43
-rw-r--r--layouts/_default/single.html24
-rw-r--r--layouts/_default/terms.html50
-rw-r--r--layouts/index.html16
6 files changed, 80 insertions, 123 deletions
diff --git a/layouts/404.html b/layouts/404.html
index 049a660..6ba3af1 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,31 +1,20 @@
-{{ partial "head" . }}
-
-<div id="container">
- {{ partial "header" . }}
- <div class="outer">
- {{ partial "profile" . }}
- <section id="main">
- <article class="article article-type-post" itemscope="" itemprop="blogPost">
- <div class="article-inner">
- <div class="article-entry" itemprop="articleBody">
- <p>
- <center>
- <h1>
- {{with .Site.Data.l10n.page_not_found.title}}{{.}}{{end}}
- </h1>
- <h3>
- {{with .Site.Data.l10n.page_not_found.subtitle}}{{.}}{{end}}
- </h3>
- </center>
- </p>
- </div>
+{{ define "main" }}
+<section id="main">
+ <article class="article article-type-post" itemscope="" itemprop="blogPost">
+ <div class="article-inner">
+ <div class="article-entry" itemprop="articleBody">
+ <p>
+ <center>
+ <h1>
+ {{with .Site.Data.l10n.page_not_found.title}}{{.}}{{end}}
+ </h1>
+ <h3>
+ {{with .Site.Data.l10n.page_not_found.subtitle}}{{.}}{{end}}
+ </h3>
+ </center>
+ </p>
</div>
- </article>
- </section>
- {{ partial "sidebar" . }}
-</div>
-</div>
-
-{{ partial "footer" . }}
-</body>
-</html>
+ </div>
+ </article>
+</section>
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..747bd46
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,21 @@
+{{ partial "head" . }}
+
+<div id="container">
+ {{ partial "header" . }}
+
+ <div class="outer">
+ {{ if not .Params.disable_profile }}
+ {{ partial "profile" . }}
+ {{ end }}
+
+ {{ block "main" . }}{{ end }}
+
+ {{ if not .Params.disable_widgets }}
+ {{ partial "sidebar" . }}
+ {{ end }}
+ </div>
+</div>
+
+{{ partial "footer" . }}
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 7752015..8821a5f 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,27 +1,16 @@
-{{ partial "head" . }}
-
-<div id="container">
- {{ partial "header" . }}
- <div class="outer">
- {{ partial "profile" . }}
- <section id="main">
- <section class="archives-wrap">
- <div class="archive-category-wrap">
- <span class="archive-category">{{ .Title }}</span>
- </div>
- <div class="archives">
- {{ $paginator := .Paginate .Data.Pages }}
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
- {{ end }}
- </div>
- </section>
- {{ partial "pagination" . }}
- </section>
- {{ partial "sidebar" . }}
- </div>
-</div>
-
-{{ partial "footer" . }}
-</body>
-</html>
+{{ define "main" }}
+<section id="main">
+ <section class="archives-wrap">
+ <div class="archive-category-wrap">
+ <span class="archive-category">{{ .Title }}</span>
+ </div>
+ <div class="archives">
+ {{ $paginator := .Paginate .Data.Pages }}
+ {{ range $paginator.Pages }}
+ {{ .Render "summary" }}
+ {{ end }}
+ </div>
+ </section>
+ {{ partial "pagination" . }}
+</section>
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 91ae34f..f41c4c8 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,21 +1,3 @@
-{{ partial "head" . }}
-
-<div id="container">
- {{ partial "header" . }}
-
- <div class="outer">
- {{ if .IsPage | and (not .Params.disable_profile) }}
- {{ partial "profile" . }}
- {{ end }}
-
- {{ partial "single_article" . }}
-
- {{ if .IsPage | and (not .Params.disable_widgets) }}
- {{ partial "sidebar" . }}
- {{ end }}
- </div>
-</div>
-
-{{ partial "footer" . }}
-</body>
-</html>
+{{ define "main" }}
+ {{ partial "single_article" . }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 6c65bb2..7f6ea23 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,31 +1,19 @@
-{{ partial "head" . }}
-
-<div id="container">
- {{ partial "header" . }}
- <div class="outer">
- {{ partial "profile" . }}
- <section id="main">
- <section class="layout-wrap">
- <div class="layout-title">
- <span>{{ .Title }}</span>
- </div>
- <div class="layout-wrap-inner list-categories">
- <ul class="category-list">
- {{ $data := .Data }} {{ range $key, $value := .Data.Terms.ByCount }}
- <li class="category-list-item">
- <a class="category-list-link" href="{{ $value.Name | urlize }}">{{ $value.Name }}</a>
- <span class="category-list-count">{{ $value.Count }}</span>
- </li>
- {{ end }}
- </ul>
- </div>
- </section>
- </section>
- {{ partial "sidebar" . }}
- </div>
-</div>
-
-{{ partial "footer" . }}
-</body>
-
-</html>
+{{ define "main" }}
+<section id="main">
+ <section class="layout-wrap">
+ <div class="layout-title">
+ <span>{{ .Title }}</span>
+ </div>
+ <div class="layout-wrap-inner list-categories">
+ <ul class="category-list">
+ {{ $data := .Data }} {{ range $key, $value := .Data.Terms.ByCount }}
+ <li class="category-list-item">
+ <a class="category-list-link" href="{{ $value.Name | urlize }}">{{ $value.Name }}</a>
+ <span class="category-list-count">{{ $value.Count }}</span>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+ </section>
+</section>
+{{ end }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 774d0b8..7fefcaf 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,15 +1,3 @@
-{{ partial "head" . }}
-
-<div id="container">
- {{ partial "header" . }}
-
- <div class="outer">
- {{ partial "profile" . }}
+{{ define "main" }}
{{ partial "article_list" . }}
- {{ partial "sidebar" . }}
- </div>
-</div>
-
-{{ partial "footer" . }}
-</body>
-</html>
+{{ end }} \ No newline at end of file