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

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsiya <parsiya@gmail.com>2018-04-22 02:59:35 +0300
committerparsiya <parsiya@gmail.com>2018-04-22 02:59:35 +0300
commit3cd676c266caf623b6f8279224491fdec68250ef (patch)
treee64e07042a0b40484d2f814da545a9f98e4e9cf8
parent5232bddae44df83360925945b909860d0183d6ed (diff)
Move tags/category to list and remove terms
-rw-r--r--layouts/_default/list.html54
-rw-r--r--layouts/_default/terms.html56
-rw-r--r--layouts/category/category.html49
-rw-r--r--layouts/tag/tag.html54
4 files changed, 54 insertions, 159 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index e69de29..df32ca6 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -0,0 +1,54 @@
+
+<!-- list layout (e.g. tags/categories) -->
+
+{{ partial "header.html" . }}
+
+<div id="main">
+ <div id="content">
+ <div>
+ <article role="article">
+ <header>
+ <h1 class="entry-title">
+ {{ .Data.Singular | title }}: {{ .Title }}
+ </h1>
+ </header>
+ <div id="blog-archives" class="category">
+ {{ range .Data.Pages }}
+ <h2>
+ {{ .Date | dateFormat "2006"}}
+ </h2>
+ <article>
+ <h1>
+ <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
+ </h1>
+ <time>
+ <span class="month">{{ .Date | dateFormat "Jan" }}</span>
+ <span class="day">{{ .Date | dateFormat "2" }}</span>
+ </time>
+ <footer>
+ <span class="categories"> <!-- show categories and tags -->
+ {{ $.Scratch.Set "cats" .Params.categories }}
+ {{ with .Params.categories }}
+ posted in:
+ {{ range ($.Scratch.Get "cats") }} <a class="category" href="{{ "/categories/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
+ </br>
+ {{ end }}
+
+ {{ $.Scratch.Set "tags" .Params.tags }}
+ {{ with .Params.tags }}
+ tags:
+ {{ range ($.Scratch.Get "tags") }} <a class="category" href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
+ {{ end }}
+ </span>
+ </footer>
+ </article>
+ {{ end }}
+ </div>
+ </article>
+ </div>
+
+ {{ partial "sidebar.html" . }}
+ </div>
+</div>
+
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
deleted file mode 100644
index 503d6e5..0000000
--- a/layouts/_default/terms.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!-- Template for /tags/ and /categories/ -->
-
-<!-- Styling for the table -->
-<style>
- table.terms, td.terms-date, td.terms-title {
- border:none;
- }
-
- td.terms-date {
- padding: 0 10px 0 0;
- }
-
- td.terms-title {
- font-size: 110%;
- }
- </style>
-
-{{ $page := . }}
-{{ $data := .Data }}
-{{ $.Scratch.Set "terms" $data.Terms.ByCount }} <!-- default is ByCount -->
-
-{{ with .Site.Params.generateTaxonomyList }}
-
- {{ partial "header.html" $page }}
- <div id="main">
- <div id="content">
- <div>
- <article role="article">
- <header>
- <h1 class="entry-title">
- {{ $.Title }}:
- </h1>
- </header>
- {{ with $.Site.Params.sortTaxonomyAlphabetical }}
- {{ if eq . true }}
- {{ $.Scratch.Set "terms" $data.Terms.Alphabetical }}
- {{ end }}
- {{ end }}
- <table class="terms">
- {{ range $key, $value := ($.Scratch.Get "terms") }}
- <tr>
- <td class="terms-date"><a href="{{ $value.Name | urlize }}">{{ humanize $value.Name }}</a></td>
- <td class="terms-title"><strong>{{ $value.Count }}</strong></td>
- </tr>
- {{ end }}
- </table>
- </article>
- </div>
-
- {{ partial "sidebar.html" $page }}
- </div>
- </div>
-
- {{ partial "footer.html" $page }}
-
-{{ end }}
diff --git a/layouts/category/category.html b/layouts/category/category.html
deleted file mode 100644
index d928c2f..0000000
--- a/layouts/category/category.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-<!-- category page -->
-
-{{ partial "header.html" . }}
-
-<div id="main">
- <div id="content">
- <div>
- <article role="article">
- <header>
- <h1 class="entry-title">
- {{ .Data.Singular | title }}: {{ .Title }}
- </h1>
- </header>
- <div id="blog-archives" class="category">
- {{ range .Data.Pages }}
- <h2>
- {{ .Date | dateFormat "2006"}}
- </h2>
- <article>
- <h1>
- <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
- </h1>
- <time>
- <span class="month">{{ .Date | dateFormat "Jan" }}</span>
- <span class="day">{{ .Date | dateFormat "2" }}</span>
- </time>
- <footer>
- <span class="categories"> <!-- show tags -->
- tags:
- <!-- although tags had no issues with isset (it is alwaus lowercase) I switched it to with anyways.
- However, .Params.tags is not visible inside so I had to use scratch -->
- {{ $.Scratch.Set "tags" .Params.tags }}
- {{ with .Params.categories }}
- {{ range ($.Scratch.Get "tags") }} <a class="category" href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
- {{ end }}
- </span>
- </footer>
- </article>
- {{ end }}
- </div>
- </article>
- </div>
-
- {{ partial "sidebar.html" . }}
- </div>
-</div>
-
-{{ partial "footer.html" . }}
diff --git a/layouts/tag/tag.html b/layouts/tag/tag.html
deleted file mode 100644
index dce2ed4..0000000
--- a/layouts/tag/tag.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-<!-- tags page -->
-
-{{ partial "header.html" . }}
-
-<div id="main">
- <div id="content">
- <div>
- <article role="article">
- <header>
- <h1 class="entry-title">
- {{ .Data.Singular | title }}: {{ .Title }}
- </h1>
- </header>
- <div id="blog-archives" class="category">
- {{ range .Data.Pages }}
- <h2>
- {{ .Date | dateFormat "2006"}}
- </h2>
- <article>
- <h1>
- <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
- </h1>
- <time>
- <span class="month">{{ .Date | dateFormat "Jan" }}</span>
- <span class="day">{{ .Date | dateFormat "2" }}</span>
- </time>
- <footer>
- <span class="categories"> <!-- show categories and tags -->
- {{ $.Scratch.Set "cats" .Params.categories }}
- {{ with .Params.categories }}
- posted in:
- {{ range ($.Scratch.Get "cats") }} <a class="category" href="{{ "/categories/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
- </br>
- {{ end }}
-
- {{ $.Scratch.Set "tags" .Params.tags }}
- {{ with .Params.tags }}
- tags:
- {{ range ($.Scratch.Get "tags") }} <a class="category" href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
- {{ end }}
- </span>
- </footer>
- </article>
- {{ end }}
- </div>
- </article>
- </div>
-
- {{ partial "sidebar.html" . }}
- </div>
-</div>
-
-{{ partial "footer.html" . }}