ajout couleurs parties + plein de modifs

This commit is contained in:
Valentin
2023-07-21 09:43:35 +02:00
parent 01f797f369
commit fdc4c7f6a0
26 changed files with 212 additions and 47 deletions
+2 -2
View File
@@ -153,8 +153,8 @@ log:
facility: local6
tag: grav
debugger:
enabled: false
provider: clockwork
enabled: true
provider: debugbar
censored: false
shutdown:
close_connection: true
@@ -1,4 +1,4 @@
last_checked: 1689718026
last_checked: 1689854813
data:
-
title: 'macOS 13.0 Ventura Apache Setup: Upgrading Homebrew'
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
last_checked: 1689725650
last_checked: 1689855523
data:
feed:
-
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

@@ -2,8 +2,6 @@
--cols: 8;
--rows: 8;
--guts: 4mm;
--beige: #fbf2e7;
--ocre: #d98a29;
}
@page {
@@ -26,14 +24,13 @@
font-family: 'Ortica';
font-weight: bold;
font-size: 8pt;
color: var(--ocre);
height: 30mm;
}
@left-top {
content: '';
white-space: nowrap;
font-family: 'Ortica';
font-weight: bold;
font-weight: lighter;
font-size: 8pt;
display: flex;
flex-direction: column;
@@ -45,7 +42,7 @@
content: '';
white-space: nowrap;
font-family: 'Ortica';
font-weight: bold;
font-weight: lighter;
font-size: 8pt;
display: flex;
flex-direction: column;
@@ -72,15 +69,37 @@ body {
transition: opacity 0.3s ease-out;
}
a {
text-decoration: underline;
}
h2 {
color: blue;
font-family: 'Ortica';
font-weight: lighter;
padding: 0 10%;
font-size: 24pt;
break-before: left;
color: white;
margin: 0;
line-height: 1.2 !important;
text-align: center;
}
.partie_count {
font-size: 55pt;
color: white;
font-family: 'Ortica';
font-weight: bold;
width: 100%;
text-align: center;
line-height: 1;
margin-bottom: 33pt;
}
h3 {
break-before: left;
font-family: 'Ortica';
font-weight: lighter;
color: var(--ocre);
font-size: 28pt;
line-height: 1.3;
}
@@ -162,9 +181,8 @@ h4 {
margin-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
margin-right: -16mm;
margin-bottom: 20mm;
background-color: var(--beige);
line-height: 12pt;
font-size: 9pt;
font-size: 8pt;
padding-right: 18mm;
padding-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
padding-bottom: 10mm;
@@ -174,7 +192,6 @@ h4 {
.encart-split {
position: absolute;
margin-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
background-color: #fbf2e7;
}
.pagedjs_left_page .latour, .pagedjs_left_page .lampe {
@@ -194,7 +211,6 @@ h4 {
display: flex;
flex-direction: row;
align-items: center;
line-height: 1.1;
margin-bottom: 3mm;
font-weight: bold;
}
@@ -212,11 +228,12 @@ h4 {
}
.bibliographie {
width: 47%;
column-count: 2;
column-gap: var(--guts);
column-fill: auto;
line-height: 12pt;
font-size: 9pt;
font-weight: bold;
color: var(--ocre);
}
img {
@@ -260,13 +277,13 @@ img {
.tripleimgs img:nth-of-type(2),
.tripleimgs_bottom img:first-of-type {
width: calc(50% - 1mm);
margin-right: 2mm;
width: calc(50% - 2mm);
margin-right: 4mm;
}
.tripleimgs img:last-of-type,
.tripleimgs_bottom img:nth-of-type(2) {
width: calc(50% - 1mm);
width: calc(50% - 2mm);
}
.tripleimgs2,
@@ -277,13 +294,13 @@ img {
.tripleimgs2 img:nth-of-type(2),
.tripleimgs2_bottom img:first-of-type {
width: calc(37.5% - 1mm);
margin-right: 2mm;
width: calc(37.5% - 2mm);
margin-right: 4mm;
}
.tripleimgs2 img:last-of-type,
.tripleimgs2_bottom img:nth-of-type(2) {
width: calc(62.5% - 1mm);
width: calc(62.5% - 2mm);
}
.imgfullspreadleft,
@@ -1,9 +1,16 @@
@font-face {
font-family: 'Public';
src: url('PublicSans/PublicSans-Regular.woff2'), format('woff2');
src: url('PublicSans/PublicSans-Light.woff2'), format('woff2');
font-weight: normal;
}
@font-face {
font-family: 'Public';
src: url('PublicSans/PublicSans-LightItalic.woff2'), format('woff2');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Public';
src: url('PublicSans/PublicSans-Bold.woff2'), format('woff2');
+161 -20
View File
@@ -6,22 +6,6 @@ class setMarginTexts extends Paged.Handler {
}
afterPreview(pages) {
// afficher correctement les éléments en marge
let topLeftBoxes = document.querySelectorAll('.pagedjs_margin-left-top');
for (let topLeftBox of topLeftBoxes) {
let contentDiv = topLeftBox.firstElementChild;
contentDiv.append('Texte marge');
contentDiv.style.marginTop = contentDiv.offsetWidth / 2 - contentDiv.offsetHeight / 2 + "px";
}
let bottomLeftBoxes = document.querySelectorAll('.pagedjs_margin-left-bottom');
for (let bottomLeftBox of bottomLeftBoxes) {
let contentDiv = bottomLeftBox.firstElementChild;
contentDiv.append('Texte marge');
contentDiv.style.marginBottom = contentDiv.offsetWidth / 2 - contentDiv.offsetHeight / 2 + "px";
}
// cleaner pour que les paragraphes tombent sur la marge haute
for(let i = 0; i < labeurs.length; i++) {
if (labeurs[i] == labeurs[i].parentNode.firstElementChild
@@ -132,9 +116,21 @@ class setMarginTexts extends Paged.Handler {
plainColor.style.top = "-22mm";
encarts[i].parentNode.prepend(plainColor);
}
if (encarts[i].previousElementSibling === null) {
encarts[i].style.marginTop = '0';
if (encarts[i].hasAttribute('data-split-original')) {
encarts[i].parentElement.style.height = '214mm';
encarts[i].style.paddingBottom = '0 !important';
encarts[i].style.height = "100%";
encarts[i].nextElementSibling.style.height = '22mm';
encarts[i].nextElementSibling.style.bottom = '-22mm';
encarts[i].nextElementSibling.style.right = '-28.5mm';
}
}
}
// TITRES
// TITRES ATELIERS
let h3s = document.querySelectorAll('h3');
for (let h3 of h3s) {
if (h3.nextSibling?.firstChild.tagName == "IMG") {
@@ -175,14 +171,159 @@ class setMarginTexts extends Paged.Handler {
}
h3.closest('.pagedjs_pagebox').querySelector('.pagedjs_margin-left').innerHTML = '';
h3.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement
.classList.add('atelier_cover_page');
}
let h4s = document.querySelectorAll('h4');
for (let h4 of h4s) {
if (h4.nextElementSibling?.classList.contains('bibliographie')) {
h4.style.color = "#d98a29";
// SET COLORS
let colors = [
'#5595a1',
'#5f9796',
'#65998d',
'#6f9b80',
'#799e75',
'#83a16b',
'#8ba460',
'#95a358',
'#9ca151',
'#a59d4a',
'#af9944',
'#b8963d',
'#b8963d',
'#b8963d'
]
// TITRES PARTIES
let h2s = document.querySelectorAll('h2');
for (let i = 0; i < h2s.length; i++) {
if (i != 0) {
let parentSheet = h2s[i].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
parentSheet.style.backgroundColor = colors[i];
parentSheet.querySelector('.pagedjs_margin-left').innerHTML = '';
parentSheet.parentElement.classList.add('partie_cover_page');
let nextPage = parentSheet.parentElement.nextElementSibling?.firstElementChild;
if (nextPage) {
nextPage.style.backgroundColor = colors[i];
}
let partieCount = document.createElement('div');
partieCount.classList.add('partie_count');
let romanCount;
switch (i) {
case 1 : romanCount = 'I'; break;
case 2 : romanCount = 'II'; break;
case 3 : romanCount = 'III'; break;
case 4 : romanCount = 'IV'; break;
case 5 : romanCount = 'V'; break;
case 6 : romanCount = 'VI'; break;
case 7 : romanCount = 'VII'; break;
case 8 : romanCount = 'VIII'; break;
case 9 : romanCount = 'IX'; break;
case 10 : romanCount = 'X'; break;
}
partieCount.innerHTML = 'Partie<br>' + romanCount;
h2s[i].parentElement.prepend(partieCount);
h2s[i].nextElementSibling?.remove();
h2s[i].parentElement.parentElement.parentElement.parentElement.style.display = 'flex';
h2s[i].parentElement.parentElement.parentElement.parentElement.style.alignItems = 'center';
}
}
// afficher correctement les éléments en marge
let topLeftBoxes = document.querySelectorAll('.pagedjs_margin-left-top');
for (let topLeftBox of topLeftBoxes) {
let contentDiv = topLeftBox.firstElementChild;
let textToPut;
let currentPage = contentDiv.parentElement.parentElement.parentElement.parentElement.parentElement;
if(currentPage.id != "page-1") {
let previousPage = currentPage.previousElementSibling;
while (previousPage) {
if (previousPage.classList.contains('atelier_cover_page')) {
textToPut = previousPage.querySelector('h3').innerText;
break;
}
previousPage = previousPage.previousElementSibling;
}
}
contentDiv.append(textToPut);
contentDiv.style.marginTop = contentDiv.offsetWidth / 2 - contentDiv.offsetHeight / 2 + "px";
}
let bottomLeftBoxes = document.querySelectorAll('.pagedjs_margin-left-bottom');
for (let bottomLeftBox of bottomLeftBoxes) {
let contentDiv = bottomLeftBox.firstElementChild;
let textToPut;
let currentPage = contentDiv.parentElement.parentElement.parentElement.parentElement.parentElement;
if(currentPage.id != "page-1") {
let previousPage = currentPage.previousElementSibling;
while (previousPage) {
if (previousPage.classList.contains('partie_cover_page')) {
textToPut = previousPage.querySelector('h2').innerText;
break;
}
previousPage = previousPage.previousElementSibling;
}
}
contentDiv.append(textToPut);
contentDiv.style.marginBottom = contentDiv.offsetWidth / 2 - contentDiv.offsetHeight / 2 + "px";
}
// set all colors
let allPages = document.querySelectorAll('.pagedjs_page');
let partieColor = '';
let bgColor = 'rgb(250, 250, 250)';
for (let page of allPages) {
if (page.classList.contains('partie_cover_page')) {
partieColor = page.firstElementChild.style.backgroundColor;
}
let pageCounter = page.querySelector('.pagedjs_margin-left-middle')
if (pageCounter) {
pageCounter.style.color = partieColor;
}
let atelierTitle = page.querySelector('h3');
if (atelierTitle) {
atelierTitle.style.color = partieColor;
}
let bibliographie = page.querySelector('.bibliographie');
if (bibliographie) {
bibliographie.style.color = partieColor;
// set bg et sprays
let bibliographiePage = bibliographie.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
bibliographiePage.style.backgroundColor = bgColor;
bibliographiePage.parentElement.nextElementSibling.firstElementChild.style.backgroundColor = bgColor;
let sprayImg = document.createElement('img');
sprayImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/sprays/spary_couleurs-page001.png');
sprayImg.style.height = "242mm";
sprayImg.style.width = "60mm";
sprayImg.style.position = "absolute";
sprayImg.style.top = "-22mm";
sprayImg.style.right = "-20mm";
sprayImg.style.mixBlendMode = "multiply";
bibliographiePage.parentElement.nextElementSibling.querySelector('.pagedjs_page_content').prepend(sprayImg);
}
let h4 = page.querySelector('h4');
if (h4 && h4?.nextElementSibling?.classList.contains('bibliographie')) {
h4.style.color = partieColor;
}
let links = page.querySelectorAll('a');
for (let link of links) {
link.style.color = partieColor;
}
let lightColor = partieColor.slice(0, -1) + ', 0.1)';
let encarts = page.querySelectorAll('.lampe, .latour, .encart-split');
for (let encart of encarts) {
encart.style.backgroundColor = lightColor;
}
}
// all links open in a new tab
let links = document.querySelectorAll('a');
for (let link of links) {
link.setAttribute('target', '_blank');
}
// loading
document.querySelector('body').style.opacity = "1";
document.querySelector('body').style.overflow = "scroll";
@@ -7,12 +7,12 @@
{# parent #}
<h2>{{ p.menu|e}}</h2>
{{ p.content|raw }}
{% if p.children.visible.count > 0 %}
{% if p.children.visible.count >= 0 %}
<div>
{% for ppage in p.children.visible %}
<h3>{{ ppage.menu|e }}</h3>
{{ ppage.content|raw }}
{% if p.children.visible.count > 0 %}
{% if p.children.visible.count >= 0 %}
<div>
{% for pppage in ppage.children.visible %}
<h4>{{ pppage.menu|e }}</h4>