mirror of
https://github.com/lmika/postlist-for-micro.blog.git
synced 2025-08-02 07:46:08 +00:00
Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
|
ea5168b7a2 | ||
|
ce7ec1e72a | ||
|
7a843af74a | ||
|
76675a7897 | ||
|
7168f63e77 | ||
|
0c1054e20f | ||
|
79e4f94a6c |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.DS_Store
|
|
@ -18,14 +18,53 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
<ul class="postlist">
|
||||
{{ range $pgr }}
|
||||
{{- if (ne .LinkTitle "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- else if (ne .Summary "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Summary | safeHTML | truncate 70 }}</a></li>
|
||||
{{- if (ne (.Get "limit") "") -}}
|
||||
{{- $pgr = $pgr.Limit (int (.Get "limit")) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if (eq (.Get "display") "content") -}}
|
||||
{{ if templates.Exists "partials/_postlist/post-content-before.html" }}
|
||||
{{ partial "_postlist/post-content-before.html" $pgr }}
|
||||
{{ end }}
|
||||
<div class="postlist postlist-display-content h-feed">
|
||||
{{ range $pgr }}
|
||||
{{ if templates.Exists "partials/_postlist/post-content.html" }}
|
||||
{{ partial "_postlist/post-content.html" . }}
|
||||
{{ else }}
|
||||
<div class="h-entry">
|
||||
{{ if .Title }}
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ if .Params.custom_summary }}
|
||||
<div class="p-summary">
|
||||
<p>{{ .Summary | safeHTML }}<p>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if templates.Exists "partials/_postlist/post-content-after.html" }}
|
||||
{{ partial "_postlist/post-content-after.html" $pgr }}
|
||||
{{ end }}
|
||||
{{- else -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Content | safeHTML | truncate 70 }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
<ul class="postlist">
|
||||
{{ range $pgr }}
|
||||
{{- if (ne .LinkTitle "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- else if (ne .Summary "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Summary | safeHTML | truncate 70 }}</a></li>
|
||||
{{- else -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Content | safeHTML | truncate 70 }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end -}}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"title": "Postlist",
|
||||
"description": "Shortcode for dynamically adding a list of posts",
|
||||
"includes": [
|
||||
|
|
Loading…
Reference in a new issue