Extract refrences partial; fix spacing bug
This commit is contained in:
@@ -17,22 +17,5 @@
|
|||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ with .Params.References }}
|
{{- partial "references.html" . -}}
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="references">
|
|
||||||
<h3>References</h3>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>
|
|
||||||
“<a href="{{ .url }}">{{ .title }}</a>”;
|
|
||||||
<a href="/archive/{{ .file }}">
|
|
||||||
backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -5,22 +5,5 @@
|
|||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ with .Params.References }}
|
{{- partial "references.html" . -}}
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="references">
|
|
||||||
<h3>References</h3>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>
|
|
||||||
“<a href="{{ .url }}">{{ .title }}</a>”;
|
|
||||||
<a href="/archive/{{ .file }}">
|
|
||||||
backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
17
themes/v2/layouts/partials/references.html
Normal file
17
themes/v2/layouts/partials/references.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{{ with .Params.References }}
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="references">
|
||||||
|
<h3>References</h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{{ range . }}
|
||||||
|
<li>“<a href="{{ .url }}">{{ .title }}</a>”;
|
||||||
|
<a href="/archive/{{ .file }}">
|
||||||
|
backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
Reference in New Issue
Block a user