From de269ebdb8695201ebd411d138fce14ade14375d Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 3 Nov 2018 20:13:43 +0000 Subject: [PATCH] feat(project): add showcase mode and revert card view to resized images * add project showcase layout, set `view = 2` in `projects.md` to use * revert card view to use resized images rather than cropped images * fix project filters for tags with non-ASCII (i18n) characters * add single column wide layout for project widget, to use set `widget_layout` in `projects.md` * add `flip_alt_rows` widget option to flip alternate rows in showcase mode * `url_` link buttons can now be added for projects * all link buttons now appear in page header rather than under a 'links' section within the page * Markdown slides can now be linked from any page by using new `slides` option * Isotope JS is now only activated when required (i.e. when using card view or when filters are defined) * `links` translation removed from i18n * consolidate talk, pub., and new project links files into new single `page_links.html` for all pages * move project widget layouts to their own files Close #764 Close #785 Close #776 Close #645 Close #326 BREAKING CHANGE: CSS class names of project tags are now prefixed with `js-id-` to namespace them and prevent clashes with existing CSS classes. Migrate any filter `tag`s in `projects.md` that are prefixed `.` to the new `.js-id-` prefix. --- archetypes/project/index.md | 17 +++ archetypes/publication/index.md | 8 + archetypes/talk/index.md | 8 + exampleSite/content/home/projects.md | 9 +- .../content/project/internal-project/index.md | 14 ++ .../content/publication/person-re-id/index.md | 8 + exampleSite/content/talk/example/index.md | 10 +- i18n/en.yaml | 3 - layouts/partials/css/academic.css | 10 +- layouts/partials/page_header.html | 5 + ...publication_links.html => page_links.html} | 8 + layouts/partials/page_links_div.html | 28 ++++ layouts/partials/project_li_card.html | 25 ++++ layouts/partials/project_li_showcase.html | 57 +++++++ layouts/partials/project_li_simple.html | 15 ++ layouts/partials/publication_li_apa.html | 2 +- layouts/partials/publication_li_detailed.html | 2 +- layouts/partials/publication_li_mla.html | 2 +- layouts/partials/publication_li_simple.html | 2 +- layouts/partials/publication_li_stream.html | 2 +- layouts/partials/talk_li_detailed.html | 2 +- layouts/partials/talk_li_simple.html | 2 +- layouts/partials/talk_li_stream.html | 2 +- layouts/partials/talk_links.html | 57 ------- layouts/partials/widgets/projects.html | 141 ++++++++---------- layouts/project/single.html | 3 - layouts/publication/single.html | 16 -- layouts/talk/single.html | 18 --- 28 files changed, 287 insertions(+), 189 deletions(-) rename layouts/partials/{publication_links.html => page_links.html} (93%) create mode 100644 layouts/partials/page_links_div.html create mode 100644 layouts/partials/project_li_card.html create mode 100644 layouts/partials/project_li_showcase.html create mode 100644 layouts/partials/project_li_simple.html delete mode 100644 layouts/partials/talk_links.html diff --git a/archetypes/project/index.md b/archetypes/project/index.md index 870725e8..e3f3f1a9 100644 --- a/archetypes/project/index.md +++ b/archetypes/project/index.md @@ -10,9 +10,26 @@ tags = [] # Project summary to display on homepage. summary = "" +# Slides (optional). +# Associate this page with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "" + # Optional external URL for project (replaces project detail page). external_link = "" +# Links (optional). +url_pdf = "" +url_code = "" +url_dataset = "" +url_project = "" +url_slides = "" +url_video = "" +url_poster = "" + # Featured image # To use, add an image named `featured.jpg/png` to your page's folder. [image] diff --git a/archetypes/publication/index.md b/archetypes/publication/index.md index 750c07df..833bf79d 100644 --- a/archetypes/publication/index.md +++ b/archetypes/publication/index.md @@ -36,6 +36,14 @@ selected = false # Otherwise, set `projects = []`. projects = [] +# Slides (optional). +# Associate this page with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "" + # Tags (optional). # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = [] diff --git a/archetypes/talk/index.md b/archetypes/talk/index.md index 64a5a5fb..5f82e779 100644 --- a/archetypes/talk/index.md +++ b/archetypes/talk/index.md @@ -33,6 +33,14 @@ selected = false # Otherwise, set `projects = []`. projects = [] +# Slides (optional). +# Associate this page with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "" + # Tags (optional). # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = [] diff --git a/exampleSite/content/home/projects.md b/exampleSite/content/home/projects.md index 623c26f1..4927f634 100644 --- a/exampleSite/content/home/projects.md +++ b/exampleSite/content/home/projects.md @@ -17,9 +17,16 @@ folder = "project" # View. # Customize how projects are displayed. -# Legend: 0 = list, 1 = cards. +# Legend: 0 = list, 1 = cards, 2 = showcase. view = 1 +# Widget layout +# Legend: 0 = two columns (default), 1 = single column +widget_layout = 0 + +# For Showcase view, flip alternate rows? +flip_alt_rows = false + # Filter toolbar. # Default filter index (e.g. 0 corresponds to the first `[[filter]]` instance below). diff --git a/exampleSite/content/project/internal-project/index.md b/exampleSite/content/project/internal-project/index.md index b9e28445..05705051 100644 --- a/exampleSite/content/project/internal-project/index.md +++ b/exampleSite/content/project/internal-project/index.md @@ -15,6 +15,20 @@ tags = ["Deep Learning"] # Optional external URL for project (replaces project detail page). external_link = "" +# Slides (optional). +# Associate this project with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "example-slides" + +# Links (optional). +url_pdf = "" +url_slides = "" +url_video = "" +url_code = "" + # Featured image # To use, add an image named `featured.jpg/png` to your project's folder. [image] diff --git a/exampleSite/content/publication/person-re-id/index.md b/exampleSite/content/publication/person-re-id/index.md index 6b5841f8..97a2e96b 100644 --- a/exampleSite/content/publication/person-re-id/index.md +++ b/exampleSite/content/publication/person-re-id/index.md @@ -36,6 +36,14 @@ selected = false # Otherwise, set `projects = []`. projects = [] +# Slides (optional). +# Associate this publication with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "example-slides" + # Tags (optional). # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = [] diff --git a/exampleSite/content/talk/example/index.md b/exampleSite/content/talk/example/index.md index 431646ee..9b705de3 100644 --- a/exampleSite/content/talk/example/index.md +++ b/exampleSite/content/talk/example/index.md @@ -37,9 +37,17 @@ projects = ["internal-project"] # Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags. tags = [] +# Slides (optional). +# Associate this talk with Markdown slides. +# Simply enter your slide deck's filename without extension. +# E.g. `slides = "example-slides"` references +# `content/slides/example-slides.md`. +# Otherwise, set `slides = ""`. +slides = "example-slides" + # Links (optional). url_pdf = "" -url_slides = "slides/example-slides" +url_slides = "" url_video = "" url_code = "" diff --git a/i18n/en.yaml b/i18n/en.yaml index ab0299bc..0146513d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -129,9 +129,6 @@ - id: last_updated translation: Last updated on -- id: links - translation: Links - - id: event translation: Event diff --git a/layouts/partials/css/academic.css b/layouts/partials/css/academic.css index bc4f6e3f..be3ca692 100644 --- a/layouts/partials/css/academic.css +++ b/layouts/partials/css/academic.css @@ -957,7 +957,7 @@ article .article-metadata { line-height: 30px; /* Match share bar line height. */ } -.pub .pub-row-heading { +.pub-row-heading { font-weight: bold; } @@ -1084,6 +1084,14 @@ article .article-metadata { margin-bottom: 1.5rem; } +.project-showcase .project-item { + margin-bottom: 3rem; +} + +.project-item:last-of-type { + margin-bottom: 0; +} + .isotope-item { z-index: 2; } diff --git a/layouts/partials/page_header.html b/layouts/partials/page_header.html index d9373ad5..91fb28d9 100644 --- a/layouts/partials/page_header.html +++ b/layouts/partials/page_header.html @@ -49,6 +49,8 @@ {{ partial "page_metadata" (dict "content" $page "is_list" 1) }} + {{ partial "page_links_div.html" $page }} + {{ partial "share.html" $page }} @@ -69,6 +71,8 @@ {{end}} {{ partial "page_metadata" (dict "content" $page "is_list" 0) }} + + {{ partial "page_links_div.html" $page }} {{else}} {{/* Case when page has no image */}} @@ -87,6 +91,7 @@ {{ if not .IsNode }} {{ partial "page_metadata" (dict "content" $page "is_list" 0) }} + {{ partial "page_links_div.html" $page }} {{end}} {{end}} diff --git a/layouts/partials/publication_links.html b/layouts/partials/page_links.html similarity index 93% rename from layouts/partials/publication_links.html rename to layouts/partials/page_links.html index a8fe1856..b3af334e 100644 --- a/layouts/partials/publication_links.html +++ b/layouts/partials/page_links.html @@ -79,6 +79,13 @@ {{ i18n "btn_poster" }} {{ end }} +{{ if $.Params.slides }} + {{ with ($.Site.GetPage (printf "slides/%s" $.Params.slides)) }} + + {{ i18n "btn_slides" }} + + {{ end }} +{{ else }} {{ with $.Params.url_slides }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} @@ -88,6 +95,7 @@ {{ i18n "btn_slides" }} {{ end }} +{{ end }} {{ with $.Params.url_video }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} diff --git a/layouts/partials/page_links_div.html b/layouts/partials/page_links_div.html new file mode 100644 index 00000000..6df74104 --- /dev/null +++ b/layouts/partials/page_links_div.html @@ -0,0 +1,28 @@ +{{/* Div wrapper around page links. */}} +{{/* The wrapper is hidden when the page has no link buttons. */}} + +{{ $pdf_link := false }} +{{ $cite_link := false }} + +{{ $slug := "" }} +{{ if eq $.File.TranslationBaseName "index" }}{{/* Check if using dir-based page bundles. */}} + {{ $slug = delimit (last 1 (split (substr $.Dir 0 -1) "/")) "" }} +{{ end }} +{{ $resource := $.Resources.GetMatch (printf "%s.pdf" $slug) }} +{{ with $resource }} + {{ $pdf_link = true }} +{{ end }} + +{{ $resource := $.Resources.GetMatch "*.bib" }} +{{ with $resource }} + {{ $cite_link = true }} +{{ end }} + +{{ if $cite_link | or $pdf_link | or .Params.external_link | or .Params.url_preprint | or .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_source | or .Params.url_code | or .Params.url_dataset | or .Params.url_poster | or .Params.url_project | or .Params.url_custom | or .Params.projects | or .Params.slides }} +
+ {{ with .Params.external_link }} + {{ i18n "open_project_site" }} + {{ end }} + {{ partial "page_links" (dict "content" . "is_list" 0) }} +
+{{ end }} diff --git a/layouts/partials/project_li_card.html b/layouts/partials/project_li_card.html new file mode 100644 index 00000000..201ac6dc --- /dev/null +++ b/layouts/partials/project_li_card.html @@ -0,0 +1,25 @@ +{{ $item := .item }} +{{ $widget := .widget }} + +{{ $link := .link }} +{{ $target := .target }} + +{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} +{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }} + +
+
+ {{ with $resource }} + {{ $image := .Resize (printf "550x q90 %s") }} + + + + {{ end }} +
+

