Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
193 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{{ $item := . }} | ||
|
||
{{/* Dynamic view adjusts to content type. */}} | ||
{{ $show_authors_only := false }}{{/* Show authors only or full metadata? */}} | ||
{{ $show_buttons := false }} | ||
{{ $link := $item.RelPermalink }} | ||
{{ $target := "" }} | ||
{{ if $item.Params.external_link }} | ||
{{ $link = $item.Params.external_link }} | ||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }} | ||
{{ end }} | ||
{{ if eq $item.Type "talk" }} | ||
{{ $show_authors_only = true }} | ||
{{ $show_buttons = true }} | ||
{{ else if eq $item.Type "publication" }} | ||
{{ $show_authors_only = true }} | ||
{{ $show_buttons = true }} | ||
{{ else if eq $item.Type "project" }} | ||
{{ $show_authors_only = true }} | ||
{{ $show_buttons = true }} | ||
{{ end }} | ||
|
||
{{/* Get summary. */}} | ||
{{ $summary := "" }} | ||
{{ if $item.Params.summary }} | ||
{{ $summary = $item.Params.summary | markdownify | emojify }} | ||
{{ else if .Params.abstract }} | ||
{{ $summary = .Params.abstract | markdownify | emojify | truncate (site.Params.abstract_length | default 135) }} | ||
{{ else if $item.Summary }} | ||
{{ $summary = $item.Summary }} | ||
{{ end }} | ||
|
||
<div class="media stream-item"> | ||
<div class="media-body"> | ||
|
||
<h3 class="article-title mb-0 mt-0"> | ||
<a href="{{$link}}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a> | ||
</h3> | ||
|
||
{{ with $summary }} | ||
<a href="{{ $item.RelPermalink }}" class="summary-link"> | ||
<div class="article-style"> | ||
{{.}} | ||
</div> | ||
</a> | ||
{{ end }} | ||
|
||
<div class="stream-meta article-metadata"> | ||
|
||
{{ if eq $item.Type "talk" }} | ||
<div> | ||
<span> | ||
{{ partial "functions/get_event_dates" $item }} | ||
</span> | ||
{{ with $item.Params.location }} | ||
<span class="middot-divider"></span> | ||
<span>{{ . }}</span> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
|
||
{{ if and $show_authors_only $item.Params.authors }} | ||
<div> | ||
{{ partial "page_metadata_authors" $item }} | ||
</div> | ||
{{ else if not $show_authors_only }} | ||
{{ partial "page_metadata" (dict "page" $item "is_list" 1) }} | ||
{{ end }} | ||
</div> | ||
|
||
{{ if $show_buttons }} | ||
<div class="btn-links"> | ||
{{ partial "page_links" (dict "page" $item "is_list" 1) }} | ||
</div> | ||
{{ end }} | ||
|
||
</div> | ||
<div class="ml-3"> | ||
{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} | ||
{{ with $resource }} | ||
{{ $image := .Resize "150x" }} | ||
<a href="{{$link}}" {{ $target | safeHTMLAttr }}> | ||
<img data-src="{{ $image.RelPermalink }}" alt="{{ $item.Title }}" class="lazyload"> | ||
</a> | ||
{{end}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{{ $item := .item }} | ||
{{ $widget := .widget }} | ||
|
||
{{ $link := .link }} | ||
{{ $target := .target }} | ||
|
||
{{/* Get summary. */}} | ||
{{ $summary := "" }} | ||
{{ if $item.Params.summary }} | ||
{{ $summary = $item.Params.summary | markdownify | emojify }} | ||
{{ else if .Params.abstract }} | ||
{{ $summary = .Params.abstract | markdownify | emojify | truncate (site.Params.abstract_length | default 135) }} | ||
{{ else if $item.Summary }} | ||
{{ $summary = $item.Summary }} | ||
{{ end }} | ||
|
||
{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} | ||
{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }} | ||
|
||
<div class="project-card project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}"> | ||
<div class="card"> | ||
{{ with $resource }} | ||
{{ $image := .Resize (printf "550x q90 %s") }} | ||
<a href="{{ $link }}" {{ $target | safeHTMLAttr }} class="card-image hover-overlay"> | ||
<img data-src="{{ $image.RelPermalink }}" alt="" class="img-responsive lazyload"> | ||
</a> | ||
{{ end }} | ||
<div class="card-text"> | ||
<h4><a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{ $item.Title | markdownify | emojify }}</a></h4> | ||
{{ with $summary }} | ||
<div class="article-style"> | ||
<p>{{ . }}</p> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.