Ajoute les shortcodes talks/talk affichant chaque conférence en carte Bootstrap avec couverture extraite du PDF, badge de langue et boutons transcript/code. Les liens externes s'ouvrent dans un nouvel onglet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1.9 KiB
HTML
34 lines
1.9 KiB
HTML
{{ $_hugo_config := `{ "version": 1 }` }}
|
|
{{ $title := .Get "title" }}
|
|
{{ $url := .Get "url" }}
|
|
{{ $img := .Get "img" }}
|
|
{{/* Open external links (slides, event page, code repo) in a new tab. */}}
|
|
{{ $blank := "" }}
|
|
{{ if hasPrefix $url "http" }}{{ $blank = " target=\"_blank\" rel=\"noopener\"" }}{{ end }}
|
|
<div class="col">
|
|
<div class="card h-100 shadow-sm talk-card">
|
|
{{ with $img }}
|
|
<a href="{{ $url }}"{{ $blank | safeHTMLAttr }} aria-hidden="true" tabindex="-1">
|
|
<img src="{{ . | relURL }}" class="card-img-top" alt="{{ printf "%s — cover slide" $title }}" loading="lazy">
|
|
</a>
|
|
{{ end }}
|
|
<div class="card-body d-flex flex-column">
|
|
<h3 class="card-title h6">
|
|
<a href="{{ $url }}"{{ $blank | safeHTMLAttr }} class="text-reset text-decoration-none">{{ $title }}</a>
|
|
</h3>
|
|
<p class="card-text small text-body-secondary mb-3">
|
|
{{ with .Get "event" }}
|
|
{{ with $.Get "eventurl" }}<a href="{{ . }}"{{ if hasPrefix . "http" }} target="_blank" rel="noopener"{{ end }}>{{ $.Get "event" }}</a>{{ else }}{{ $.Get "event" }}{{ end }}
|
|
{{ end }}
|
|
{{ with .Get "year" }} · {{ . }}{{ end }}
|
|
</p>
|
|
<div class="mt-auto d-flex flex-wrap gap-2 align-items-center">
|
|
{{ with .Get "lang" }}<span class="badge text-bg-secondary text-uppercase align-self-center">{{ . }}</span>{{ end }}
|
|
<span class="ms-auto d-flex flex-wrap gap-2">
|
|
{{ with .Get "transcript" }}<a href="{{ relref $.Page . }}" class="btn btn-sm btn-outline-secondary talk-action"><i class="fa-solid fa-align-left"></i>{{ if eq $.Page.Language.Lang "fr" }}transcription{{ else }}transcript{{ end }}</a>{{ end }}
|
|
{{ with .Get "code" }}<a href="{{ . }}"{{ if hasPrefix . "http" }} target="_blank" rel="noopener"{{ end }} class="btn btn-sm btn-outline-secondary talk-action"><i class="fa-solid fa-code"></i>code</a>{{ end }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|