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

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-03-02 17:55:02 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-03-02 17:55:02 +0300
commit1bb9347f4e122b573ff3e4f94e5954e1bcfb95ff (patch)
tree6c83b03e5fe7821cb9bb8832a9594a73849ba9b5 /layouts/_default
parentfdaf6145cbbc4573a87e51b492e4893722b8fe73 (diff)
Add Section(Archive) page.
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/section.html40
-rw-r--r--layouts/_default/single.html7
2 files changed, 46 insertions, 1 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
new file mode 100644
index 0000000..d7f6e95
--- /dev/null
+++ b/layouts/_default/section.html
@@ -0,0 +1,40 @@
+{{ define "main" }}
+<div ref="streamContainer" class="stream-container">
+ <div class="post-list-container post-list-container-shadow">
+ {{ range .Paginator.Pages.GroupByDate "2006" }}
+ <a class="a-block">
+ <div class="post-item-wrapper post-item-wrapper-no-hover">
+ <div class="post-item post-item-no-gaps">
+ <div class="post-item-info-wrapper">
+ <div class="post-item-title post-item-title-small year">
+ {{ .Key }}
+ </div>
+ </div>
+ </div>
+ </div>
+ </a>
+ {{ range .Pages }}
+ <a href="{{ .RelPermalink }}" class="a-block">
+ <div class="post-item-wrapper">
+ <div class="post-item post-item-no-gaps">
+ <div class="post-item-info-wrapper">
+ <div class="post-item-title">
+ {{.Title}}
+ </div>
+ <div class="post-item-meta">
+ {{ dateFormat "Jan 2, 2006" .Date }}
+
+ {{ if .Draft }}
+ <span class="draft-label">DRAFT</span>
+ {{ end }}
+ </div>
+ </div>
+ </div>
+ </div>
+ </a>
+ {{ end }}
+ {{ end }}
+ </div>
+</div>
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 3a0e2a4..d037687 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -10,12 +10,16 @@
<div class="{{$post_class}}"
style="background-image: url('{{ $featured_image | relLangURL}}')">
+ <!-- WeChat Moment Thumbnail -->
+ <img src="{{ $featured_image | absLangURL}}" style="display: none;"></img>
<div class="post-title">
{{ .Title }}
<div class="post-meta">
+ {{ if .Params.date}}
<time itemprop="datePublished">
{{ .PublishDate.Format "2006-01-02 15:04" }}
</time>
+ {{ end }}
{{ if .Params.categories }}
<i class="material-icons" style="">folder</i>
@@ -37,10 +41,11 @@
<div class="post-body-wrapper">
<div class="post-body">
{{.Content}}
+ {{ if .Params.date }}
<HR width="100%" id="EOF">
<p style="color:#777;">Last modified on {{ .Page.Lastmod.Format "2006-01-02" }}</p>
+ {{ end }}
</div>
-
</div>