Compare commits

...
Sign in to create a new pull request.

26 commits

Author SHA1 Message Date
1f024a7e71 sommaire > table des matières 2026-02-20 17:14:40 +01:00
276c567bc8 newsletter blueprint add label and adjust layout. Sommaire > table des matières 2026-02-20 17:13:42 +01:00
01c5b098e4 refactoring avec claude + ajout scroll-margin-top et désaffichage du panel au click sur les liens du toc 2026-02-17 18:10:04 +01:00
d51fc592ed implémentation de la toc complete pour linear 2026-02-17 17:32:27 +01:00
0de3b29e8b début de mise en place de la toc. le design reste à voir 2026-02-16 16:11:36 +01:00
e210ed40f6 merge avec light_mod 2026-02-16 11:30:14 +01:00
e82ad2f4a8 Merge branch 'light_mod' of https://forge.studio-variable.com/Adrien/actuel-inactuel into light_mod 2026-02-16 11:23:12 +01:00
c5a130f9a5 close #46 : optimisation des images en reprenant le template du snipet pour les blocks image 2026-02-13 17:04:51 +01:00
f792954e04 ajout du champs blockBody dans le template. Avec possibilité de mettre des image. L'ancien champs s'affichera toujour si le nouveau est vide 2026-02-13 13:11:37 +01:00
bb5d12cb36 Mode archive ajouter pour visionner les linear avec l'ancien champs corp plus ajout du nouveau champs corp avec block 2026-02-12 15:53:28 +01:00
861cc67ccc closes #48 : date d'inscription associé au subscriber ajouter à la mailing list 2026-02-12 11:06:53 +01:00
3f5595144d j'avais oublié : header.php, linear.php, grid.php pour l'implémentation du allYears(). Peut-etr que ça vaudrait le coup de refactorisé tout ça parceque ça fait beaucoup de duplication 2026-02-09 22:44:13 +01:00
d4b7a3f3fb correction du champs linkedTexts pour ne pas in clure les page de la section texts 2026-02-09 22:32:19 +01:00
9789b645ff ajout d'une fonction pour faire dans l'autre sens : avoir toute les date (parent et linked) + implémentation de la fonction 2026-02-09 22:24:17 +01:00
7501e2cbb7 ajout des page lié pour le template year 2026-02-09 21:22:52 +01:00
d91455a0b4 corection des style css du panel pour ne pas avoir le before et le margin bottom sur la liste des pages liés 2026-02-09 21:10:27 +01:00
dee8f94182 ajout de la methode allTexts() dans site\models\year.php 2026-02-09 20:57:56 +01:00
344af4c0fe modification du blueprint year pour pouvoir séléctionner une page dans une autre année 2026-02-09 19:53:17 +01:00
9aece68498 fix les couleur du panel 2025-12-02 16:58:53 +01:00
20e305744f ajustement alignement toggle-mode ordi fix #42 2025-11-28 18:27:04 +01:00
8e9464f248 rééquilibrage marge (s'inscrire, à propos) 2025-11-24 12:03:36 +01:00
00ffa70d4c correction bouton du bas telephone, placement z-index 2025-11-24 11:58:20 +01:00
57b2e432e2 ajout du bouton de switch + quelque reglage des input 2025-11-21 15:32:57 +01:00
af6feaf913 ajusustement typo 2025-11-21 10:21:52 +01:00
1d95a53126 Front > nav > panel__item : changement de couleur barre left 2025-11-20 17:58:41 +01:00
0585421854 début implémentation light-mode avec son script : remplacement de tout les valeur de couleur par varriable corespondante, text-shadow autour de du logo pour le contour, changement de fonctionnement pour que svg puisse changer de couleur 2025-11-20 17:31:26 +01:00
108 changed files with 4294 additions and 7059 deletions

View file

@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(git show:*)"
]
}
}

View file

@ -9,10 +9,10 @@
color: #000; color: #000;
} }
.k-panel[data-template="year"] .k-list-items .k-item:first-child { .k-panel[data-template="year"] .k-section-name-texts .k-list-items .k-item:first-child {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.k-panel[data-template="year"] .k-list-items::before { .k-panel[data-template="year"] .k-section-name-texts .k-list-items::before {
content: "Texte princeps"; content: "Texte princeps";
display: block; display: block;
padding: 0.5rem; padding: 0.5rem;

View file

@ -24,17 +24,31 @@ article #main-content #chapo::after {
width: 100%; width: 100%;
height: 1px; height: 1px;
background-color: #fff; background-color: var(--color-background);
} }
article #main-content li:not(.text) { article #main-content li:not(.text) {
list-style-type: inherit; list-style-type: inherit;
} }
article h3 { article h3 {
scroll-margin-top: calc(var(--unit--vertical) * 1);
margin-top: calc(3 * var(--unit--vertical)); margin-top: calc(3 * var(--unit--vertical));
margin-bottom: calc(1 * var(--unit--vertical)); margin-bottom: calc(1 * var(--unit--vertical));
} }
@media screen and (max-width: 640px) {
article h3 {
scroll-margin-top: calc(var(--unit--vertical) * 5);
}
}
article li,
article ol {
margin-left: var(--unit--horizontal);
}
article figure img {
max-width: 100%;
}
@media screen and (min-width: 640px) { @media screen and (min-width: 640px) {
article #main-content { article #main-content {

View file

@ -12,12 +12,39 @@
bottom: 0; bottom: 0;
} }
@media screen and (max-width: 640px) {
#main-footer ul {
bottom: 0;
display: flex;
justify-content: space-around;
border-top: 1px solid var(--color-primary);
background-color: var(--color-background);
}
#main-footer .open-nav-wrapper:has([data-open-panel="toc"]) {
margin-right: 50px;
}
}
@media screen and (min-width: 1100px) {
/* On mobile > 1100px, le bouton table des matières n'est pas nécessaire car la TOC est visible */
#main-footer .open-nav-wrapper:has([data-open-panel="toc"]) {
display: none !important;
}
}
#main-footer li:not(.open-nav-wrapper) { #main-footer li:not(.open-nav-wrapper) {
display: none; display: none;
} }
#main-footer li {
flex: 1;
}
#main-footer li > * {
width: calc(100% - var(--unit--vertical) * 2);
}
#main-footer button.open-nav { #main-footer button.open-nav {
transform: translateY(-1px); transform: translateY(-2px);
} }
[data-template="home"] .title-wrapper button.open-nav { [data-template="home"] .title-wrapper button.open-nav {
@ -26,17 +53,14 @@
@media screen and (max-width: 640px) { @media screen and (max-width: 640px) {
#main-footer .open-nav { #main-footer .open-nav {
box-sizing: border-box;
bottom: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 100%;
outline: none; outline: none;
border-top: 1px solid #fff;
font-size: var(--font-size-m); font-size: var(--font-size-m);
background-color: #000; background-color: var(--color-background);
color: var(--color-primary);
line-height: 1;
padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal); padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal);
margin-bottom: env(safe-area-inset-bottom);
} }
} }

View file

@ -138,3 +138,5 @@ button.less::after {
width: 100%; width: 100%;
margin-top: calc(var(--unit--vertical) / 2); margin-top: calc(var(--unit--vertical) / 2);
} }

View file

@ -44,15 +44,22 @@ main article > div {
#logo #actuel { #logo #actuel {
font-weight: 550; font-weight: 550;
} }
[data-theme="light"] #logo #actuel {
font-weight: 550;
color: white;
text-shadow: -1px 0 var(--color-primary), 1px 0 var(--color-primary), 0 -1px var(--color-primary),0 1px var(--color-primary);
}
#logo #actuel, #logo #actuel,
#logo #inactuel { #logo #inactuel {
mix-blend-mode: difference; mix-blend-mode: difference;
} }
#logo #inactuel { #logo #inactuel {
transition: margin-top 0.3s ease-in-out, transform 0.3s ease-in-out; transition: margin-top 0.3s ease-in-out, transform 0.3s ease-in-out;
} }
[data-theme="light"] #logo #inactuel {
mix-blend-mode: difference;
}
#main-header.minimized #inactuel { #main-header.minimized #inactuel {
margin-top: -20vw; margin-top: -20vw;
@ -75,6 +82,7 @@ article > h1 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--unit--vertical);
} }
[data-template="home"] .page-cover { [data-template="home"] .page-cover {
@ -98,9 +106,10 @@ button.toggle.right::before {
.page-cover .links { .page-cover .links {
position: absolute; position: absolute;
bottom: 8px; bottom: calc(var(--unit--vertical) / 2);
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
.page-cover .links li { .page-cover .links li {

View file

@ -39,7 +39,7 @@ html {
* { * {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255) transparent; scrollbar-color: var(--color-primary) transparent;
} }
/* Works on Chrome, Edge, and Safari */ /* Works on Chrome, Edge, and Safari */
@ -54,7 +54,7 @@ html {
} }
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255); background-color: var(--color-primary);
border-radius: 0px; border-radius: 0px;
border: none; border: none;
} }

View file

@ -1,7 +1,7 @@
#nav-overlay { #nav-overlay {
position: fixed; position: fixed;
inset: 0; inset: 0;
background-color: #000; background-color: var(--color-background);
opacity: 0.7; opacity: 0.7;
z-index: 2; z-index: 2;
cursor: w-resize; cursor: w-resize;
@ -17,8 +17,8 @@
width: 100vw; width: 100vw;
height: 100dvh; height: 100dvh;
top: 0; top: 0;
background-color: #000; background-color: var(--color-background);
outline: 1px solid #fff; outline: 1px solid var(--color-primary);
transition: all 0.5s var(--curve-sine); transition: all 0.5s var(--curve-sine);
z-index: 3; z-index: 3;
box-sizing: border-box; box-sizing: border-box;
@ -34,7 +34,7 @@
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1; z-index: 1;
background-color: #000; background-color: var(--color-background);
padding: var(--unit--vertical) var(--unit--horizontal); padding: var(--unit--vertical) var(--unit--horizontal);
padding-bottom: 0; padding-bottom: 0;
} }
@ -64,10 +64,13 @@
position: relative; position: relative;
width: 100%; width: 100%;
margin-top: var(--unit--vertical); margin-top: var(--unit--vertical);
background-color: #000; background-color: var(--color-background);
z-index: 1; z-index: 1;
top: 0; top: 0;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid var(--color-primary);
display: flex;
align-items: center;
} }
.search__input { .search__input {
all: unset; all: unset;
@ -75,23 +78,33 @@
background-color: transparent; background-color: transparent;
padding: calc(var(--unit--vertical) / 4) 0; padding: calc(var(--unit--vertical) / 4) 0;
border: none; border: none;
border-bottom: 1px solid #fff; border-bottom: 1px solid var(--color-background);
color: #fff; color: var(--color-primary);
font-size: var(--font-size-m); font-size: var(--font-size-m);
font-weight: var(--font-weight-light); font-weight: var(--font-weight-light);
caret-color: var(--color-primary);
} }
.search__input::placeholder { .search__input::placeholder {
color: var(--color-primary);
font-size: var(--font-size-sm); font-size: var(--font-size-sm);
letter-spacing: 1px; letter-spacing: 1px;
opacity: 0.55;
} }
.search__icon { .search__icon {
all: unset; all: unset;
position: absolute; position: absolute;
width: 1.2rem; width: 0.2rem;
height: 1.2rem; height: 0.2rem;
padding: 0.5rem; padding: 0.5rem;
right: 0; right: 0;
transform: translateX(0.5rem) translateY(0.2rem); /* transform: translateY(0.2rem); */
background-color: var(--color-primary);
mask: var(--icon-search) no-repeat center;
mask-size: contain;
-webkit-mask: var(--icon-search) no-repeat center;
-webkit-mask-size: contain;
} }
button.search__icon { button.search__icon {
cursor: pointer; cursor: pointer;
@ -114,11 +127,13 @@ footer {
justify-content: center; justify-content: center;
width: 100%; width: 100%;
outline: none; outline: none;
border-top: 1px solid #fff; border-top: 1px solid var(--color-primary);
font-size: var(--font-size-m); font-size: var(--font-size-m);
background-color: #000; background-color: var(--color-background);
padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal); padding: calc(var(--unit--vertical) / 2) var(--unit--horizontal);
margin-bottom: env(safe-area-inset-bottom); margin-bottom: env(safe-area-inset-bottom);
color: var(--color-primary);
line-height: 1;
} }
/* ================= LISTS ================= */ /* ================= LISTS ================= */
@ -180,7 +195,7 @@ button.see-more {
top: 0; top: 0;
height: 100%; height: 100%;
width: 1px; width: 1px;
background-color: #fff; background-color: var(--color-primary);
} }
@media screen and (min-width: 640px) { @media screen and (min-width: 640px) {

View file

@ -11,18 +11,24 @@
#subscribe-form input { #subscribe-form input {
background-color: transparent; background-color: transparent;
border: none; border: none;
border-bottom: 1px solid #fff;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 0.3rem; padding-bottom: 0.3rem;
padding-right: 2rem; padding-right: 2rem;
color: #fff;
width: 15rem; width: 15rem;
border-bottom: 1px solid var(--color-primary);
color: var(--color-primary);
caret-color: var(--color-primary);
}
#subscribe-form input::placeholder {
color: var(--color-primary);
opacity: 0.55;
} }
#subscribe-form input:focus-visible { #subscribe-form input:focus-visible {
outline: none; outline: none;
} }
#subscribe-form button[type="submit"] { #subscribe-form button[type="submit"] {
color: #fff; color: var(--color-primary);
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;

