Difference between revisions of "Template:ImageDiv"

From The Aruba Wiki
Jump to: navigation, search
Line 1: Line 1:
 
<includeonly><div style="background-color:{{{bgcolor|black}}}; border-radius: 5px; padding: 3px; width: {{{img-width|155px}}}; position: relative;"><div style="border-radius: 2px; overflow: hidden; width: {{{img-width|155px}}}; height: {{{img-height|125px}}};">{{{image}}}</div>{{#if: {{{name|}}} |
 
<includeonly><div style="background-color:{{{bgcolor|black}}}; border-radius: 5px; padding: 3px; width: {{{img-width|155px}}}; position: relative;"><div style="border-radius: 2px; overflow: hidden; width: {{{img-width|155px}}}; height: {{{img-height|125px}}};">{{{image}}}</div>{{#if: {{{name|}}} |
[[{{{articlename|}}}|<span style="background-color:{{{namebgcolor|black}}}; position: absolute; right: 0px; bottom: 0px; font-size: {{{fontsize|x-small}}}; font-weight: bold; color: white; padding: 0 5px; border-radius: 5px 0;">{{{name|}}}</span>]]}}</div></includeonly>
+
<span style="background-color:{{{namebgcolor|black}}}; position: absolute; right: 0px; bottom: 0px; font-size: {{{fontsize|x-small}}}; font-weight: bold; color: white; padding: 0 5px; border-radius: 5px 0;">{{{name|}}}</span> }}</div></includeonly>
 
<noinclude>
 
<noinclude>
 
{{ImageDiv
 
{{ImageDiv
| articlename = :Category:Hotels
 
 
  | name        = Hotels
 
  | name        = Hotels
 
  | image      = [[File:Placeholder.jpg|155px]]  
 
  | image      = [[File:Placeholder.jpg|155px]]  
Line 13: Line 12:
 
<pre>
 
<pre>
 
{{ImageDiv
 
{{ImageDiv
| articlename = :Category:Hotels
 
 
  | name        = Hotels
 
  | name        = Hotels
 
  | image      = [[File:Placeholder.jpg|155px]]
 
  | image      = [[File:Placeholder.jpg|155px]]
Line 23: Line 21:
 
====Usage====
 
====Usage====
 
{{ImageDiv
 
{{ImageDiv
| articlename =
 
 
  | name        =  
 
  | name        =  
 
  | image      =  
 
  | image      =  
Line 30: Line 27:
  
 
====Usage====
 
====Usage====
*'''''articlename''''' – The name of the article (in this case, [[Hotels]]). This will also be the article which will open once the user clicks on the title or image.
 
 
*'''''name''''' – Display name (ie., the name you want the template to display)
 
*'''''name''''' – Display name (ie., the name you want the template to display)
 
*'''''image''''' – File name
 
*'''''image''''' – File name

Revision as of 00:58, 8 August 2018





{{ImageDiv
 | name        = Hotels
 | image       = [[File:Placeholder.jpg|155px]]
 | bgcolor     = orange
 | namebgcolor = orange
 | fontsize    = 18px
}}

====Usage====
{{ImageDiv
 | name        = 
 | image       = 
}}

Usage

  • name – Display name (ie., the name you want the template to display)
  • image – File name
Advanced Parameters
  • bgcolor – Set background color for the image (default to black).
  • namebgcolor – Set background color for the title (default to black).
  • fontsize – Set font size for the title (default to x-small).
  • img-width – Set div width (default to 155px).
  • img-height – Set div height (default to 125px).
  • img-size – Set image size (default to 155px).