Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mdashx/basicwebtheme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/preview-post.html')
-rw-r--r--layouts/partials/preview-post.html70
1 files changed, 70 insertions, 0 deletions
diff --git a/layouts/partials/preview-post.html b/layouts/partials/preview-post.html
new file mode 100644
index 0000000..2de519a
--- /dev/null
+++ b/layouts/partials/preview-post.html
@@ -0,0 +1,70 @@
+{{ if isset . "full" }}
+{{ if .full }}
+
+<!-- Show full post -->
+
+{{ if .page.PublishDate }}
+
+<!-- ...link with publish date -->
+
+<h2>{{ .page.Title }}</h2>
+
+<a href={{ .Permalink }}>
+ <em>{{ .page.PublishDate.Format "January 2, 2006" }}</em>
+</a>
+
+{{ else }}
+
+<!-- link with NO publish date -->
+
+<a href={{ .Permalink }}>
+ <h2>{{ .page.Title }}</h2>
+</a>
+
+{{ end }}
+
+<!-- /end link -->
+
+<div class="list-content">
+ {{ .page.Content }}
+</div>
+
+{{ end }}
+
+<!-- /end full post -->
+
+{{ else }}
+
+<!-- Show truncated post -->
+
+{{ if .PublishDate }}
+
+<!-- ...link with publish date -->
+
+<em>{{ .Title }}</em><span> - </span>
+
+<a href={{ .Permalink }}>
+ <em>{{ .PublishDate.Format "January 2, 2006" }}</em>
+</a>
+
+
+
+<!-- ...link with NO publish date -->
+
+{{ else }}
+
+<a href={{ .Permalink }}>
+ <em>{{ .Title }}</em>
+</a>
+
+{{ end }}
+
+<!-- /end link -->
+
+{{ .Content | truncate 200 }}
+
+{{ end }}
+
+<!-- /end truncated post -->
+
+<hr />