diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4b2340..15f22a3 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,9 +6,12 @@
  • {{ .Title }}

    {{ partial "metadata.html" . }} + {{ if .Params.cws }} + {{ else }}

    {{ .Summary }}

    + {{ end }}
  • {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1c1d830..7ffcb2b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,5 +2,15 @@

    {{ .Title }}

    {{ partial "metadata.html" . }}

    +{{ if $.Params.cws }} +Content Warning: {{ range $i, $e := .Params.cws -}} +{{- if $i -}}, {{ end -}} +{{ $e | humanize }} +{{- end -}} + +{{ else }} {{ .Content }} +{{ end }} {{ end }} \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index 4f0b42a..99cd2c1 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -192,4 +192,12 @@ footer { pre, code { font-family: 'Liberation Mono', monospace; } - \ No newline at end of file + + /* For Content Warnings */ + label { + display: none; + } + + #cw:checked + label { + display: block; + } \ No newline at end of file