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
This commit is contained in:
George Cushen committed 2019-02-04 22:14:28 +00:00
1 parent 11a859dca2
commit 7c2a85c351
49 files changed
+289 -339

No files matched your search

+11 -19
View File
@@ -131,27 +131,19 @@ sharing = true
# Examples: "Mon, Jan 2, 2006" or "2006-01-02" # Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "January 2006" date_format = "January 2006"
# Citation style ("apa" or "mla")
citation_style = "apa"
# Configuration of project pages. # Configuration of project pages.
[projects] [projects]
# Post list format. # Views for associated content.
# 0 = Simple # 1: List
# 1 = Detailed # 2: Compact
# 2 = Stream # 3: Card
post_format = 2 # 4: Citation (publications only)
post_view = 2
# Publication list format. publication_view = 4
# 0 = Simple talk_view = 2
# 1 = Detailed
# 2 = APA
# 3 = MLA
# 4 = Stream
publication_format = 4
# Talk list format.
# 0 = Simple
# 1 = Detailed
# 2 = Stream
talk_format = 2
# Search. # Search.
[search] [search]
+3 -16
View File
@@ -42,22 +42,9 @@ interests = [
year = 2008 year = 2008
# Social/Academic Networking # Social/Academic Networking
# # For available icons, see: https://sourcethemes.com/academic/docs/widgets/#icons
# Icon pack "fab" includes the following social network icons: # For an email link, use "fas" icon pack, "envelope" icon, and a link in the
# # form "mailto:your-email@example.com" or "#contact" for contact widget.
# twitter, weibo, linkedin, github, facebook, pinterest, google-plus,
# youtube, instagram, soundcloud
#
# For email icon, use "fas" icon pack, "envelope" icon, and
# "mailto:your@email.com" as the link.
#
# Full list: https://fontawesome.com/icons
#
# Icon pack "ai" includes the following academic icons:
#
# cv, google-scholar, arxiv, orcid, researchgate, mendeley
#
# Full list: https://jpswalsh.github.io/academicons/
[[social]] [[social]]
icon = "envelope" icon = "envelope"
-1
View File
@@ -3,7 +3,6 @@
widget = "about" # Do not modify this line! widget = "about" # Do not modify this line!
active = true # Activate this widget? true/false active = true # Activate this widget? true/false
weight = 5 # Order that this section will appear in. weight = 5 # Order that this section will appear in.
date = 2016-04-20T00:00:00
title = "Biography" title = "Biography"
+1 -1
View File
@@ -7,7 +7,7 @@ title = "Accomplish­ments"
subtitle = "" subtitle = ""
# Order that this section will appear in. # Order that this section will appear in.
weight = 15 weight = 9
# Date format # Date format
# Refer to https://sourcethemes.com/academic/docs/customization/#date-format # Refer to https://sourcethemes.com/academic/docs/customization/#date-format
+2 -3
View File
@@ -1,8 +1,7 @@
+++ +++
# Contact widget. # Contact widget.
widget = "contact" widget = "contact" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Contact" title = "Contact"
subtitle = "" subtitle = ""
+2 -3
View File
@@ -1,8 +1,7 @@
+++ +++
# Hero widget. # Hero widget.
widget = "hero" widget = "hero" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2017-10-15T00:00:00
title = "Academic" title = "Academic"
+2 -3
View File
@@ -1,8 +1,7 @@
+++ +++
# Hero Carousel widget. # Hero Carousel widget.
widget = "hero_carousel" widget = "hero_carousel" # Do not modify this line!
active = false active = false # Activate this widget? true/false
date = 2017-10-15T00:00:00
# Order that this section will appear in. # Order that this section will appear in.
weight = 1 weight = 1
+5 -6
View File
@@ -4,7 +4,6 @@
widget = "posts" # Do not modify this line! widget = "posts" # Do not modify this line!
active = true # Activate this widget? true/false active = true # Activate this widget? true/false
weight = 40 # Order that this section will appear. weight = 40 # Order that this section will appear.
date = 2016-04-20T00:00:00
title = "Recent Posts" title = "Recent Posts"
subtitle = "" subtitle = ""
@@ -12,11 +11,11 @@ subtitle = ""
# Number of recent posts to list. # Number of recent posts to list.
count = 5 count = 5
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = Stream # 3 = Card
list_format = 2 view = 2
# Filter posts by tag or category. # Filter posts by tag or category.
# E.g. to only show posts tagged with `Academic`, set `filter_tag = "Academic"` # E.g. to only show posts tagged with `Academic`, set `filter_tag = "Academic"`
+6 -6
View File
@@ -1,8 +1,7 @@
+++ +++
# Projects widget. # Projects widget.
widget = "projects" widget = "projects" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Projects" title = "Projects"
subtitle = "" subtitle = ""
@@ -16,9 +15,10 @@ weight = 50
folder = "project" folder = "project"
# View. # View.
# Customize how projects are displayed. # 1 = List
# Legend: 0 = list, 1 = cards, 2 = showcase. # 3 = Card
view = 1 # 5 = Showcase
view = 3
# Widget layout # Widget layout
# Legend: 0 = two columns (default), 1 = single column # Legend: 0 = two columns (default), 1 = single column
+8 -10
View File
@@ -1,9 +1,8 @@
+++ +++
# Recent Publications widget. # Recent Publications widget.
# This widget displays recent publications from `content/publication/`. # This widget displays recent publications from `content/publication/`.
widget = "publications" widget = "publications" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Recent Publications" title = "Recent Publications"
subtitle = "" subtitle = ""
@@ -14,13 +13,12 @@ weight = 20
# Number of publications to list. # Number of publications to list.
count = 10 count = 10
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = APA # 3 = Card
# 3 = MLA # 4 = Citation
# 4 = Stream view = 2
list_format = 4
# Filter by publication type. # Filter by publication type.
# -1: Any # -1: Any
@@ -1,10 +1,9 @@
+++ +++
# Featured Publications widget. # Featured Publications widget.
# This widget displays publications from `content/publication/` which have # This widget displays publications from `content/publication/` which have
# `featured = true` in their `+++` front matter. # `featured = true` in their front matter.
widget = "publications_featured" widget = "publications_featured" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Featured Publications" title = "Featured Publications"
subtitle = "" subtitle = ""
@@ -12,13 +11,12 @@ subtitle = ""
# Order that this section will appear in. # Order that this section will appear in.
weight = 10 weight = 10
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = APA # 3 = Card
# 3 = MLA # 4 = Citation
# 4 = Stream view = 3
list_format = 1
# Filter by publication type. # Filter by publication type.
# -1: Any # -1: Any
+2 -8
View File
@@ -1,10 +1,7 @@
+++ +++
# Feature/Skill widget. # Feature/Skill widget.
widget = "featurette" # Do not modify this line! widget = "featurette" # Do not modify this line!
date = 2017-09-20T00:00:00 active = true # Activate this widget? true/false
# Activate this widget? true/false
active = true
title = "Skills" title = "Skills"
subtitle = "" subtitle = ""
@@ -16,10 +13,7 @@ weight = 7
# #
# Add/remove as many `[[feature]]` blocks below as you like. # Add/remove as many `[[feature]]` blocks below as you like.
# #
# Available icon packs and icons: # For available icons, see: https://sourcethemes.com/academic/docs/widgets/#icons
# * fas - Font Awesome standard icons (see https://fontawesome.com/icons)
# * fab - Font Awesome brand icons (see https://fontawesome.com/icons)
# * ai - academic icons (see https://jpswalsh.github.io/academicons/)
[[feature]] [[feature]]
icon = "r-project" icon = "r-project"
+2 -3
View File
@@ -1,8 +1,7 @@
+++ +++
# Tag Cloud widget. # Tag Cloud widget.
widget = "tag_cloud" widget = "tag_cloud" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2017-09-20T00:00:00
title = "Tags" title = "Tags"
subtitle = "" subtitle = ""
+7 -8
View File
@@ -1,8 +1,7 @@
+++ +++
# Recent and Upcoming Talks widget. # Recent and Upcoming Talks widget.
widget = "talks" widget = "talks" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Recent & Upcoming Talks" title = "Recent & Upcoming Talks"
subtitle = "" subtitle = ""
@@ -13,11 +12,11 @@ weight = 30
# Number of talks to list. # Number of talks to list.
count = 10 count = 10
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = Stream # 3 = Card
list_format = 2 view = 2
# Exclude talks that are shown in the Featured Talks widget? # Exclude talks that are shown in the Featured Talks widget?
exclude_featured = false exclude_featured = false
+7 -8
View File
@@ -1,8 +1,7 @@
+++ +++
# Featured Talks widget. # Featured Talks widget.
widget = "talks_featured" widget = "talks_featured" # Do not modify this line!
active = false active = false # Activate this widget? true/false
date = 2016-04-20T00:00:00
title = "Featured Talks" title = "Featured Talks"
subtitle = "" subtitle = ""
@@ -10,9 +9,9 @@ subtitle = ""
# Order that this section will appear in. # Order that this section will appear in.
weight = 29 weight = 29
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 3 = Stream # 3 = Card
list_format = 0 view = 3
+++ +++
+2 -3
View File
@@ -2,9 +2,8 @@
# Custom widget. # Custom widget.
# An example of using the custom widget to create your own homepage section. # An example of using the custom widget to create your own homepage section.
# To create more sections, duplicate this file and edit the values below as desired. # To create more sections, duplicate this file and edit the values below as desired.
widget = "custom" widget = "custom" # Do not modify this line!
active = true active = true # Activate this widget? true/false
date = 2016-04-20T00:00:00
# Note: a full width section format can be enabled by commenting out the `title` and `subtitle` with a `#`. # Note: a full width section format can be enabled by commenting out the `title` and `subtitle` with a `#`.
title = "Teaching" title = "Teaching"
+5 -6
View File
@@ -1,12 +1,11 @@
+++ +++
title = "Posts" title = "Posts"
date = 2017-01-01T00:00:00
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = Stream # 3 = Card
list_format = 2 view = 2
# Optional featured image (relative to `static/img/` folder). # Optional featured image (relative to `static/img/` folder).
[header] [header]
+6 -8
View File
@@ -1,14 +1,12 @@
+++ +++
title = "Publications" title = "Publications"
date = 2017-01-01T00:00:00
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = APA # 3 = Card
# 3 = MLA # 4 = Citation
# 4 = Stream view = 4
list_format = 3
# Optional featured image (relative to `static/img/` folder). # Optional featured image (relative to `static/img/` folder).
[header] [header]
+5 -6
View File
@@ -1,12 +1,11 @@
+++ +++
title = "Recent & Upcoming Talks" title = "Recent & Upcoming Talks"
date = 2017-01-01T00:00:00
# List format. # View.
# 0 = Simple # 1 = List
# 1 = Detailed # 2 = Compact
# 2 = Stream # 3 = Card
list_format = 2 view = 2
# Optional featured image (relative to `static/img/` folder). # Optional featured image (relative to `static/img/` folder).
[header] [header]
+3 -3
View File
@@ -88,7 +88,7 @@
# Publications widget # Publications widget
- id: more_publications - id: more_publications
translation: More Publications translation: See all publications
# Posts widget # Posts widget
@@ -96,12 +96,12 @@
translation: CONTINUE READING translation: CONTINUE READING
- id: more_posts - id: more_posts
translation: More Posts translation: See all posts
# Talks widget # Talks widget
- id: more_talks - id: more_talks
translation: More Talks translation: See all talks
# Contact widget # Contact widget
+8 -2
View File
@@ -1,8 +1,14 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}
{{ partial "page_header.html" . }}
<section id="about" class="home-section"> {{/* Just display author name as title if user profile unavailable. */}}
{{ if not ($.Site.GetPage (printf "/author/%s" (urlize .Title))) }}
<div class="universal-wrapper pt-3">
<h1 itemprop="name">{{ .Title }}</h1>
</div>
{{ end }}
<section id="about" class="pt-5">
<div class="container"> <div class="container">
{{/* Only show About widget if a profile has been configured for this user. */}} {{/* Only show About widget if a profile has been configured for this user. */}}
{{ $widget := "widgets/about.html" }} {{ $widget := "widgets/about.html" }}
+10 -24
View File
@@ -522,6 +522,15 @@ a[data-fancybox] img {
color: #b2b2b2; color: #b2b2b2;
} }
/*************************************************
* Widgets (common)
**************************************************/
.see-all {
margin-top: 2rem;
text-transform: uppercase;
}
/************************************************* /*************************************************
* Hero Widget * Hero Widget
**************************************************/ **************************************************/
@@ -600,7 +609,7 @@ a[data-fancybox] img {
} }
/************************************************* /*************************************************
* Biography * About widget
**************************************************/ **************************************************/
#profile { #profile {
@@ -1069,11 +1078,6 @@ article .article-metadata {
margin-right: auto; margin-right: auto;
} }
.pub .pub-authors {
font-style: italic;
line-height: 30px; /* Match share bar line height. */
}
.pub-row-heading { .pub-row-heading {
font-weight: bold; font-weight: bold;
} }
@@ -1082,24 +1086,6 @@ article .article-metadata {
font-size: 1rem; font-size: 1rem;
} }
.pub-list-item .pub-authors {
line-height: normal;
font-style: normal;
font-size: 0.9rem;
color: rgba(0,0,0,0.54);
}
.pub-list-item .pub-publication {
color: rgba(0,0,0,0.54);
font-size: 0.9rem;
}
.dark .pub-authors,
.dark .pub-publication {
color: rgba(255,255,255,0.54);
}
.pub-list-item .btn-links { .pub-list-item .btn-links {
padding-top: 10px; padding-top: 10px;
} }
+3 -4
View File
@@ -47,7 +47,7 @@
<p class="page-subtitle">{{ . | markdownify | emojify }}</p> <p class="page-subtitle">{{ . | markdownify | emojify }}</p>
{{end}} {{end}}
{{ partial "page_metadata" (dict "content" $page "is_list" 1) }} {{ partial "page_metadata" (dict "content" $page "is_list" 0) }}
{{ partial "page_links_div.html" $page }} {{ partial "page_links_div.html" $page }}
@@ -70,8 +70,7 @@
<p class="page-subtitle">{{ . | markdownify | emojify }}</p> <p class="page-subtitle">{{ . | markdownify | emojify }}</p>
{{end}} {{end}}
{{ partial "page_metadata" (dict "content" $page "is_list" 0) }} {{ partial "page_metadata" (dict "content" $page "is_list" 0 "share" true) }}
{{ partial "page_links_div.html" $page }} {{ partial "page_links_div.html" $page }}
</div> </div>
{{else}} {{else}}
@@ -90,7 +89,7 @@
{{end}} {{end}}
{{ if not .IsNode }} {{ if not .IsNode }}
{{ partial "page_metadata" (dict "content" $page "is_list" 0) }} {{ partial "page_metadata" (dict "content" $page "is_list" 0 "share" true) }}
{{ partial "page_links_div.html" $page }} {{ partial "page_links_div.html" $page }}
{{end}} {{end}}
</div> </div>
+14 -11
View File
@@ -1,4 +1,5 @@
{{ $is_list := .is_list }} {{ $is_list := .is_list }}
{{ $share := .share | default false }}
{{ $ := .content }} {{ $ := .content }}
<meta content="{{ $.Params.Date }}" itemprop="datePublished"> <meta content="{{ $.Params.Date }}" itemprop="datePublished">
@@ -11,16 +12,7 @@
{{ $authorLen := len $.Params.authors }} {{ $authorLen := len $.Params.authors }}
{{ if gt $authorLen 0 }} {{ if gt $authorLen 0 }}
<div> <div>
{{ range $k, $v := $.Params.authors -}} {{ partial "page_metadata_authors" $ }}
<span itemscope itemprop="author" itemtype="http://schema.org/Person">
<span itemprop="name">
{{with $.Site.GetPage (printf "/authors/%s" $v) }}{{ printf "<a href=\"%s\">" .RelPermalink | safeHTML }}{{end}}
{{- $v | markdownify -}}
{{with $.Site.GetPage (printf "/authors/%s" $v) }}{{ printf "</a>" | safeHTML }}{{end}}
</span>
</span>
{{- if lt $k (sub $authorLen 1) -}}, {{ end }}
{{ end }}
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
@@ -39,6 +31,17 @@
</span> </span>
{{ end }} {{ end }}
{{ if and (eq $is_list 1) (eq $.Type "publication") }}
<span class="middot-divider"></span>
<span class="pub-publication">
{{ if $.Params.publication_short }}
{{ $.Params.publication_short | markdownify }}
{{ else if $.Params.publication }}
{{ $.Params.publication | markdownify }}
{{ end }}
</span>
{{ end }}
{{ if and (eq $.Type "post") (not (or (eq $.Site.Params.reading_time false) (eq $.Params.reading_time false))) }} {{ if and (eq $.Type "post") (not (or (eq $.Site.Params.reading_time false) (eq $.Params.reading_time false))) }}
<span class="middot-divider"></span> <span class="middot-divider"></span>
<span class="article-reading-time"> <span class="article-reading-time">
@@ -66,7 +69,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if ne $is_list 1 }} {{ if $share }}
{{ partial "share.html" $ }} {{ partial "share.html" $ }}
{{ end }} {{ end }}
@@ -0,0 +1,23 @@
{{/* If `authors` is set and is not empty. */}}
{{ if $.Params.authors }}
{{ $authorLen := len $.Params.authors }}
{{ if gt $authorLen 0 }}
{{ range $k, $v := $.Params.authors -}}
<span itemscope itemprop="author" itemtype="http://schema.org/Person">
<span itemprop="name">
{{ $link := ($.Site.GetPage (printf "/authors/%s" $v)).RelPermalink }}
{{ $person_page_path := (printf "/author/%s" (urlize $v)) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ if $person_page }}
{{ $person := $person_page.Params }}
{{- printf "<a href=\"%s\">%s</a>" $link $person.name | safeHTML -}}
{{- else -}}
{{- printf "<a href=\"%s\">%s</a>" $link ($v | markdownify) | safeHTML -}}
{{- end -}}
</span>{{- /* This comment removes whitespace */ -}}
</span>
{{- if lt $k (sub $authorLen 1) -}}, {{ end }}
{{ end }}
{{ end }}
{{ end }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
-16
View File
@@ -1,16 +0,0 @@
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
<span itemprop="author">
{{ with .Params.authors }}
{{- delimit . ", " | markdownify -}}
{{- end -}}
</span>
({{- .Date.Format "2006" -}}).
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}}.
{{ else if .Params.publication }}
{{- .Params.publication | markdownify -}}.
{{ end }}
<p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p>
</div>
@@ -1,4 +1,5 @@
<div class="pub-list-item card-simple" itemscope itemtype="http://schema.org/CreativeWork"> <div class="pub-list-item card-simple" itemscope itemtype="http://schema.org/CreativeWork">
{{ partial "page_metadata" (dict "content" $ "is_list" 1) }}
{{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }} {{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ $anchor := .Params.image.focal_point | default "Smart" }} {{ $anchor := .Params.image.focal_point | default "Smart" }}
@@ -23,21 +24,6 @@
{{ end }} {{ end }}
</div> </div>
<div class="pub-authors" itemprop="author">
{{ with .Params.authors }}
{{ delimit . ", " | markdownify }}
{{ end }}
</div>
<div class="pub-publication">
{{ if .Params.publication_short }}
{{ .Params.publication_short | markdownify }},
{{ else if .Params.publication }}
{{ .Params.publication | markdownify }},
{{ end }}
{{ .Date.Format "2006" }}
</div>
<div class="btn-links"> <div class="btn-links">
{{ partial "page_links" (dict "content" . "is_list" 1) }} {{ partial "page_links" (dict "content" . "is_list" 1) }}
</div> </div>
@@ -0,0 +1,35 @@
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
{{/* APA Style */}}
{{ if eq ($.Site.Params.publications.citation_style | default "apa") "apa" }}
<span itemprop="author">
{{ partial "page_metadata_authors" . }}
</span>
({{- .Date.Format "2006" -}}).
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}}.
{{ else if .Params.publication }}
{{- .Params.publication | markdownify -}}.
{{ end }}
<p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p>
{{/* MLA Style */}}
{{ else }}
<span itemprop="author">
{{ partial "page_metadata_authors" . }}
</span>.
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}},
{{ else if .Params.publication }}
{{- .Params.publication | markdownify -}},
{{ end }}
{{- .Date.Format "2006" -}}.
<p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p>
{{ end }}
</div>
@@ -21,9 +21,7 @@
<div class="stream-meta article-metadata"> <div class="stream-meta article-metadata">
<div itemprop="author"> <div itemprop="author">
{{ with .Params.authors }} {{ partial "page_metadata_authors" . }}
{{- delimit . ", " | markdownify -}}
{{- end -}}
</div> </div>
</div> </div>
@@ -2,9 +2,7 @@
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i> <i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a> <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>
<div itemprop="author"> <div itemprop="author">
{{ with .Params.authors }} {{ partial "page_metadata_authors" . }}
{{- delimit . ", " | markdownify -}}
{{- end -}}
</div> </div>
<p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p> <p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p>
</div> </div>
-16
View File
@@ -1,16 +0,0 @@
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
<span itemprop="author">
{{ with .Params.authors }}
{{- delimit . ", " | markdownify -}}
{{- end -}}
</span>.
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
{{ if .Params.publication_short }}
{{- .Params.publication_short | markdownify -}},
{{ else if .Params.publication }}
{{- .Params.publication | markdownify -}},
{{ end }}
{{- .Date.Format "2006" -}}.
<p>{{ partial "page_links" (dict "content" . "is_list" 1) }}</p>
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
+15 -16
View File
@@ -13,37 +13,36 @@
{{ $query = $query | intersect $archive_page.Pages }} {{ $query = $query | intersect $archive_page.Pages }}
{{ end }} {{ end }}
{{ $count := len ($query) }} {{ $count := len $query }}
<!-- Blog Posts widget --> <!-- Blog Posts widget -->
<div class="row"> <div class="row">
<div class="col-12 col-lg-4 section-heading"> <div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1> <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $count $page.Params.count }}
<p class="view-all">
<a href="{{ $archive_page.RelPermalink }}">
{{ i18n "more_posts" | markdownify }}
<i class="fas fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div> </div>
<div class="col-12 col-lg-8"> <div class="col-12 col-lg-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ range $post := first $page.Params.count $query }} {{ range $post := first $page.Params.count $query }}
{{ if eq $page.Params.list_format 0 }} {{ if eq $page.Params.view 1 }}
{{ partial "post_li_simple" . }} {{ partial "post_li_list" . }}
{{ else if eq $page.Params.list_format 1 }} {{ else if eq $page.Params.view 3 }}
{{ partial "post_li_detailed" . }} {{ partial "post_li_card" . }}
{{ else }} {{ else }}
{{ partial "post_li_stream" . }} {{ partial "post_li_compact" . }}
{{ end }} {{ end }}
{{end}} {{end}}
{{ if gt $count $page.Params.count }}
<div class="see-all">
<a href="{{ $archive_page.RelPermalink }}">
{{ i18n "more_posts" | markdownify }}
<i class="fas fa-angle-right"></i>
</a>
</div>
{{ end }}
</div> </div>
</div> </div>
+3 -3
View File
@@ -71,9 +71,9 @@
{{ $link = $item.Params.external_link }} {{ $link = $item.Params.external_link }}
{{ $target = "target=\"_blank\" rel=\"noopener\"" }} {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
{{ end }} {{ end }}
{{ if eq $page.Params.view 0 }} {{ if eq $page.Params.view 1 }}
{{ partial "project_li_simple" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} {{ partial "project_li_list" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }}
{{ else if eq $page.Params.view 1 }} {{ else if eq $page.Params.view 3 }}
{{ partial "project_li_card" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} {{ partial "project_li_card" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }}
{{ else }} {{ else }}
{{ partial "project_li_showcase" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} {{ partial "project_li_showcase" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }}
+26 -29
View File
@@ -1,47 +1,44 @@
{{ $ := .root }} {{ $ := .root }}
{{ $page := .page }} {{ $page := .page }}
{{ $pubs_len := len (where $.Site.RegularPages "Type" "publication") }}
{{ $query := where $.Site.RegularPages "Type" "publication" }}
{{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }}
{{ $query = where $query ".Params.publication_types" "intersect" (slice $page.Params.publication_type) }}
{{ end }}
{{ if $page.Params.exclude_featured }}
{{ $query = $query | intersect (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" "!=" true) }}
{{ end }}
{{ $count := len $query }}
<!-- Publications widget --> <!-- Publications widget -->
<div class="row"> <div class="row">
<div class="col-12 col-lg-4 section-heading"> <div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1> <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $pubs_len $page.Params.count }}
<p class="view-all">
<a href="{{ ($.Site.GetPage "section" "publication").RelPermalink }}">
{{ i18n "more_publications" | markdownify }}
<i class="fas fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div> </div>
<div class="col-12 col-lg-8"> <div class="col-12 col-lg-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }} {{ range first $page.Params.count $query }}
{{ $.Scratch.Set "recent_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }} {{ 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 }} {{ else }}
{{ $.Scratch.Set "recent_pubs" (where $.Site.RegularPages "Type" "publication") }} {{ partial "publication_li_compact" . }}
{{ end }}
{{ end }} {{ end }}
{{ if $page.Params.exclude_featured }} {{ if gt $count $page.Params.count }}
{{ $.Scratch.Set "recent_pubs" ( ($.Scratch.Get "recent_pubs") | intersect (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" "!=" true) ) }} <div class="see-all">
{{ end }} <a href="{{ ($.Site.GetPage "section" "publication").RelPermalink }}">
{{ i18n "more_publications" | markdownify }}
{{ $recent_pubs := $.Scratch.Get "recent_pubs" }} <i class="fas fa-angle-right"></i>
{{ range first $page.Params.count $recent_pubs }} </a>
{{ if eq $page.Params.list_format 1 }} </div>
{{ partial "publication_li_detailed" . }}
{{ else if eq $page.Params.list_format 2 }}
{{ partial "publication_li_apa" . }}
{{ else if eq $page.Params.list_format 3 }}
{{ partial "publication_li_mla" . }}
{{ else if eq $page.Params.list_format 4 }}
{{ partial "publication_li_stream" . }}
{{ else }}
{{ partial "publication_li_simple" . }}
{{ end }}
{{ end }} {{ end }}
</div> </div>
@@ -18,16 +18,14 @@
{{ $sel_pubs := $.Scratch.Get "sel_pubs" }} {{ $sel_pubs := $.Scratch.Get "sel_pubs" }}
{{ range $sel_pubs }} {{ range $sel_pubs }}
{{ if eq $page.Params.list_format 1 }} {{ if eq $page.Params.view 1 }}
{{ partial "publication_li_detailed" . }} {{ partial "publication_li_list" . }}
{{ else if eq $page.Params.list_format 2 }} {{ else if eq $page.Params.view 3 }}
{{ partial "publication_li_apa" . }} {{ partial "publication_li_card" . }}
{{ else if eq $page.Params.list_format 3 }} {{ else if eq $page.Params.view 4 }}
{{ partial "publication_li_mla" . }} {{ partial "publication_li_citation" . }}
{{ else if eq $page.Params.list_format 4 }}
{{ partial "publication_li_stream" . }}
{{ else }} {{ else }}
{{ partial "publication_li_simple" . }} {{ partial "publication_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+19 -17
View File
@@ -1,39 +1,41 @@
{{ $ := .root }} {{ $ := .root }}
{{ $page := .page }} {{ $page := .page }}
{{ $talks_len := len (where $.Site.RegularPages "Type" "talk") }} {{ $count := len (where $.Site.RegularPages "Type" "talk") }}
<!-- Talks widget --> <!-- Talks widget -->
<div class="row"> <div class="row">
<div class="col-12 col-lg-4 section-heading"> <div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1> <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $talks_len $page.Params.count }}
<p class="view-all">
<a href="{{ ($.Site.GetPage "section" "talk").RelPermalink }}">
{{ i18n "more_talks" | markdownify }}
<i class="fas fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div> </div>
<div class="col-12 col-lg-8"> <div class="col-12 col-lg-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ $.Scratch.Set "talks" (where $.Site.RegularPages "Type" "talk") }} {{ $talks := where $.Site.RegularPages "Type" "talk" }}
{{/* Exclude talks shown in Featured Talks widget? */}} {{/* Exclude talks shown in Featured Talks widget? */}}
{{ if $page.Params.exclude_featured }} {{ if $page.Params.exclude_featured }}
{{ $.Scratch.Set "talks" (where ($.Scratch.Get "talks") ".Params.featured" "!=" true) }} {{ $talks = (where $talks ".Params.featured" "!=" true) }}
{{ end }} {{ end }}
{{ range first $page.Params.count (sort ($.Scratch.Get "talks") ".Params.time_start" "desc") }} {{ range first $page.Params.count (sort $talks ".Params.time_start" "desc") }}
{{ if eq $page.Params.list_format 1 }} {{ if eq $page.Params.view 1 }}
{{ partial "talk_li_detailed" . }} {{ partial "talk_li_list" . }}
{{ else if eq $page.Params.list_format 2 }} {{ else if eq $page.Params.view 3 }}
{{ partial "talk_li_stream" . }} {{ partial "talk_li_card" . }}
{{ else }} {{ else }}
{{ partial "talk_li_simple" . }} {{ partial "talk_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $count $page.Params.count }}
<div class="see-all">
<a href="{{ ($.Site.GetPage "section" "talk").RelPermalink }}">
{{ i18n "more_talks" | markdownify }}
<i class="fas fa-angle-right"></i>
</a>
</div>
{{ end }}
</div> </div>
</div> </div>
+5 -5
View File
@@ -11,12 +11,12 @@
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }} {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ range (sort (where (where $.Site.RegularPages "Type" "talk") ".Params.featured" true) ".Params.time_start" "desc") }} {{ range (sort (where (where $.Site.RegularPages "Type" "talk") ".Params.featured" true) ".Params.time_start" "desc") }}
{{ if eq $page.Params.list_format 1 }} {{ if eq $page.Params.view 1 }}
{{ partial "talk_li_detailed" . }} {{ partial "talk_li_list" . }}
{{ else if eq $page.Params.list_format 2 }} {{ else if eq $page.Params.view 3 }}
{{ partial "talk_li_stream" . }} {{ partial "talk_li_card" . }}
{{ else }} {{ else }}
{{ partial "talk_li_simple" . }} {{ partial "talk_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</div> </div>
+13 -15
View File
@@ -22,12 +22,12 @@
{{ if ge $count 1 }} {{ if ge $count 1 }}
<h2>{{ (i18n "posts") }}</h2> <h2>{{ (i18n "posts") }}</h2>
{{ range $items }} {{ range $items }}
{{ if eq $page.Site.Params.projects.post_format 0 }} {{ if eq $page.Site.Params.projects.post_format 1 }}
{{ partial "post_li_simple" . }} {{ partial "post_li_list" . }}
{{ else if eq $page.Site.Params.projects.post_format 1 }} {{ else if eq $page.Site.Params.projects.post_format 3 }}
{{ partial "post_li_detailed" . }} {{ partial "post_li_card" . }}
{{ else }} {{ else }}
{{ partial "post_li_stream" . }} {{ partial "post_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@@ -38,15 +38,13 @@
<h2>{{ (i18n "publications") }}</h2> <h2>{{ (i18n "publications") }}</h2>
{{ range $items }} {{ range $items }}
{{ if eq $page.Site.Params.projects.publication_format 1 }} {{ if eq $page.Site.Params.projects.publication_format 1 }}
{{ partial "publication_li_detailed" . }} {{ partial "publication_li_list" . }}
{{ else if eq $page.Site.Params.projects.publication_format 2 }}
{{ partial "publication_li_apa" . }}
{{ else if eq $page.Site.Params.projects.publication_format 3 }} {{ else if eq $page.Site.Params.projects.publication_format 3 }}
{{ partial "publication_li_mla" . }} {{ partial "publication_li_card" . }}
{{ else if eq $page.Site.Params.projects.publication_format 4 }} {{ else if eq $page.Site.Params.projects.publication_format 4 }}
{{ partial "publication_li_stream" . }} {{ partial "publication_li_citation" . }}
{{ else }} {{ else }}
{{ partial "publication_li_simple" . }} {{ partial "publication_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@@ -57,11 +55,11 @@
<h2>{{ (i18n "talks") }}</h2> <h2>{{ (i18n "talks") }}</h2>
{{ range sort $items ".Params.time_start" "desc" }} {{ range sort $items ".Params.time_start" "desc" }}
{{ if eq $page.Site.Params.projects.talk_format 1 }} {{ if eq $page.Site.Params.projects.talk_format 1 }}
{{ partial "talk_li_detailed" . }} {{ partial "talk_li_list" . }}
{{ else if eq $page.Site.Params.projects.talk_format 2 }} {{ else if eq $page.Site.Params.projects.talk_format 3 }}
{{ partial "talk_li_stream" . }} {{ partial "talk_li_card" . }}
{{ else }} {{ else }}
{{ partial "talk_li_simple" . }} {{ partial "talk_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+5 -5
View File
@@ -11,12 +11,12 @@
{{ $paginator := .Paginate .Data.Pages }} {{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ if eq $.Params.list_format 0 }} {{ if eq $.Params.view 1 }}
{{ partial "post_li_simple" . }} {{ partial "post_li_list" . }}
{{ else if eq $.Params.list_format 1 }} {{ else if eq $.Params.view 3 }}
{{ partial "post_li_detailed" . }} {{ partial "post_li_card" . }}
{{ else }} {{ else }}
{{ partial "post_li_stream" . }} {{ partial "post_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+7 -9
View File
@@ -58,16 +58,14 @@
{{ end }} {{ end }}
<div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}"> <div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
{{ if eq $.Params.list_format 1 }} {{ if eq $.Params.view 1 }}
{{ partial "publication_li_detailed" . }} {{ partial "publication_li_list" . }}
{{ else if eq $.Params.list_format 2 }} {{ else if eq $.Params.view 3 }}
{{ partial "publication_li_apa" . }} {{ partial "publication_li_card" . }}
{{ else if eq $.Params.list_format 3 }} {{ else if eq $.Params.view 4 }}
{{ partial "publication_li_mla" . }} {{ partial "publication_li_citation" . }}
{{ else if eq $.Params.list_format 4 }}
{{ partial "publication_li_stream" . }}
{{ else }} {{ else }}
{{ partial "publication_li_simple" . }} {{ partial "publication_li_compact" . }}
{{ end }} {{ end }}
</div> </div>
+5 -5
View File
@@ -19,12 +19,12 @@
<div class="col-lg-10"> <div class="col-lg-10">
{{ range sort .Pages ".Params.time_start" "desc" }} {{ range sort .Pages ".Params.time_start" "desc" }}
{{ if eq $.Params.list_format 1 }} {{ if eq $.Params.view 1 }}
{{ partial "talk_li_detailed" . }} {{ partial "talk_li_list" . }}
{{ else if eq $.Params.list_format 2 }} {{ else if eq $.Params.view 3 }}
{{ partial "talk_li_stream" . }} {{ partial "talk_li_card" . }}
{{ else }} {{ else }}
{{ partial "talk_li_simple" . }} {{ partial "talk_li_compact" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB