Template:Gallery Game: Difference between revisions
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{gallery_image|{{{gallery_image1|}}}}}}| | <includeonly>{{#if:{{{gallery_image|{{{gallery_image1|}}}}}}| | ||
<!-- 1. HEADER LOGIC: Only print the header once per page --> | |||
{{#if: {{#get:gallery_shown}} | | == Gallery =={{#set:gallery_shown=1}} }} | |||
{{#if:{{ | |||
{{# | |||
| | <!-- 2. IMAGE LOGIC: Force them next to each other using inline-block --> | ||
<div style="display: inline-block; vertical-align: top; margin: 10px 10px 10px 0; width: 175px; text-align: center;"> | |||
<div style="height: 175px; display: flex; align-items: center; justify-content: center; background: #222; border: 1px solid #444; border-radius: 4px;"> | |||
[[File:{{{gallery_image|{{{gallery_image1|}}}}}}|175x175px|center|link={{{gallery_image|{{{gallery_image1|}}}}}}]] | |||
</div> | |||
<div style="font-size: 90%; margin-top: 5px; line-height: 1.2; color: #ccc; word-wrap: break-word;"> | |||
{{{gallery_caption|{{{gallery_caption1|}}}}}} | |||
</div> | |||
</div> | |||
<!-- 3. COMPATIBILITY: Handle old fields if they exist --> | |||
{{#if:{{{gallery_image2|}}}| | |||
<div style="display: inline-block; vertical-align: top; margin: 10px 10px 10px 0; width: 175px; text-align: center;"> | |||
<div style="height: 175px; display: flex; align-items: center; justify-content: center; background: #222; border: 1px solid #444; border-radius: 4px;"> | |||
[[File:{{{gallery_image2}}}|175x175px|center|link={{{gallery_image2}}}]] | |||
</div> | |||
<div style="font-size: 90%; margin-top: 5px; color: #ccc;">{{{gallery_caption2|}}}</div> | |||
</div> | |||
}} | |||
{{#if:{{{gallery_image3|}}}| | |||
<div style="display: inline-block; vertical-align: top; margin: 10px 10px 10px 0; width: 175px; text-align: center;"> | |||
<div style="height: 175px; display: flex; align-items: center; justify-content: center; background: #222; border: 1px solid #444; border-radius: 4px;"> | |||
[[File:{{{gallery_image3}}}|175x175px|center|link={{{gallery_image3}}}]] | |||
</div> | |||
<div style="font-size: 90%; margin-top: 5px; color: #ccc;">{{{gallery_caption3|}}}</div> | |||
</div> | |||
}} | }} | ||
}}</includeonly> | }}<nowiki /></includeonly> | ||