{{ $item.Title }}

+
+ {{ with $item.Params.summary }}

{{ . | markdownify }}

{{ end }} +
+
+
+
diff --git a/layouts/partials/project_li_showcase.html b/layouts/partials/project_li_showcase.html new file mode 100644 index 00000000..34bf3c09 --- /dev/null +++ b/layouts/partials/project_li_showcase.html @@ -0,0 +1,57 @@ +{{ $item := .item }} +{{ $widget := .widget }} + +{{ $do_link := true }} +{{ if $item.Params.external_link | or $item.Content }} + {{ $do_link = true }} +{{ else }} + {{ $do_link = false }} +{{ end }} + +{{ $link := .link }} +{{ $target := .target }} + +{{ $order := "" }} +{{ if and ($widget.Params.flip_alt_rows | default true) (not (modBool .index 2)) }} + {{ $order = "order-md-2" }} +{{ end }} + +{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }} + +
+
+
+

+ {{- if $do_link}}{{end -}} +

+ + {{ $summary := "" }} + {{ if $item.Params.summary }} + {{ $summary = $item.Params.summary | markdownify }} + {{ else if $item.Truncated }} + {{ $summary = $item.Summary }} + {{ end }} + {{ with $summary }} +
+ {{ . }} +
+ {{ end }} + + + +
+
+ {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $resource }} + {{ $image := .Resize "540x" }} + {{if $do_link}}{{end}} + + {{if $do_link}}{{end}} + {{end}} +
+
+
diff --git a/layouts/partials/project_li_simple.html b/layouts/partials/project_li_simple.html new file mode 100644 index 00000000..30cb1356 --- /dev/null +++ b/layouts/partials/project_li_simple.html @@ -0,0 +1,15 @@ +{{ $item := .item }} +{{ $widget := .widget }} +{{ $link := .link }} +{{ $target := .target }} +{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }} + +
+ + + + + + + {{ with $item.Params.summary }}

