diff options
author | Joway.CI <joway.w@gmail.com> | 2019-12-15 18:41:31 +0300 |
---|---|---|
committer | Joway.CI <joway.w@gmail.com> | 2019-12-15 18:41:31 +0300 |
commit | ca0be59be62a35502447b720668d7b5e9171daaf (patch) | |
tree | 68277a387ea13b7b77638b5763b4b5d8adb034fa /layouts | |
parent | 9c962d294cffbe3e835c719e7317616df4ec5f2f (diff) |
add categories
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 43 | ||||
-rw-r--r-- | layouts/_default/single.html | 15 | ||||
-rw-r--r-- | layouts/index.html | 15 | ||||
-rw-r--r-- | layouts/section/list.html | 0 | ||||
-rw-r--r-- | layouts/taxonomy/list.html | 0 |
5 files changed, 69 insertions, 4 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..9ecaa8c --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html lang="en"> +{{ partial "head.html" . }} + +<body> + <article class="posts"> + <div class="row"> + <div class="col-xs-12 col-sm-10 col-md-8 col-sm-offset-1 col-md-offset-2 col-lg-6 col-lg-offset-3"> + {{ partial "header.html" . }} + + <h1 class="taxonomy-term">{{.Data.Term}}</h1> + <div id="posts-list"> + {{ range (where .Data.Pages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}} + <section> + <h1 class="site-date-catalog">{{ .Key }}</h1> + + {{ range .Pages }} + <div class="row posts-line"> + <div class="posts-date col-xs-2"> + <time datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">{{ .Date.Format "Jan 02"}}</time> + </div> + <div class="posts-title col-xs-10"> + <div class="row"> + <div class="col-xs-12"> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </div> + </div> + </div> + </div> + {{ end }} + </section> + {{ end }} + </div> + + {{ partial "footer.html" . }} + </div> + </div> + </article> + + {{ partial "scripts.html" . }} +</body> + +</html>
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 315007a..db32e7c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -34,10 +34,21 @@ <div class="post-content markdown-body"> {{ .Content }} </div> - {{ if in site.Params.mainSections .Type }} - {{ partial "related.html" . }} + <div class="row middle-xs"> + <div class="col-xs-12"> + {{ range .Params.categories }} + <div class="post-category"> + <a href="/{{ . }}/"> + {{ . }} + </a> + </div> + {{ end }} + </div> + </div> + {{ if in site.Params.mainSections .Type }} + {{ partial "related.html" . }} {{ if .Site.Params.postAds }} <div class="post-ads">{{ .Site.Params.postAds | safeHTML }}</div> {{ end }} diff --git a/layouts/index.html b/layouts/index.html index f76a692..519f63d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,12 +13,23 @@ <h1 class="site-date-catalog">{{ .Key }}</h1> {{ range .Pages }} - <div class="row post-line"> + <div class="row posts-line"> <div class="posts-date col-xs-2"> <time datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">{{ .Date.Format "Jan 02"}}</time> </div> <div class="posts-title col-xs-10"> - <a href="{{ .RelPermalink }}">{{ .Title }}</a> + <div class="row"> + <div class="col-xs-9 col-sm-10"> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </div> + <div class="col-xs-3 col-sm-2 posts-categories"> + {{ range .Params.categories }} + <div class="posts-category"> + <a href="/categories/{{ lower . }}/"><strong>{{ . }}</strong></a> + </div> + {{ end }} + </div> + </div> </div> </div> {{ end }} diff --git a/layouts/section/list.html b/layouts/section/list.html deleted file mode 100644 index e69de29..0000000 --- a/layouts/section/list.html +++ /dev/null diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html deleted file mode 100644 index e69de29..0000000 --- a/layouts/taxonomy/list.html +++ /dev/null |