mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
Add option to hide talk time (#350)
* Add `[params.talks]` section to config
This commit is contained in:
parent
73f8fac2b5
commit
acbeb3da92
4 changed files with 18 additions and 7 deletions
|
@ -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 )
|
||||
|
|
|
@ -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 }}
|
||||
— {{ (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 }}
|
||||
— {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
— {{ (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 }}
|
||||
— {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue