Add option to hide talk time (#350)

* Add `[params.talks]` section to config
This commit is contained in:
Sandra Parsick authored and gcushen committed 2017-10-26 22:15:54 +01:00
1 parent 73f8fac2b5
commit acbeb3da92
4 files changed
+18 -7

No files matched your search

+5
View File
@@ -143,6 +143,11 @@ defaultContentLanguageInSubdir = false
'Book chapter' # 6
]
# Configuration of talk pages.
[params.talks]
# Show talk time?
time = true
# Configuration of publication pages.
[params.publications]
# Date format (refer to Go's date format: http://fuckinggodateformat.com )
+5 -3
View File
@@ -33,9 +33,11 @@
<div class="talk-metadata" itemprop="startDate">
{{ $date := .Params.time_start | default .Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ with .Params.time_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ if $.Site.Params.talks.time }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ with .Params.time_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</div>
+3 -1
View File
@@ -4,7 +4,9 @@
<div itemprop="startDate">
{{ $date := .Params.time_start | default .Date }}
{{ (time $date).Format $.Site.Params.date_format }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ if $.Site.Params.talks.time }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ end }}
</div>
<div class="talk-metadata">
{{ if .Params.event_short }}
+5 -3
View File
@@ -34,9 +34,11 @@
{{ $date := .Params.time_start | default .Date }}
{{ (time $date).Format $.Site.Params.date_format }}
<div class="talk-time">
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ with .Params.time_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ if $.Site.Params.talks.time }}
{{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ with .Params.time_end }}
&mdash; {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
{{ end }}
{{ end }}
</div>
</div>