Compare commits
16 commits
main
...
epub-plugi
| Author | SHA1 | Date | |
|---|---|---|---|
| 309111c23a | |||
| c4892e919c | |||
| 8c8295b677 | |||
| a9d24a43a9 | |||
| 7829420c78 | |||
| 4323b79ac1 | |||
| 0a92094e53 | |||
| d4d1d70804 | |||
| fcf47818d0 | |||
| 0c447209d9 | |||
| 59411d0896 | |||
| c0ec5f30ad | |||
| 3df6ff186f | |||
| 7d3d20d006 | |||
| d365abfdb9 | |||
| abff2cba9b |
35 changed files with 749 additions and 52 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
.k-panel-menu {
|
.k-panel-menu {
|
||||||
background-color: var(--color-primary);
|
background-color: #000;
|
||||||
}
|
}
|
||||||
.k-panel-menu * {
|
.k-panel-menu * {
|
||||||
color: var(--color-background);
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.k-panel-menu-button[aria-current] * {
|
.k-panel-menu-button[aria-current] * {
|
||||||
color: var(--color-primary);
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.k-panel[data-template="year"] .k-list-items .k-item:first-child {
|
.k-panel[data-template="year"] .k-list-items .k-item:first-child {
|
||||||
|
|
@ -20,6 +20,6 @@
|
||||||
border-radius: var(--rounded-md) var(--rounded-md) 0 0;
|
border-radius: var(--rounded-md) var(--rounded-md) 0 0;
|
||||||
transform: translateY(0.3rem);
|
transform: translateY(0.3rem);
|
||||||
|
|
||||||
background-color: var(--color-primary);
|
background-color: #000;
|
||||||
color: var(--color-background);
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,5 +138,8 @@ button.less::after {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: calc(var(--unit--vertical) / 2);
|
margin-top: calc(var(--unit--vertical) / 2);
|
||||||
}
|
}
|
||||||
|
.only-print{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ body.full-width #main-content {
|
||||||
margin-left: inherit;
|
margin-left: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.grid .column:not(:last-child) {
|
.grid .column:not(:last-child) {
|
||||||
margin-bottom: calc(2 * var(--unit--vertical));
|
margin-bottom: calc(2 * var(--unit--vertical));
|
||||||
}
|
}
|
||||||
|
|
@ -35,11 +35,15 @@ body.full-width #main-content {
|
||||||
[data-template="grid"] main #main-content {
|
[data-template="grid"] main #main-content {
|
||||||
margin-left: calc(0px - calc(4 * var(--unit--horizontal)));
|
margin-left: calc(0px - calc(4 * var(--unit--horizontal)));
|
||||||
}
|
}
|
||||||
|
[data-template="grid"] .grid {
|
||||||
|
column-gap: var(--unit--horizontal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 640px) {
|
||||||
[data-template="grid"] .grid {
|
[data-template="grid"] .grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(39, 1fr);
|
grid-template-columns: repeat(39, 1fr);
|
||||||
column-gap: var(--unit--horizontal);
|
column-gap: var(--unit--horizontal);
|
||||||
margin-bottom: calc(var(--unit--vertical) * 2);
|
margin-bottom: calc(var(--unit--vertical) * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -92,6 +92,7 @@ article > h1 {
|
||||||
margin-bottom: calc(0.255 * var(--unit--vertical));
|
margin-bottom: calc(0.255 * var(--unit--vertical));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.page-cover .text-wrapper {
|
.page-cover .text-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,42 @@
|
||||||
@media print {
|
@media print {
|
||||||
/* Hide header / footer infos. */
|
/* Hide header / footer infos. */
|
||||||
|
|
||||||
|
:root{
|
||||||
|
--font-size-m: calc(var(--font-size-s) * 1.4) !important;
|
||||||
|
}
|
||||||
|
*:not(.page-cover) p, *:not(.page-cover) li, *:not(.page-cover) button, *:not(.page-cover) .fs-m{
|
||||||
|
font-size: var(--font-size-m);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-template="linear"] #main-content{
|
||||||
|
padding-right: calc(var(--unit--horizontal) * 2) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-template="grid"] .grid .column {
|
||||||
|
grid-column: span 1;
|
||||||
|
}
|
||||||
|
[data-template="grid"] .grid {
|
||||||
|
column-gap: 20px;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
[data-template="grid"] .blocks, .column {
|
||||||
|
page-break-inside: auto; /* autoriser la coupe si nécessaire */
|
||||||
|
}
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
margin: 0;
|
/*variable pas supporter dans les marges...*/
|
||||||
|
/*
|
||||||
|
--unit--horizontal: 2.5vw;
|
||||||
|
--unit--vertical: 1.7rem;
|
||||||
|
*/
|
||||||
|
margin: 2.5vw 1.7rem;
|
||||||
size: auto;
|
size: auto;
|
||||||
|
|
||||||
@top-left {
|
@top-left {
|
||||||
|
|
@ -25,38 +59,58 @@
|
||||||
content: none;
|
content: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.only-print{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.panel, nav {
|
.panel, nav, .main-edito-btn, .theme-toggler, .page-cover .links,
|
||||||
display: none;
|
[data-template="home"] .title-wrapper button.open-nav, #nav-overlay, .only-screen{
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* regle du light mode dupliqué*/
|
/* regle du light mode dupliqué*/
|
||||||
:root {
|
:root {
|
||||||
--color-background: #ffffff;
|
--color-background: #ffffff !important;
|
||||||
--color-primary: #000;
|
--color-primary: #000 !important;
|
||||||
|
|
||||||
--color-secondary-rgb: 140, 140, 140;
|
--color-secondary-rgb: 140, 140, 140;
|
||||||
--font-weight-light: 240;
|
--font-weight-light: 240;
|
||||||
|
|
||||||
|
--unit--vertical: 2cm;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
padding-top: 4rem;
|
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-color: var(--color-background) !important;
|
background-color: var(--color-background) !important;
|
||||||
}
|
}
|
||||||
|
#main-header {
|
||||||
|
position: relative;
|
||||||
|
page-break-after: always;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
.minimized #inactuel{
|
.minimized #inactuel{
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
#logo *{
|
||||||
|
font-size: 27.3vw;
|
||||||
|
}
|
||||||
#logo h1{
|
#logo h1{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 100%;
|
grid-template-columns: 100%;
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
}
|
}
|
||||||
|
#logo span{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
#logo #actuel, #logo #inactuel{
|
#logo #actuel, #logo #inactuel{
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
}
|
}
|
||||||
|
[data-theme="light"] #logo #actuel, [data-theme="dark"] #logo #actuel,
|
||||||
|
[data-theme="light"] #logo #inactuel, [data-theme="dark"] #logo #inactuel{
|
||||||
|
mix-blend-mode: normal;
|
||||||
|
}
|
||||||
|
|
||||||
#logo #actuel {
|
#logo #actuel {
|
||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
color: rgb(254, 250, 254) !important;
|
color: rgb(254, 250, 254) !important;
|
||||||
|
|
@ -66,16 +120,19 @@
|
||||||
#logo #inactuel {
|
#logo #inactuel {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
.page-cover{
|
||||||
|
padding-top: 0;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: auto;
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
.main-title.fs-xxl {
|
.main-title.fs-xxl {
|
||||||
font-size: 7rem !important;
|
font-size: 7rem !important;
|
||||||
line-height: 1 !important;
|
line-height: 1 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-header {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry-btns {
|
#entry-btns {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +142,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
article #main-content {
|
article #main-content {
|
||||||
width: 60%;
|
/* width: 60%; */
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
main {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
/* .url{
|
||||||
|
position: absolute;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: top left;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ article h2 {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-weight: var(--font-weight-light);
|
font-weight: var(--font-weight-light);
|
||||||
margin-bottom: var(--unit--vertical);
|
margin-bottom: var(--unit--vertical);
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text__title {
|
.text__title {
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,16 @@
|
||||||
mask: var(--icon-theme-toggler) no-repeat center;
|
mask: var(--icon-theme-toggler) no-repeat center;
|
||||||
-webkit-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-icon {
|
@media screen and (min-width: 641px) {
|
||||||
width: 1.1rem;
|
.theme-toggler-icon {
|
||||||
height: 1.1rem;
|
padding-bottom: calc(var(--unit--vertical) - (var(--unit--vertical) / 4));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 640px) {
|
||||||
|
.theme-toggler-icon {
|
||||||
|
width: 1.1rem;
|
||||||
|
height: 1.1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -29,7 +29,8 @@
|
||||||
"php-http/guzzle7-adapter": "^1.1",
|
"php-http/guzzle7-adapter": "^1.1",
|
||||||
"mailersend/mailersend": "^0.28.0",
|
"mailersend/mailersend": "^0.28.0",
|
||||||
"sylvainjule/code-editor": "^1.0",
|
"sylvainjule/code-editor": "^1.0",
|
||||||
"tobimori/kirby-seo": "^1.1"
|
"tobimori/kirby-seo": "^1.1",
|
||||||
|
"splorp/paperback-export": "^2.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
||||||
51
composer.lock
generated
51
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "30f9edc8f90ec79150fffac01e3b80fd",
|
"content-hash": "8ef02ef5b3cde9ff5bc677b8766397a3",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "beberlei/assert",
|
"name": "beberlei/assert",
|
||||||
|
|
@ -2292,6 +2292,55 @@
|
||||||
],
|
],
|
||||||
"time": "2025-01-31T14:54:12+00:00"
|
"time": "2025-01-31T14:54:12+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "splorp/paperback-export",
|
||||||
|
"version": "2.0.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/splorp/kirby-paperback-export.git",
|
||||||
|
"reference": "94a43248af69040f1144700262e35842ce6602ff"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/splorp/kirby-paperback-export/zipball/94a43248af69040f1144700262e35842ce6602ff",
|
||||||
|
"reference": "94a43248af69040f1144700262e35842ce6602ff",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"getkirby/composer-installer": "^1.1"
|
||||||
|
},
|
||||||
|
"type": "kirby-plugin",
|
||||||
|
"extra": {
|
||||||
|
"installer-name": "paperback-export"
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Grant Hutchinson",
|
||||||
|
"email": "grant@splorp.com",
|
||||||
|
"homepage": "https://splorp.com/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Export Kirby CMS content for use with the PaperBack Book Maker",
|
||||||
|
"homepage": "https://github.com/splorp/kirby-paperback-export",
|
||||||
|
"keywords": [
|
||||||
|
"kirby",
|
||||||
|
"kirby-cms",
|
||||||
|
"kirby-plugin",
|
||||||
|
"newton-book",
|
||||||
|
"newton-os",
|
||||||
|
"paperback-book-maker"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"docs": "https://github.com/splorp/kirby-paperback-export/blob/master/readme.md",
|
||||||
|
"issues": "https://github.com/splorp/kirby-paperback-export/issues",
|
||||||
|
"source": "https://github.com/splorp/kirby-paperback-export"
|
||||||
|
},
|
||||||
|
"time": "2025-06-25T20:50:14+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "sylvainjule/code-editor",
|
"name": "sylvainjule/code-editor",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
|
|
||||||
2
site/blueprints/files/pdfVersion-file.yml
Normal file
2
site/blueprints/files/pdfVersion-file.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
accept:
|
||||||
|
extension: pdf
|
||||||
|
|
@ -8,6 +8,14 @@ tabs:
|
||||||
presentationSection:
|
presentationSection:
|
||||||
type: fields
|
type: fields
|
||||||
fields:
|
fields:
|
||||||
|
|
||||||
|
web2printTest:
|
||||||
|
type: web2print
|
||||||
|
options:
|
||||||
|
- summary
|
||||||
|
- page-number
|
||||||
|
- cover
|
||||||
|
|
||||||
presentation:
|
presentation:
|
||||||
extends: fields/body
|
extends: fields/body
|
||||||
label: Présentation
|
label: Présentation
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,14 @@ tabs:
|
||||||
label: Corps
|
label: Corps
|
||||||
type: fields
|
type: fields
|
||||||
fields:
|
fields:
|
||||||
|
pdfVersion:
|
||||||
|
label: version pdf
|
||||||
|
help: glisser ici le fichier pdf généré avec `ctrl + p` depuis la page du site
|
||||||
|
type: files
|
||||||
|
multiple: false
|
||||||
|
image: false
|
||||||
|
uploads: pdfVersion-file
|
||||||
|
width: 1/3
|
||||||
fullWidth:
|
fullWidth:
|
||||||
label: Pleine largeur
|
label: Pleine largeur
|
||||||
type: toggle
|
type: toggle
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,17 @@ tabs:
|
||||||
label: Corps
|
label: Corps
|
||||||
type: fields
|
type: fields
|
||||||
fields:
|
fields:
|
||||||
|
epub-export:
|
||||||
|
type: epubexport
|
||||||
|
headline: "Exporter cette page"
|
||||||
|
pdfVersion:
|
||||||
|
label: version pdf
|
||||||
|
help: glisser ici le fichier pdf généré avec `ctrl + p` depuis la page du site
|
||||||
|
type: files
|
||||||
|
multiple: false
|
||||||
|
image: false
|
||||||
|
uploads: pdfVersion-file
|
||||||
|
width: 1/3
|
||||||
subtitle:
|
subtitle:
|
||||||
label: Sous-titre
|
label: Sous-titre
|
||||||
type: writer
|
type: writer
|
||||||
|
|
|
||||||
20
site/plugins/epub-export/.editorconfig
Normal file
20
site/plugins/epub-export/.editorconfig
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# This file is for unifying the coding style for different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.php]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.md,*.txt]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[composer.json]
|
||||||
|
indent_size = 4
|
||||||
11
site/plugins/epub-export/.gitattributes
vendored
Normal file
11
site/plugins/epub-export/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Note: You need to uncomment the lines you want to use; the other lines can be deleted
|
||||||
|
|
||||||
|
# Git
|
||||||
|
# .gitattributes export-ignore
|
||||||
|
# .gitignore export-ignore
|
||||||
|
|
||||||
|
# Tests
|
||||||
|
# /.coveralls.yml export-ignore
|
||||||
|
# /.travis.yml export-ignore
|
||||||
|
# /phpunit.xml.dist export-ignore
|
||||||
|
# /tests/ export-ignore
|
||||||
14
site/plugins/epub-export/.gitignore
vendored
Normal file
14
site/plugins/epub-export/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# npm modules
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# Parcel cache folder
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Composer files
|
||||||
|
/vendor
|
||||||
|
|
||||||
|
# kirbyup temp development entry
|
||||||
|
/index.dev.mjs
|
||||||
21
site/plugins/epub-export/LICENSE.md
Normal file
21
site/plugins/epub-export/LICENSE.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) <Year> <Your Name>
|
||||||
|
|
||||||
|
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.
|
||||||
117
site/plugins/epub-export/README.md
Normal file
117
site/plugins/epub-export/README.md
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
# Kirby Pluginkit: Example plugin for Kirby
|
||||||
|
|
||||||
|
> Variant "Panel plugin setup"
|
||||||
|
|
||||||
|
This is a boilerplate for a Kirby Panel plugin that can be installed via all three [supported installation methods](https://getkirby.com/docs/guide/plugins/plugin-setup-basic#the-three-plugin-installation-methods).
|
||||||
|
|
||||||
|
You can find a list of Pluginkit variants on the [`master` branch](https://github.com/getkirby/pluginkit/tree/master).
|
||||||
|
|
||||||
|
****
|
||||||
|
|
||||||
|
## How to use the Pluginkit
|
||||||
|
|
||||||
|
1. Fork this repository
|
||||||
|
2. Change the plugin name and description in the `composer.json`
|
||||||
|
3. Change the plugin name in the `index.php` and `src/index.js`
|
||||||
|
4. Change the license if you don't want to publish under MIT
|
||||||
|
5. Add your plugin code to the `index.php` and `src/index.js`
|
||||||
|
6. Update this `README` with instructions for your plugin
|
||||||
|
|
||||||
|
### Install the development and build setup
|
||||||
|
|
||||||
|
We use [kirbyup](https://github.com/johannschopplich/kirbyup) for the development and build setup.
|
||||||
|
|
||||||
|
You can start developing directly. kirbyup will be fetched remotely with your first `npm run` command, which may take a short amount of time.
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
You can start the dev process with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
This will automatically update the `index.js` and `index.css` of your plugin as soon as you make changes.
|
||||||
|
Reload the Panel to see your code changes reflected.
|
||||||
|
|
||||||
|
With kirbyup 2.0.0+ and Kirby 3.7.4+ you can alternatively use hot module reloading (HMR):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
This will start a development server that updates the page as soon as you make changes. Some updates are instant, like CSS or Vue template changes, others require a reload of the page, which happens automatically.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The live reload functionality requires top level await, [which is only supported in modern browsers](https://caniuse.com/mdn-javascript_operators_await_top_level). If you're developing in older browsers, use `npm run dev` and reload the page manually to see changes.
|
||||||
|
|
||||||
|
### Production
|
||||||
|
|
||||||
|
As soon as you are happy with your plugin, you should build the final version with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
This will automatically create a minified and optimized version of your `index.js` and `index.css`
|
||||||
|
which you can ship with your plugin.
|
||||||
|
|
||||||
|
We have a tutorial on how to build your own plugin based on the Pluginkit [in the Kirby documentation](https://getkirby.com/docs/guide/plugins/plugin-setup-basic).
|
||||||
|
|
||||||
|
### Build reproducibility
|
||||||
|
|
||||||
|
While kirbyup will stay backwards compatible, exact build reproducibility may be of importance to you. If so, we recommend to target a specific package version, rather than using npx:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"dev": "kirbyup src/index.js --watch",
|
||||||
|
"build": "kirbyup src/index.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"kirbyup": "^3.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
What follows is an example README for your plugin.
|
||||||
|
|
||||||
|
****
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Download
|
||||||
|
|
||||||
|
Download and copy this repository to `/site/plugins/{{ plugin-name }}`.
|
||||||
|
|
||||||
|
### Git submodule
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule add https://github.com/{{ your-name }}/{{ plugin-name }}.git site/plugins/{{ plugin-name }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Composer
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer require {{ your-name }}/{{ plugin-name }}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
*Additional instructions on how to configure the plugin (e.g. blueprint setup, config options, etc.)*
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
*Document the options and APIs that this plugin offers*
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
*Add instructions on how to help working on the plugin (e.g. npm setup, Composer dev dependencies, etc.)*
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
- [Your Name](https://github.com/ghost)
|
||||||
18
site/plugins/epub-export/SECURITY.md
Normal file
18
site/plugins/epub-export/SECURITY.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
*Use this section to tell people about which versions of your project are currently being supported with security updates.*
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 5.1.x | :white_check_mark: |
|
||||||
|
| 5.0.x | :x: |
|
||||||
|
| 4.0.x | :white_check_mark: |
|
||||||
|
| < 4.0 | :x: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
*Use this section to tell people how to report a vulnerability.*
|
||||||
|
|
||||||
|
*Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc.*
|
||||||
21
site/plugins/epub-export/composer.json
Normal file
21
site/plugins/epub-export/composer.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "studioVariable/epub",
|
||||||
|
"description": "Kirby Example Plugin",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "kirby-plugin",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Studio Variable",
|
||||||
|
"email": "contact@studio-variable.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"getkirby/composer-installer": "^1.1"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"allow-plugins": {
|
||||||
|
"getkirby/composer-installer": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
66
site/plugins/epub-export/composer.lock
generated
Normal file
66
site/plugins/epub-export/composer.lock
generated
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "37a8e61308b9b6f49cb9835f477f0c64",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "getkirby/composer-installer",
|
||||||
|
"version": "1.2.1",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
"type": "composer-plugin",
|
||||||
|
"extra": {
|
||||||
|
"class": "Kirby\\ComposerInstaller\\Plugin"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-12-28T12:54:39+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": [],
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": [],
|
||||||
|
"platform-dev": [],
|
||||||
|
"plugin-api-version": "2.6.0"
|
||||||
|
}
|
||||||
2
site/plugins/epub-export/index.css
Normal file
2
site/plugins/epub-export/index.css
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
/** Put your CSS here **/
|
||||||
63
site/plugins/epub-export/index.js
Normal file
63
site/plugins/epub-export/index.js
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
(function() {
|
||||||
|
"use strict";
|
||||||
|
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
||||||
|
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
||||||
|
if (render) {
|
||||||
|
options.render = render;
|
||||||
|
options.staticRenderFns = staticRenderFns;
|
||||||
|
options._compiled = true;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
exports: scriptExports,
|
||||||
|
options
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
props: {
|
||||||
|
pageId: String
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
error: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async exportEpub() {
|
||||||
|
this.loading = true;
|
||||||
|
this.error = null;
|
||||||
|
try {
|
||||||
|
const response = await this.$api.post(`epub-export/${this.pageId}`);
|
||||||
|
const blob = await response.blob();
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = this.pageId + ".epub";
|
||||||
|
a.click();
|
||||||
|
} catch (e) {
|
||||||
|
this.error = "Erreur : " + e.message;
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var _sfc_render = function render() {
|
||||||
|
var _vm = this, _c = _vm._self._c;
|
||||||
|
return _c("k-box", [_c("k-button", { attrs: { "theme": "positive", "icon": "download", "disabled": _vm.loading }, on: { "click": _vm.exportEpub } }, [_vm._v(" Exporter en EPUB ")]), _vm.loading ? _c("k-text", [_vm._v("Génération en cours…")]) : _vm._e(), _vm.error ? _c("k-text", { attrs: { "theme": "negative" } }, [_vm._v(_vm._s(_vm.error))]) : _vm._e()], 1);
|
||||||
|
};
|
||||||
|
var _sfc_staticRenderFns = [];
|
||||||
|
_sfc_render._withStripped = true;
|
||||||
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
||||||
|
_sfc_main,
|
||||||
|
_sfc_render,
|
||||||
|
_sfc_staticRenderFns
|
||||||
|
);
|
||||||
|
__component__.options.__file = "C:/Users/anton/Desktop/studioVariable/actuelleInactuelle/actuel-inactuel/site/plugins/epub-export/src/components/ExportButton.vue";
|
||||||
|
const ExportButton = __component__.exports;
|
||||||
|
window.panel.plugin("getkirby/pluginkit", {
|
||||||
|
sections: {
|
||||||
|
epubexport: ExportButton
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
51
site/plugins/epub-export/index.php
Normal file
51
site/plugins/epub-export/index.php
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
Kirby::plugin('tonnom/epub-export', [
|
||||||
|
'api' => [
|
||||||
|
'routes' => [
|
||||||
|
[
|
||||||
|
'pattern' => 'epub-export/(:any)',
|
||||||
|
'method' => 'POST',
|
||||||
|
'action' => function () {
|
||||||
|
|
||||||
|
$pageId = get('id');
|
||||||
|
$page = page($pageId);
|
||||||
|
|
||||||
|
throw new Exception($pageId);
|
||||||
|
if (!$page) {
|
||||||
|
throw new Exception("Page introuvable");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Markdown du champ Body
|
||||||
|
$markdown = $page->body()->toMarkdown();
|
||||||
|
|
||||||
|
// Emplacement du fichier
|
||||||
|
$root = kirby()->root('media') . '/exports';
|
||||||
|
Dir::make($root);
|
||||||
|
|
||||||
|
$filename = $page->id() . '.md';
|
||||||
|
$filepath = $root . '/' . $filename;
|
||||||
|
|
||||||
|
file_put_contents($filepath, $markdown);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'message' => 'OK',
|
||||||
|
'file' => $filename,
|
||||||
|
'path' => $filepath,
|
||||||
|
'url' => kirby()->url('media') . '/exports/' . $filename,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
'fields' => [
|
||||||
|
'epubexport' => [
|
||||||
|
'computed' => [
|
||||||
|
'pageId' => function () {
|
||||||
|
return $this->model()->id();
|
||||||
|
},
|
||||||
|
],
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
8
site/plugins/epub-export/package.json
Normal file
8
site/plugins/epub-export/package.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "studioVariable/epub",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "npx -y kirbyup src/index.js --watch",
|
||||||
|
"serve": "npx -y kirbyup serve src/index.js",
|
||||||
|
"build": "npx -y kirbyup src/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
92
site/plugins/epub-export/src/components/ExportButton.vue
Normal file
92
site/plugins/epub-export/src/components/ExportButton.vue
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
<template>
|
||||||
|
<k-box>
|
||||||
|
<k-button
|
||||||
|
theme="positive"
|
||||||
|
icon="download"
|
||||||
|
:disabled="loading"
|
||||||
|
@click="exportEpub"
|
||||||
|
>
|
||||||
|
Exporter en EPUB
|
||||||
|
</k-button>
|
||||||
|
|
||||||
|
<k-text v-if="loading">Génération en cours…</k-text>
|
||||||
|
<k-text v-if="error" theme="negative">{{ error }}</k-text>
|
||||||
|
</k-box>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- <script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
pageId: String
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
error: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async exportEpub() {
|
||||||
|
this.loading = true;
|
||||||
|
this.error = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await this.$api.post(`epub-export/${this.pageId}`);
|
||||||
|
const blob = await response.blob()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Télécharger le fichier
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.href = url
|
||||||
|
a.download = this.pageId + '.epub'
|
||||||
|
a.click()
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
this.error = "Erreur : " + e.message
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script> -->
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
// Props
|
||||||
|
const { pageId } = defineProps({
|
||||||
|
pageId: String
|
||||||
|
})
|
||||||
|
|
||||||
|
// State
|
||||||
|
const loading = ref(false)
|
||||||
|
const error = ref(null)
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
async function exportEpub() {
|
||||||
|
loading.value = true
|
||||||
|
error.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Appel API
|
||||||
|
const response = await $api.post(`epub-export/${pageId}`)
|
||||||
|
const blob = await response.blob()
|
||||||
|
|
||||||
|
// Création du téléchargement
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.href = url
|
||||||
|
a.download = pageId + '.epub'
|
||||||
|
a.click()
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
error.value = 'Erreur : ' + e.message
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
8
site/plugins/epub-export/src/index.js
Normal file
8
site/plugins/epub-export/src/index.js
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import ExportButton from "./components/ExportButton.vue";
|
||||||
|
|
||||||
|
window.panel.plugin("tonnom/epub-export", {
|
||||||
|
fields: {
|
||||||
|
epubexport: ExportButton
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
@ -1,24 +1,26 @@
|
||||||
|
|
||||||
<?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" title="chercher parmi les textes">textes</button>
|
</li>
|
||||||
</li>
|
<?php if (!$page->is(page('lettre'))): ?>
|
||||||
<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>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php if (!$page->is(page('a-propos'))): ?>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="<?= $site->find('a-propos')->url() ?>">
|
href="<?= $site->find('a-propos')->url() ?>">
|
||||||
à propos
|
à propos
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<?php endif ?>
|
||||||
</footer>
|
</ul>
|
||||||
<?php endif ?>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<article>
|
<article>
|
||||||
<?php snippet('cover', slots: true) ?>
|
<?php snippet('cover', slots: true) ?>
|
||||||
<?php slot('title') ?>
|
<?php slot('title') ?>
|
||||||
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
|
<h1 class="main-title"><?= $page->title() ?></h1>
|
||||||
<?= $page->presentation() ?>
|
<?= $page->presentation() ?>
|
||||||
<?php endslot() ?>
|
<?php endslot() ?>
|
||||||
<?php endsnippet() ?>
|
<?php endsnippet() ?>
|
||||||
|
|
@ -32,4 +32,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<?php snippet('footer') ?>
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
<article>
|
<article>
|
||||||
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
||||||
<?php slot('title') ?>
|
<?php slot('title') ?>
|
||||||
<h2
|
<h1 class="main-title"><?= $page->title() ?></h1>
|
||||||
class="main-title fs-xl">
|
|
||||||
<?= $page->title() ?></h2>
|
|
||||||
<?php endslot() ?>
|
<?php endslot() ?>
|
||||||
<?php endsnippet() ?>
|
<?php endsnippet() ?>
|
||||||
<div id="main-content">
|
<div id="main-content">
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
<article>
|
<article>
|
||||||
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
||||||
<?php slot('title') ?>
|
<?php slot('title') ?>
|
||||||
<h2
|
<h1 class="main-title"><?= $page->title() ?></h1>
|
||||||
class="main-title <?= setTitleFontSizeClass($page->title()) ?>">
|
|
||||||
<?= $page->title() ?></h2>
|
|
||||||
<p>
|
<p>
|
||||||
<span class="light">par</span>
|
<span class="light">par</span>
|
||||||
<a class="author"
|
<a class="author"
|
||||||
|
|
@ -17,6 +15,17 @@
|
||||||
/ <a
|
/ <a
|
||||||
href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
|
href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
|
||||||
</p>
|
</p>
|
||||||
|
<?php if ($document = $page->pdfVersion()->toFile()): ?>
|
||||||
|
<p class="only-screen">
|
||||||
|
<a href="<?= $document->url() ?>" target= "_blank">
|
||||||
|
télécharger le pdf
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<?php endif ?>
|
||||||
|
<p class="only-print">
|
||||||
|
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
|
||||||
|
<span class="light url"><?= $page->url() ?></span>
|
||||||
|
</p>
|
||||||
<?php endslot() ?>
|
<?php endslot() ?>
|
||||||
<?php endsnippet() ?>
|
<?php endsnippet() ?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,12 @@
|
||||||
class="no-underline home-baseline"
|
class="no-underline home-baseline"
|
||||||
title="lire l'éditorial"
|
title="lire l'éditorial"
|
||||||
>
|
>
|
||||||
<h2 class="main-title <?= setTitleFontSizeClass($site->subtitle()) ?>"><?= $site->subtitle()->inline() ?></h2>
|
<h2 class="main-title"><?= $site->subtitle()->inline() ?></h2>
|
||||||
</a>
|
</a>
|
||||||
|
<p class="only-print">
|
||||||
|
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
|
||||||
|
<span class="light url"><?= $page->url() ?></span>
|
||||||
|
</p>
|
||||||
<a href="#main-edito" class="main-edito-btn | no-underline" title="lire l'éditorial">
|
<a href="#main-edito" class="main-edito-btn | no-underline" title="lire l'éditorial">
|
||||||
<p
|
<p
|
||||||
class="oggle-btn toggle-btn--left"
|
class="oggle-btn toggle-btn--left"
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
<article>
|
<article>
|
||||||
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
|
||||||
<?php slot('title') ?>
|
<?php slot('title') ?>
|
||||||
<h2
|
<h1 class="main-title"><?= $page->title() ?></h1>
|
||||||
class="main-title <?= setTitleFontSizeClass($page->title()) ?>">
|
|
||||||
<?= $page->title() ?></h2>
|
|
||||||
<div id="main-content">
|
<div id="main-content">
|
||||||
<?= $page->body() ?>
|
<?= $page->body() ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,17 @@
|
||||||
/ <a href="/categories/<?= Str::slug($page->category()) ?>"
|
/ <a href="/categories/<?= Str::slug($page->category()) ?>"
|
||||||
title="voir les textes de la catégorie <?= $page->category() ?>"><?= $page->category() ?></a>
|
title="voir les textes de la catégorie <?= $page->category() ?>"><?= $page->category() ?></a>
|
||||||
</p>
|
</p>
|
||||||
|
<?php if ($document = $page->pdfVersion()->toFile()): ?>
|
||||||
|
<p class="only-screen">
|
||||||
|
<a href="<?= $document->url() ?>" target= "_blank">
|
||||||
|
télécharger le pdf
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<?php endif ?>
|
||||||
|
<p class="only-print">
|
||||||
|
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
|
||||||
|
<span class="light url"><?= $page->url() ?></span>
|
||||||
|
</p>
|
||||||
<?php endslot() ?>
|
<?php endslot() ?>
|
||||||
<?php endsnippet() ?>
|
<?php endsnippet() ?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
|
<?php snippet('footer') ?>
|
||||||
<main id="<?= $page->template() ?>">
|
<main id="<?= $page->template() ?>">
|
||||||
<article>
|
<article>
|
||||||
<?php snippet('cover', array('isOpen' => true), slots: true) ?>
|
<?php snippet('cover', array('isOpen' => true), slots: true) ?>
|
||||||
<?php slot('title') ?>
|
<?php slot('title') ?>
|
||||||
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
|
<h1 class="main-title"><?= $page->title() ?></h1>
|
||||||
<?= $page->body() ?>
|
<?= $page->body() ?>
|
||||||
<form id="subscribe-form">
|
<form id="subscribe-form">
|
||||||
<label for="email">
|
<label for="email">
|
||||||
|
|
@ -14,6 +15,4 @@
|
||||||
<?php endslot() ?>
|
<?php endslot() ?>
|
||||||
<?php endsnippet() ?>
|
<?php endsnippet() ?>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php snippet('footer') ?>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue