mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-08 18:15:23 +00:00
Add option to hide talk time (#350)
* Add `[params.talks]` section to config
This commit is contained in:
1 parent
73f8fac2b5
commit
acbeb3da92
4 files changed
+18
-7
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user