diff --git a/layouts/partials/css/academic.css b/layouts/partials/css/academic.css index b12c4ed3..206d6feb 100644 --- a/layouts/partials/css/academic.css +++ b/layouts/partials/css/academic.css @@ -1096,15 +1096,35 @@ article .article-metadata { } /************************************************* - * Publications + * List items **************************************************/ +.view-list-item { + margin-bottom: 1rem; +} + .pub-icon { color: rgba(0, 0, 0, 0.54); font-size: 0.81em; - padding-top: 6px; + padding-right: 6px; } +.view-list-item .article-metadata { + margin-bottom: 0; +} + +.pub-list-item .pub-abstract { + font-size: 1rem; +} + +.pub-list-item .btn-links { + padding-top: 10px; +} + +/************************************************* + * Publications + **************************************************/ + .pub-banner { max-width: 100%; height: auto; @@ -1116,14 +1136,6 @@ article .article-metadata { font-weight: bold; } -.pub-list-item .pub-abstract { - font-size: 1rem; -} - -.pub-list-item .btn-links { - padding-top: 10px; -} - #container-publications { display: block; position: relative; diff --git a/layouts/partials/li_list.html b/layouts/partials/li_list.html new file mode 100644 index 00000000..1b9a5810 --- /dev/null +++ b/layouts/partials/li_list.html @@ -0,0 +1,52 @@ +{{ $item := . }} + +{{ $microdata_type := "http://schema.org/CreativeWork" }} +{{ $icon := "fa-file-alt" }} +{{ $show_authors := false }} +{{ $show_buttons := false }} + +{{/* Dynamic view adjusts to content type. */}} +{{ if eq $item.Type "post" }} + {{ $microdata_type = "http://schema.org/BlogPosting" }} + {{ $icon = "fa-newspaper" }} +{{ else if eq $item.Type "talk" }} + {{ $microdata_type = "http://schema.org/Event" }} + {{ $icon = "fa-calendar-alt" }} +{{ else if eq $item.Type "publication" }} + {{ $show_authors = true }} + {{ $show_buttons = true }} +{{ end }} + +
+ + + + {{ if eq $item.Type "talk" }} +
+ + {{ $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") }} + {{ end }} + + {{ with $item.Params.location }} + + {{ . }} + {{ end }} +
+ {{ end }} + + {{ if $show_authors }} + + {{ end }} + + {{ if $show_buttons }} + + {{ end }} + +
diff --git a/layouts/partials/post_li_list.html b/layouts/partials/post_li_list.html deleted file mode 100644 index b1435cec..00000000 --- a/layouts/partials/post_li_list.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ $post := . }} - -
- - -
diff --git a/layouts/partials/publication_li_list.html b/layouts/partials/publication_li_list.html deleted file mode 100644 index 25f92cf4..00000000 --- a/layouts/partials/publication_li_list.html +++ /dev/null @@ -1,8 +0,0 @@ -
- - {{ .Title }} - -

{{ partial "page_links" (dict "content" . "is_list" 1) }}

-
diff --git a/layouts/partials/talk_li_list.html b/layouts/partials/talk_li_list.html deleted file mode 100644 index e04e49f7..00000000 --- a/layouts/partials/talk_li_list.html +++ /dev/null @@ -1,21 +0,0 @@ -
- - {{ .Title }} -
- {{ $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") }} - {{ end }} -
-
- {{ if .Params.event_short }} - {{ .Params.event_short | markdownify }} - {{ else if .Params.event }} - {{ .Params.event | markdownify }} - {{ end }} -
- -
diff --git a/layouts/partials/widgets/posts.html b/layouts/partials/widgets/posts.html index 5e66d329..a2b63c13 100644 --- a/layouts/partials/widgets/posts.html +++ b/layouts/partials/widgets/posts.html @@ -27,7 +27,7 @@ {{ range $post := first $page.Params.count $query }} {{ if eq $page.Params.view 1 }} - {{ partial "post_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} {{ partial "post_li_card" . }} {{ else }} diff --git a/layouts/partials/widgets/publications.html b/layouts/partials/widgets/publications.html index 28a04d46..61d51612 100644 --- a/layouts/partials/widgets/publications.html +++ b/layouts/partials/widgets/publications.html @@ -22,7 +22,7 @@ {{ range first $page.Params.count $query }} {{ if eq $page.Params.view 1 }} - {{ partial "publication_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} {{ partial "publication_li_card" . }} {{ else if eq $page.Params.view 4 }} diff --git a/layouts/partials/widgets/publications_featured.html b/layouts/partials/widgets/publications_featured.html index c7158beb..2bab40d1 100644 --- a/layouts/partials/widgets/publications_featured.html +++ b/layouts/partials/widgets/publications_featured.html @@ -19,7 +19,7 @@ {{ $sel_pubs := $.Scratch.Get "sel_pubs" }} {{ range $sel_pubs }} {{ if eq $page.Params.view 1 }} - {{ partial "publication_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} {{ partial "publication_li_card" . }} {{ else if eq $page.Params.view 4 }} diff --git a/layouts/partials/widgets/talks.html b/layouts/partials/widgets/talks.html index 8db286f2..c3ed3839 100644 --- a/layouts/partials/widgets/talks.html +++ b/layouts/partials/widgets/talks.html @@ -20,7 +20,7 @@ {{ range first $page.Params.count (sort $talks ".Params.time_start" "desc") }} {{ if eq $page.Params.view 1 }} - {{ partial "talk_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} {{ partial "talk_li_card" . }} {{ else }} diff --git a/layouts/partials/widgets/talks_featured.html b/layouts/partials/widgets/talks_featured.html index 6788e5b0..808602d5 100644 --- a/layouts/partials/widgets/talks_featured.html +++ b/layouts/partials/widgets/talks_featured.html @@ -12,7 +12,7 @@ {{ range (sort (where (where $.Site.RegularPages "Type" "talk") ".Params.featured" true) ".Params.time_start" "desc") }} {{ if eq $page.Params.view 1 }} - {{ partial "talk_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Params.view 3 }} {{ partial "talk_li_card" . }} {{ else }} diff --git a/layouts/project/single.html b/layouts/project/single.html index 8b9b9695..36a05237 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -23,7 +23,7 @@

{{ (i18n "posts") }}

{{ range $items }} {{ if eq $page.Site.Params.projects.post_format 1 }} - {{ partial "post_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.post_format 3 }} {{ partial "post_li_card" . }} {{ else }} @@ -38,7 +38,7 @@

{{ (i18n "publications") }}

{{ range $items }} {{ if eq $page.Site.Params.projects.publication_format 1 }} - {{ partial "publication_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.publication_format 3 }} {{ partial "publication_li_card" . }} {{ else if eq $page.Site.Params.projects.publication_format 4 }} @@ -55,7 +55,7 @@

{{ (i18n "talks") }}

{{ range sort $items ".Params.time_start" "desc" }} {{ if eq $page.Site.Params.projects.talk_format 1 }} - {{ partial "talk_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $page.Site.Params.projects.talk_format 3 }} {{ partial "talk_li_card" . }} {{ else }} diff --git a/layouts/section/post.html b/layouts/section/post.html index 10adb21e..d2f2bfce 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -12,7 +12,7 @@ {{ $paginator := .Paginate .Data.Pages }} {{ range $paginator.Pages }} {{ if eq $.Params.view 1 }} - {{ partial "post_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} {{ partial "post_li_card" . }} {{ else }} diff --git a/layouts/section/publication.html b/layouts/section/publication.html index 53a6e7ab..de15cf5d 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -59,7 +59,7 @@
{{ if eq $.Params.view 1 }} - {{ partial "publication_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} {{ partial "publication_li_card" . }} {{ else if eq $.Params.view 4 }} diff --git a/layouts/section/talk.html b/layouts/section/talk.html index a544583e..2e8a419a 100644 --- a/layouts/section/talk.html +++ b/layouts/section/talk.html @@ -20,7 +20,7 @@ {{ range sort .Pages ".Params.time_start" "desc" }} {{ if eq $.Params.view 1 }} - {{ partial "talk_li_list" . }} + {{ partial "li_list" . }} {{ else if eq $.Params.view 3 }} {{ partial "talk_li_card" . }} {{ else }}