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>2018-09-27 03:25:46 +0300
committerBaron Schwartz <xaprb@users.noreply.github.com>2018-09-27 03:25:46 +0300
commitdbf2c7f52859363e9cc2d3f522d0cc2aa6809acf (patch)
tree5fc332ae3a450063c730a8c45c8785a99933fb6c
parent229ec7e0b87f635dc4b6ed7527cb260fa85fcca7 (diff)
add publish date to preview images; fix markdownify title bug
-rw-r--r--layouts/index.json2
-rw-r--r--layouts/partials/li.html9
2 files changed, 6 insertions, 5 deletions
diff --git a/layouts/index.json b/layouts/index.json
index 413be9e..52b514b 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}}
{{- range where .Site.Pages ".Params.skip" "ne" "true" -}}
-{{- $.Scratch.Add "index" (dict "uri" .Permalink "title" (cond (eq .Site.Params.titlecase true) (.Title | title) (.Title | markdownify)) "categories" .Params.categories "keywords" .Params.keywords "content" .Summary) -}}
+{{- $.Scratch.Add "index" (dict "uri" .Permalink "title" (cond (eq .Site.Params.titlecase true) (.Title | title | markdownify) (.Title | markdownify)) "categories" .Params.categories "keywords" .Params.keywords "content" .Summary) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
diff --git a/layouts/partials/li.html b/layouts/partials/li.html
index c329924..5a202e9 100644
--- a/layouts/partials/li.html
+++ b/layouts/partials/li.html
@@ -4,16 +4,17 @@
<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="pr3-ns mb4 mb0-ns w-100 h4 h4-m w4-m h5-ns w5-ns br3 cover" 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="db w-100 h-100 f5-l f7 white no-underline pa3">
- {{- if and (eq .Section "talks") (gt .Date.Unix now.Unix) }}<i class="far fa-hourglass tc bg-black-60 pa2 pa3-ns br3 ba b--white shadow-2"> {{ .Date.Format "Jan 2006" }}</i>{{ end -}}
+ <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="db child w-100 h-100 f7 lh-copy white no-underline br3 pa3 ttu tc bg-black-60">
+ <div style="width: 0" class="dn-s dn-m dib-l v-mid h-100"></div>
+ <i class="dib v-mid child far {{ cond (gt .Date.Unix now.Unix) "fa-hourglass" "fa-calendar-alt" }}"> {{ .Date.Format "Jan 2, 2006" }}</i>
</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">
{{- if eq .Section "talks" }}{{ .Params.event }}: {{ end -}}
- {{- cond (eq .Site.Params.titlecase true) (.Title | title) (.Title | markdownify) -}}
+ {{- 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">
{{ if eq .Section "slides" }}