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>2019-12-24 17:37:42 +0300
committerLinlin Yan <yanlinlin82@gmail.com>2019-12-24 17:37:42 +0300
commit71d62126454d9d25f029145e452566252323284e (patch)
tree1022a1140d12458272957623f3ce936f2220ef90
parentdbd3d24b2cc80c18c9e2b1be50c43ec00fd84695 (diff)
Add section page and other improvements
-rw-r--r--layouts/_default/list.html6
-rw-r--r--layouts/_default/section.html14
-rw-r--r--layouts/index.html5
3 files changed, 21 insertions, 4 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index d45b0df..978cf16 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,6 +1,6 @@
-{{- define "main" -}}
-<div class="post-header">
- <h1 class="post-title">{{ .Title }}</h1>
+{{ define "main" -}}
+<div>
+ <h1>{{ .Title }}</h1>
</div>
<ul>
{{ range .Paginator.Pages -}}
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
new file mode 100644
index 0000000..c7faf14
--- /dev/null
+++ b/layouts/_default/section.html
@@ -0,0 +1,14 @@
+{{ define "main" -}}
+<div>
+ <h1>{{ .Title }}</h1>
+</div>
+<div>
+ {{ .Content -}}
+</div>
+<ul>
+ {{ range .Paginator.Pages -}}
+ <li>{{ with .Date }}{{ .Format "2006-01-02 15:04" }} - {{ end }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ with .Description }}: {{ . }}{{ end }}</li>
+ {{ end -}}
+</ul>
+</main>
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 61ed863..02cc477 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,4 +1,7 @@
-{{- define "main" -}}
+{{ define "main" -}}
+<div>
+ {{ .Content -}}
+</div>
<ul>
{{ range (.Paginate ( where .Site.RegularPages "Type" "in" site.Params.mainSections )).Pages -}}
<li>{{ .Date.Format "2006-01-02 15:04" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a></li>