Vorlage:Galerie: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 8: | Zeile 8: | ||
-->{{#vardefine:display|{{{display|grid}}}}}<!-- | -->{{#vardefine:display|{{{display|grid}}}}}<!-- | ||
+ | |||
+ | |||
-->{{#vardefine:rw|{{{rw|100}}}}}<!-- | -->{{#vardefine:rw|{{{rw|100}}}}}<!-- | ||
-->{{#vardefine:rh|{{#if:{{{rh|}}} | -->{{#vardefine:rh|{{#if:{{{rh|}}} | ||
| grid-auto-rows: {{{rh|}}}px;}}}}<!-- | | grid-auto-rows: {{{rh|}}}px;}}}}<!-- | ||
+ | |||
+ | optional | ||
+ | |||
-->{{#vardefine:repeat|{{{repeat|auto-fit}}}}}<!-- | -->{{#vardefine:repeat|{{{repeat|auto-fit}}}}}<!-- | ||
-->{{#vardefine:gap|{{{gap|10px}}}}}<!-- | -->{{#vardefine:gap|{{{gap|10px}}}}}<!-- | ||
Zeile 27: | Zeile 32: | ||
#grid_{{#var:id}} { | #grid_{{#var:id}} { | ||
display: {{#var:display}}; | display: {{#var:display}}; | ||
− | grid-template-columns: repeat({{#var:repeat}}, {{#var:rw}}px); | + | grid-template-columns: repeat({{#var:repeat}}, minmax({{#var:rw}}px, 1fr)); |
{{#var:rh}} | {{#var:rh}} | ||
flex-wrap: wrap; | flex-wrap: wrap; |
Version vom 12. April 2020, 18:31 Uhr
Beliebige Menge von Bildern in einem Grid anzeigen.
{{galerie| caption= 16 Arhats | rw= 100 | rh= 200 | {{DiaX.2|rw=150|img=luohan1.jpg|style="grid-area:1/1/3/3;"}} {{DiaX.2|rw=150|rh=300|img=luohan2.jpg}} ... }}
Parameter:
- Bilder: 1
- Text: caption
- grid: rw, rh [Einheit=px], gap, gapY [Einheit dazuschreiben], repeat [Zahl, default = auto-fit]
- Layout: center[center=1], margin [left und right, mit Einheit]
(Grid-items in diaX.2 können auch mit style= positioniert werden.)