hello
This commit is contained in:
parent
b7ee2a6dae
commit
749310f99f
3 changed files with 41 additions and 6 deletions
|
@ -373,8 +373,7 @@ title="Home Page"
|
|||
|
||||
|
||||
[permalinks]
|
||||
[permalinks.page]
|
||||
blog = '/blog/:year/:slug/'
|
||||
blog = "/blog/:year/:slugorfilename/"
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
|
|
36
layouts/blog/:year/list.html
Normal file
36
layouts/blog/:year/list.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{{ define "main" }}
|
||||
<div class="cover">
|
||||
<div class="cover-back"></div>
|
||||
<div class="cover-container">
|
||||
<div class="container mx-auto">
|
||||
<div class="cover-title">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<main class="content container mx-auto">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<div class="post-title">
|
||||
{{ if eq $listtitle "Posts" }}
|
||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
|
@ -70,8 +70,8 @@
|
|||
<div class="mt-6 pt-2 blog-pagination">
|
||||
<div class="blog-pagination-previous">
|
||||
<a
|
||||
class="{{ if .Paginator.HasPrev }}disabled{{end}}"
|
||||
class="button button-primary mobile-icon"
|
||||
class="button button-primary mobile-icon {{ if (not .Paginator.HasPrev) }}disabled{{end}}"
|
||||
{{ if (not .Paginator.HasPrev) }}disabled{{end}}
|
||||
href="{{ if .Paginator.HasPrev}}{{.Paginator.Prev.URL}}{{ end }}">
|
||||
<div class="button-icon">
|
||||
<i class="fa fas fa-arrow-left"></i>
|
||||
|
@ -86,8 +86,8 @@
|
|||
</div>
|
||||
<div class="blog-pagination-next">
|
||||
<a
|
||||
class="{{ if .Paginator.HasNext }}disabled{{end}}"
|
||||
class="button button-primary mobile-icon"
|
||||
class="button button-primary mobile-icon {{ if (not .Paginator.HasNext) }}disabled{{end}}"
|
||||
{{ if (not .Paginator.HasNext) }}disabled{{end}}
|
||||
href="{{ if .Paginator.HasNext }}{{.Paginator.Next.URL }}{{end}}">
|
||||
<div class="link button-text">
|
||||
{{ site.Params.next }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue