Diferencia entre revisiones de «Plantilla:Infobox»

De Inkipedia
m (Adding a zero-width space to the gobbler tab title, to fix line breaks)
mSin resumen de edición
Línea 3: Línea 3:
<span class="tagTab" style="display: none; padding: 2px; margin-right: 2px; cursor: default; border-width: 1px 3px 1px 3px; border-style: solid; border-radius: 4px; font-size: 12px; border-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.5); background-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.2); outline-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.3); ">{{{title|{{PAGENAME}}}}}&#8203;</span>
<span class="tagTab" style="display: none; padding: 2px; margin-right: 2px; cursor: default; border-width: 1px 3px 1px 3px; border-style: solid; border-radius: 4px; font-size: 12px; border-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.5); background-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.2); outline-color: rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.3); ">{{{title|{{PAGENAME}}}}}&#8203;</span>
{{InfoboxTitle|color={{{color|}}}|{{{title|{{PAGENAME}}}}}}}
{{InfoboxTitle|color={{{color|}}}|{{{title|{{PAGENAME}}}}}}}
<div style="text-align: center; margin: 8px; max-width: 334px;">{{#if:{{{logo|}}}|[[File:{{{logo|}}}|frameless|334x250px]]<br />}}[[File:{{{image|Example.png}}}|frameless|334x250px]]{{#if:{{{caption|}}}|<br />''{{{caption}}}''}}</div>
<div style="text-align: center; margin: 8px; max-width: 334px;">{{#if:{{{logo|}}}|[[File:{{{logo|}}}|frameless|334x250px]]}}[[File:{{{image|Example.png}}}|frameless|334x250px]]{{#if:{{{caption|}}}|<br />''{{{caption}}}''}}</div>
{{#ifeq:{{{1|}}}|open||{{{1|}}}</div>}}
{{#ifeq:{{{1|}}}|open||{{{1|}}}</div>}}
</includeonly><noinclude>__NOTOC__
</includeonly><noinclude>__NOTOC__

Revisión del 00:18 3 ago 2018

Produces a basic infobox for a game.

Parameters

open Optional. Like with {{BubbleBox}}, the "open" parameter leaves the table open (unclosed div) for further customization.
color Optional. An RGB triplet to use as the base color for formatting. The default color is {{SiteColor|<Generic>}}.
style Optional. A CSS property list to apply to the top-level container.
title Optional. The title. If absent, the page name is used.
logo Optional. The filename of the logo to display.
image Optional. The filename of the image to display.
caption Optional. Text displayed below the image.

Example

Markup

{{Infobox
|color     = {{SiteColor|Splatoon}}
|title     = Splatoon
|image     = Boxart.jpg
|caption   = North American box art
}}

Output

Splatoon
Archivo:Boxart.jpg
North American box art
{{Infobox
|color     = {{SiteColor|Splatoon 2}}
|title     = Splatoon 2
|caption   = Example
}}

Output

Splatoon 2
Example.png
Example
{{Infobox
|color     = {{SiteColor|Generic}}
|title     = Moray Towers
|image     = Splatoon Stage Moray Towers.png
|caption   = Horizontal image
}}

Output

Moray Towers
{{Infobox|open|color={{SiteColor|NIWA}}}}
{| style="border-spacing: 4px;"
{{InfoboxProperty|color={{SiteColor|NIWA}}|Field 1|Text 1}}
{{InfoboxProperty|color={{SiteColor|NIWA}}|Field 2|Text 2}}
|}</div>

Output

Infobox
Example.png


Field 1 Text 1
Field 2 Text 2