Modèle:Gallery : Différence entre versions

[version vérifiée][version vérifiée]
 
(17 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
 
{{#switch:{{{style}}}
 
{{#switch:{{{style}}}
 
|1=
 
|1=
<div class="grid{{{MinCol|3}}}" style="display: grid; grid-template-columns: repeat({{#if:{{{Mass|}}}|auto-fit, minmax({{#if:{{{tailleCell|}}}|{{{tailleCell}}}|170}}px, 1fr)|auto-fill, {{#if:{{{tailleCell|}}}|{{{tailleCell}}}|170}}px); justify-content:left; grid-gap: {{#if:{{{Gap|}}}|{{{Gap}}}|5}}px}};">
+
<div {{#ifeq:{{{MinCol|3}}}|1||class="grid{{{MinCol|3}}}"}} style="display: grid; grid-template-columns: {{#if:{{{Trompette|}}}|repeat(auto-fit, minmax({{#if:{{{tailleCell|}}}|{{{tailleCell}}}|170}}px, 1fr))|repeat(auto-fill, {{#if:{{{tailleCell|}}}|{{{tailleCell}}}|170}}px)}}; justify-content:left; grid-gap: {{#if:{{{Gap|}}}|{{{Gap}}}|5}}px;">
 
{{#fornumargs: number
 
{{#fornumargs: number
 
| value
 
| value
|{{#ifeq:{{#var:value}}|||<div align="center" style="padding:5px; border:1px solid black;">{{#var:value}}</div>}}
+
|{{#ifeq:{{#var:value}}|||<div align="center" style="padding:5px; border:1px solid #2f1d1f; display: flex; justify-content: center; {{#ifeq:{{{align|}}}||align-items: center;}}"><div style="width: 100%;">{{#var:value}}</div></div>}}
 
}}
 
}}
 
</div>
 
</div>
 
|2=
 
|2=
<div style="padding-top: 5px; width: max-content; justify-content: center; grid-template-columns: repeat(2, auto); display: grid; justify-content: left; grid-gap: 5px;">
+
<div style="padding-top: 5px; justify-content: center; grid-template-columns: repeat(2, auto); display: grid; grid-gap: 5px; justify-items: end;">
 
{{#fornumargs: number
 
{{#fornumargs: number
 
| value
 
| value
|<div align="{{#ifeq:{{#expr:{{#var:number}} mod 2}}|1|left|right}}">{{#var:value}}</div>
+
|<div>{{#var:value}}</div>
 
}}
 
}}
 
</div>
 
</div>
 
}}
 
}}
 
<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>
 
<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>

Version actuelle datée du 23 juin 2022 à 20:58