jlelse
/
Indieroad
Archived
1
Fork 0

Add option to display full content in summary, merge links into default layouts, display post series

This commit is contained in:
Jan-Lukas Else 2019-11-20 08:53:32 +01:00
parent 6635b18eec
commit cafec4b44c
5 changed files with 25 additions and 44 deletions

View File

@ -14,6 +14,9 @@
<p><audio controls preload="metadata" style="width: 100%;"><source src="{{ . }}"/></audio></p>
{{ end }}
{{ .Content }}
{{ with .Params.externalUrl }}
<p>{{ . | markdownify }}</p>
{{ end }}
</div>
{{ partial "post_tags.html" . }}
</article>

View File

@ -1,18 +1,33 @@
<article class="list-item h-entry">
<div class="list-header">
{{ if .Title }}
{{ if .Params.externalURL }}
<a href="{{ .Params.externalURL }}">
<h2 class="list-title p-name">{{ .Title }}</h2>
</a>
{{ else }}
<a href="{{ .RelPermalink }}">
<h2 class="list-title p-name">{{ .Title }}</h2>
</a>
{{ end }}
{{ end }}
{{ with partial "post_meta.html" . }}
<div class="list-meta">{{ . }}</div>
{{ end }}
</div>
{{ if .Params.showFull }}
<div class="list-excerpt e-content">
{{ .Content }}
</div>
<div class="list-footer">
<a class="read-more u-url" href="{{ .RelPermalink }}">{{ T "permalink" }}</a>
</div>
{{ else }}
<div class="list-excerpt p-summary">
{{ .Summary }}
</div>
<div class="list-footer">
<a class="u-url read-more" href="{{ .RelPermalink }}">{{ T "read_more" }}</a>
</div>
{{ end }}
</article>

View File

@ -1,22 +0,0 @@
{{ define "main" }}
<main class="main h-entry">
<article>
<header class="main-header">
{{ with .Title }}
<h1 class="p-name post-title">{{ . }}</h1>
{{ end }}
{{ with partial "post_meta.html" . }}
<div class="post-meta">{{ . }}</div>
{{ end }}
</header>
<div class="e-content content clearfix">
{{ .Content }}
<p>{{ .Params.externalUrl | markdownify }}</p>
</div>
{{ partial "post_tags.html" . }}
</article>
{{ partial "authorbox.html" . }}
</main>
{{ partial "webmentionform" . }}
{{ partial "post_nav.html" . }}
{{ end }}

View File

@ -1,18 +0,0 @@
<article class="list-item h-entry">
<div class="list-header">
{{ if .Title }}
<a href="{{ .Params.externalURL }}">
<h2 class="list-title p-name">{{ .Title }}</h2>
</a>
{{ end }}
{{ with partial "post_meta.html" . -}}
<div class="list-meta">{{ . }}</div>
{{- end }}
</div>
<div class="list-excerpt e-content">
{{ .Content }}
</div>
<div class="list-footer">
<a class="read-more u-url" href="{{ .RelPermalink }}">{{ T "permalink" }}</a>
</div>
</article>

View File

@ -1,9 +1,12 @@
{{- if .Params.tags }}
{{ if or .Params.tags .Params.series }}
<div class="tags">
<ul class="tags-list">
{{- range .Params.tags }}
{{ range .Params.series }}
<li class="tag-item"><a class="tag-link" href="{{ "series/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a></li>
{{ end }}
{{ range .Params.tags }}
<li class="tag-item"><a class="tag-link p-category" href="{{ "tags/" | relLangURL }}{{ . | urlize }}/" rel="tag">{{ . }}</a></li>
{{- end }}
{{ end }}
</ul>
</div>
{{- end }}
{{ end }}