{{/* Smart Slides Single Layout Landing page for slide decks. Presentation output is rendered via the present output format. */}} {{ define "main" }} {{ $present_format := .OutputFormats.Get "present" }} {{ $back_to_slides_label := i18n "back_to_slides" | default "Back to Slides" }} {{ $featured_label := i18n "featured" | default "Featured" }} {{ $slides_label := i18n "slides" | default "Slides" }} {{ $abstract_label := i18n "callout_abstract" | default "Abstract" }} {{ $topics_label := i18n "topics" | default "Topics" }} {{ $related_resources_label := i18n "related_resources" | default "Related Resources" }} {{ $present_fullscreen_label := i18n "present_fullscreen" | default "Present (fullscreen)" }} {{ $copy_link_label := i18n "copy_link" | default "Copy Link" }} {{ $copy_citation_label := i18n "copy_citation" | default "Copy citation" }} {{ $copied_label := i18n "btn_copied" | default "Copied" }} {{ $export_pdf_label := i18n "export_pdf_print" | default "Export PDF (print)" }} {{ $print_hint := i18n "slides_print_hint" | default "Opens in print mode - use browser Print > Save as PDF" }} {{ $how_to_cite_label := i18n "how_to_cite" | default "How to cite" }} {{ $citation_label := i18n "citation" | default "Citation" }} {{ $doi_label := i18n "btn_doi" | default "DOI" }} {{ $bibtex_label := i18n "bibtex" | default "BibTeX" }} {{ $download_cite_bib_label := i18n "download_cite_bib" | default "Download cite.bib" }} {{ $lecture_label := i18n "lecture" | default "Lecture" }} {{/* LANDING PAGE CONTENT */}}
{{/* Get slide metadata */}} {{ $authors := .Params.authors | default (slice) }} {{ $venue := .Params.venue }} {{ $event := .Params.event }} {{ $course := .Params.course }} {{ $lecture := .Params.lecture_number }} {{ $tags := .Params.tags | default (slice) }} {{ $topics := .Params.topics | default $tags }} {{ $description := .Params.abstract | default .Params.summary | default .Description }} {{ $citation := .Params.citation }} {{ $authorNames := slice }} {{ $authorList := slice }} {{ with $authors }} {{ if reflect.IsSlice . }} {{ $authorList = . }} {{ else }} {{ $authorList = slice . }} {{ end }} {{ end }} {{ range $authorList }} {{ $profile := partial "functions/get_author_profile" . }} {{ $authorName := . }} {{ if $profile.has_data }} {{ $authorName = $profile.title }} {{ end }} {{ $authorNames = $authorNames | append $authorName }} {{ end }} {{/* Build links using HugoBlox standard structure */}} {{ $builtLinks := partial "functions/build_links.html" (dict "page" . "is_list" false) }} {{/* Filter links by type for Related Resources section */}} {{ $resourceLinks := slice }} {{ $citationLinks := slice }} {{ range $builtLinks }} {{ if in (slice "pdf" "preprint" "code" "video" "dataset" "demo" "site") .type }} {{ $resourceLinks = $resourceLinks | append . }} {{ else if in (slice "doi" "bibtex") .type }} {{ $citationLinks = $citationLinks | append . }} {{ end }} {{ end }} {{ $citation_copy := "" }} {{ if $citation }} {{ $citation_copy = $citation }} {{ else }} {{ range $citationLinks }} {{ if and (eq $citation_copy "") (eq .type "doi") }} {{ $citation_copy = .url }} {{ else if and (eq $citation_copy "") (eq .type "bibtex") }} {{ $citation_copy = .url }} {{ end }} {{ end }} {{ end }} {{ $has_citation_copy := ne $citation_copy "" }} {{/* Calculate slide count */}} {{ $content := .RawContent }} {{ $slideCount := 1 }} {{ $separators := findRE "(?m)^---$" $content }} {{ if $separators }} {{ $slideCount = add (len $separators) 1 }} {{ if hasPrefix $content "---" }} {{ $slideCount = sub $slideCount 1 }} {{ end }} {{ end }}
{{/* Back to library link */}} {{ $back_to_slides_label }} {{/* Main content card */}}
{{/* Hero section with gradient */}}
{{/* Featured badge */}} {{ if or .Params.featured .Params.pinned }}
{{ $featured_label }}
{{ end }}

{{ .Title }}

{{/* Meta info */}}
{{ if gt (len $authorNames) 0 }}
{{ delimit $authorNames ", " }}
{{ end }} {{ with $venue }}
{{ . }}
{{ end }} {{ with $event }}
{{ . }}
{{ end }} {{ if $course }}
{{ $course }}{{ with $lecture }} - {{ $lecture_label }} {{ . }}{{ end }}
{{ end }}
{{ .Date | time.Format "January 2006" }}
{{ $slideCount }} {{ $slides_label | lower }}
{{/* Content section */}}
{{/* Description/Abstract */}} {{ with $description }}

{{ $abstract_label }}

{{ . }}

{{ end }} {{/* Topics/Tags */}} {{ if $topics }}

{{ $topics_label }}

{{ range $topics }} {{ . }} {{ end }}
{{ end }} {{/* Related Resources - Use HugoBlox standard links */}} {{ if $resourceLinks }}

{{ $related_resources_label }}

{{ range $resourceLinks }} {{ $linkLabel := .label }} {{ with .labelKey }} {{ $linkLabel = i18n . | default $linkLabel }} {{ end }} {{ $target := "" }} {{ $rel := "" }} {{ $scheme := (urls.Parse .url).Scheme }} {{ if in (slice "http" "https") $scheme }} {{ $target = "_blank" }} {{ $rel = "noopener" }} {{ end }} {{ partial "functions/get_icon" (dict "name" (.icon | default "hero/link") "attributes" "class='w-4 h-4'") }} {{ $linkLabel }} {{ end }}
{{ end }} {{/* Share Panel */}}
{{/* Open Presenter */}} {{ with $present_format }} {{ $present_fullscreen_label }} {{ end }} {{/* Copy Link */}} {{/* Copy Citation */}} {{ if $has_citation_copy }} {{ end }} {{/* Print PDF */}} {{ with $present_format }} {{ $export_pdf_label }} {{ end }}
{{/* Citation Section - Use HugoBlox standard links + citation field */}} {{ if or $citation $citationLinks }}
{{ with $citation }}

{{ $citation_label }}

{{ . }}
{{ end }} {{/* DOI and BibTeX from standard links structure */}} {{ range $citationLinks }} {{ if eq .type "doi" }} {{ else if eq .type "bibtex" }} {{ end }} {{ end }}
{{ end }}
{{ end }}