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

github.com/jbub/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlobopraveen <github@praveenlobo.com>2017-07-26 09:08:54 +0300
committerJuraj Bubniak <juraj.bubniak@gmail.com>2017-07-26 09:08:54 +0300
commit5f7ced80b82657e2e1177348be911ecfa0d5e06f (patch)
treeb399e9dab0028ce565a37a0f46a71f273209b939
parentf808d39849ee3bffd9eeddd72fe0dbe3be9aa2bb (diff)
reusing intro partial in 404 and index (#34)
-rw-r--r--layouts/404.html9
-rw-r--r--layouts/index.html9
-rw-r--r--layouts/partials/intro.html4
3 files changed, 6 insertions, 16 deletions
diff --git a/layouts/404.html b/layouts/404.html
index 934625b..56b6ece 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,13 +1,8 @@
{{ partial "header.html" . }}
<div class="container">
- {{ if .Site.Params.intro }}
- <header class="post-header">
- <h1 class="post-title" itemprop="name">{{ .Site.Params.headline }}</h1>
- <p>{{ .Site.Params.description }}</p>
- </header>
- {{ end }}
+ {{ partial "intro.html" . }}
<p class="error">Oh, this page does not exist. You can head back to <a href="{{ .Site.BaseURL }}">homepage</a>.</p>
</div>
-{{ partial "footer.html" . }} \ No newline at end of file
+{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
index c4afe7b..70190f9 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,12 +1,7 @@
{{ partial "header.html" . }}
<div id="post-index" class="container" itemscope="" itemtype="https://schema.org/Blog">
- {{ if .Site.Params.intro }}
- <header class="post-header">
- <h1 class="post-title" itemprop="name">{{ .Site.Params.headline }}</h1>
- <p>{{ .Site.Params.description }}</p>
- </header>
- {{ end }}
+ {{ partial "intro.html" . }}
<ol class="post-list">
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
@@ -20,4 +15,4 @@
</div>
</div>
-{{ partial "footer.html" . }} \ No newline at end of file
+{{ partial "footer.html" . }}
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index 534c399..92d02d4 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -1,6 +1,6 @@
{{ if .Site.Params.intro }}
<header class="post-header">
- <h1 class="post-title">{{ .Site.Params.headline }}</h1>
+ <h1 class="post-title" itemprop="name">{{ .Site.Params.headline }}</h1>
<p>{{ .Site.Params.description }}</p>
</header>
-{{ end }} \ No newline at end of file
+{{ end }}