mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2024-11-09 21:49:41 +00:00
Move sources and changelog to it's own partial
This commit is contained in:
parent
0a6245431a
commit
70d3e26b86
29
layouts/partials/content-info.html
Normal file
29
layouts/partials/content-info.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<div class="content-info">
|
||||
{{ if .Params.Sources }}
|
||||
<div id="sources">
|
||||
<h2>Sources</h2>
|
||||
<ul>
|
||||
{{ range $i, $e := .Params.Sources }}
|
||||
<li>{{ markdownify $e }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Params.Changelog }}
|
||||
<div id="changelog">
|
||||
<h2> Changelog</h2>
|
||||
<ul class="changelog-time">
|
||||
{{ range $i, $e := .Params.Changelog }}
|
||||
<li>
|
||||
{{ time $i | time.Format "2006-01-02" }}:
|
||||
<ul>
|
||||
{{ range $c := $e }}
|
||||
<li>{{ markdownify $c }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -31,33 +31,9 @@
|
|||
|
||||
{{ .Content }}
|
||||
|
||||
|
||||
<div id="sources">
|
||||
{{ if .Params.Sources }}
|
||||
<h2>Sources</h2>
|
||||
<ul>
|
||||
{{ range $i, $e := .Params.Sources }}
|
||||
<li>{{ markdownify $e }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div id="changelog">
|
||||
{{ if .Params.Changelog }}
|
||||
<h2> Changelog</h2>
|
||||
<ul class="changelog-time">
|
||||
{{ range $i, $e := .Params.Changelog }}
|
||||
<li>
|
||||
{{ time $i | time.Format "2006-01-02" }}:
|
||||
<ul>
|
||||
{{ range $c := $e }}
|
||||
<li>{{ markdownify $c }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if or .Params.Sources .Params.Changelog }}
|
||||
<hr>
|
||||
{{ partial "content-info.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue