mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-02 01:37:33 -05:00
Move article.page wrapping to summary.html instead of at list template
I am trying to make various templates and partials act more like self-contained components. This is in preparation for #113.
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
<div class="page-list">
|
<div class="page-list">
|
||||||
{{ with . }}
|
{{ with . }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<article class="page">
|
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
</article>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
<article class="page">
|
||||||
<h2 class="page-title">
|
<h2 class="page-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
@@ -14,3 +15,4 @@
|
|||||||
<div class="readmore">
|
<div class="readmore">
|
||||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
@@ -11,9 +11,7 @@
|
|||||||
<div class="page-list">
|
<div class="page-list">
|
||||||
{{ with .Paginator.Pages }}
|
{{ with .Paginator.Pages }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<article class="page">
|
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
</article>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
<article class="page">
|
||||||
<h2 class="page-title">
|
<h2 class="page-title">
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
@@ -14,8 +15,7 @@
|
|||||||
|
|
||||||
<div class="page-list series-inner">
|
<div class="page-list series-inner">
|
||||||
{{ range .Data.Pages.Reverse }}
|
{{ range .Data.Pages.Reverse }}
|
||||||
<article class="page">
|
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
</article>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
<article class="page">
|
||||||
<h2 class="page-title">
|
<h2 class="page-title">
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
@@ -17,3 +18,4 @@
|
|||||||
<div class="readmore">
|
<div class="readmore">
|
||||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
Reference in New Issue
Block a user