diff options
-rw-r--r-- | exampleSite/content/mailchimp/_index.md | 1 | ||||
-rw-r--r-- | layouts/_default/mailchimp.html | 38 |
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 }} • {{ .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 |