diff --git a/i18n/en.yaml b/i18n/en.yaml index f430cfd1..ed9850cb 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -95,9 +95,6 @@ # Posts widget -- id: continue_reading - translation: CONTINUE READING - - id: more_posts translation: See all posts diff --git a/layouts/partials/css/academic.css b/layouts/partials/css/academic.css index ecb32101..58cba87b 100644 --- a/layouts/partials/css/academic.css +++ b/layouts/partials/css/academic.css @@ -1043,11 +1043,13 @@ article .article-metadata { margin-bottom: 2rem; } -.media.stream-item .article-title { +.media.stream-item .article-title, +.card-simple .article-title { font-size: 1.2rem; } -.media.stream-item .article-style { +.media.stream-item .article-style, +.card-simple .article-style { margin-top: 2px; font-size: 0.8rem; } diff --git a/layouts/partials/li_card.html b/layouts/partials/li_card.html new file mode 100644 index 00000000..5a86369b --- /dev/null +++ b/layouts/partials/li_card.html @@ -0,0 +1,82 @@ +{{ $item := . }} + +{{ $microdata_type := "CreativeWork" }} +{{ $show_buttons := false }} + +{{/* Dynamic view adjusts to content type. */}} +{{ if eq $item.Type "post" }} + {{ $microdata_type = "BlogPosting" }} +{{ else if eq $item.Type "talk" }} + {{ $microdata_type = "Event" }} + {{ $show_buttons = true }} +{{ else if eq $item.Type "publication" }} + {{ $microdata_type = "ScholarlyArticle" }} + {{ $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 }} +{{ else if $item.Truncated }} + {{ $summary = $item.Summary }} +{{ else }} + {{ $summary = $item.Content }} +{{ end }} + +
+ + {{ if eq $item.Type "talk" }} +
+ {{ if $item.Params.authors }} + + {{ end }} + + {{ $date := $item.Params.time_start | default $item.Date }} + {{ (time $date).Format $.Site.Params.date_format }} + {{ if not $item.Params.all_day }} + {{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }} + {{ with .Params.time_end }} + — {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }} + {{ end }} + {{ end }} + + {{ with $item.Params.location }} + + {{ . }} + {{ end }} +
+ {{ else }} + {{ partial "page_metadata" (dict "content" $item "is_list" 1) }} + {{ end }} + + {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} + {{ $anchor := $item.Params.image.focal_point | default "Smart" }} + {{ with $resource }} + {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }} + + + + {{end}} + +

+ +

+ + {{ with $summary }} +
+ {{ . }} +
+ {{ end }} + + {{ if $show_buttons }} + + {{ end }} + +
diff --git a/layouts/partials/publication_li_citation.html b/layouts/partials/li_citation.html similarity index 100% rename from layouts/partials/publication_li_citation.html rename to layouts/partials/li_citation.html diff --git a/layouts/partials/post_li_card.html b/layouts/partials/post_li_card.html deleted file mode 100644 index c9455386..00000000 --- a/layouts/partials/post_li_card.html +++ /dev/null @@ -1,31 +0,0 @@ -{{ $post := . }} - -
- {{ partial "page_metadata" (dict "content" $post "is_list" 1) }} - - {{ $resource := ($post.Resources.ByType "image").GetMatch "*featured*" }} - {{ $anchor := $post.Params.image.focal_point | default "Smart" }} - {{ with $resource }} - {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }} - - - - {{end}} -

- -

-
- {{ if $post.Params.summary }} -

{{ printf "%s" $post.Params.summary | markdownify }}

- {{ else if $post.Truncated }} - {{ $post.Summary }} - {{ else }} - {{ $post.Content }} - {{ end }} -
-

- - {{ i18n "continue_reading" }} - -

-
diff --git a/layouts/partials/publication_li_card.html b/layouts/partials/publication_li_card.html deleted file mode 100644 index 454d26cb..00000000 --- a/layouts/partials/publication_li_card.html +++ /dev/null @@ -1,31 +0,0 @@ -
- {{ partial "page_metadata" (dict "content" $ "is_list" 1) }} - - {{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }} - {{ $anchor := .Params.image.focal_point | default "Smart" }} - {{ with $resource }} - {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }} -
- - - -
- {{end}} - -

- -

- -
- {{ if .Params.abstract_short }} - {{ .Params.abstract_short | markdownify }} - {{ else }} - {{ .Params.abstract | markdownify}} - {{ end }} -
- - - -
diff --git a/layouts/partials/talk_li_card.html b/layouts/partials/talk_li_card.html deleted file mode 100644 index f87c8b90..00000000 --- a/layouts/partials/talk_li_card.html +++ /dev/null @@ -1,49 +0,0 @@ -
- - {{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }} - {{ $anchor := .Params.image.focal_point | default "Smart" }} - {{ with $resource }} - {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }} -
- - - -
- {{end}} - -

