From 7cce73e2ba23ca98977ef5bd6faa8ae9eacf8132 Mon Sep 17 00:00:00 2001 From: gribse Date: Tue, 22 Apr 2025 23:21:24 +0200 Subject: [PATCH] la infobox est dans le layout now --- archetypes/collection.md | 3 - content/collection/bob-315/index.md | 1 - content/collection/corona----/index.md | 1 - content/collection/japy-s18/index.md | 1 - content/collection/olivetti-et-121/index.md | 2 +- .../collection/olivetti-lettera-32/index.md | 1 - .../collection/olivetti-praxis-48/index.md | 1 - .../collection/remington-portable/index.md | 2 +- layouts/partials/maec-encadre.html | 91 +++++++++++++++++++ readMe.md | 5 +- themes/PaperMod/layouts/_default/single.html | 17 +++- 11 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 layouts/partials/maec-encadre.html diff --git a/archetypes/collection.md b/archetypes/collection.md index 9d87a2c..1100d88 100644 --- a/archetypes/collection.md +++ b/archetypes/collection.md @@ -30,9 +30,6 @@ typewriterSpecs: serialNumber: --- -{{< maec-encadre >}} - - {{< figure src="images/20250414_153350_lmc_8.4.jpg" alt="Alt text" title="Title">}} diff --git a/content/collection/bob-315/index.md b/content/collection/bob-315/index.md index 4f91912..eee71a3 100644 --- a/content/collection/bob-315/index.md +++ b/content/collection/bob-315/index.md @@ -29,4 +29,3 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} \ No newline at end of file diff --git a/content/collection/corona----/index.md b/content/collection/corona----/index.md index 4846c7e..135c5cb 100644 --- a/content/collection/corona----/index.md +++ b/content/collection/corona----/index.md @@ -29,4 +29,3 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} \ No newline at end of file diff --git a/content/collection/japy-s18/index.md b/content/collection/japy-s18/index.md index d9f9e56..dcd5169 100644 --- a/content/collection/japy-s18/index.md +++ b/content/collection/japy-s18/index.md @@ -29,4 +29,3 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} \ No newline at end of file diff --git a/content/collection/olivetti-et-121/index.md b/content/collection/olivetti-et-121/index.md index c0f6c03..0321137 100644 --- a/content/collection/olivetti-et-121/index.md +++ b/content/collection/olivetti-et-121/index.md @@ -29,7 +29,7 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} + Cette machine, mise sur le marché par Olivetti en 1980, a pour spécificité d'être électromécanique, et de ne plus utiliser de marteaux d'impression. diff --git a/content/collection/olivetti-lettera-32/index.md b/content/collection/olivetti-lettera-32/index.md index c484e00..130e679 100644 --- a/content/collection/olivetti-lettera-32/index.md +++ b/content/collection/olivetti-lettera-32/index.md @@ -29,4 +29,3 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} \ No newline at end of file diff --git a/content/collection/olivetti-praxis-48/index.md b/content/collection/olivetti-praxis-48/index.md index 05f1f22..6f7cfe9 100644 --- a/content/collection/olivetti-praxis-48/index.md +++ b/content/collection/olivetti-praxis-48/index.md @@ -29,4 +29,3 @@ typewriterSpecs: widthCm: 80 --- -{{< maec-encadre >}} \ No newline at end of file diff --git a/content/collection/remington-portable/index.md b/content/collection/remington-portable/index.md index 17b402b..10cf317 100644 --- a/content/collection/remington-portable/index.md +++ b/content/collection/remington-portable/index.md @@ -30,7 +30,7 @@ typewriterSpecs: serialNumber: "NE31859" --- -{{< maec-encadre >}} + # Une machine portable et pliable diff --git a/layouts/partials/maec-encadre.html b/layouts/partials/maec-encadre.html new file mode 100644 index 0000000..7fe2a6e --- /dev/null +++ b/layouts/partials/maec-encadre.html @@ -0,0 +1,91 @@ + + + +{{ $specs := .Page.Params.typewriterSpecs }} + +{{ if $specs }} +
+

{{$specs.make}} {{$specs.model}}

+ {{ with $specs.logo }} + + {{ end }} + + {{ with $specs.image }} +
+ Image of {{ $specs.manufacturer }} {{ $specs.type }} +
+ {{ end }} + + + + {{ with $specs.make }} + + + + + {{ end }} + + {{ with $specs.type }} + + + + + {{ end }} + + {{ with $specs.dateManufactured }} + + + + + {{ end }} + + {{ with $specs.massKg }} + + + + + {{ end }} + + {{ with $specs.widthCm }} + + + + + {{ end }} + + {{ with $specs.linkWiki }} + + + + + {{ end }} + + {{ with $specs.linkTpdb }} + + + + + {{ end }} + +
Fabricant{{ . }}
Type{{ . }}
Date de fabrication{{ . }}
Masse{{ . }} kg
Largeur{{ . }} cm
Ressource externeLink
Typewriter DatabaseLink
+ + + + +
+{{ else }} +
+

Pas de spécifications trouvées :(

+
+{{ end }} \ No newline at end of file diff --git a/readMe.md b/readMe.md index 378ec4c..3a4147d 100644 --- a/readMe.md +++ b/readMe.md @@ -14,7 +14,9 @@ ### Collection - [x] changer l'affichage des machines à écrire dans colleciton en grid, avec le titre et une image -- [ ] finir de créer l'encadré de fiche technique pour les màe +- [ ] finir de créer le contenu de l'encadré de fiche technique pour les màe +- [ ] afficher l'encadré à droite de la page, avec le reste du texte qui s'organise autour (comme dans word) + - [ ] la infobox est dans le layout single spécifique à la collection, reste à mettre le css pour que tout s'affiche bien - [ ] pouvoir trier les machines par les paramètres de l'encadré sur la page de liste - [ ] Rendre adaptatifs au theme les encadrés de machines - [ ] Mettre un traitement pour les images dans l'encadré @@ -28,5 +30,6 @@ - [ ] réhéberger TPE & PEM2T (et autres trucs chez OVH) en local - [ ] make it so the 404 page works - [ ] Ajouter un colophon +- [ ] Modifié last time diff --git a/themes/PaperMod/layouts/_default/single.html b/themes/PaperMod/layouts/_default/single.html index 19a624f..f75b465 100644 --- a/themes/PaperMod/layouts/_default/single.html +++ b/themes/PaperMod/layouts/_default/single.html @@ -35,12 +35,19 @@ {{- end }} {{- if .Content }} -
- {{- if not (.Param "disableAnchoredHeadings") }} - {{- partial "anchored_headings.html" .Content -}} - {{- else }}{{ .Content }}{{ end }} + +
+ + {{- if eq .Section "collection" }} + {{ partial "maec-encadre.html" . }} + {{- end }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+ {{- end }}
- {{- end }}