View file

@ -1,5 +1,6 @@
@media print { @media print {
/* Hide header / footer infos. */ /* Hide header / footer infos. */
@page { @page {
margin: 0; margin: 0;
size: auto; size: auto;
@ -25,13 +26,45 @@
} }
} }
body { .panel, nav {
padding-top: 4rem; display: none;
color: #000;
} }
.panel { /* regle du light mode dupliqué*/
display: none; :root {
--color-background: #ffffff;
--color-primary: #000;
--color-secondary-rgb: 140, 140, 140;
--font-weight-light: 240;
}
body {
padding-top: 4rem;
background-image: none;
background-color: var(--color-background) !important;
}
.minimized #inactuel{
transform: none !important;
margin: 0 !important;
}
#logo h1{
display: grid;
grid-template-columns: 100%;
grid-template-rows: auto;
}
#logo #actuel, #logo #inactuel{
grid-column: 1;
grid-row: 1;
}
#logo #actuel {
font-weight: 550;
color: rgb(254, 250, 254) !important;
text-shadow: -1px 0 var(--color-primary), 1px 0 var(--color-primary), 0 -1px var(--color-primary),0 1px var(--color-primary);
z-index: 100;
}
#logo #inactuel {
z-index: 0;
} }
.main-title.fs-xxl { .main-title.fs-xxl {
@ -43,15 +76,6 @@
position: relative; position: relative;
} }
#logo #actuel {
color: #000;
opacity: 0.8;
}
#logo #inactuel {
color: rgb(86, 217, 163);
}
#entry-btns { #entry-btns {
display: none; display: none;
} }

View file

@ -6,7 +6,8 @@ h3,
h4, h4,
h5, h5,
p, p,
ul { ul,
figure {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }

View file

@ -56,7 +56,7 @@ button.toggle.right.open::before {
.active-tab { .active-tab {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: #fff transparent; scrollbar-color: var(--color-background) transparent;
} }
/* Works on Chrome, Edge, and Safari */ /* Works on Chrome, Edge, and Safari */
@ -71,7 +71,7 @@ button.toggle.right.open::before {
} }
.active-tab::-webkit-scrollbar-thumb { .active-tab::-webkit-scrollbar-thumb {
background-color: #fff; background-color: var(--color-background);
border-radius: 1px; border-radius: 1px;
border: none; border: none;
} }

View file

@ -28,7 +28,9 @@ h4 *,
h5, h5,
h5 *, h5 *,
p, p,
p *:not(strong) { p *:not(strong),
figcaption,
.toc{
font-weight: var(--font-weight-light); font-weight: var(--font-weight-light);
line-height: 1; line-height: 1;
} }
@ -168,7 +170,7 @@ a:not(.no-underline) {
text-decoration-thickness: 0.5px; text-decoration-thickness: 0.5px;
} }
article p:not(:last-child) { article p:not(:last-child), article ul:not(:last-child), article figure:not(:last-child){
margin-bottom: var(--unit--vertical); margin-bottom: var(--unit--vertical);
} }

39
assets/css/src/toc.css Normal file
View file

@ -0,0 +1,39 @@
.toc {
display: flex;
flex-direction: column;
justify-content: center;
}
.page-cover .toc {
flex: 1;
}
@media (min-width: 1100px) {
.page-cover .toc {
position: fixed;
width: calc(var(--body-padding) - var(--unit--horizontal) * 2);
left: 0;
top: 15vw;
padding-inline: var(--unit--horizontal);
padding-top: calc(var(--unit--vertical) / 2);
}
}
.panel-toc .toc {
padding: var(--unit--vertical) var(--unit--horizontal);
}
.toc_label {
font-size: var(--font-size-m);
margin-bottom: calc(var(--unit--vertical) / 4);
}
.toc ul {
display: flex;
flex-direction: column;
gap: calc(var(--unit--vertical) / 4);
}
.toc li {
margin-left: 0;
}

View file

@ -0,0 +1,31 @@
.theme-toggler{
position: fixed;
right: 0;
bottom: 0;
padding: calc((var(--unit--vertical) / 2) / 2) calc(var(--unit--horizontal) / 2);
margin: calc((var(--unit--vertical) / 2) / 2) calc(var(--unit--horizontal) / 2);
margin-bottom: calc(var(--unit--vertical) - ((var(--unit--vertical) / 2) / 2));
z-index: 100;
}
.theme-toggler-icon {
width: 1.2rem;
height: 1.2rem;
background-color: var(--color-primary);
mask-size: cover;
-webkit-mask-size: cover;
mask: var(--icon-theme-toggler) no-repeat center;
-webkit-mask: var(--icon-theme-toggler) no-repeat center;
}
@media screen and (max-width: 640px) {
.theme-toggler{
margin-bottom: calc((var(--unit--vertical) / 2) / 2);
}
.theme-toggler-icon {
width: 1.1rem;
height: 1.1rem;
}
}

View file

@ -10,10 +10,14 @@
@import url("src/grid.css"); @import url("src/grid.css");
@import url("src/newsletter.css"); @import url("src/newsletter.css");
@import url("src/footer.css"); @import url("src/footer.css");
@import url("src/toggle-light-mode.css");
@import url("src/print.css"); @import url("src/print.css");
@import url("src/toc.css");
:root { :root {
--color-background: #000;
--color-primary: #ffffff;
--color-primary--transparent: rgba(255, 255, 255, 0.86); --color-primary--transparent: rgba(255, 255, 255, 0.86);
/* --color-secondary-rgb: 120, 171, 150; /* --color-secondary-rgb: 120, 171, 150;
@ -56,6 +60,20 @@
--curve-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95); --curve-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
} }
[data-theme="dark"] {
--color-background: #000;
--color-primary: #ffffff;
--font-weight-light: 200;
}
[data-theme="light"] {
--color-background: #ffffff;
--color-primary: #000;
--color-secondary-rgb: 140, 140, 140;
--font-weight-light: 240;
}
@media screen and (min-width: 640px) { @media screen and (min-width: 640px) {
:root { :root {
--unit--horizontal: 2.5vw; --unit--horizontal: 2.5vw;
@ -67,9 +85,9 @@
--font-size-xl: calc(var(--font-size-l) * 1.5); --font-size-xl: calc(var(--font-size-l) * 1.5);
--font-size-xxl: calc(var(--font-size-xl) * 1.5); --font-size-xxl: calc(var(--font-size-xl) * 1.5);
--font-weight-light: 200; /* --font-weight-light: 200;
--font-weight-bold: 400; --font-weight-bold: 400;
--font-weight-extra-bold: 550; --font-weight-extra-bold: 550; */
--body-padding: calc(10 * var(--unit--horizontal)); --body-padding: calc(10 * var(--unit--horizontal));
} }

View file