{{ . | markdownify }}

{{ end }} +
diff --git a/layouts/partials/publication_li_apa.html b/layouts/partials/publication_li_apa.html index f61dfd23..cc91cdce 100644 --- a/layouts/partials/publication_li_apa.html +++ b/layouts/partials/publication_li_apa.html @@ -12,5 +12,5 @@ {{ else if .Params.publication }} {{- .Params.publication | markdownify -}}. {{ end }} -

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

+

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

diff --git a/layouts/partials/publication_li_detailed.html b/layouts/partials/publication_li_detailed.html index 6739561f..8536d44a 100644 --- a/layouts/partials/publication_li_detailed.html +++ b/layouts/partials/publication_li_detailed.html @@ -39,7 +39,7 @@ diff --git a/layouts/partials/publication_li_mla.html b/layouts/partials/publication_li_mla.html index 2e43e933..a8a47955 100644 --- a/layouts/partials/publication_li_mla.html +++ b/layouts/partials/publication_li_mla.html @@ -12,5 +12,5 @@ {{- .Params.publication | markdownify -}}, {{ end }} {{- .Date.Format "2006" -}}. -

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

+

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

diff --git a/layouts/partials/publication_li_simple.html b/layouts/partials/publication_li_simple.html index ad0ed1c4..62573d8e 100644 --- a/layouts/partials/publication_li_simple.html +++ b/layouts/partials/publication_li_simple.html @@ -6,5 +6,5 @@ {{- delimit . ", " | markdownify -}} {{- end -}} -

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

