Template:Gallery Game: Difference between revisions

From Forklift Certified Video Games
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{gallery_image|{{{gallery_image1|}}}}}}|
<includeonly>
<!-- 1. HEADER LOGIC: Only print the header once per page -->
{{#if: {{{gallery_image1|}}}{{{gallery_image2|}}}{{{gallery_image3|}}}{{{gallery_image4|}}}{{{gallery_image5|}}} |
{{#if: {{#get:gallery_shown}} | | == Gallery =={{#set:gallery_shown=1}} }}
== Gallery ==
 
{{#tag:gallery|
<!-- 2. IMAGE LOGIC: Force them next to each other using inline-block -->
{{#if:{{{gallery_image1|}}}|File:{{{gallery_image1|}}}{{!}}{{{gallery_caption1|}}} }}
<div style="display: inline-block; vertical-align: top; margin: 10px 10px 10px 0; width: 175px; text-align: center;">
{{#if:{{{gallery_image2|}}}|File:{{{gallery_image2|}}}{{!}}{{{gallery_caption2|}}} }}
  <div style="height: 175px; display: flex; align-items: center; justify-content: center; background: #222; border: 1px solid #444; border-radius: 4px;">
{{#if:{{{gallery_image3|}}}|File:{{{gallery_image3|}}}{{!}}{{{gallery_caption3|}}} }}
    [[File:{{{gallery_image|{{{gallery_image1|}}}}}}|175x175px|center|link={{{gallery_image|{{{gallery_image1|}}}}}}]]
{{#if:{{{gallery_image4|}}}|File:{{{gallery_image4|}}}{{!}}{{{gallery_caption4|}}} }}
  </div>
{{#if:{{{gallery_image5|}}}|File:{{{gallery_image5|}}}{{!}}{{{gallery_caption5|}}} }}
  <div style="font-size: 90%; margin-top: 5px; line-height: 1.2; color: #ccc; word-wrap: break-word;">
|mode=packed|widths=175|heights=175|style="text-align:left;"
    {{{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>
}}
}}
}}<nowiki /></includeonly>
</includeonly>

Latest revision as of 22:44, 25 April 2026