lives: affiche un avertissement pour les annonces
surcharge certains éléments du thème, afin d'afficher un avertissement pour mettre en évidence les billets qui sont des annonces de prochain live. Co-Authored-by: iGor milhit <igor@milhit.ch>dev
parent
6392100ca3
commit
eeece83476
|
@ -2,6 +2,7 @@
|
|||
title: "10ᵉ live"
|
||||
date: 2024-11-16T19:44:53+01:00
|
||||
draft: false
|
||||
params:
|
||||
announce: false
|
||||
categories: ["musique"]
|
||||
tags: ["streaming", "listening", "live"]
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
announcedLive = "Announce of the next live!"
|
||||
announce = "Announce!"
|
|
@ -0,0 +1,2 @@
|
|||
announcedLive = "Annonce du prochain live !"
|
||||
announce = "Annonce !"
|
|
@ -0,0 +1,34 @@
|
|||
{{ define "main" }}
|
||||
<header>
|
||||
<h2>{{.Title}}</h2>
|
||||
</header>
|
||||
<!-- "{{.Content}}" pulls from the markdown content of the corresponding
|
||||
_index.md -->
|
||||
<main>
|
||||
<header>
|
||||
{{.Content }}
|
||||
</header>
|
||||
<section class="posts-list">
|
||||
<!--
|
||||
Ranges pages by the publish date, in reverse order, to display the
|
||||
post titles of the section from most recent to older. If the pages
|
||||
has the parameter announce, then it displays a marked warning.
|
||||
-->
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
<article>
|
||||
{{ if .Params.Announce }}
|
||||
<a href="{{ .Permalink }}"
|
||||
title="{{ i18n "announcedLive" }}">
|
||||
{{- .Title -}}
|
||||
</a> <mark>{{ i18n "announce" }}</mark>
|
||||
{{ else }}
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ partial "lists-footer.html" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -0,0 +1,21 @@
|
|||
<section class="home-posts-list">
|
||||
<h2>{{ i18n "lastPosts" }}</h2>
|
||||
<!--
|
||||
Ranges regular pages by the publish date, in reverse order, to display the
|
||||
post titles of the section from most recent to older, and the category.
|
||||
-->
|
||||
{{ range first 5 .Site.RegularPages.ByPublishDate.Reverse }}
|
||||
<article>
|
||||
{{ if .Params.Announce }}
|
||||
<a href="{{ .Permalink }}"
|
||||
title="{{ i18n "announcedLive" }}">
|
||||
{{- .Title -}}
|
||||
</a> <mark>{{ i18n "announce" }}</mark>
|
||||
{{ else }}
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
|
@ -1 +1 @@
|
|||
Subproject commit 0c6ae76ed93490439f4ffcaf28232a9b4f727011
|
||||
Subproject commit 264fc3480e6eb9f7a21df632eefe9e596cb174b3
|
Loading…
Reference in New Issue