Difference between revisions of "Template:GalleryItem"
From Geohashing
imported>Relet |
imported>Relet (again: now with explicit defaulting for var gaLines) |
||
Line 1: | Line 1: | ||
− | <noinclude>This template includes a gallery item in the main page gallery. It may format as a date bar, if the second parameter is "date", or an image and subtitle otherwise.</noinclude><includeonly>{{#ifeq:{{{2|}}}|date|<table style="width:30px; float:left; border-collapse:collapse; margin:3px;"><tr><td style="background-color:#ddd; height:{{#expr:{{#var:gaHeight|180}}+20}}px; border:1px solid #ffffff; padding:0px; width=30px; text-align:center">{{{1}}}</td></tr><tr style="border-right:1px solid #ffffff; border-bottom:1px solid #ffffff; border-left:1px solid #ffffff; vertical-align:top;"><td style="display:block; font-size:1em; height:1. | + | <noinclude>This template includes a gallery item in the main page gallery. It may format as a date bar, if the second parameter is "date", or an image and subtitle otherwise.</noinclude><includeonly>{{#if:{{#var:gaLines|}}||{{#vardefine:gaLines|1}}}}{{#ifeq:{{{2|}}}|date|<table style="width:30px; float:left; border-collapse:collapse; margin:3px;"><tr><td style="background-color:#ddd; height:{{#expr:{{#var:gaHeight|180}}+20}}px; border:1px solid #ffffff; padding:0px; width=30px; text-align:center">{{{1}}}</td></tr><tr style="border-right:1px solid #ffffff; border-bottom:1px solid #ffffff; border-left:1px solid #ffffff; vertical-align:top;"><td style="display:block; font-size:1em; height:{{#Expr:0.2+1.5*{{#var:gaLines|1}}}}em; padding:0px;"><div class="gallerytext" style="height:{{#Expr:0.2+1.5*{{#var:gaLines|1}}}}em; line-height:1.3em; padding:2px 6px 1px 6px; overflow-y:auto; margin:0px; border:none; border-width:0px;"> </div></td></tr></table>|<table style="width:{{#expr:{{#var:gaWidth|180}}+20}}px; float:left; border-collapse:collapse; margin:3px; background-color:#f8f8f8;"><tr><td style="height:{{#expr:{{#var:gaHeight|180}}+20}}px; border:1px solid #CCCCCC; padding:0px;">[[{{{1|File:Landgeohash.png}}}|center|border|{{#if:{{#var:gaWidth}}|{{#var:gaWidth|180}}x{{#var:gaHeight|180}}px|150px}}|alt={{#var:gaAlt|}}|{{{2}}}]]</td></tr><tr style="border-right:1px solid #F0F0F0; border-bottom:1px solid #f0f0f0; border-left:1px solid #f0f0f0; vertical-align:top;"><td style="display:block; font-size:1em; height:{{#Expr:0.2+1.5*{{#var:gaLines|1}}}}em; padding:0px;"><div class="gallerytext" style="height:{{#Expr:0.2+1.5*{{#var:gaLines|1}}}}em; width:{{#if:{{#var:gaWidth}}|{{#expr:{{#var:gaWidth|180}}+7}}|150}}px; line-height:1.3em; padding:2px 6px 1px 6px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{{2|}}} </div></td></tr></table>}}</includeonly> |
Revision as of 09:17, 29 June 2010
This template includes a gallery item in the main page gallery. It may format as a date bar, if the second parameter is "date", or an image and subtitle otherwise.