Files
hugo-cwpearson/themes/academic/layouts/partials/widgets/publications.html
Carl Pearson c86ae95ea6 add theme
2017-07-18 17:40:37 -04:00

36 lines
1.1 KiB
HTML

{{ $ := .root }}
{{ $page := .page }}
{{ $pubs_len := len (where $.Data.Pages "Type" "publication") }}
<!-- Publications widget -->
<div class="row">
<div class="col-xs-12 col-md-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $pubs_len $page.Params.count }}
<p class="view-all">
<a href="{{ "/publication/" | relLangURL }}">
{{ i18n "more_publications" | markdownify }}
<i class="fa fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div>
<div class="col-xs-12 col-md-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $page.Params.detailed_list }}
{{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
{{ partial "publication_li_detailed" . }}
{{ end }}
{{ else }}
<ul class="fa-ul">
{{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
{{ partial "publication_li_simple" . }}
{{ end }}
</ul>
{{ end }}
</div>
</div>