@ -1,5 +1,5 @@
:root { :root {
--fc-border: 2px solid #000; --fc-border: 2px solid var(--color-primary);
--fc-border-light: 1px solid #999; --fc-border-light: 1px solid #999;
--fc-font-size-m: 1.2rem; --fc-font-size-m: 1.2rem;
--fc-font-size-s: calc(var(--fc-font-size-m) / 1.3); --fc-font-size-s: calc(var(--fc-font-size-m) / 1.3);
@ -91,7 +91,7 @@
.fc__edition-panel textarea { .fc__edition-panel textarea {
position: relative !important; position: relative !important;
resize: none !important; resize: none !important;
color: #000 !important; color: var(--color-primary) !important;
font-family: sans-serif !important; font-family: sans-serif !important;
font-weight: 100 !important; font-weight: 100 !important;
@ -108,14 +108,14 @@
.fc__edition-panel__btns { .fc__edition-panel__btns {
display: flex; display: flex;
background-color: #fff; background-color: var(--color-background);
margin-top: 0.5rem; margin-top: 0.5rem;
} }
.fc__edition-panel__btns button { .fc__edition-panel__btns button {
all: initial; all: initial;
color: #000; color: var(--color-primary);
font-family: sans-serif; font-family: sans-serif;
font-weight: 100; font-weight: 100;
text-align: center; text-align: center;
@ -124,7 +124,7 @@
width: 100%; width: 100%;
padding: 0.5rem; padding: 0.5rem;
border: var(--fc-border) !important; border: var(--fc-border) !important;
background-color: #fff; background-color: var(--color-background);
cursor: pointer; cursor: pointer;
} }
.fc__edition-panel__btns button:first-child { .fc__edition-panel__btns button:first-child {
@ -145,7 +145,7 @@
height: 2.9rem; height: 2.9rem;
scroll-margin-top: 6rem; scroll-margin-top: 6rem;
color: #000; color: var(--color-primary);
font-family: sans-serif; font-family: sans-serif;
font-size: var(--fc-font-size-m); font-size: var(--fc-font-size-m);
font-weight: 500; font-weight: 500;
@ -162,12 +162,12 @@
width: 20rem; width: 20rem;
padding: 1rem; padding: 1rem;
background-color: #fff; background-color: var(--color-background);
border: var(--fc-border) !important; border: var(--fc-border) !important;
} }
.fc__comment * { .fc__comment * {
color: #000 !important; color: var(--color-primary) !important;
font-family: sans-serif !important; font-family: sans-serif !important;
font-weight: 100 !important; font-weight: 100 !important;
} }
@ -248,20 +248,20 @@
.fc__context-item:not(:last-child) { .fc__context-item:not(:last-child) {
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
border-bottom: 1px dotted #000; border-bottom: 1px dotted var(--color-primary);
} }
.fc__open-window { .fc__open-window {
background-color: transparent; background-color: transparent;
border: 1px solid #000; border: 1px solid var(--color-primary);
border-radius: 0; border-radius: 0;
cursor: pointer; cursor: pointer;
margin-left: 1rem; margin-left: 1rem;
} }
.fc__open-window:hover { .fc__open-window:hover {
background-color: #000; background-color: var(--color-primary);
color: #fff !important; color: var(--color-background) !important;
} }
/* ================= END CONTEXT ================= */ /* ================= END CONTEXT ================= */
@ -281,8 +281,8 @@
border: var(--fc-border); border: var(--fc-border);
} }
.fc__suggestion:hover { .fc__suggestion:hover {
color: #fff; color: var(--color-background);
background-color: #000; background-color: var(--color-primary);
} }
.fc__suggestion--edit { .fc__suggestion--edit {
background-color: rgba(0, 0, 0, 0.1) !important; background-color: rgba(0, 0, 0, 0.1) !important;
@ -292,8 +292,8 @@
position: absolute; position: absolute;
z-index: 999; z-index: 999;
width: 20vw; width: 20vw;
background-color: #fff; background-color: var(--color-background);
color: #000; color: var(--color-primary);
border: var(--fc-border); border: var(--fc-border);
padding: 1rem; padding: 1rem;
left: -0.1rem; left: -0.1rem;

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-circle-half" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 0 8 1zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16"/>
</svg>

After

Width:  |  Height:  |  Size: 181 B

29
assets/js/light-mode.js Normal file
View file

@ -0,0 +1,29 @@
(function () {
const root = document.documentElement;
function toggleDarkMode() {
const currentTheme = root.getAttribute("data-theme");
const newTheme = currentTheme === "dark" ? "light" : "dark";
root.setAttribute("data-theme", newTheme);
localStorage.setItem("theme", newTheme);
}
function init() {
const storedPreference = localStorage.getItem("theme");
const systemPrefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
const theme = storedPreference || (systemPrefersDark ? "dark" : "light");
// const theme = "dark";
root.setAttribute("data-theme", theme);
}
init();
document.addEventListener("DOMContentLoaded", function () {
const togglers = document.querySelectorAll(".theme-toggler");
togglers.forEach((toggler) => {
toggler.addEventListener("click", toggleDarkMode);
});
});
})();

View file

@ -69,9 +69,13 @@ function toggleLogoState() {
} }
function toggleFooterState() { function toggleFooterState() {
if (scrollY > 90) { if (scrollY > 90) {
document.querySelector(".open-nav-wrapper").classList.remove("hidden"); document.querySelectorAll(".open-nav-wrapper").forEach(element => {
element.classList.remove("hidden");
});
} else { } else {
document.querySelector(".open-nav-wrapper").classList.add("hidden"); document.querySelectorAll(".open-nav-wrapper").forEach(element => {
element.classList.add("hidden");
});
} }
} }
@ -125,16 +129,24 @@ function subscribe(event) {
} }
} }
const panelNav = document.querySelector(".panel"); const panels = document.querySelectorAll(".panel[data-panel]");
const navOverlay = document.querySelector("#nav-overlay"); const navOverlay = document.querySelector("#nav-overlay");
const openNavBtns = document.querySelectorAll("button.open-nav");
const closeNavBtn = document.querySelector(".panel-close"); function closeAllPanels() {
function closeNav() { panels.forEach(panel => panel.classList.remove("panel--visible"));
panelNav.classList.remove("panel--visible");
navOverlay.classList.remove("nav-overlay--visible"); navOverlay.classList.remove("nav-overlay--visible");
document.body.classList.remove("no-scroll"); document.body.classList.remove("no-scroll");
} }
function openPanel(name) {
const panel = document.querySelector(`.panel[data-panel="${name}"]`);
if (panel) {
panel.classList.add("panel--visible");
navOverlay.classList.add("nav-overlay--visible");
document.body.classList.add("no-scroll");
}
}
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
ragadjust("h1, h2, h4, h5", ["all"]); ragadjust("h1, h2, h4, h5", ["all"]);
window.window.scrollTo({ window.window.scrollTo({
@ -158,10 +170,10 @@ document.addEventListener("DOMContentLoaded", () => {
window.addEventListener("keyup", (event) => { window.addEventListener("keyup", (event) => {
if (event.key === "Escape") { if (event.key === "Escape") {
closeNav(); closeAllPanels();
} }
}); });
document.querySelectorAll(".panel").forEach((panel) => { panels.forEach((panel) => {
panel.addEventListener("click", (event) => { panel.addEventListener("click", (event) => {
event.stopPropagation(); event.stopPropagation();
}); });
@ -193,18 +205,20 @@ document.addEventListener("DOMContentLoaded", () => {
}); });
}); });
openNavBtns.forEach((openNavBtn) => { document.querySelectorAll("[data-open-panel]").forEach((btn) => {
openNavBtn.addEventListener("click", () => { btn.addEventListener("click", () => {
panelNav.classList.add("panel--visible"); openPanel(btn.dataset.openPanel);
navOverlay.classList.add("nav-overlay--visible");
document.body.classList.add("no-scroll");
}); });
}); });
closeNavBtn.addEventListener("click", () => { document.querySelectorAll(".panel-close").forEach((btn) => {
closeNav(); btn.addEventListener("click", closeAllPanels);
}); });
navOverlay.addEventListener("click", () => {
closeNav(); navOverlay.addEventListener("click", closeAllPanels);
// Fermer le panel TOC quand on clique sur un lien
document.querySelectorAll(".panel-toc .toc a").forEach((link) => {
link.addEventListener("click", closeAllPanels);
}); });
}); });

387
composer.lock generated
View file