+

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

diff --git a/layouts/partials/publication_li_stream.html b/layouts/partials/publication_li_stream.html index 3e5a8555..7a9c4859 100644 --- a/layouts/partials/publication_li_stream.html +++ b/layouts/partials/publication_li_stream.html @@ -28,7 +28,7 @@ diff --git a/layouts/partials/talk_li_detailed.html b/layouts/partials/talk_li_detailed.html index 5128df3b..1e32e8e1 100644 --- a/layouts/partials/talk_li_detailed.html +++ b/layouts/partials/talk_li_detailed.html @@ -43,7 +43,7 @@ diff --git a/layouts/partials/talk_li_simple.html b/layouts/partials/talk_li_simple.html index c7181500..76bc521d 100644 --- a/layouts/partials/talk_li_simple.html +++ b/layouts/partials/talk_li_simple.html @@ -16,6 +16,6 @@ {{ end }} diff --git a/layouts/partials/talk_li_stream.html b/layouts/partials/talk_li_stream.html index 78d85423..8e516326 100644 --- a/layouts/partials/talk_li_stream.html +++ b/layouts/partials/talk_li_stream.html @@ -44,7 +44,7 @@ diff --git a/layouts/partials/talk_links.html b/layouts/partials/talk_links.html deleted file mode 100644 index b99c6ef9..00000000 --- a/layouts/partials/talk_links.html +++ /dev/null @@ -1,57 +0,0 @@ -{{ $is_list := .is_list }} -{{ $ := .content }} - -{{ with $.Params.url_pdf }} -{{ $link := . }} -{{ if not (urls.Parse .).Scheme }} -{{ $link = (printf "%s%s" $.Dir .) | relURL }} -{{ end }} - - {{ i18n "btn_pdf" }} - -{{ end }} -{{ with $.Params.url_slides }} -{{ $link := . }} -{{ if not (urls.Parse .).Scheme }} -{{ $link = (printf "%s%s" $.Dir .) | relURL }} -{{ end }} - - {{ i18n "btn_slides" }} - -{{ end }} -{{ with $.Params.url_video }} -{{ $link := . }} -{{ if not (urls.Parse .).Scheme }} -{{ $link = (printf "%s%s" $.Dir .) | relURL }} -{{ end }} - - {{ i18n "btn_video" }} - -{{ end }} -{{ with $.Params.url_code }} -{{ $link := . }} -{{ if not (urls.Parse .).Scheme }} -{{ $link = (printf "%s%s" $.Dir .) | relURL }} -{{ end }} - - {{ i18n "btn_code" }} - -{{ end }} -{{ range $.Params.projects }} - {{ with ($.Site.GetPage (printf "project/%s" .)) }} - - {{ i18n "btn_project" }} - - {{ else }} - {{/* errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . */}} - {{ end }} -{{ end }} -{{ range $.Params.url_custom }} -{{ $link := .url }} -{{ if not (urls.Parse .url).Scheme }} -{{ $link = (printf "%s%s" $.Dir .url) | relURL }} -{{ end }} - - {{ .name }} - -{{ end }} diff --git a/layouts/partials/widgets/projects.html b/layouts/partials/widgets/projects.html index 5415d83b..ca140e4a 100644 --- a/layouts/partials/widgets/projects.html +++ b/layouts/partials/widgets/projects.html @@ -2,105 +2,84 @@ {{ $page := .page }} +{{ $widget_layout := $page.Params.widget_layout | default 0 }} +{{ if eq $widget_layout 0 }} +{{/* Standard dual-column layout. */}} +
-
+
+

