From 2ab49f97ee8f95e14ed3ff0eafcc789a05920ec1 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 6 Sep 2020 14:18:38 +0200 Subject: [PATCH] feat: add default/list fix warning: found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. --- assets/scss/partials/article.scss | 5 ++++- assets/scss/partials/pagination.scss | 4 ++-- layouts/_default/list.html | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 layouts/_default/list.html diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index 76ccc48..4acd166 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -6,12 +6,15 @@ article { display: flex; flex-direction: column; - margin-bottom: var(--section-separation); background-color: var(--card-background); @include box_shadow(1); border-radius: var(--card-border-radius); overflow: hidden; + &:not(:last-of-type) { + margin-bottom: var(--section-separation); + } + .article-image { img { width: 100%; diff --git a/assets/scss/partials/pagination.scss b/assets/scss/partials/pagination.scss index 0b3fcc8..ef6b2bd 100644 --- a/assets/scss/partials/pagination.scss +++ b/assets/scss/partials/pagination.scss @@ -5,8 +5,8 @@ border-radius: var(--card-border-radius); overflow: hidden; flex-wrap: wrap; - margin-bottom: var(--section-separation); - + margin: var(--section-separation) 0; + .page-link { padding: 16px 32px; display: inline-flex; diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..613c68a --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,24 @@ +{{ define "body_class" }}3-column{{ end }} +{{ define "main" }} +
+ {{ partialCached "sidebar/left.html" . }} + +
+
+

{{ .Title }}

+
+ +
+ {{ range .Paginator.Pages }} + {{ partial "article-list/compact" . }} + {{ end }} +
+ + {{- partial "pagination.html" . -}} + + {{ partialCached "footer" . }} +
+ + {{ partialCached "sidebar/right.html" . }} +
+{{ end }} \ No newline at end of file