Files
HugoBlox-kit/layouts/section/publication.html
T
George Cushen 1584b2db62 refactor: consolidate and simplify compact views
- Consolidate the code for all compact views into a single file
- Make authors clickable in all compact views
- Improve archetypes

BREAKING CHANGES:
`abstract_short` field dropped in publications and talks in favour of
`summary` field.

See #918
See https://github.com/gcushen/hugo-academic/issues/916#issuecomment-462274214
2019-02-11 13:59:18 +00:00

80 lines
2.6 KiB
HTML

{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "page_header.html" . }}
<div class="universal-wrapper">
<div class="row">
<div class="col-lg-12">
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
{{ end }}
{{/* Array of distinct years. */}}
{{ range .Pages.ByDate.Reverse }}
{{ $year := print (.Date.Format "2006") }}
{{ $.Scratch.SetInMap "years" $year $year }}
{{ end }}
<div class="form-row mb-3">
<div class="col-auto">
{{ i18n "filter_by_type" }}:
</div>
<div class="col-auto">
<select class="pub-filters pubtype-select form-control form-control-sm" data-filter-group="pubtype">
<option value="*">{{ i18n "filter_all" }}</option>
{{ partial "pub_types.html" $ }}
{{ range $index, $taxonomy := .Site.Taxonomies.publication_types }}
<option value=".pubtype-{{ (int $index) }}">
{{ $pub_types := $.Scratch.Get "pub_types" }}
{{ index $pub_types (int $index) }}
</option>
{{ end }}
</select>
</div>
<div class="col-auto">
<select class="pub-filters form-control form-control-sm" data-filter-group="year">
<option value="*">{{ i18n "filter_all" }}</option>
{{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
{{ if $years_sorted }}
{{ range $year := sort $years_sorted "" "desc" }}
<option value=".year-{{ $year }}">
{{ $year }}
</option>
{{ end }}
{{ end }}
</select>
</div>
</div>
<div id="container-publications">
{{ range .Pages.ByDate.Reverse }}
{{ if .Params.publication_types }}
{{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }}
{{ else }}
{{ $.Scratch.Set "pubtype" 0 }}
{{ end }}
<div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
{{ if eq $.Params.view 1 }}
{{ partial "li_list" . }}
{{ else if eq $.Params.view 3 }}
{{ partial "publication_li_card" . }}
{{ else if eq $.Params.view 4 }}
{{ partial "publication_li_citation" . }}
{{ else }}
{{ partial "li_compact" . }}
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}