{{ with $page.Title }}{{ . | markdownify }}{{ end }}

{{ with $page.Params.subtitle }}

{{ . | markdownify }}

{{ end }} +
-
+
+ +{{ else }} +{{/* Single column layout. */}} + +
+ +
+ {{ with $page.Title }}

{{ . | markdownify }}

{{ end }} + {{ with $page.Params.subtitle }}

{{ . | markdownify }}

{{ end }} +
+
+{{ end }} + {{ with $page.Content }}

{{ . | markdownify }}

{{ end }} {{ if $page.Params.filter }} - {{ $filter_default := default (int $page.Params.filter_default) 0 }} + {{ $filter_default := default (int $page.Params.filter_default) 0 }} - {{/* Parse default filter tag from front matter in the form of either tag name or CSS class name. */}} - {{ $default_filter_tag_raw := (index $page.Params.filter ($filter_default)).tag }} - {{ $default_filter_tag := printf ".%s" (urlize $default_filter_tag_raw) }} - {{ if or (eq (substr $default_filter_tag_raw 0 1) "*") (eq (substr $default_filter_tag_raw 0 1) ".") }} - {{ $default_filter_tag = $default_filter_tag_raw }} - {{ end }} + {{/* Parse default filter tag from front matter in the form of either tag name or CSS class name. */}} + {{ $default_filter_tag_raw := (index $page.Params.filter ($filter_default)).tag }} + {{ $default_filter_tag := printf ".js-id-%s" (replace $default_filter_tag_raw " " "-") }} + {{ if or (eq (substr $default_filter_tag_raw 0 1) "*") (eq (substr $default_filter_tag_raw 0 1) ".") }} + {{ $default_filter_tag = $default_filter_tag_raw }} + {{ end }} - {{ $default_filter_tag }} + {{ $default_filter_tag }} - {{/* Only show filter buttons if there are multiple filters. */}} - {{ if gt (len $page.Params.filter) 1 }} -
-
-
-
- {{ range $idx, $item := $page.Params.filter }} - {{/* Parse filter tag from front matter in the form of either tag name or CSS class name. */}} - {{ if or (eq (substr .tag 0 1) "*") (eq (substr .tag 0 1) ".") }} - {{ $.Scratch.Set "tag" .tag }} - {{ else }} - {{ $.Scratch.Set "tag" (printf ".%s" (urlize .tag)) }} + {{/* Only show filter buttons if there are multiple filters. */}} + {{ if gt (len $page.Params.filter) 1 }} +
+
+
+
+ {{ range $idx, $item := $page.Params.filter }} + {{/* Parse filter tag from front matter in the form of either tag name or CSS class name. */}} + {{ $data_filter := printf ".js-id-%s" (replace .tag " " "-") }} + {{ if or (eq (substr .tag 0 1) "*") (eq (substr .tag 0 1) ".") }} + {{ $data_filter = .tag }} + {{ end }} + {{ .name }} {{ end }} - {{ .name }} - {{ end }} -
-
-
-
- {{ end }} - {{ end }} - - {{ if eq $page.Params.view 0 }} - -
- {{ range where $.Site.RegularPages "Type" ($page.Params.folder | default "project") }} -
- - - - {{ if .Content }} - - {{ else }} - {{ with .Params.external_link }}{{ end }} - {{ end }} - {{ .Title }} - {{ if .Content }}{{ else }}{{ with .Params.external_link }}{{ end }}{{ end }} - - {{ with .Params.summary }}

