🎨 Finish archives page coding.
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
{{- end }}
|
||||
<div class="post-eof"></div>
|
||||
{{- else }}
|
||||
{{ partial "post/post_footer/tags.html" . }}
|
||||
{{ partial "post/footer_meta/tags.html" . }}
|
||||
{{ partial "_thirdparty/share/addthis.html" . }}
|
||||
<hr/>
|
||||
{{ partial "post/post_footer/reward.html" . }}
|
||||
{{ partial "post/post_footer/copyright.html" . }}
|
||||
{{ partial "post/post_footer/followme.html" . }}
|
||||
{{ partial "post/footer_meta/reward.html" . }}
|
||||
{{ partial "post/footer_meta/copyright.html" . }}
|
||||
{{ partial "post/footer_meta/followme.html" . }}
|
||||
<div class="post-nav">
|
||||
<div class="post-nav-next post-nav-item">
|
||||
{{- with .NextInSection }}
|
||||
@@ -13,7 +13,7 @@
|
||||
<meta itemprop="description" content="{{ .Description | default .Summary }}">
|
||||
</span>
|
||||
<header class="post-header">
|
||||
<h2 class="post-title" itemprop="name headline">
|
||||
{{- if $.IsHome }} <h2 {{ else }} <h1 {{ end -}} class="post-title" itemprop="name headline">
|
||||
{{- if and .Weight (gt .Weight 0) }}
|
||||
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
|
||||
<i class="fa fa-thumbtack"></i>
|
||||
@@ -35,18 +35,18 @@
|
||||
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</h2>
|
||||
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}}
|
||||
<div class="post-meta-container">
|
||||
<div class="post-meta-items">
|
||||
{{ partial "post/post_meta/created_date.html" . }}
|
||||
{{ partial "post/post_meta/update_date.html" . }}
|
||||
{{ partial "post/post_meta/categories.html" . }}
|
||||
{{ partial "post/header_meta/created_date.html" . }}
|
||||
{{ partial "post/header_meta/update_date.html" . }}
|
||||
{{ partial "post/header_meta/categories.html" . }}
|
||||
</div>
|
||||
{{- if not $.IsHome }}
|
||||
<div class="post-meta-items">
|
||||
{{ partial "post/post_meta/words.html" . }}
|
||||
{{ partial "post/post_meta/readtime.html" . }}
|
||||
{{ partial "post/post_meta/views.html" . }}
|
||||
{{ partial "post/header_meta/words.html" . }}
|
||||
{{ partial "post/header_meta/readtime.html" . }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -2,11 +2,11 @@
|
||||
<div class="post-block">
|
||||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ .Scratch.Get "lang" }}">
|
||||
|
||||
{{ partial "post/post_header.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
{{ partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
<!-- POST BODY -->
|
||||
{{ partial "post/post_body.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
{{ partial "post/body.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
<footer class="post-footer">
|
||||
{{ partial "post/post_footer.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
{{ partial "post/footer.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
27
layouts/partials/post/list.html
Normal file
27
layouts/partials/post/list.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="collection-year">
|
||||
<span class="collection-header">{{ .Key }}</span>
|
||||
</div>
|
||||
{{ range .Pages }}
|
||||
<article itemscope itemtype="http://schema.org/Article">
|
||||
<header class="post-header">
|
||||
<div class="post-meta-container">
|
||||
{{ $month := .Date.Format .Site.Params.monthFormat }}
|
||||
<time itemprop="dateCreated" datetime="{{ .Date.Format .Site.Params.timeFormat }}" content="{{ $month }}">
|
||||
{{ $month }}
|
||||
</time>
|
||||
</div>
|
||||
<div class="post-title">
|
||||
{{- if isset .Params "extlink" }}
|
||||
<a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title="">
|
||||
<span itemprop="name">{{- .Title -}}</span>
|
||||
<i class="fa fa-external-link-alt"></i>
|
||||
</a>
|
||||
{{- else }}
|
||||
<a class="post-title-link" href="{{ .Permalink }}" itemprop="url">
|
||||
<span itemprop="name">{{ .Title }}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</header>
|
||||
</article>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user