initial commit on forge variable
|
|
@ -137,6 +137,50 @@ figure[data-crop="false"] img {
|
||||||
column-width: auto!important;
|
column-width: auto!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.print-image{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image div{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
mix-blend-mode: multiply;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image figcaption{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image .print-red{
|
||||||
|
background: var(--rouge);
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image .print-green{
|
||||||
|
background: var(--vert);
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image .print-blue{
|
||||||
|
background: var(--bleu);
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-image > div > img{
|
||||||
|
mix-blend-mode: screen;
|
||||||
|
-webkit-filter: grayscale(100%) contrast(200%);
|
||||||
|
filter: grayscale(100%) contrast(200%);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
body[data-template="print"] .print-image {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body[data-template="print"] .web-image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -182,6 +226,28 @@ td:last-child{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Gestion des couches */
|
||||||
|
body.isolate-red-layer .green-layer,
|
||||||
|
body.isolate-red-layer .blue-layer,
|
||||||
|
body.isolate-red-layer .black-layer { display: none; }
|
||||||
|
|
||||||
|
body.isolate-green-layer .red-layer,
|
||||||
|
body.isolate-green-layer .blue-layer,
|
||||||
|
body.isolate-green-layer .black-layer { display: none; }
|
||||||
|
|
||||||
|
body.isolate-blue-layer .red-layer,
|
||||||
|
body.isolate-blue-layer .green-layer,
|
||||||
|
body.isolate-blue-layer .black-layer { display: none; }
|
||||||
|
|
||||||
|
body.isolate-black-layer .red-layer,
|
||||||
|
body.isolate-black-layer .green-layer,
|
||||||
|
body.isolate-black-layer .blue-layer { display: none; }
|
||||||
|
|
||||||
|
/* Noir et blanc */
|
||||||
|
body.mode-black .print-image > div {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
/* fade entre les pages */
|
/* fade entre les pages */
|
||||||
#fade{
|
#fade{
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,9 @@
|
||||||
--fontFamily: sans-serif;
|
--fontFamily: sans-serif;
|
||||||
--textSize: 17px;
|
--textSize: 17px;
|
||||||
--ratio : auto;
|
--ratio : auto;
|
||||||
|
|
||||||
|
--rouge: #ff665e;
|
||||||
|
--vert: #44d62c;
|
||||||
|
--bleu: #0078bf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -156,7 +156,7 @@
|
||||||
|
|
||||||
#interface-header {
|
#interface-header {
|
||||||
all: initial;
|
all: initial;
|
||||||
/*display: none;*/
|
display: none;
|
||||||
}
|
}
|
||||||
#interface-header * {
|
#interface-header * {
|
||||||
all: unset;
|
all: unset;
|
||||||
|
|
@ -191,17 +191,15 @@
|
||||||
--border-color: #999;
|
--border-color: #999;
|
||||||
--backgroung-button: rgb(195, 195, 195);
|
--backgroung-button: rgb(195, 195, 195);
|
||||||
color: var(--color-interface-header);
|
color: var(--color-interface-header);
|
||||||
border: 1px solid magenta;
|
border: 1px solid black;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
/* display: flex;
|
display: block;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;*/
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-family: "IBM Plex Mono";
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#interface-header input[type="checkbox"] {
|
#interface-header input[type="checkbox"] {
|
||||||
|
|
@ -297,10 +295,10 @@ form {
|
||||||
|
|
||||||
/* BUTTONS GROUP */
|
/* BUTTONS GROUP */
|
||||||
|
|
||||||
#header-group-right {
|
/*#header-group-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
#header-group-right > p {
|
#header-group-right > p {
|
||||||
margin-right: 5ch !important;
|
margin-right: 5ch !important;
|
||||||
|
|
@ -320,52 +318,42 @@ form {
|
||||||
line-height: 1em !important;
|
line-height: 1em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttons {
|
#preview-form,
|
||||||
display: flex;
|
#black-form{
|
||||||
justify-content: flex-end;
|
margin-bottom: 20px;
|
||||||
/* width: 300px; */
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#button-print {
|
|
||||||
width: 60px;
|
|
||||||
opacity: 0.2;
|
|
||||||
background: none;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#label-preview-toggle img {
|
|
||||||
width: 80%;
|
|
||||||
height: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#label-preview-toggle,
|
#label-preview-toggle,
|
||||||
#button-print {
|
#label-black-toggle,
|
||||||
--buttons-size: 36px;
|
#button-print,
|
||||||
display: flex;
|
#button-print-spread,
|
||||||
align-items: center;
|
#quality-toggle {
|
||||||
justify-content: center;
|
|
||||||
width: var(--buttons-size);
|
|
||||||
height: var(--buttons-size);
|
|
||||||
margin-right: 10px;
|
|
||||||
border: 1px solid var(--color-interface-header);
|
border: 1px solid var(--color-interface-header);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
/* box-shadow: 1px 1px 0px 0px #9f9f9f;*/
|
box-shadow: 1px 1px 0px 0px #9f9f9f;
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interface-preview #label-preview-toggle {
|
|
||||||
border: 2px solid var(--color-interface-header);
|
|
||||||
}
|
|
||||||
|
|
||||||
#button-print {
|
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.interface-preview #label-preview-toggle,
|
||||||
|
.mode-black #label-black-toggle{
|
||||||
|
background-color: #000;
|
||||||
|
color: #FFF;
|
||||||
|
/*border: 2px solid var(--color-interface-header);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#label-preview-toggle:hover,
|
#label-preview-toggle:hover,
|
||||||
#button-print:hover {
|
#label-black-toggle:hover,
|
||||||
background-color: var(--backgroung-button);
|
#button-print:hover,
|
||||||
|
#button-print-spread:hover,
|
||||||
|
#quality-toggle:hover {
|
||||||
|
background-color: #000;
|
||||||
|
color: #FFF;
|
||||||
|
/*background-color: var(--backgroung-button);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#button-print[data-ready="true"] {
|
#button-print[data-ready="true"] {
|
||||||
|
|
@ -373,6 +361,53 @@ form {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* LAYER SELECTOR --------------------------------------- */
|
||||||
|
|
||||||
|
#layer-form {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer-select {
|
||||||
|
width: 100%;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid var(--color-interface-header);
|
||||||
|
border-radius: 2px;
|
||||||
|
padding: 6px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 1px 1px 0px 0px #9f9f9f;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--color-interface-header);
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23222'/%3E%3C/svg%3E");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 8px center;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer-select:hover {
|
||||||
|
background-color: #000;
|
||||||
|
color: #FFF;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23FFF'/%3E%3C/svg%3E");
|
||||||
|
box-shadow: 1px 1px 0px 0px #9f9f9f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer-select:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* État actif quand une couche est isolée */
|
||||||
|
body[class*="isolate-"] #layer-select {
|
||||||
|
background-color: #000;
|
||||||
|
color: #FFF;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23FFF'/%3E%3C/svg%3E");
|
||||||
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
#interface-header {
|
#interface-header {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="reset-this grid-form-values-group" id="size-baseline-form">
|
<div class="reset-this grid-form-values-group" id="size-baseline-form">
|
||||||
<div>
|
<div>
|
||||||
<label class="reset-this" for="size-baseline">Size (px)</label>
|
<label class="reset-this" for="size-baseline">Taille (px)</label>
|
||||||
<input class="reset-this" type="number" id="size-baseline" name="size-baseline" min="1" max="100" value="12">
|
<input class="reset-this" type="number" id="size-baseline" name="size-baseline" min="1" max="100" value="12">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -26,17 +26,37 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="reset-this" id="header-group-right">
|
<div class="reset-this" id="header-group-right">
|
||||||
<p class="reset-this"><span id="nrb-pages" class="reset-this"></span> pages</p>
|
|
||||||
<div class="reset-this header-group" id="buttons">
|
<div class="reset-this header-group" id="buttons">
|
||||||
|
<form class="reset-this" id="layer-form">
|
||||||
|
<label class="reset-this" for="layer-select">Sélection de couche</label>
|
||||||
|
<select class="reset-this" id="layer-select" name="layer-select">
|
||||||
|
<option value="">Toutes</option>
|
||||||
|
<option value="red-layer">Rouge</option>
|
||||||
|
<option value="green-layer">Verte</option>
|
||||||
|
<option value="blue-layer">Bleue</option>
|
||||||
|
<option value="black-layer">Noire</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
<form class="reset-this" id="preview-form">
|
<form class="reset-this" id="preview-form">
|
||||||
<input class="reset-this" type="checkbox" id="preview-toggle" name="preview-toggle">
|
<input class="reset-this" type="checkbox" id="preview-toggle" name="preview-toggle">
|
||||||
<label class="reset-this"for="preview-toggle" id="label-preview-toggle">
|
<label class="reset-this"for="preview-toggle" id="label-preview-toggle">
|
||||||
<img src="assets/pagedjs/icon-preview.svg">
|
<!-- <img src="assets/pagedjs/icon-preview.svg"> -->
|
||||||
|
Preview
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
<form class="reset-this" id="black-form">
|
||||||
|
<input class="reset-this" type="checkbox" id="black-toggle" name="black-toggle">
|
||||||
|
<label class="reset-this"for="black-toggle" id="label-black-toggle">
|
||||||
|
Noir et blanc
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
<button class="reset-this" id="button-print" onclick="window.print()" data-ready="false" data-text="Print">
|
<button class="reset-this" id="button-print" onclick="window.print()" data-ready="false" data-text="Print">
|
||||||
<img src="assets/pagedjs/icon-printer.svg">
|
<!-- <img src="assets/pagedjs/icon-printer.svg">-->
|
||||||
|
Exporter le PDF page à page
|
||||||
|
</button>
|
||||||
|
<button class="reset-this" id="button-print-spread" data-ready="false" data-text="Print Spread">
|
||||||
|
Exporter le PDF imposé
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,55 @@ function interfaceEvents(){
|
||||||
body.classList.remove('interface-preview');
|
body.classList.remove('interface-preview');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/* LAYER SELECTOR ------------------------------------------------------------*/
|
||||||
|
document.querySelector("#layer-select").addEventListener("change", (e) => {
|
||||||
|
const layers = ["red-layer", "green-layer", "blue-layer", "black-layer"];
|
||||||
|
const selected = e.target.value;
|
||||||
|
|
||||||
|
layers.forEach(layer => {
|
||||||
|
body.classList.remove("isolate-" + layer);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
body.classList.add("isolate-" + selected);
|
||||||
|
// Active automatiquement le mode noir et blanc
|
||||||
|
body.classList.add("mode-black");
|
||||||
|
document.querySelector("#black-toggle").checked = true;
|
||||||
|
} else {
|
||||||
|
// Repasse en couleur si on revient sur "Toutes"
|
||||||
|
body.classList.remove("mode-black");
|
||||||
|
document.querySelector("#black-toggle").checked = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/* Passer le PDF en noir et blanc ----------------------------------------------------------------------------------------------------
|
||||||
|
----------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
document.querySelector("#black-toggle").addEventListener("input", (e) => {
|
||||||
|
if(e.target.checked){
|
||||||
|
/* black mode */
|
||||||
|
body.classList.add('mode-black');
|
||||||
|
}else{
|
||||||
|
body.classList.remove('mode-black');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/* PRINT SPREAD ----------------------------------------------------------------------------------------------------
|
||||||
|
----------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
window.enableBooklet = false;
|
||||||
|
document.querySelector("#button-print-spread").addEventListener("click", (e) => {
|
||||||
|
// not working
|
||||||
|
// body.style.setProperty("--paged-layout", "booklet");
|
||||||
|
// window.print();
|
||||||
|
window.enableBooklet = true;
|
||||||
|
window.print();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,8 +226,8 @@ class interfacePaged extends Paged.Handler {
|
||||||
|
|
||||||
afterPageLayout(pageElement, page, breakToken){
|
afterPageLayout(pageElement, page, breakToken){
|
||||||
let nbr = page.id.replace('page-', '');
|
let nbr = page.id.replace('page-', '');
|
||||||
let span = document.querySelector("#nrb-pages");
|
// let span = document.querySelector("#nrb-pages");
|
||||||
span.innerHTML = nbr;
|
// span.innerHTML = nbr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -187,5 +236,4 @@ class interfacePaged extends Paged.Handler {
|
||||||
print.dataset.ready = 'true';
|
print.dataset.ready = 'true';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Paged.registerHandlers(interfacePaged);
|
Paged.registerHandlers(interfacePaged);
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 783 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 5
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: 2wf46av8ux3phcf2
|
||||||
|
After Width: | Height: | Size: 846 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 6
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: srxqys3zkq30qj3p
|
||||||
|
After Width: | Height: | Size: 756 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 7
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: 1uzzwwbasn8r0iqo
|
||||||
|
After Width: | Height: | Size: 322 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 8
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: pnay3w7atruamgm0
|
||||||
|
After Width: | Height: | Size: 844 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 2
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: xlan86lj7ahog6lx
|
||||||
|
After Width: | Height: | Size: 726 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 3
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: iq1wtbdcya7v7php
|
||||||
|
After Width: | Height: | Size: 670 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 4
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: gazrgkr8dk1pvnpy
|
||||||
|
After Width: | Height: | Size: 320 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: d9pdhgsaowqudwku
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Template: blocks/image
|
||||||
|
After Width: | Height: | Size: 1 MiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 9
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: bwihnr29xatlksa6
|
||||||
|
After Width: | Height: | Size: 1 MiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 10
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: wglbjgszwsm6i4wj
|
||||||
|
After Width: | Height: | Size: 898 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 11
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: jf2ru49ui6j1visy
|
||||||
|
After Width: | Height: | Size: 377 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 12
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: nyullbf4a3swcamu
|
||||||
|
After Width: | Height: | Size: 786 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 13
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: bmvowidresycrn2r
|
||||||
|
After Width: | Height: | Size: 684 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 14
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: 7gjpwntiujsh4k7b
|
||||||
|
After Width: | Height: | Size: 991 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 15
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: hszh9rbag6igordy
|
||||||
|
After Width: | Height: | Size: 372 KiB |
|
|
@ -0,0 +1,13 @@
|
||||||
|
Caption:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Alt:
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Sort: 16
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Uuid: 39awiqtt1wdub2xw
|
||||||
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 331 KiB After Width: | Height: | Size: 331 KiB |
|
Before Width: | Height: | Size: 446 KiB After Width: | Height: | Size: 446 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 427 KiB After Width: | Height: | Size: 427 KiB |
|
Before Width: | Height: | Size: 952 KiB After Width: | Height: | Size: 952 KiB |
|
Before Width: | Height: | Size: 586 KiB After Width: | Height: | Size: 586 KiB |
|
Before Width: | Height: | Size: 896 KiB After Width: | Height: | Size: 896 KiB |
|
|
@ -2,14 +2,6 @@ name: field.blocks.image.name
|
||||||
icon: image
|
icon: image
|
||||||
preview: image
|
preview: image
|
||||||
fields:
|
fields:
|
||||||
location:
|
|
||||||
label: field.blocks.image.location
|
|
||||||
type: radio
|
|
||||||
columns: 2
|
|
||||||
default: "kirby"
|
|
||||||
options:
|
|
||||||
kirby: "{{ t('field.blocks.image.location.internal') }}"
|
|
||||||
web: "{{ t('field.blocks.image.location.external') }}"
|
|
||||||
image:
|
image:
|
||||||
label: field.blocks.image.name
|
label: field.blocks.image.name
|
||||||
type: files
|
type: files
|
||||||
|
|
@ -19,13 +11,33 @@ fields:
|
||||||
back: black
|
back: black
|
||||||
uploads:
|
uploads:
|
||||||
template: blocks/image
|
template: blocks/image
|
||||||
when:
|
imagered:
|
||||||
location: kirby
|
label: Image (couche rouge)
|
||||||
src:
|
type: files
|
||||||
label: field.blocks.image.url
|
query: model.images
|
||||||
type: url
|
multiple: false
|
||||||
when:
|
image:
|
||||||
location: web
|
back: black
|
||||||
|
uploads:
|
||||||
|
template: blocks/image
|
||||||
|
imagegreen:
|
||||||
|
label: Image (couche verte)
|
||||||
|
type: files
|
||||||
|
query: model.images
|
||||||
|
multiple: false
|
||||||
|
image:
|
||||||
|
back: black
|
||||||
|
uploads:
|
||||||
|
template: blocks/image
|
||||||
|
imageblue:
|
||||||
|
label: Image (couche bleu)
|
||||||
|
type: files
|
||||||
|
query: model.images
|
||||||
|
multiple: false
|
||||||
|
image:
|
||||||
|
back: black
|
||||||
|
uploads:
|
||||||
|
template: blocks/image
|
||||||
alt:
|
alt:
|
||||||
label: field.blocks.image.alt
|
label: field.blocks.image.alt
|
||||||
type: text
|
type: text
|
||||||
|
|
@ -35,26 +47,3 @@ fields:
|
||||||
type: writer
|
type: writer
|
||||||
icon: text
|
icon: text
|
||||||
inline: true
|
inline: true
|
||||||
link:
|
|
||||||
label: field.blocks.image.link
|
|
||||||
type: text
|
|
||||||
icon: url
|
|
||||||
width:
|
|
||||||
label: Largeur de l'image
|
|
||||||
type: select
|
|
||||||
width: 1/2
|
|
||||||
options:
|
|
||||||
16.666%: "16.666%"
|
|
||||||
20%: "20%"
|
|
||||||
25%: "25%"
|
|
||||||
33.333%: "33.333%"
|
|
||||||
50%: "50%"
|
|
||||||
66.666%: "66.666%"
|
|
||||||
100%: "100%"
|
|
||||||
position:
|
|
||||||
label: Position de l'image
|
|
||||||
type: select
|
|
||||||
width: 1/2
|
|
||||||
options:
|
|
||||||
auto: "Centrée"
|
|
||||||
0: "Alignée à gauche"
|
|
||||||
|
|
@ -3,32 +3,39 @@
|
||||||
/** @var \Kirby\Cms\Block $block */
|
/** @var \Kirby\Cms\Block $block */
|
||||||
$alt = $block->alt();
|
$alt = $block->alt();
|
||||||
$caption = $block->caption();
|
$caption = $block->caption();
|
||||||
$crop = $block->crop()->toBool();
|
$src = $block->image()->toFile()->url();
|
||||||
$link = $block->link();
|
|
||||||
$ratio = $block->ratio()->or('auto');
|
|
||||||
$src = null;
|
|
||||||
|
|
||||||
if ($block->location() == 'web') {
|
|
||||||
$src = $block->src()->esc();
|
|
||||||
} elseif ($image = $block->image()->toFile()) {
|
|
||||||
$alt = $alt->or($image->alt());
|
|
||||||
$src = $image->url();
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($src): ?>
|
<?php if ($src): ?>
|
||||||
<figure
|
<figure class="web-image">
|
||||||
data-crop="<?= $crop ? 'true' : 'false' ?>"
|
|
||||||
data-ratio="<?= $ratio ?>"
|
|
||||||
style="--ratio: <?= $ratio ?>;"
|
|
||||||
>
|
|
||||||
<?php if ($link->isNotEmpty()): ?>
|
|
||||||
<a href="<?= Str::esc($link->toUrl()) ?>">
|
|
||||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
|
||||||
</a>
|
|
||||||
<?php else: ?>
|
|
||||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||||
|
|
||||||
|
<?php if ($caption->isNotEmpty()): ?>
|
||||||
|
<figcaption>
|
||||||
|
<?= $caption->kt() ?>
|
||||||
|
</figcaption>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<figure class="print-image full-page" style="height:<?= $block->image()->toFile()->height()?>px">
|
||||||
|
<?php if($srcred = $block->imagered()->toFile()):?>
|
||||||
|
<div class="print-red red-layer">
|
||||||
|
<img src="<?= $srcred->url() ?>" alt="<?= $alt->esc() ?>">
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php if($srcgreen = $block->imagegreen()->toFile()):?>
|
||||||
|
<div class="print-green green-layer">
|
||||||
|
<img src="<?= $srcgreen->url() ?>" alt="<?= $alt->esc() ?>">
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php if($srcblue = $block->imageblue()->toFile()):?>
|
||||||
|
<div class="print-blue blue-layer">
|
||||||
|
<img src="<?= $srcblue->url() ?>" alt="<?= $alt->esc() ?>">
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
|
||||||
<?php if ($caption->isNotEmpty()): ?>
|
<?php if ($caption->isNotEmpty()): ?>
|
||||||
<figcaption>
|
<figcaption>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre') as $chapitre):?>
|
<?php foreach($site->index()->filterBy('intendedTemplate', 'chapitre') as $chapitre):?>
|
||||||
<section class="chapter">
|
<section class="chapter">
|
||||||
<h2><?= $chapitre->title()->html()->smartypants() ?></h2>
|
<h2><?= $chapitre->title()->html()->smartypants() ?></h2>
|
||||||
|
<div class="chapeau"><?= $chapitre->chapeau()->kt()->smartypants() ?></div>
|
||||||
<?php foreach ($chapitre->text()->toBlocks() as $block): ?>
|
<?php foreach ($chapitre->text()->toBlocks() as $block): ?>
|
||||||
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
|
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
|
||||||
<?= $block ?>
|
<?= $block ?>
|
||||||
|
|
|
||||||