{{ . | markdownify }}

{{ end }} -
- {{ end }} -
- - {{ else }} - -
- - {{ range $project := where $.Site.RegularPages "Type" ($page.Params.folder | default "project") }} - {{ $.Scratch.Set "project_url" $project.RelPermalink }} - {{ $.Scratch.Set "target" "" }} - {{ if $project.Params.external_link }} - {{ $.Scratch.Set "project_url" $project.Params.external_link }} - {{ $.Scratch.Set "target" "target=\"_blank\" rel=\"noopener\"" }} - {{ end }} - {{ $resource := ($project.Resources.ByType "image").GetMatch "*featured*" }} - {{ $anchor := $project.Params.image.focal_point | default "Smart" }} -
-
- {{ with $resource }} - {{ $image := .Fill (printf "550x550 q90 %s" $anchor) }} - - - - {{ end }} -
-

{{ .Title }}

-
- {{ with $project.Params.summary }}

{{ . | markdownify }}

{{ end }}
{{ end }} - -
- {{ end }} +
+ {{ range $idx, $item := where $.Site.RegularPages "Type" ($page.Params.folder | default "project") }} + {{ $link := $item.RelPermalink }} + {{ $target := "" }} + {{ if $item.Params.external_link }} + {{ $link = $item.Params.external_link }} + {{ $target = "target=\"_blank\" rel=\"noopener\"" }} + {{ end }} + {{ if eq $page.Params.view 0 }} + {{ partial "project_li_simple" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} + {{ else if eq $page.Params.view 1 }} + {{ partial "project_li_card" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} + {{ else }} + {{ partial "project_li_showcase" (dict "widget" $page "index" $idx "item" $item "link" $link "target" $target) }} + {{ end }} + {{ end }} +
+
diff --git a/layouts/project/single.html b/layouts/project/single.html index c2a4d23f..347856fb 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -6,9 +6,6 @@ {{ partial "page_header.html" . }}
- {{ with .Params.external_link }} - {{ i18n "open_project_site" }} - {{ end }}
{{ .Content }} diff --git a/layouts/publication/single.html b/layouts/publication/single.html index dcc4ec0f..79f801bd 100644 --- a/layouts/publication/single.html +++ b/layouts/publication/single.html @@ -59,22 +59,6 @@
-
-
-
-
-
{{ i18n "links" }}
-
- - {{ partial "publication_links" (dict "content" . "is_list" 0) }} - -
-
-
-
-
-
-
{{ .Content }}
diff --git a/layouts/talk/single.html b/layouts/talk/single.html index 39022a6c..dc284626 100644 --- a/layouts/talk/single.html +++ b/layouts/talk/single.html @@ -66,24 +66,6 @@
{{ end }} - {{ if .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_code | or .Params.projects | or .Params.url_custom }} -
-
-
-
-
{{ i18n "links" }}
-
- - {{ partial "talk_links" (dict "content" . "is_list" 0) }} - -
-
-
-
-
-
- {{ end }} -