mobile calendrier event display fix; Hyphenation words with dash fix
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -90,6 +90,7 @@ function processTitle(txt) {
|
|||||||
const chars = Array.from(word.getElementsByClassName('char'));
|
const chars = Array.from(word.getElementsByClassName('char'));
|
||||||
styleWordChars(chars);
|
styleWordChars(chars);
|
||||||
hyphenateWord(chars);
|
hyphenateWord(chars);
|
||||||
|
breakAfterHyphens(chars);
|
||||||
}
|
}
|
||||||
txt.classList.add('is-ready');
|
txt.classList.add('is-ready');
|
||||||
}
|
}
|
||||||
@@ -304,4 +305,22 @@ function hyphenateWord(chars) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autorise la coupure après un trait d'union (« text-to-speech »).
|
||||||
|
*
|
||||||
|
* Le « - » est isolé dans son span .char : l'opportunité de coupure qu'il
|
||||||
|
* porte normalement ne passe pas dans le flux entre les spans, et le mot
|
||||||
|
* entier ne coupe jamais. Comme pour les césures, on pose un point de coupure
|
||||||
|
* entre les spans : un <wbr>. (Un espace sans chasse U+200B à la place est
|
||||||
|
* ignoré par Firefox après un « - » : mesuré sur /projets, aucune coupure.)
|
||||||
|
*/
|
||||||
|
function breakAfterHyphens(chars) {
|
||||||
|
for (let i = 0; i < chars.length - 1; i++) {
|
||||||
|
const c = chars[i];
|
||||||
|
if (/^[-‐]$/.test(c.textContent) && c.parentNode) {
|
||||||
|
c.parentNode.insertBefore(document.createElement('wbr'), c.nextSibling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initTitles();
|
initTitles();
|
||||||
|
|||||||
@@ -2,41 +2,30 @@
|
|||||||
@use "../abstracts/variables" as *;
|
@use "../abstracts/variables" as *;
|
||||||
@use "fluid" as *;
|
@use "fluid" as *;
|
||||||
@use "../abstracts/event-date-time" as *;
|
@use "../abstracts/event-date-time" as *;
|
||||||
|
@use "../abstracts/breakpoints" as *;
|
||||||
|
|
||||||
@mixin event_calendar(){
|
@mixin event_calendar(){
|
||||||
// @include evenementListe();
|
// @include evenementListe();
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
padding: 2em 0 1em 0;
|
padding: 2em 0 1em 0;
|
||||||
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 1em;
|
|
||||||
header{
|
header{
|
||||||
flex:0 1 auto;
|
|
||||||
// width: 5em;
|
|
||||||
padding:0 1em 0 0;
|
|
||||||
|
|
||||||
.field_dates{
|
.field_dates{
|
||||||
@include event-date-time(5em);
|
@include event-date-time(5em);
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.6em;
|
|
||||||
span.date-sep{
|
span.date-sep{
|
||||||
display: block;
|
display: block;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
transform-origin: center;
|
// transform-origin: center;
|
||||||
transform: rotate(90deg) translateX(0.1em);
|
transform: translateX(0.1em);
|
||||||
line-height: 0;
|
// line-height: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section.content{
|
section.content{
|
||||||
flex:1 1 auto;
|
|
||||||
h2.node-title{
|
h2.node-title{
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
}
|
}
|
||||||
@@ -59,21 +48,66 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
section.last-cel{
|
section.last-cel{
|
||||||
flex:0 1 auto;
|
|
||||||
.field_images{
|
.field_images{
|
||||||
a{
|
a{
|
||||||
display: block;
|
display: block;
|
||||||
width: 12em;
|
width: 100%;
|
||||||
height: 12em;
|
height: 12em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img{
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
object-fit:cover;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media #{$desktop-et-tablette}{
|
||||||
|
&{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
header{
|
||||||
|
flex:0 1 auto;
|
||||||
|
// width: 5em;
|
||||||
|
padding:0 1em 0 0;
|
||||||
|
|
||||||
|
.field_dates{
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6em;
|
||||||
|
span.date-sep{
|
||||||
|
transform-origin: center;
|
||||||
|
transform: rotate(90deg) translateX(0.1em);
|
||||||
|
line-height: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
section.content{
|
||||||
|
flex:1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.last-cel{
|
||||||
|
flex:0 1 auto;
|
||||||
|
.field_images{
|
||||||
|
a{
|
||||||
|
width: 12em;
|
||||||
|
height: 12em;
|
||||||
|
img{
|
||||||
object-fit:contain;
|
object-fit:contain;
|
||||||
object-position: top right;
|
object-position: top right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user