diff options
| author | nanxiaobei <nanxiaobei@gmail.com> | 2019-03-31 20:32:06 +0800 |
|---|---|---|
| committer | nanxiaobei <nanxiaobei@gmail.com> | 2019-03-31 20:32:06 +0800 |
| commit | 8088299ecb919f61daff669c9c25b6e1ca5924c1 (patch) | |
| tree | 2c4b0dbe9b2787ed688d6feec2afce2707329ff6 /layouts/_default | |
| parent | 55dc991f4c5e269e81bc1a5fc16224191f980c7b (diff) | |
Update for 3.0
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/list.html | 46 | ||||
| -rw-r--r-- | layouts/_default/single.html | 6 |
2 files changed, 27 insertions, 25 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5433b17..94ad1b8 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,44 +1,46 @@ {{ partial "header.html" . }} + {{ if not .IsHome }} -<header class="list-header"> - {{ if eq .Data.Singular "tag" }}<span>Tagged in</span> - <h1 class="list-title">{{ .Data.Term }}</h1> - {{ else }}<h1 class="list-title">Posts</h1> +<header class="page-header"> + {{ if eq .Data.Singular "tag" }} + <div class="tagged">Tagged in</div> + <h1>{{ .Data.Term }}</h1> + {{ else }} + <h1>Posts</h1> {{ end }} </header> {{ end }} -{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") (index .Site.Params "paginate" | default 10) }} + +{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") }} + {{ if gt $paginator.TotalPages 0 }} {{ range $index, $page := $paginator.Pages }} -{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }} -{{ .Scratch.Set "postClass" "first-entry" }} -{{ .Scratch.Set "firstEmoji" "<span class=\"welcome-emoji\">๐</span>" }} -{{ else }} -{{ .Scratch.Set "postClass" "post-entry" }} -{{ end }} -<article class="post {{ .Scratch.Get `postClass` }}"> - <header class="post-header"> - {{ safeHTML (.Scratch.Get `firstEmoji`) }} - <h2 class="post-title">{{ .Title }}</h2> +<article class="post-entry"> + <header class="entry-header"> + <h2>{{ .Title }}</h2> </header> - <p class="post-summary">{{ .Summary | plainify | htmlUnescape }}...</p> - <footer class="post-footer"> - <p class="post-meta">{{ .Date.Format "2006.1.2" }}</p> + <section class="entry-content"> + <p>{{ .Summary | plainify | htmlUnescape }}...</p> + </section> + <footer class="entry-footer"> + <time >{{ .Date.Format "2006.1.2" }}</time> </footer> - <a class="post-link" href="{{ .Permalink }}"></a> + <a class="entry-link" href="{{ .Permalink }}"></a> </article> {{ end }} {{ end }} + {{ if gt $paginator.TotalPages 1 }} -<footer class="list-footer"> +<footer class="page-footer"> <nav class="pagination"> {{ if $paginator.HasPrev }} - <a class="pagination-prev" href="{{ $paginator.Prev.URL }}">โ {{ i18n "prevPage" }}</a> + <a class="prev" href="{{ $paginator.Prev.URL }}">โ {{ i18n "prevPage" }}</a> {{ end }} {{ if $paginator.HasNext }} - <a class="pagination-next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} โ</a> + <a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} โ</a> {{ end }} </nav> </footer> {{ end }} + {{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6d0935e..25fdb5c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,12 +1,12 @@ {{ partial "header.html" . }} -<article class="post post-view"> +<article class="post-single"> <header class="post-header"> <h1 class="post-title">{{ .Title }}</h1> - <p class="post-meta"> + <div class="post-meta"> {{- if or .Params.author .Site.Params.author -}} {{ .Params.author | default .Site.Params.author }} ยท {{ end }} {{- .Date.Format "2006.1.2" -}} - </p> + </div> </header> <div class="post-content">{{ .Content }}</div> <footer class="post-footer"> |