- -

- -
- {{ $date := .Params.time_start | default .Date }} - {{ (time $date).Format $.Site.Params.date_format }} - {{ if not .Params.all_day }} - {{ (time $date).Format ($.Site.Params.time_format | default "3:04 PM") }} - {{ with .Params.time_end }} - — {{ (time .).Format ($.Site.Params.time_format | default "3:04 PM") }} - {{ end }} - {{ end }} -
- -
- {{ if .Params.event }} - {{ .Params.event | markdownify }} - {{ else if .Params.event_short }} - {{ .Params.event_short | markdownify }} - {{ end }} -
- -
- {{ if .Params.abstract_short }} - {{ .Params.abstract_short | markdownify }} - {{ else }} - {{ .Params.abstract | markdownify }} - {{ end }} -
- - - -
diff --git a/layouts/partials/widgets/posts.html b/layouts/partials/widgets/posts.html index f2978194..0bc2257a 100644 --- a/layouts/partials/widgets/posts.html +++ b/layouts/partials/widgets/posts.html @@ -29,7 +29,7 @@ {{ if eq $page.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} - {{ partial "post_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/partials/widgets/publications.html b/layouts/partials/widgets/publications.html index 822e503d..d9fb7e70 100644 --- a/layouts/partials/widgets/publications.html +++ b/layouts/partials/widgets/publications.html @@ -24,9 +24,9 @@ {{ if eq $page.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} - {{ partial "publication_li_card" . }} + {{ partial "li_card" . }} {{ else if eq $page.Params.view 4 }} - {{ partial "publication_li_citation" . }} + {{ partial "li_citation" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/partials/widgets/publications_featured.html b/layouts/partials/widgets/publications_featured.html index 6e2ba6d4..994cfcf1 100644 --- a/layouts/partials/widgets/publications_featured.html +++ b/layouts/partials/widgets/publications_featured.html @@ -21,9 +21,9 @@ {{ if eq $page.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} - {{ partial "publication_li_card" . }} + {{ partial "li_card" . }} {{ else if eq $page.Params.view 4 }} - {{ partial "publication_li_citation" . }} + {{ partial "li_citation" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/partials/widgets/talks.html b/layouts/partials/widgets/talks.html index b691cd2e..e2b377e6 100644 --- a/layouts/partials/widgets/talks.html +++ b/layouts/partials/widgets/talks.html @@ -22,7 +22,7 @@ {{ if eq $page.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} - {{ partial "talk_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/partials/widgets/talks_featured.html b/layouts/partials/widgets/talks_featured.html index 47ede597..4075c6d4 100644 --- a/layouts/partials/widgets/talks_featured.html +++ b/layouts/partials/widgets/talks_featured.html @@ -14,7 +14,7 @@ {{ if eq $page.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} - {{ partial "talk_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/project/single.html b/layouts/project/single.html index 08a58519..71bb9ccc 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -25,7 +25,7 @@ {{ if eq $page.Site.Params.projects.post_view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.post_view 3 }} - {{ partial "post_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} @@ -40,9 +40,9 @@ {{ if eq $page.Site.Params.projects.publication_view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.publication_view 3 }} - {{ partial "publication_li_card" . }} + {{ partial "li_card" . }} {{ else if eq $page.Site.Params.projects.publication_view 4 }} - {{ partial "publication_li_citation" . }} + {{ partial "li_citation" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} @@ -57,7 +57,7 @@ {{ if eq $page.Site.Params.projects.talk_view 1 }} {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.talk_view 3 }} - {{ partial "talk_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/section/post.html b/layouts/section/post.html index be828582..da41003e 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -14,7 +14,7 @@ {{ if eq $.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} - {{ partial "post_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/section/publication.html b/layouts/section/publication.html index 13bed7c4..dd92e30a 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -62,9 +62,9 @@ {{ if eq $.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} - {{ partial "publication_li_card" . }} + {{ partial "li_card" . }} {{ else if eq $.Params.view 4 }} - {{ partial "publication_li_citation" . }} + {{ partial "li_citation" . }} {{ else }} {{ partial "li_compact" . }} {{ end }} diff --git a/layouts/section/talk.html b/layouts/section/talk.html index 3886880c..d683988b 100644 --- a/layouts/section/talk.html +++ b/layouts/section/talk.html @@ -22,7 +22,7 @@ {{ if eq $.Params.view 1 }} {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} - {{ partial "talk_li_card" . }} + {{ partial "li_card" . }} {{ else }} {{ partial "li_compact" . }} {{ end }}