création du nouveau block links : big-links-list

This commit is contained in:
antonin gallon 2026-02-17 11:34:33 +01:00
parent 54bd4fbc87
commit 8776c089e4
5 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(dir \"C:\\\\Users\\\\anton\\\\Desktop\\\\studioVariable\\\\NTB\\\\nouveau-theatre-de-besancon\\\\site\\\\cache\")"
]
}
}

View file

@ -73,12 +73,39 @@
position: absolute;
inset: 0;
}
[data-template="sectioned"] .links-list li a::before {
[data-template="sectioned"] .links-list li a::before
{
content: "→";
display: inline-block;
transform: rotate(-45deg);
}
/*big links list*/
[data-template="sectioned"] .big-links-list li {
position: relative;
display: flex;
border-bottom: 1px solid #000;
font-size: var(--font-size-h3);
margin-bottom: 0.7rem;
padding-bottom: 0.4rem;
}
[data-template="sectioned"] .big-links-list li .li_arrow{
transition: opacity 0.3s, width 0.4s;
opacity: 0;
width: 0;
}
[data-template="sectioned"] .big-links-list li:hover .li_arrow{
opacity: 1;
width: 2.5rem;
}
[data-template="sectioned"] .big-links-list li a::before{
content: "";
position: absolute;
inset: 0;
}
.section__row.fixed-img-height img {
max-height: var(--height);
object-fit: contain;

View file

@ -0,0 +1,22 @@
name: Liste de grands liens
icon: list-bullet
preview: fields
wysiwyg: true
fields:
items:
label: false
type: structure
fields:
text:
type: text
label: texte
width: 1/2
link:
label: Lien
type: link
required: true
options:
- url
- page
- file
width: 1/2

View file

@ -34,6 +34,7 @@ tabs:
- text
- image
- links-list
- big-links-list
settings:
fields:
imgHeight:

View file

@ -0,0 +1,8 @@
<ul class="big-links-list">
<?php foreach($block->items()->toStructure() as $item): ?>
<li>
<span class="li_arrow"></span><span class="li_text"><?= $item->text() ?></span>
<?php snippet('a', ['url' => $item->link()->toUrl()]) ?>
</li>
<?php endforeach ?>
</ul>