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

github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaron Schwartz <xaprb@users.noreply.github.com>2019-02-17 04:44:03 +0300
committerBaron Schwartz <xaprb@users.noreply.github.com>2019-02-17 04:44:03 +0300
commita62491c98c85ddb1c1acb0c53a3e050c6906a779 (patch)
treefc503ece88f2924b4207b7a3cd0773f2737af38f
parent35c2b3baf5423c3659135c833c632b083d00693b (diff)
render mailchimp html preview
-rw-r--r--exampleSite/content/mailchimp/_index.md1
-rw-r--r--layouts/_default/mailchimp.html38
2 files changed, 39 insertions, 0 deletions
diff --git a/exampleSite/content/mailchimp/_index.md b/exampleSite/content/mailchimp/_index.md
index 4593e53..1c53ad3 100644
--- a/exampleSite/content/mailchimp/_index.md
+++ b/exampleSite/content/mailchimp/_index.md
@@ -3,4 +3,5 @@ skip: true
layout: mailchimp
outputs:
- rss
+- html
---
diff --git a/layouts/_default/mailchimp.html b/layouts/_default/mailchimp.html
new file mode 100644
index 0000000..ca9e6b9
--- /dev/null
+++ b/layouts/_default/mailchimp.html
@@ -0,0 +1,38 @@
+{{ define "title" }}{{ .Section | title }} &bullet; {{ .Site.Title }}{{ end }}
+{{ define "main" }}
+<div class="pa3 pa4-ns w-100 w-70-ns center">
+ <section class="w-100 mw8">
+ {{- $hdr := cond (or (in .Site.Params.classes "feature-nohdr") (in .Params.classes "feature-nohdr")) false true -}}
+ {{ range first 20 (where (where (where .Site.RegularPages "Section" "ne" "slides") ".Params.skip" "ne" "true") ".Date.Unix" "<" now.Unix) }}
+ <div class="relative w-100">
+ <article>
+ <div class="db pv4 {{ cond $hdr "ph3" "" }} ph0-l no-underline dark-gray">
+ <div class="flex flex-column flex-row-ns">
+ {{ if $hdr }}
+ <div class="mb4 mb0-ns w-100 h4 h4-m w4-m h5-ns w5-ns br3 cover {{ if lt .Date.Unix now.Unix }}hide-child{{ end }}" style="background-image: url('{{ absURL (default "img/default-header-img.tn-500x500.jpg" (default .Params.image .Params.thumbnail)) }}'); background-position: center;">
+ <a href="{{ .Permalink }}" class="sans-serif db child w-100 h-100 f7 lh-copy white no-underline br3 ph3 pt4 pt5-l ttu tc bg-black-60">
+ <i class="mt3 mt5-l child far {{ cond (gt .Date.Unix now.Unix) "fa-hourglass" "fa-calendar-alt" }}"></i> {{ .Date.Format "Jan 2, 2006" }}
+ </a>
+ </div>
+ {{ end }}
+ <div class="w-100 w6-ns pl3-ns">
+ <h1 class="f3 fw1 mt0 lh-title"><a href="{{ .Permalink }}" class="color-inherit dim link">
+ {{- cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify) -}}
+ </a></h1>
+ <div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
+ {{ with .Params.tldr }}{{ . | markdownify | html }}{{ else }}{{ (printf "%s<br>%s" .Params.description .Summary) | markdownify | html }}{{ end }}
+ </div>
+ </div>
+ </div>
+ </div>
+ </article>
+ </div>
+
+ {{ end }}
+ </section>
+</div>
+{{ end }}
+
+{{ define "pagination" }}
+<br>
+{{ end }} \ No newline at end of file