Ability to display well formatter longer description in talks page
By default content is used as a subtitle - displayed right under Title without extra formatting (to keep backward compatibility). However, it doesn't look good to longer (multiline) content (margins, etc.). For that cases there is an option to define the Subtitle parameter in _index.md to render is as a subtitle and then .Content is rendered within the main tag with better formatting.
This commit is contained in:
parent
6e80fe903f
commit
f28aaef6d3
|
@ -5,11 +5,21 @@
|
|||
<h3 class="h3 terms__title">
|
||||
{{ .Title }}
|
||||
</h3>
|
||||
{{ if not .Params.subtitle }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
<main class="main archive">
|
||||
{{ if .Params.subtitle }}
|
||||
<div class="archive__content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<h4 class="archive__subtitle">
|
||||
{{ .Params.subtitle }}
|
||||
</h4>
|
||||
{{ end }}
|
||||
<div class="archive__container">
|
||||
{{ $pages := (where .Site.RegularPages "Section" "talks") }}
|
||||
{{ $paginator := .Paginate ($pages.GroupByPublishDate ($.Param "talksGroupByDate" | default "2006")) ($.Param "talksPaginate") }}
|
||||
|
|
Loading…
Reference in New Issue