@ -334,16 +334,16 @@
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.17.0", "version": "2.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "075bc0c26631110584175de6523ab3f1652eb28e" "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e", "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e",
"reference": "075bc0c26631110584175de6523ab3f1652eb28e", "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -393,7 +393,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/filp/whoops/issues", "issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.17.0" "source": "https://github.com/filp/whoops/tree/2.18.0"
}, },
"funding": [ "funding": [
{ {
@ -401,20 +401,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-01-25T12:00:00+00:00" "time": "2025-03-15T12:00:00+00:00"
}, },
{ {
"name": "getkirby/cms", "name": "getkirby/cms",
"version": "4.6.0", "version": "4.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getkirby/kirby.git", "url": "https://github.com/getkirby/kirby.git",
"reference": "994556ca78eab3c11415702870b6388e8472addc" "reference": "5292c17832dd34b0e5f3e98dea837a357ef037b6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getkirby/kirby/zipball/994556ca78eab3c11415702870b6388e8472addc", "url": "https://api.github.com/repos/getkirby/kirby/zipball/5292c17832dd34b0e5f3e98dea837a357ef037b6",
"reference": "994556ca78eab3c11415702870b6388e8472addc", "reference": "5292c17832dd34b0e5f3e98dea837a357ef037b6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -432,15 +432,15 @@
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"filp/whoops": "2.17.0", "filp/whoops": "2.18.0",
"getkirby/composer-installer": "^1.2.1", "getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.15.0", "laminas/laminas-escaper": "2.17.0",
"michelf/php-smartypants": "1.8.1", "michelf/php-smartypants": "1.8.1",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"phpmailer/phpmailer": "6.9.3", "phpmailer/phpmailer": "6.10.0",
"symfony/polyfill-intl-idn": "1.31.0", "symfony/polyfill-intl-idn": "1.32.0",
"symfony/polyfill-mbstring": "1.31.0", "symfony/polyfill-mbstring": "1.32.0",
"symfony/yaml": "6.4.18" "symfony/yaml": "6.4.21"
}, },
"replace": { "replace": {
"symfony/polyfill-php72": "*" "symfony/polyfill-php72": "*"
@ -504,7 +504,7 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2025-01-30T11:02:53+00:00" "time": "2025-06-03T09:52:03+00:00"
}, },
{ {
"name": "getkirby/composer-installer", "name": "getkirby/composer-installer",
@ -555,22 +555,22 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.9.2", "version": "7.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b" "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b", "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5.3 || ^2.0.3", "guzzlehttp/promises": "^2.3",
"guzzlehttp/psr7": "^2.7.0", "guzzlehttp/psr7": "^2.8",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -661,7 +661,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.9.2" "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
}, },
"funding": [ "funding": [
{ {
@ -677,20 +677,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-24T11:22:20+00:00" "time": "2025-08-23T22:36:01+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "2.0.4", "version": "2.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" "reference": "481557b130ef3790cf82b713667b43030dc9c957"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "reference": "481557b130ef3790cf82b713667b43030dc9c957",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -698,7 +698,7 @@
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -744,7 +744,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/2.0.4" "source": "https://github.com/guzzle/promises/tree/2.3.0"
}, },
"funding": [ "funding": [
{ {
@ -760,20 +760,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-10-17T10:06:22+00:00" "time": "2025-08-22T14:34:08+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.7.0", "version": "2.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" "reference": "21dc724a0583619cd1652f673303492272778051"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "reference": "21dc724a0583619cd1652f673303492272778051",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -789,7 +789,7 @@
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0", "http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@ -860,7 +860,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.7.0" "source": "https://github.com/guzzle/psr7/tree/2.8.0"
}, },
"funding": [ "funding": [
{ {
@ -876,20 +876,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-18T11:15:46+00:00" "time": "2025-08-23T21:21:41+00:00"
}, },
{ {
"name": "illuminate/collections", "name": "illuminate/collections",
"version": "v11.41.3", "version": "v11.46.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/collections.git", "url": "https://github.com/illuminate/collections.git",
"reference": "80c85f81573cc4c024da05312119f9149a6b64c1" "reference": "856b1da953e46281ba61d7c82d337072d3ee1825"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/80c85f81573cc4c024da05312119f9149a6b64c1", "url": "https://api.github.com/repos/illuminate/collections/zipball/856b1da953e46281ba61d7c82d337072d3ee1825",
"reference": "80c85f81573cc4c024da05312119f9149a6b64c1", "reference": "856b1da953e46281ba61d7c82d337072d3ee1825",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -932,20 +932,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-01-24T15:40:32+00:00" "time": "2025-03-24T11:54:20+00:00"
}, },
{ {
"name": "illuminate/conditionable", "name": "illuminate/conditionable",
"version": "v11.41.3", "version": "v11.46.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/conditionable.git", "url": "https://github.com/illuminate/conditionable.git",
"reference": "911df1bda950a3b799cf80671764e34eede131c6" "reference": "319b717e0587bd7c8a3b44464f0e27867b4bcda9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/conditionable/zipball/911df1bda950a3b799cf80671764e34eede131c6", "url": "https://api.github.com/repos/illuminate/conditionable/zipball/319b717e0587bd7c8a3b44464f0e27867b4bcda9",
"reference": "911df1bda950a3b799cf80671764e34eede131c6", "reference": "319b717e0587bd7c8a3b44464f0e27867b4bcda9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -978,20 +978,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-11-21T16:28:56+00:00" "time": "2025-03-24T11:54:20+00:00"
}, },
{ {
"name": "illuminate/contracts", "name": "illuminate/contracts",
"version": "v11.41.3", "version": "v11.46.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75" "reference": "4b2a67d1663f50085bc91e6371492697a5d2d4e8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75", "url": "https://api.github.com/repos/illuminate/contracts/zipball/4b2a67d1663f50085bc91e6371492697a5d2d4e8",
"reference": "534b697fc1dd9fbdd9fbf2f33fc9dcbb943dea75", "reference": "4b2a67d1663f50085bc91e6371492697a5d2d4e8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1026,11 +1026,11 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-01-10T20:57:00+00:00" "time": "2025-03-24T11:54:20+00:00"
}, },
{ {
"name": "illuminate/macroable", "name": "illuminate/macroable",
"version": "v11.41.3", "version": "v11.46.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/macroable.git", "url": "https://github.com/illuminate/macroable.git",
@ -1076,16 +1076,16 @@
}, },
{ {
"name": "laminas/laminas-escaper", "name": "laminas/laminas-escaper",
"version": "2.15.0", "version": "2.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laminas/laminas-escaper.git", "url": "https://github.com/laminas/laminas-escaper.git",
"reference": "c612b0488ae486284c39885efca494c180f16351" "reference": "df1ef9503299a8e3920079a16263b578eaf7c3ba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/c612b0488ae486284c39885efca494c180f16351", "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/df1ef9503299a8e3920079a16263b578eaf7c3ba",
"reference": "c612b0488ae486284c39885efca494c180f16351", "reference": "df1ef9503299a8e3920079a16263b578eaf7c3ba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1097,12 +1097,11 @@
"zendframework/zend-escaper": "*" "zendframework/zend-escaper": "*"
}, },
"require-dev": { "require-dev": {
"infection/infection": "^0.27.11", "infection/infection": "^0.29.8",
"laminas/laminas-coding-standard": "~3.0.1", "laminas/laminas-coding-standard": "~3.0.1",
"maglnet/composer-require-checker": "^3.8.0", "phpunit/phpunit": "^10.5.45",
"phpunit/phpunit": "^9.6.22", "psalm/plugin-phpunit": "^0.19.2",
"psalm/plugin-phpunit": "^0.19.0", "vimeo/psalm": "^6.6.2"
"vimeo/psalm": "^5.26.1"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -1134,7 +1133,7 @@
"type": "community_bridge" "type": "community_bridge"
} }
], ],
"time": "2024-12-17T19:39:54+00:00" "time": "2025-05-06T19:29:36+00:00"
}, },
{ {
"name": "league/color-extractor", "name": "league/color-extractor",
@ -1783,16 +1782,16 @@
}, },
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.9.3", "version": "v6.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git", "url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e" "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e", "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e", "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1852,7 +1851,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP", "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": { "support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues", "issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3" "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.10.0"
}, },
"funding": [ "funding": [
{ {
@ -1860,7 +1859,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-11-24T18:04:13+00:00" "time": "2025-04-24T15:19:31+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
@ -2295,20 +2294,20 @@
}, },
{ {
"name": "sylvainjule/code-editor", "name": "sylvainjule/code-editor",
"version": "1.0.3", "version": "1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sylvainjule/kirby-code-editor.git", "url": "https://github.com/sylvainjule/kirby-code-editor.git",
"reference": "9795565acbf64f92c46423ed4cb5c94bb8a738ea" "reference": "adbc2c8a728994cc57ea72a7f8628f27d202b8df"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sylvainjule/kirby-code-editor/zipball/9795565acbf64f92c46423ed4cb5c94bb8a738ea", "url": "https://api.github.com/repos/sylvainjule/kirby-code-editor/zipball/adbc2c8a728994cc57ea72a7f8628f27d202b8df",
"reference": "9795565acbf64f92c46423ed4cb5c94bb8a738ea", "reference": "adbc2c8a728994cc57ea72a7f8628f27d202b8df",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"getkirby/composer-installer": "^1.1" "getkirby/composer-installer": "^1.2"
}, },
"type": "kirby-plugin", "type": "kirby-plugin",
"extra": { "extra": {
@ -2324,25 +2323,25 @@
"email": "contact@sylvain-jule.fr" "email": "contact@sylvain-jule.fr"
} }
], ],
"description": "Code editor field for Kirby 3 and 4", "description": "Code editor field for Kirby 3, 4 and 5",
"support": { "support": {
"issues": "https://github.com/sylvainjule/kirby-code-editor/issues", "issues": "https://github.com/sylvainjule/kirby-code-editor/issues",
"source": "https://github.com/sylvainjule/kirby-code-editor/tree/1.0.3" "source": "https://github.com/sylvainjule/kirby-code-editor/tree/1.1.0"
}, },
"time": "2024-03-06T18:19:23+00:00" "time": "2025-08-04T17:32:08+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2355,7 +2354,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@ -2380,7 +2379,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@ -2396,20 +2395,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "symfony/http-client", "name": "symfony/http-client",
"version": "v7.2.3", "version": "v7.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-client.git", "url": "https://github.com/symfony/http-client.git",
"reference": "7ce6078c79a4a7afff931c413d2959d3bffbfb8d" "reference": "4b62871a01c49457cf2a8e560af7ee8a94b87a62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/7ce6078c79a4a7afff931c413d2959d3bffbfb8d", "url": "https://api.github.com/repos/symfony/http-client/zipball/4b62871a01c49457cf2a8e560af7ee8a94b87a62",
"reference": "7ce6078c79a4a7afff931c413d2959d3bffbfb8d", "reference": "4b62871a01c49457cf2a8e560af7ee8a94b87a62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2417,10 +2416,12 @@
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/http-client-contracts": "~3.4.4|^3.5.2", "symfony/http-client-contracts": "~3.4.4|^3.5.2",
"symfony/polyfill-php83": "^1.29",
"symfony/service-contracts": "^2.5|^3" "symfony/service-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"amphp/amp": "<2.5", "amphp/amp": "<2.5",
"amphp/socket": "<1.1",
"php-http/discovery": "<1.15", "php-http/discovery": "<1.15",
"symfony/http-foundation": "<6.4" "symfony/http-foundation": "<6.4"
}, },
@ -2433,7 +2434,6 @@
"require-dev": { "require-dev": {
"amphp/http-client": "^4.2.1|^5.0", "amphp/http-client": "^4.2.1|^5.0",
"amphp/http-tunnel": "^1.0|^2.0", "amphp/http-tunnel": "^1.0|^2.0",
"amphp/socket": "^1.1",
"guzzlehttp/promises": "^1.4|^2.0", "guzzlehttp/promises": "^1.4|^2.0",
"nyholm/psr7": "^1.0", "nyholm/psr7": "^1.0",
"php-http/httplug": "^1.0|^2.0", "php-http/httplug": "^1.0|^2.0",
@ -2475,7 +2475,7 @@
"http" "http"
], ],
"support": { "support": {
"source": "https://github.com/symfony/http-client/tree/v7.2.3" "source": "https://github.com/symfony/http-client/tree/v7.3.4"
}, },
"funding": [ "funding": [
{ {
@ -2486,25 +2486,29 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-01-28T15:51:35+00:00" "time": "2025-09-11T10:12:26+00:00"
}, },
{ {
"name": "symfony/http-client-contracts", "name": "symfony/http-client-contracts",
"version": "v3.5.2", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-client-contracts.git", "url": "https://github.com/symfony/http-client-contracts.git",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" "reference": "75d7043853a42837e68111812f4d964b01e5101c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", "reference": "75d7043853a42837e68111812f4d964b01e5101c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2517,7 +2521,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@ -2553,7 +2557,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" "source": "https://github.com/symfony/http-client-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@ -2569,20 +2573,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-12-07T08:49:48+00:00" "time": "2025-04-29T11:18:49+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v7.2.0", "version": "v7.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
"reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2620,7 +2624,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v7.2.0" "source": "https://github.com/symfony/options-resolver/tree/v7.3.3"
}, },
"funding": [ "funding": [
{ {
@ -2631,16 +2635,20 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-11-20T11:17:29+00:00" "time": "2025-08-05T10:16:07+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.31.0", "version": "v1.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
@ -2699,7 +2707,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
}, },
"funding": [ "funding": [
{ {
@ -2710,6 +2718,10 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
@ -2719,16 +2731,16 @@
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
"version": "v1.31.0", "version": "v1.32.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git", "url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3",
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2782,7 +2794,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.32.0"
}, },
"funding": [ "funding": [
{ {
@ -2798,11 +2810,11 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-09T11:45:10+00:00" "time": "2024-09-10T14:38:51+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-normalizer", "name": "symfony/polyfill-intl-normalizer",
"version": "v1.31.0", "version": "v1.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@ -2863,7 +2875,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0"
}, },
"funding": [ "funding": [
{ {
@ -2874,6 +2886,10 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
@ -2883,19 +2899,20 @@
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.31.0", "version": "v1.32.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-iconv": "*",
"php": ">=7.2" "php": ">=7.2"
}, },
"provide": { "provide": {
@ -2943,7 +2960,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0"
}, },
"funding": [ "funding": [
{ {
@ -2959,20 +2976,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-09T11:45:10+00:00" "time": "2024-12-23T08:48:59+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.31.0", "version": "v1.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3023,7 +3040,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0"
}, },
"funding": [ "funding": [
{ {
@ -3034,25 +3051,109 @@
"url": "https://github.com/fabpot", "url": "https://github.com/fabpot",
"type": "github" "type": "github"
}, },
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{ {
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-09T11:45:10+00:00" "time": "2025-01-02T08:10:11+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/polyfill-php83",
"version": "v3.5.1", "version": "v1.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/polyfill-php83.git",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5",
"reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php83\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-07-08T02:45:35+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v3.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3070,7 +3171,7 @@
"name": "symfony/contracts" "name": "symfony/contracts"
}, },
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@ -3106,7 +3207,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.5.1" "source": "https://github.com/symfony/service-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@ -3122,20 +3223,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2025-04-25T09:37:31+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v6.4.18", "version": "v6.4.21",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5" "reference": "f01987f45676778b474468aa266fe2eda1f2bc7e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", "url": "https://api.github.com/repos/symfony/yaml/zipball/f01987f45676778b474468aa266fe2eda1f2bc7e",
"reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", "reference": "f01987f45676778b474468aa266fe2eda1f2bc7e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3178,7 +3279,7 @@
"description": "Loads and dumps YAML files", "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/yaml/tree/v6.4.18" "source": "https://github.com/symfony/yaml/tree/v6.4.21"
}, },
"funding": [ "funding": [
{ {
@ -3194,7 +3295,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-01-07T09:44:41+00:00" "time": "2025-04-04T09:48:44+00:00"
}, },
{ {
"name": "tobimori/kirby-seo", "name": "tobimori/kirby-seo",

BIN
layouts.zip Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,16 @@
label: Corps
type: blocks
default:
- type: heading
content:
level: h2
fieldsets:
text:
name: Texte
icon: text
wysiwyg: true
fields:
text:
extends: fields/body
label: false
image: true

View file

@ -26,10 +26,27 @@ tabs:
label: Chapo label: Chapo
extends: fields/body extends: fields/body
help: optionnel help: optionnel
body: isArchiveMode:
extends: fields/body label: Mode archive
type: toggle
width: 1/4
help: |
Actif : l'ancien champ body sera affiché dans le panel (texte sans médias). Utile pour éditer d'anciens articles uniquement.
when: when:
isHtmlMode: false isHtmlMode: false
bodyBlocks:
extends: fields/bodyBlocks
width: 3/4
when:
isHtmlMode: false
isArchiveMode: false
body:
extends: fields/body
help: Anciens champs conservés pour archive (ne pas remplir pour les nouveaux articles). Ce champs ne sera utiliser en front que si le champs "corp" normal est vide.
width: 3/4
when:
isHtmlMode: false
isArchiveMode: true
htmlBody: htmlBody:
label: Corps label: Corps
type: textarea type: textarea

View file

@ -7,7 +7,7 @@ tabs:
fields: fields:
body: body:
extends: fields/body extends: fields/body
- width: 1/2 - width: 2/3
fields: fields:
subscribers: subscribers:
label: Abonnés label: Abonnés
@ -16,7 +16,12 @@ tabs:
fields: fields:
email: email:
type: email type: email
- width: 1/2 inscriptionDate:
label: Date d'inscription
type: date
display: MM/DD/YYYY
default: today
- width: 1/3
sections: sections:
newsletters: newsletters:
label: Lettres label: Lettres

View file

@ -15,7 +15,7 @@ tabs:
type: pages type: pages
template: year template: year
sortBy: title desc sortBy: title desc
- width: 1/1 - width: 1/2
sections: sections:
allTextsSection: allTextsSection:
label: Tous les textes label: Tous les textes

View file

@ -24,6 +24,14 @@ tabs:
templates: templates:
- linear - linear
- grid - grid
linkedTextsSection:
type: fields
fields:
linkedTexts:
label: Textes liés
type: pages
query : site.find('textes').grandChildren.not(page.children)
help: textes enregistrés à une autre année à inclure aussi dans celle-ci.
- width: 2/3 - width: 2/3
fields: fields:
edito: edito:

View file

@ -22,7 +22,10 @@ return [
]; ];
} }
$newSubscriber = ['email' => $email]; $newSubscriber = [
'email' => $email,
'inscriptionDate' => date('Y-m-d')
];
$subscribers[] = $newSubscriber; $subscribers[] = $newSubscriber;
$page->update([ $page->update([

8
site/models/year.php Normal file
View file

@ -0,0 +1,8 @@
<?php
class YearPage extends Page{
public function allTexts(){
$texts = $this->children()->listed();
$linked = $this->linkedTexts()->toPages();
return $texts->merge($linked);
}
}

View file

@ -1,15 +0,0 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:vue/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
}
}

View file

@ -1,2 +1,6 @@
.DS_Store .DS_Store
.cache
node_modules node_modules
package-lock.json
yarn.lock
composer.lock

View file

@ -1,6 +1,6 @@
# Kirby Code editor # Kirby Code editor
Code editor field for Kirby 3 and 4. Code editor field for Kirby 3, 4 and 5.
![screenshot-code-editor](https://user-images.githubusercontent.com/14079751/109679014-7b043800-7b7b-11eb-8c4e-2ae25da8288d.png) ![screenshot-code-editor](https://user-images.githubusercontent.com/14079751/109679014-7b043800-7b7b-11eb-8c4e-2ae25da8288d.png)
@ -8,7 +8,7 @@ Code editor field for Kirby 3 and 4.
## Overview ## Overview
> This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider [making a donation of your choice](https://paypal.me/sylvainjl) or purchasing your license(s) through [my affiliate link](https://a.paddle.com/v2/click/1129/36369?link=1170). > This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, you can consider [making a donation of your choice](https://paypal.me/sylvainjl).
- [1. Installation](#1-installation) - [1. Installation](#1-installation)
- [2. Setup](#2-setup) - [2. Setup](#2-setup)

View file

@ -1,9 +1,9 @@
{ {
"name": "sylvainjule/code-editor", "name": "sylvainjule/code-editor",
"description": "Code editor field for Kirby 3 and 4", "description": "Code editor field for Kirby 3, 4 and 5",
"type": "kirby-plugin", "type": "kirby-plugin",
"license": "MIT", "license": "MIT",
"version": "1.0.3", "version": "1.1.0",
"authors": [ "authors": [
{ {
"name": "Sylvain Julé", "name": "Sylvain Julé",
@ -11,7 +11,7 @@
} }
], ],
"require": { "require": {
"getkirby/composer-installer": "^1.1" "getkirby/composer-installer": "^1.2"
}, },
"extra": { "extra": {
"installer-name": "code-editor" "installer-name": "code-editor"

View file

@ -0,0 +1,28 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import vue from "eslint-plugin-vue";
export default [
js.configs.recommended,
...vue.configs["flat/vue2-recommended"],
prettier,
{
rules: {
"vue/attributes-order": "error",
"vue/component-definition-name-casing": "off",
"vue/html-closing-bracket-newline": [
"error",
{
singleline: "never",
multiline: "always"
}
],
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/require-prop-types": "error"
},
languageOptions: {
ecmaVersion: 2022
}
}
];

View file

@ -1 +1 @@
.prism-editor-wrapper{width:100%;height:100%;display:flex;align-items:flex-start;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.prism-editor-wrapper .prism-editor__textarea{color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::-moz-selection{background-color:#accef7!important;color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::selection{background-color:#accef7!important;color:transparent!important}}.prism-editor-wrapper .prism-editor__container{position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;width:100%}.prism-editor-wrapper .prism-editor__line-numbers{height:100%;overflow:hidden;flex-shrink:0;padding-top:4px;margin-top:0;margin-right:10px}.prism-editor-wrapper .prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor-wrapper .prism-editor__textarea{position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent}.prism-editor-wrapper .prism-editor__editor,.prism-editor-wrapper .prism-editor__textarea{margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-wrap:keep-all;overflow-wrap:break-word;padding:0}.prism-editor-wrapper .prism-editor__textarea--empty{-webkit-text-fill-color:inherit!important}.prism-editor-wrapper .prism-editor__editor{position:relative;pointer-events:none}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.k-code-editor-input{background:#2d2d2d;color:#ccc;font-family:Fira code,Fira Mono,Consolas,Menlo,Courier,monospace;font-size:.9rem;line-height:1.5;padding:10px}.k-code-editor-input[data-size=small]{min-height:7.5rem}.k-code-editor-input[data-size=medium]{min-height:15rem}.k-code-editor-input[data-size=large],.k-code-editor-input[data-size=huge]{min-height:30rem}.prism-editor__textarea:focus{outline:none} .prism-editor-wrapper{width:100%;height:100%;display:flex;align-items:flex-start;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.prism-editor-wrapper .prism-editor__textarea{color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::-moz-selection{background-color:#accef7!important;color:transparent!important}.prism-editor-wrapper .prism-editor__textarea::selection{background-color:#accef7!important;color:transparent!important}}.prism-editor-wrapper .prism-editor__container{position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;width:100%}.prism-editor-wrapper .prism-editor__line-numbers{height:100%;overflow:hidden;flex-shrink:0;padding-top:4px;margin-top:0;margin-right:10px}.prism-editor-wrapper .prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor-wrapper .prism-editor__textarea{position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent}.prism-editor-wrapper .prism-editor__editor,.prism-editor-wrapper .prism-editor__textarea{margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-wrap:keep-all;overflow-wrap:break-word;padding:0}.prism-editor-wrapper .prism-editor__textarea--empty{-webkit-text-fill-color:inherit!important}.prism-editor-wrapper .prism-editor__editor{position:relative;pointer-events:none}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.k-code-editor-input{background:light-dark(var(--color-gray-950),var(--input-color-back));color:var(--color-gray-200);font-family:var(--font-mono);font-size:var(--text-sm);line-height:1.5;padding:var(--spacing-2);border-radius:var(--rounded)}.k-code-editor-input[data-size=small]{min-height:7.5rem}.k-code-editor-input[data-size=medium]{min-height:15rem}.k-code-editor-input[data-size=large]{min-height:30rem}.k-code-editor-input[data-size=huge]{min-height:45rem}.prism-editor__textarea:focus{outline:none}

File diff suppressed because one or more lines are too long

View file

@ -1,15 +1,15 @@
<?php <?php
Kirby::plugin('sylvainjule/code-editor', [ Kirby::plugin('sylvainjule/code-editor', [
'options' => [ 'options' => array(
'language' => 'css', 'language' => 'css',
'size' => 'small', 'size' => 'small',
'lineNumbers' => true, 'lineNumbers' => true,
'tabSize' => 4, 'tabSize' => 4,
'insertSpaces' => true, 'insertSpaces' => true,
'ignoreTabKey' => false, 'ignoreTabKey' => false,
], ),
'fields' => [ 'fields' => array(
'code-editor' => require_once __DIR__ . '/lib/fields/code-editor.php', 'code-editor' => require_once __DIR__ . '/lib/fields/code-editor.php',
], ),
]); ]);

File diff suppressed because it is too large Load diff

View file

@ -18,13 +18,13 @@
"prepare": "node src/node/patchVuePrismEditor.mjs" "prepare": "node src/node/patchVuePrismEditor.mjs"
}, },
"devDependencies": { "devDependencies": {
"consola": "^2.15.3", "consola": "^3.4.2",
"eslint": "^8.3.0", "eslint": "^9.27.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^10.1.5",
"eslint-plugin-vue": "^8.1.1", "eslint-plugin-vue": "^9.33.0",
"kirbyup": "^0.21.1", "kirbyup": "^3.3.0",
"prettier": "^2.5.0", "prettier": "^3.5.3",
"prismjs": "^1.25.0", "prismjs": "^1.30.0",
"vue-prism-editor": "^1.3.0" "vue-prism-editor": "^1.3.0"
} }
} }

View file

@ -1,62 +0,0 @@
/* Colors
---------------------------------*/
$color-black: #000;
$color-white: #fff;
$color-dark: #16171a;
$color-dark-grey: #777;
$color-light: #efefef;
$color-light-grey: #999;
$color-background: $color-light;
$color-positive: #5d800d;
$color-positive-border: $color-positive;
$color-positive-outline: rgba($color-positive, 0.25);
$color-positive-on-dark: #a7bd68;
$color-focus: #4271ae;
$color-focus-border: $color-focus;
$color-focus-outline: rgba($color-focus, 0.25);
$color-focus-on-dark: #81a2be;
$color-notice: #f5871f;
$color-notice-on-dark: #de935f;
$color-negative: #c82829;
$color-negative-border: $color-negative;
$color-negative-outline: rgba($color-negative, 0.25);
$color-negative-on-dark: #d16464;
$color-border: #ccc;
$color-backdrop: rgba($color-dark, 0.6);
$color-inset: #ebebeb;
/* Breakpoint
---------------------------------*/
$breakpoint-small: 30em;
$breakpoint-menu: 45em;
$breakpoint-medium: 65em;
$breakpoint-large: 90em;
$breakpoint-huge: 120em;
/* Fields
---------------------------------*/
$field-input-padding: .5rem;
$field-input-height: 2.25rem;
$field-input-line-height: 1.25rem;
/* Typography
---------------------------------*/
$font-size-tiny: 0.75rem;
$font-size-small: 0.875rem;
$font-size-medium: 1rem;
$font-size-large: 1.25rem;
$font-size-huge: 1.5rem;
$font-size-monster: 1.75rem;
$font-weight-normal: 400;
$font-weight-bold: 600;
$font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
$font-family-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;

View file

@ -1,29 +0,0 @@
@import
'abstracts/variables.scss';
.k-code-editor-input {
background: #2d2d2d;
color: #ccc;
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
font-size: .9rem;
line-height: 1.5;
padding: 10px;
&[data-size="small"] {
min-height: 7.5rem;
}
&[data-size="medium"] {
min-height: 15rem;
}
&[data-size="large"] {
min-height: 30rem;
}
&[data-size="huge"] {
min-height: 30rem;
}
}
.prism-editor__textarea:focus {
outline: none;
}

View file

@ -67,6 +67,31 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style>
@import "../../assets/css/styles.scss"; .k-code-editor-input {
background: light-dark(var(--color-gray-950), var(--input-color-back));
color: var(--color-gray-200);
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: 1.5;
padding: var(--spacing-2);
border-radius: var(--rounded);
}
.k-code-editor-input[data-size="small"] {
min-height: 7.5rem;
}
.k-code-editor-input[data-size="medium"] {
min-height: 15rem;
}
.k-code-editor-input[data-size="large"] {
min-height: 30rem;
}
.k-code-editor-input[data-size="huge"] {
min-height: 45rem;
}
.prism-editor__textarea:focus {
outline: none;
}
</style> </style>

View file

@ -1,5 +1,17 @@
<?php <?php
function allYears ($article) {
$years = new Pages([$article->parent()]);
foreach (site()->find('textes')->children() as $year) {
if ($year->linkedTexts()->toPages()->has($article)) {
$years = $years->add($year);
}
}
return $years;
}
function setTitleFontSizeClass($title, $level = 'h1') function setTitleFontSizeClass($title, $level = 'h1')
{ {
$length = strlen($title); $length = strlen($title);

View file

@ -0,0 +1,47 @@
<?php
Kirby::plugin('actuel-inactuel/toc', [
'pageMethods' => [
/**
* Vérifie si la page doit afficher une TOC
*/
'hasToc' => function(): bool {
if (!$this->parent()?->parent()?->is('textes')) {
return false;
}
if (!$this->bodyBlocks()?->isNotEmpty()) {
return false;
}
return (bool) preg_match('/<h3>/', $this->bodyBlocks()->toBlocks());
},
/**
* Retourne les items de la TOC
*/
'tocItems' => function(): array {
if (!$this->bodyBlocks()?->isNotEmpty()) {
return [];
}
preg_match_all('/<h3>(.*?)<\/h3>/', $this->bodyBlocks()->toBlocks(), $matches);
return array_map(fn($title) => [
'title' => $title,
'slug' => Str::slug($title)
], $matches[1]);
},
/**
* Retourne le contenu avec les ancres ajoutées aux h3
*/
'bodyWithAnchors' => function(): string {
if (!$this->bodyBlocks()?->isNotEmpty()) {
return '';
}
return preg_replace_callback(
'/<h3>(.*?)<\/h3>/',
fn($m) => '<h3 id="' . Str::slug($m[1]) . '">' . $m[1] . '</h3>',
$this->bodyBlocks()->toBlocks()
);
}
]
]);

View file

@ -0,0 +1,8 @@
try {
await import("http://[::1]:5177/src/index.js");
} catch (err) {
console.error(
"[kirbyup] Couldn't connect to the development server. Run `npm run serve` to start Vite or build the plugin with `npm run build` so Kirby uses the production version."
);
throw err;
}

View file

@ -0,0 +1,8 @@
{
"hash": "2448440c",
"configHash": "ac82c898",
"lockfileHash": "e3b0c442",
"browserHash": "066a9804",
"optimized": {},
"chunks": {}
}

View file

@ -0,0 +1,3 @@
{
"type": "module"
}

View file

@ -0,0 +1,25 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit37a8e61308b9b6f49cb9835f477f0c64::getLoader();

View file

@ -0,0 +1,579 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View file

@ -0,0 +1,359 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}
}

View file

@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,10 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);

View file

@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);

View file

@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Kirby\\' => array($vendorDir . '/getkirby/composer-installer/src'),
);

View file

@ -0,0 +1,36 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit37a8e61308b9b6f49cb9835f477f0c64
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit37a8e61308b9b6f49cb9835f477f0c64', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit37a8e61308b9b6f49cb9835f477f0c64', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit37a8e61308b9b6f49cb9835f477f0c64::getInitializer($loader));
$loader->register(true);
return $loader;
}
}

View file

@ -0,0 +1,36 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit37a8e61308b9b6f49cb9835f477f0c64
{
public static $prefixLengthsPsr4 = array (
'K' =>
array (
'Kirby\\' => 6,
),
);
public static $prefixDirsPsr4 = array (
'Kirby\\' =>
array (
0 => __DIR__ . '/..' . '/getkirby/composer-installer/src',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit37a8e61308b9b6f49cb9835f477f0c64::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit37a8e61308b9b6f49cb9835f477f0c64::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit37a8e61308b9b6f49cb9835f477f0c64::$classMap;
}, null, ClassLoader::class);
}
}

View file

@ -0,0 +1,56 @@
{
"packages": [
{
"name": "getkirby/composer-installer",
"version": "1.2.1",
"version_normalized": "1.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/getkirby/composer-installer.git",
"reference": "c98ece30bfba45be7ce457e1102d1b169d922f3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getkirby/composer-installer/zipball/c98ece30bfba45be7ce457e1102d1b169d922f3d",
"reference": "c98ece30bfba45be7ce457e1102d1b169d922f3d",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
"composer/composer": "^1.8 || ^2.0"
},
"time": "2020-12-28T12:54:39+00:00",
"type": "composer-plugin",
"extra": {
"class": "Kirby\\ComposerInstaller\\Plugin"
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Kirby\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Kirby's custom Composer installer for the Kirby CMS and for Kirby plugins",
"homepage": "https://getkirby.com",
"support": {
"issues": "https://github.com/getkirby/composer-installer/issues",
"source": "https://github.com/getkirby/composer-installer/tree/1.2.1"
},
"funding": [
{
"url": "https://getkirby.com/buy",
"type": "custom"
}
],
"install-path": "../getkirby/composer-installer"
}
],
"dev": true,
"dev-package-names": []
}

View file

@ -0,0 +1,32 @@
<?php return array(
'root' => array(
'name' => 'getkirby/pluginkit',
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'getkirby/composer-installer' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'reference' => 'c98ece30bfba45be7ce457e1102d1b169d922f3d',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/../getkirby/composer-installer',
'aliases' => array(),
'dev_requirement' => false,
),
'getkirby/pluginkit' => array(
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
),
);

View file

@ -0,0 +1,30 @@
{
"name": "getkirby/composer-installer",
"description": "Kirby's custom Composer installer for the Kirby CMS and for Kirby plugins",
"type": "composer-plugin",
"license": "MIT",
"homepage": "https://getkirby.com",
"require": {
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
"composer/composer": "^1.8 || ^2.0"
},
"autoload": {
"psr-4": {
"Kirby\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Kirby\\": "tests/"
}
},
"scripts": {
"fix": "php-cs-fixer fix --config .php_cs",
"test": "--stderr --coverage-html=tests/coverage"
},
"extra": {
"class": "Kirby\\ComposerInstaller\\Plugin"
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,104 @@
# Kirby Composer Installer
[![CI Status](https://flat.badgen.net/github/checks/getkirby/composer-installer/master)](https://github.com/getkirby/composer-installer/actions?query=workflow%3ACI)
[![Coverage Status](https://flat.badgen.net/coveralls/c/github/getkirby/composer-installer)](https://coveralls.io/github/getkirby/composer-installer)
This is Kirby's custom [Composer installer](https://getcomposer.org/doc/articles/custom-installers.md) for the Kirby CMS.
It is responsible for automatically choosing the correct installation paths if you install the CMS via Composer.
It can also be used to automatically install Kirby plugins to the `site/plugins` directory.
## Installing the CMS
### Default configuration
If you `require` the `getkirby/cms` package in your own `composer.json`, there is nothing else you need to do:
```js
{
"require": {
"getkirby/cms": "^3.0"
}
}
```
Kirby's Composer installer (this repo) will run automatically and will install the CMS to the `kirby` directory.
### Custom installation path
You might want to use a different installation path. The path can be configured like this in your `composer.json`:
```js
{
"require": {
"getkirby/cms": "^3.0"
},
"extra": {
"kirby-cms-path": "kirby" // change this to your custom path
}
}
```
### Disable the installer for the CMS
If you prefer to have the CMS installed to the `vendor` directory, you can disable the custom path entirely:
```js
{
"require": {
"getkirby/cms": "^3.0"
},
"extra": {
"kirby-cms-path": false
}
}
```
Please note that you will need to modify your site's `index.php` to load the `vendor/autoload.php` file instead of Kirby's `bootstrap.php`.
## Installing plugins
### Support in published plugins
Plugins need to require this installer as a Composer dependency to make use of the automatic installation to the `site/plugins` directory.
You can find out more about this in our [plugin documentation](https://getkirby.com/docs/guide/plugins/plugin-setup-basic).
### Usage for plugin users
As a user of Kirby plugins that support this installer, you only need to `require` the plugins in your site's `composer.json`:
```js
{
"require": {
"getkirby/cms": "^3.0",
"superwoman/superplugin": "^1.0"
}
}
```
The installer (this repo) will run automatically, as the plugin dev added it to the plugin's `composer.json`.
### Custom installation path
If your `site/plugins` directory is at a custom path, you can configure the installation path like this in your `composer.json`:
```js
{
"require": {
"getkirby/cms": "^3.0",
"superwoman/superplugin": "^1.0"
},
"extra": {
"kirby-plugin-path": "site/plugins" // change this to your custom path
}
}
```
## License
<http://www.opensource.org/licenses/mit-license.php>
## Author
Lukas Bestle <https://getkirby.com>

View file

@ -0,0 +1,64 @@
<?php
namespace Kirby\ComposerInstaller;
use Composer\Config;
use Composer\Package\PackageInterface;
use InvalidArgumentException;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class CmsInstaller extends Installer
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
{
return $packageType === 'kirby-cms';
}
/**
* Returns the installation path of a package
*
* @param \Composer\Package\PackageInterface $package
* @return string
*/
public function getInstallPath(PackageInterface $package): string
{
// get the extra configuration of the top-level package
if ($rootPackage = $this->composer->getPackage()) {
$extra = $rootPackage->getExtra();
} else {
$extra = [];
}
// use path from configuration, otherwise fall back to default
if (isset($extra['kirby-cms-path']) === true) {
$path = $extra['kirby-cms-path'];
} else {
$path = 'kirby';
}
// if explicitly set to something invalid (e.g. `false`), install to vendor dir
if (is_string($path) !== true) {
return parent::getInstallPath($package);
}
// don't allow unsafe directories
$vendorDir = $this->composer->getConfig()->get('vendor-dir', Config::RELATIVE_PATHS) ?? 'vendor';
if ($path === $vendorDir || $path === '.') {
throw new InvalidArgumentException('The path ' . $path . ' is an unsafe installation directory for ' . $package->getPrettyName() . '.');
}
return $path;
}
}

View file

@ -0,0 +1,105 @@
<?php
namespace Kirby\ComposerInstaller;
use Composer\Installer\LibraryInstaller;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use React\Promise\PromiseInterface;
use RuntimeException;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class Installer extends LibraryInstaller
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
{
throw new RuntimeException('This method needs to be overridden.'); // @codeCoverageIgnore
}
/**
* Installs a specific package
*
* @param \Composer\Repository\InstalledRepositoryInterface $repo Repository in which to check
* @param \Composer\Package\PackageInterface $package Package instance to install
* @return \React\Promise\PromiseInterface|null
*/
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
{
// first install the package normally...
$promise = parent::install($repo, $package);
// ...then run custom code
$postInstall = function () use ($package): void {
$this->postInstall($package);
};
// Composer 2 in async mode
if ($promise instanceof PromiseInterface) {
return $promise->then($postInstall);
}
// Composer 1 or Composer 2 without async
$postInstall();
}
/**
* Updates a specific package
*
* @param \Composer\Repository\InstalledRepositoryInterface $repo Repository in which to check
* @param \Composer\Package\PackageInterface $initial Already installed package version
* @param \Composer\Package\PackageInterface $target Updated version
* @return \React\Promise\PromiseInterface|null
*
* @throws \InvalidArgumentException if $initial package is not installed
*/
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
{
// first update the package normally...
$promise = parent::update($repo, $initial, $target);
// ...then run custom code
$postInstall = function () use ($target): void {
$this->postInstall($target);
};
// Composer 2 in async mode
if ($promise instanceof PromiseInterface) {
return $promise->then($postInstall);
}
// Composer 1 or Composer 2 without async
$postInstall();
}
/**
* Custom handler that will be called after each package
* installation or update
*
* @param \Composer\Package\PackageInterface $package
* @return void
*/
protected function postInstall(PackageInterface $package)
{
// remove the package's `vendor` directory to avoid duplicated autoloader and vendor code
$packageVendorDir = $this->getInstallPath($package) . '/vendor';
if (is_dir($packageVendorDir) === true) {
$success = $this->filesystem->removeDirectory($packageVendorDir);
if ($success !== true) {
throw new RuntimeException('Could not completely delete ' . $packageVendorDir . ', aborting.'); // @codeCoverageIgnore
}
}
}
}

View file

@ -0,0 +1,59 @@
<?php
namespace Kirby\ComposerInstaller;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class Plugin implements PluginInterface
{
/**
* Apply plugin modifications to Composer
*
* @param \Composer\Composer $composer
* @param \Composer\IO\IOInterface $io
* @return void
*/
public function activate(Composer $composer, IOInterface $io): void
{
$installationManager = $composer->getInstallationManager();
$installationManager->addInstaller(new CmsInstaller($io, $composer));
$installationManager->addInstaller(new PluginInstaller($io, $composer));
}
/**
* Remove any hooks from Composer
*
* @codeCoverageIgnore
*
* @param \Composer\Composer $composer
* @param \Composer\IO\IOInterface $io
* @return void
*/
public function deactivate(Composer $composer, IOInterface $io): void
{
// nothing to do
}
/**
* Prepare the plugin to be uninstalled
*
* @codeCoverageIgnore
*
* @param Composer $composer
* @param IOInterface $io
* @return void
*/
public function uninstall(Composer $composer, IOInterface $io): void
{
// nothing to do
}
}

View file

@ -0,0 +1,112 @@
<?php
namespace Kirby\ComposerInstaller;
use Composer\Package\PackageInterface;
use InvalidArgumentException;
/**
* @package Kirby Composer Installer
* @author Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class PluginInstaller extends Installer
{
/**
* Decides if the installer supports the given type
*
* @param string $packageType
* @return bool
*/
public function supports($packageType): bool
{
return $packageType === 'kirby-plugin';
}
/**
* Returns the installation path of a package
*
* @param \Composer\Package\PackageInterface $package
* @return string path
*/
public function getInstallPath(PackageInterface $package): string
{
// place into `vendor` directory as usual if Pluginkit is not supported
if ($this->supportsPluginkit($package) !== true) {
return parent::getInstallPath($package);
}
// get the extra configuration of the top-level package
if ($rootPackage = $this->composer->getPackage()) {
$extra = $rootPackage->getExtra();
} else {
$extra = [];
}
// use base path from configuration, otherwise fall back to default
$basePath = $extra['kirby-plugin-path'] ?? 'site/plugins';
if (is_string($basePath) !== true) {
throw new InvalidArgumentException('Invalid "kirby-plugin-path" option');
}
// determine the plugin name from its package name;
// can be overridden in the plugin's `composer.json`
$prettyName = $package->getPrettyName();
$pluginExtra = $package->getExtra();
if (empty($pluginExtra['installer-name']) === false) {
$name = $pluginExtra['installer-name'];
if (is_string($name) !== true) {
throw new InvalidArgumentException('Invalid "installer-name" option in plugin ' . $prettyName);
}
} elseif (strpos($prettyName, '/') !== false) {
// use name after the slash
$name = explode('/', $prettyName)[1];
} else {
$name = $prettyName;
}
// build destination path from base path and plugin name
return $basePath . '/' . $name;
}
/**
* Custom handler that will be called after each package
* installation or update
*
* @param \Composer\Package\PackageInterface $package
* @return void
*/
protected function postInstall(PackageInterface $package): void
{
// only continue if Pluginkit is supported
if ($this->supportsPluginkit($package) !== true) {
return;
}
parent::postInstall($package);
}
/**
* Checks if the package has explicitly required this installer;
* otherwise (if the Pluginkit is not yet supported by the plugin)
* the installer will fall back to the behavior of the LibraryInstaller
*
* @param \Composer\Package\PackageInterface $package
* @return bool
*/
protected function supportsPluginkit(PackageInterface $package): bool
{
foreach ($package->getRequires() as $link) {
if ($link->getTarget() === 'getkirby/composer-installer') {
return true;
}
}
// no required package is the installer
return false;
}
}

View file

@ -0,0 +1,37 @@
<?php
/** @var \Kirby\Cms\Block $block */
$alt = $block->alt();
$caption = $block->caption();
$crop = $block->crop()->isTrue();
$link = $block->link();
$ratio = $block->ratio()->or('auto');
$src = null;
$srcset = null;
if ($block->location() == 'web') {
$src = $block->src()->esc();
} elseif ($image = $block->image()->toFile()) {
$alt = $alt->or($image->alt());
$src = $image->url();
$srcset = $image->srcset([300, 600, 900, 1200, 1800]);
}
?>
<?php if ($src): ?>
<figure<?= Html::attr(['data-ratio' => $ratio, 'data-crop' => $crop], null, ' ') ?>>
<?php if ($link->isNotEmpty()): ?>
<a href="<?= Str::esc($link->toUrl()) ?>">
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>"<?php if ($srcset): ?> srcset="<?= $srcset ?>" sizes="min(60vw, 45rem)"<?php endif ?> loading="lazy">
</a>
<?php else: ?>
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>"<?php if ($srcset): ?> srcset="<?= $srcset ?>" sizes="min(60vw, 45rem)"<?php endif ?> loading="lazy">
<?php endif ?>
<?php if ($caption->isNotEmpty()): ?>
<figcaption>
<?= $caption ?>
</figcaption>
<?php endif ?>
</figure>
<?php endif ?>

View file

@ -8,6 +8,9 @@ $isOpen ??= false;
<?= $slots->title() ?> <?= $slots->title() ?>
</a> </a>
</div> </div>
<?php if ($page->hasToc()): ?>
<?php snippet('toc') ?>
<?php endif ?>
<?php if ($slots->text()): ?> <?php if ($slots->text()): ?>
<div class="text-wrapper"> <div class="text-wrapper">
<?= $slots->text() ?> <?= $slots->text() ?>

View file

@ -1,18 +1,22 @@
<?php if (!$page->is(page('lettre')) && !$page->is(page('a-propos'))): ?> <?php if (!$page->is(page('lettre')) && !$page->is(page('a-propos'))): ?>
<footer id="main-footer"> <footer id="main-footer">
<ul id="links"> <ul id="links">
<li class="open-nav-wrapper hidden"> <li class="open-nav-wrapper hidden">
<button class="plus open-nav" title="chercher parmi les textes">textes</button> <button class="plus open-nav" data-open-panel="text" title="chercher parmi les textes">textes</button>
</li> </li>
<?php if ($page->hasToc()): ?>
<li class="open-nav-wrapper hidden">
<button class="plus open-nav" data-open-panel="toc" title="ouvrir le table des matières">table des
matières</button>
</li>
<?php endif ?>
<li> <li>
<a href="/lettre" id="subscribe-btn" class="plus"> <a href="/lettre" id="subscribe-btn" class="plus">
s'inscrire s'inscrire
</a> </a>
</li> </li>
<li> <li>
<a <a href="<?= $site->find('a-propos')->url() ?>">
href="<?= $site->find('a-propos')->url() ?>">
à propos à propos
</a> </a>
</li> </li>

View file

@ -22,6 +22,8 @@ $entryTopPos ??= 20;
</script> </script>
<script defer src="<?= url('assets/js/ragadjust.js') ?>"> <script defer src="<?= url('assets/js/ragadjust.js') ?>">
</script> </script>
<script defer src="<?= url('assets/js/light-mode.js') ?>">
</script>
<meta name="robots" content="noindex, nofollow, noarchive"> <meta name="robots" content="noindex, nofollow, noarchive">
@ -37,7 +39,7 @@ $entryTopPos ??= 20;
"name": "<?= $page->author() ?>" "name": "<?= $page->author() ?>"
}], }],
"image": "<?= url('assets/images/logo.png') ?>", "image": "<?= url('assets/images/logo.png') ?>",
"description": "<?= $page->title() ?>, par <?= $page->author()->toPage()->title() ?>. Publié le <?= $page->published()->toDate('d/m/Y') ?> dans <?= $page->parent()->title() ?>/<?= $page->category() ?>", "description": "<?= $page->title() ?>, par <?= $page->author()->toPage()->title() ?>. Publié le <?= $page->published()->toDate('d/m/Y') ?> dans <?= implode(', ', allYears($page)->pluck('title')) ?>/<?= $page->category() ?>",
"datePublished": "<?= $page->published()->toDate('Y-m-d') ?>", "datePublished": "<?= $page->published()->toDate('Y-m-d') ?>",
"dateModified": "<?= $page->modified('Y-m-d') ?>", "dateModified": "<?= $page->modified('Y-m-d') ?>",
"url": "<?= $page->url() ?>", "url": "<?= $page->url() ?>",
@ -62,6 +64,15 @@ $entryTopPos ??= 20;
<meta name="apple-mobile-web-app-title" content="actuel-inactuel" /> <meta name="apple-mobile-web-app-title" content="actuel-inactuel" />
<link rel="manifest" href="/site.webmanifest" /> <link rel="manifest" href="/site.webmanifest" />
<!-- ICON -->
<style>
:root {
--icon-search: url("<?= url('assets/images/icons/search.svg') ?>");
--icon-close: url("<?= url('assets/images/icons/close.svg') ?>");
--icon-theme-toggler: url("<?= url('assets/images/icons/circle-half.svg') ?>");
}
</style>
<?php if ($page->additionnalCss()->isNotEmpty()): ?> <?php if ($page->additionnalCss()->isNotEmpty()): ?>
<!-- CUSTOM CSS --> <!-- CUSTOM CSS -->
<style> <style>
@ -73,7 +84,11 @@ $entryTopPos ??= 20;
<body <body
class="background-grid <?= e($page->fullWidth() == 'true', 'full-width') ?>" class="background-grid <?= e($page->fullWidth() == 'true', 'full-width') ?>"
data-has-toc="<?= $page->hasToc() ? 'true' : 'false' ?>"
data-template="<?= $page->template() ?>"> data-template="<?= $page->template() ?>">
<button class="theme-toggler" data-theme-toggler>
<span class="theme-toggler-icon"></span>
</button>
<header id="main-header"> <header id="main-header">
<a id="logo" <a id="logo"
href="<?= e($page->isHomePage(), '#main-edito', $site->url()) ?>" href="<?= e($page->isHomePage(), '#main-edito', $site->url()) ?>"
@ -86,3 +101,7 @@ $entryTopPos ??= 20;
</a> </a>
</header> </header>
<?php snippet('nav') ?> <?php snippet('nav') ?>
<?php if ($page->hasToc()): ?>
<?php snippet('panel-toc') ?>
<?php endif ?>
<div id="nav-overlay"></div>

View file

@ -1,4 +1,4 @@
<nav class="panel" x-data="{search: ''}"> <nav class="panel panel-text" data-panel="text" x-data="{search: ''}">
<header> <header>
<p class="sort-btns"> <p class="sort-btns">
<button class="sort-btn sort-btn--years active">années</span></button> <button class="sort-btn sort-btn--years active">années</span></button>
@ -7,9 +7,7 @@
</p> </p>
<div class="search"> <div class="search">
<input class="search__input" type="text" placeholder="Chercher" x-model="search"> <input class="search__input" type="text" placeholder="Chercher" x-model="search">
<img x-show="search.length === 0" <div class="search__icon"></div>
src="<?= url('assets/images/icons/search.svg') ?>"
class="search__icon" alt="Icône loupe indiquant le champ de recherche.">
<button x-show="search.length > 0" @click="search = ''" class="search__icon"> <button x-show="search.length > 0" @click="search = ''" class="search__icon">
<img <img
src="<?= url('assets/images/icons/close.svg') ?>" src="<?= url('assets/images/icons/close.svg') ?>"
@ -22,4 +20,3 @@
<?php snippet('nav__texts--collection', ['collection' => 'years']) ?> <?php snippet('nav__texts--collection', ['collection' => 'years']) ?>
<button class="less panel-close">textes</button> <button class="less panel-close">textes</button>
</nav> </nav>
<div id="nav-overlay"></div>

View file

@ -29,9 +29,12 @@
<span class="light">publié le </span><?php echo $article->published()->toDate('d/m/Y') ?><br> <span class="light">publié le </span><?php echo $article->published()->toDate('d/m/Y') ?><br>
<span class="light">dans</span> <a <span class="light">dans</span>
href="<?= $article->parent()->url() ?>"><?= $article->parent()->title() ?></a> <?php foreach(allYears($article) as $year):?>
/ <a <a href="<?= $year->url() ?>"><?= $year->title()?></a>/
<?php endforeach ?>
<a
href="/categories/<?= Str::slug($article->category()) ?>"><?= $article->category() ?></a> href="/categories/<?= Str::slug($article->category()) ?>"><?= $article->category() ?></a>
</p> </p>
</div> </div>

View file

@ -18,7 +18,8 @@
class="see-more toggle-btn toggle-btn--left" @click="edito = !edito">Lire</button> class="see-more toggle-btn toggle-btn--left" @click="edito = !edito">Lire</button>
<?php endif ?> <?php endif ?>
<ul class="panel-item-content__texts texts"> <ul class="panel-item-content__texts texts">
<?php foreach($section->children() as $article): ?> <?php $articles = method_exists($section, 'allTexts') ? $section->allTexts() : $section->children(); ?>
<?php foreach($articles as $article): ?>
<?php <?php
$author = $article->author()->toPage() == null ? 'inconnu' : $article->author()->toPage()->title(); $author = $article->author()->toPage() == null ? 'inconnu' : $article->author()->toPage()->title();
?> ?>
@ -48,9 +49,11 @@
<span class="light">publié le </span><?php echo $article->published()->toDate('d/m/Y') ?><br> <span class="light">publié le </span><?php echo $article->published()->toDate('d/m/Y') ?><br>
<span class="light">dans</span> <a <span class="light">dans</span>
href="<?= $article->parent()->url() ?>"><?= $article->parent()->title() ?></a> <?php foreach(allYears($article) as $year): ?>
/ <a <a href="<?= $year->url() ?>"><?= $year->title() ?></a> /
<?php endforeach ?>
<a
href="/categories/<?= Str::slug($article->category()) ?>"><?= $article->category() ?></a> href="/categories/<?= Str::slug($article->category()) ?>"><?= $article->category() ?></a>
</p> </p>
</div> </div>

View file

@ -0,0 +1,4 @@
<div class="panel panel-toc" data-panel="toc">
<?php snippet('toc') ?>
<button class="less panel-close">table des matières</button>
</div>

Some files were not shown because too many files have changed in this diff Show more