Files
HugoBlox-kit/layouts/partials/widgets/publications_featured.html
T
George Cushen 7c2a85c351 feat: improve listings
- link author profile pages in listings
- display author name (rather than username) in metadata
- refactor `list_format` to `view` and use new consistent mappings
- add `citation_style` in `params.toml`
- re-order Accomplishments widget in Demo
- make params/comments more consistent in all widget front matter
- Author page: don't show username if profile exists as that will
  already show the user's display name
- Publication card: move author and publication name to metadata bar to
  be consistent with other listings
- Remove portrait.jpg from static as it was duplicated for Demo author

BREAKING CHANGES: See issue below.

See #909
2019-02-04 22:14:28 +00:00

34 lines
1.3 KiB
HTML

{{ $ := .root }}
{{ $page := .page }}
<!-- Featured Publications widget -->
<div class="row">
<div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
</div>
<div class="col-12 col-lg-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }}
{{ $.Scratch.Set "sel_pubs" (where (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }}
{{ else }}
{{ $.Scratch.Set "sel_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) }}
{{ end }}
{{ $sel_pubs := $.Scratch.Get "sel_pubs" }}
{{ range $sel_pubs }}
{{ if eq $page.Params.view 1 }}
{{ partial "publication_li_list" . }}
{{ else if eq $page.Params.view 3 }}
{{ partial "publication_li_card" . }}
{{ else if eq $page.Params.view 4 }}
{{ partial "publication_li_citation" . }}
{{ else }}
{{ partial "publication_li_compact" . }}
{{ end }}
{{ end }}
</div>
</div>