ajout de la possibilité de changer les syle de texte en pixel et vert. à vir si ça fonctionne dans le front
All checks were successful
Deploy / Deploy to Production (push) Successful in 9s

This commit is contained in:
antonin gallon 2026-01-14 16:25:06 +01:00
parent b039131102
commit 6e27c1c53b
8 changed files with 112 additions and 0 deletions

View file

@ -9,6 +9,13 @@ columns:
fields:
text:
type: writer
marks:
- bold
- italic
- underline
- strike
- green
- pixel
sidebar:
width: 1/3
sections:

View file

@ -15,6 +15,13 @@ tabs:
label: Titre
type: writer
nodes: false
marks:
- bold
- italic
- underline
- strike
- green
- pixel
required: true
help: "Ex: PLAY THE REAL."
textes:

View file

@ -23,6 +23,13 @@ columns:
description:
label: Description
type: writer
marks:
- bold
- italic
- underline
- strike
- green
- pixel
# Sidebar
- width: 1/3

View file

@ -25,10 +25,24 @@ columns:
label: Phrase d'accroche
type: writer
nodes: false
marks:
- bold
- italic
- underline
- strike
- green
- pixel
help: "Ex: Transformez votre lecture en aventure."
description:
label: Description
type: writer
marks:
- bold
- italic
- underline
- strike
- green
- pixel
help: Description complète du projet
images:

View file

@ -0,0 +1,24 @@
/*
* Styles pour les marks personnalisés - Front-end
* À inclure dans ton CSS principal ou à importer
*/
/* Mark Green - Couleur verte */
.green {
color: #04fea0;
}
/* Mark Pixel - Typo serif (remplacer par ta typo pixel) */
.pixel {
font-family: Georgia, "Times New Roman", serif;
/* Remplace par ta font pixel, ex:
font-family: "Press Start 2P", cursive;
*/
}
/* Combinaison des deux marks */
.green.pixel,
.pixel.green {
color: #04fea0;
font-family: Georgia, "Times New Roman", serif;
}

View file

@ -0,0 +1,18 @@
/* Styles pour les marks personnalisés dans le panel Kirby */
/* Mark Green - Couleur verte */
.k-writer span.green {
color: #04fea0;
}
/* Mark Pixel - Typo serif (placeholder pour future typo pixel) */
.k-writer span.pixel {
font-family: Georgia, "Times New Roman", serif;
}
/* Combinaison des deux marks */
.k-writer span.green.pixel,
.k-writer span.pixel.green {
color: #04fea0;
font-family: Georgia, "Times New Roman", serif;
}

View file

@ -0,0 +1,32 @@
panel.plugin("custom/marks", {
writerMarks: {
green: {
button: {
icon: "brush",
label: "Vert"
},
commands() {
return () => this.toggle();
},
name: "green",
schema: {
parseDOM: [{ tag: "span.green" }],
toDOM: () => ["span", { class: "green" }, 0]
}
},
pixel: {
button: {
icon: "grid-full",
label: "Pixel"
},
commands() {
return () => this.toggle();
},
name: "pixel",
schema: {
parseDOM: [{ tag: "span.pixel" }],
toDOM: () => ["span", { class: "pixel" }, 0]
}
}
}
});

View file

@ -0,0 +1,3 @@
<?php
Kirby::plugin('custom/marks', []);