Difference between revisions of "Template:ImageDiv"
(Created page with "<includeonly><div style="background-color:{{{bgcolor|black}}}; border-radius: 5px; padding: 3px; width: {{{img-width|155px}}}; position: relative;"><div style="border-radius:...") |
|||
(11 intermediate revisions by the same user not shown) | |||
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>[[{{{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> | + | <includeonly> |
+ | {{#switch: {{{type|}}} | ||
+ | |0= | ||
+ | <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|}}} | | ||
+ | <span style="background-color:{{{namebgcolor|black}}}; position: absolute; {{{direction|right}}}: 0px; bottom: 0px; font-size: {{{fontsize|x-small}}}; font-weight: bold; color: {{{namecolor|white}}}; padding: {{{padding|0 5px}}}; border-radius: {{{border-radius|5px 0}}};">{{{name|}}}</span> }}</div> | ||
+ | |1=<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}}};">{{PlainURL|1={{{articlename|}}}|2={{{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: {{{namecolor|white}}}; padding: 0 5px; border-radius: 5px 0;">{{{name|}}}</span>]] }}</div> | ||
+ | |2=<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: {{{namecolor|white}}}; padding: 0 5px; border-radius: 5px 0;">{{{name|}}}</span>]] }}</div> | ||
+ | }} | ||
+ | |||
+ | </includeonly> | ||
<noinclude> | <noinclude> | ||
{{ImageDiv | {{ImageDiv | ||
− | | | + | | type = 0 |
| name = Hotels | | name = Hotels | ||
| image = [[File:Placeholder.jpg|155px]] | | image = [[File:Placeholder.jpg|155px]] | ||
Line 12: | Line 23: | ||
<pre> | <pre> | ||
{{ImageDiv | {{ImageDiv | ||
− | | | + | | type = 0 |
| name = Hotels | | name = Hotels | ||
− | | image = Placeholder.jpg | + | | image = [[File:Placeholder.jpg|155px]] |
| bgcolor = orange | | bgcolor = orange | ||
| namebgcolor = orange | | namebgcolor = orange | ||
Line 22: | Line 33: | ||
====Usage==== | ====Usage==== | ||
{{ImageDiv | {{ImageDiv | ||
− | | | + | | type = |
| name = | | name = | ||
| image = | | image = | ||
Line 29: | Line 40: | ||
====Usage==== | ====Usage==== | ||
− | *''''' | + | *'''''type''''' – Switch between allow links (1) or no (0), (2) will allow to use <img> tag |
*'''''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 | ||
Line 39: | Line 50: | ||
*'''''img-height''''' – Set div height (default to 125px). | *'''''img-height''''' – Set div height (default to 125px). | ||
*'''''img-size''''' – Set image size (default to 155px). | *'''''img-size''''' – Set image size (default to 155px). | ||
− | + | *'''''direction''''' – Direction of the Text (default to right). | |
+ | *'''''border-radius''''' – Set border-radius of the text area (default to 5px 0). | ||
+ | *'''''border-radius''''' – Set padding of the text area (default to 0 5px). | ||
+ | *'''''namecolor''''' – Set text color of text area (default to white). | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Latest revision as of 23:45, 14 August 2018
Hotels
{{ImageDiv | type = 0 | name = Hotels | image = [[File:Placeholder.jpg|155px]] | bgcolor = orange | namebgcolor = orange | fontsize = 18px }} ====Usage==== {{ImageDiv | type = | name = | image = }}
Usage
- type – Switch between allow links (1) or no (0), (2) will allow to use <img> tag
- 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).
- direction – Direction of the Text (default to right).
- border-radius – Set border-radius of the text area (default to 5px 0).
- border-radius – Set padding of the text area (default to 0 5px).
- namecolor – Set text color of text area (default to white).