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

github.com/yanlinlin82/simple-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinlin Yan <yanlinlin82@gmail.com>2020-01-02 14:37:34 +0300
committerLinlin Yan <yanlinlin82@gmail.com>2020-01-02 14:37:34 +0300
commitd30bed50c5ef0934451a68ef216e97903a3097e9 (patch)
tree233cee5cf8d683b48fc346856308787cfa78cbb9
parent72710a4529b36b115872c271ce080199ac84385a (diff)
Support post subtitle
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/single.html11
2 files changed, 8 insertions, 5 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 9b8ab89..5e91693 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -30,7 +30,7 @@
</nav>
</header>
<main>
- <article class="content">
+ <article>
{{ block "main" . }}{{- end }}
</article>
</main>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index cf67696..64e90bc 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,10 +1,13 @@
{{ define "main" -}}
-<div>
+<div class="title">
<h1>{{ .Title }}</h1>
+ {{ with .Params.Subtitle -}}
+ <h2>{{ . }}</h2>
+ {{ end -}}
</div>
-<div>
+<div class="meta">
{{ if .Date -}}
- <div>{{ .Date.Format "2006-01-02 15:04" }}</span>
+ <div>{{ .Date.Format "2006-01-02 15:04" }}</div>
{{ end -}}
{{ $taxo := "tags" -}}
{{ if .Param $taxo -}}
@@ -18,7 +21,7 @@
</div>
{{ end -}}
</div>
-<div>
+<div class="content">
{{ .Content -}}
</div>
{{ end -}}