Organize summary template files

Also a small CSS patch to fix margin around post-title
This commit is contained in:
BBaoVanC 2023-02-28 18:24:19 -06:00
parent 316c62ebe8
commit 6f140f096b
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
10 changed files with 12 additions and 30 deletions

View File

@ -175,15 +175,18 @@ pre > code {
.page-list .post,
.series-taxonomy-list .series-taxonomy,
.series-taxonomy .post {
padding-top: 8px;
padding-left: 24px;
padding-right: 24px;
padding-bottom: 24px;
padding: 24px;
border-radius: 12px;
background-color: var(--background-1);
color: var(--text-1);
}
.post > .post-title,
.series-taxonomy > .post-title,
.author > .author-name {
margin-top: 0;
}
.post-series-position {
position: relative;
float: right;

View File

@ -13,7 +13,7 @@
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary/section" }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ end }}

View File

@ -1,21 +0,0 @@
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -12,7 +12,7 @@
{{ with .Paginator.Pages }}
{{ range . }}
<article class="post">
{{ .Render "summary/author" }}
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}

View File

@ -2,7 +2,7 @@
{{ with . }}
{{ range . }}
<article class="post">
{{ .Render "summary/post" }}
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}

View File

@ -12,7 +12,7 @@
{{ with .Pages }}
{{ range . }}
<article class="series-taxonomy">
{{ .Render "summary/series" }}
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}

View File

@ -18,7 +18,7 @@
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<article class="post">
{{ .Render "summary/series_post" }}
{{ .Render "summary" }}
</article>
{{ end }}
</div>