« Modèle:Infobox » : différence entre les versions

De Inkipédia
Aller à la navigation Aller à la recherche
m (1 révision importée : http://splatoonwiki.org/wik/Inkling)
(Mis à jour)
Balises : Modification par mobile Modification par le web mobile
Ligne 1 : Ligne 1 :
{| class="infobox" align="right"
<includeonly>{{BubbleBox|tags=tagInfobox|open|border={{{color|}}}|background=rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.15)
|-
|style=width: 350px; padding: 8px; float: right; {{{style|}}}}}
! colspan="2" class="infobox1" | {{{name|{{PAGENAME}}}}}
<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>
|- style="text-align:center;"
{{InfoboxTitle|color={{{color|}}}|{{{title|{{PAGENAME}}}}}}}
| colspan="2" style="padding:0.5em;" | [[{{{image|Image:Placeholder person.png}}}|250px]]<br/>''{{{caption| }}}''
<div style="text-align: center; margin: 8px;">{{#if:{{{logo|}}}|[[File:{{{logo|}}}|frameless|334x250px]]<br />}}{{#if:{{{image|}}}|[[File:{{{image|Example.png}}}|frameless|334x250px]]}}{{#if:{{{caption|}}}|<br />''{{{caption}}}''}}</div><!--
|-
-->{{#ifeq:{{{1|}}}|open||{{{1|}}}</div>}}<!--
{{#if: {{{Notable Inklings<includeonly>|</includeonly>}}} |
--></includeonly><noinclude>__NOTOC__
{{!}} '''Notable Inklings'''
Produces a basic infobox for a game.
{{!}} {{{Notable Inklings}}}
 
=== Parameters ===
{||- style="vertical-align: top;"
|<code>open</code>||Optional.||Like with {{t|BubbleBox}}, the "open" parameter leaves the table open (unclosed div) for further customization.
|- style="vertical-align: top;"
|- style="vertical-align: top;"
|<code>color</code>||Optional.||An RGB triplet to use as the base color for formatting. The default color is {{t|SiteColor|Generic}}.
|- style="vertical-align: top;"
|<code>style</code>||Optional.||A CSS property list to apply to the top-level container.
|- style="vertical-align: top;"
|<code>title</code>||Optional.||The title. If absent, the page name is used.
|- style="vertical-align: top;"
|<code>logo</code>||Optional.||The filename of the logo to display.
|- style="vertical-align: top;"
|<code>image</code>||Optional.||The filename of the image to display.
|- style="vertical-align: top;"
|<code>caption</code>||Optional.||Text displayed below the image.
|- style="vertical-align: top;"
|}
 
=== Example ===
==== Markup ====
<nowiki>{{Infobox
|color    = {{SiteColor|Splatoon}}
|title    = Splatoon
|image    = Splatoon NA Box Art.jpg
|caption  = North American box art
}}</nowiki>
 
==== Output ====
{{Infobox
|color    = {{SiteColor|Splatoon}}
|title    = Splatoon
|image    = Splatoon NA Box Art.jpg
|caption  = North American box art
}}
}}
|-
{{clr}}
{{#if: {{{Allies<includeonly>|</includeonly>}}} |
 
{{!}} '''Allies'''
<nowiki>{{Infobox
{{!}} {{{Allies}}}
|color    = {{SiteColor|Splatoon 2}}
|title    = Splatoon 2
|caption  = Example
}}</nowiki>
 
==== Output ====
{{Infobox
|color    = {{SiteColor|Splatoon 2}}
|title    = Splatoon 2
|caption  = Example
}}
}}
|-
{{clr}}
{{#if: {{{Enemies<includeonly>|</includeonly>}}} |
 
{{!}} '''Enemies'''
<nowiki>{{Infobox
{{!}} {{{Enemies}}}
|color    = {{SiteColor|Generic}}
|title    = Moray Towers
|image    = S Stage Moray Towers.png
|caption  = Horizontal image
}}</nowiki>
 
==== Output ====
{{Infobox
|color    = {{SiteColor|Generic}}
|title    = Moray Towers
|image    = S Stage Moray Towers.png
|caption  = Horizontal image
}}
}}
|-
{{clr}}
{{#if: {{{Location<includeonly>|</includeonly>}}} |
 
{{!}} '''Location'''
<nowiki>{{Infobox|open|color={{SiteColor|NIWA}}}}
{{!}} {{{location}}}
{| style="border-spacing: 4px;"
}}
{{InfoboxProperty|color={{SiteColor|NIWA}}|Field 1|Text 1}}
|-
{{InfoboxProperty|color={{SiteColor|NIWA}}|Field 2|Text 2}}
|}<noinclude>{{-}}
|}</div></nowiki>
{{documentation}}</noinclude>
 
==== Output ====
{{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>
 
{{clr}}
 
{{Documentation}}
</noinclude>

Version du 25 juillet 2023 à 21:36

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     = Splatoon NA Box Art.jpg
|caption   = North American box art
}}

Output

<div class="rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15) tagInfobox" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 1px 10px 1px; border-style: solid; border-color: rgb(Erreur de script : le module « SiteColor » n’existe pas.); border-radius: 10px; padding: 15px; margin: 4px; background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15); width: 350px; padding: 8px; float: right;"> <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(Erreur de script : le module « SiteColor » n’existe pas., 0.5); background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.2); outline-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.3); ">Splatoon​ Erreur de script : le module « InfoboxTitle » n’existe pas.

Splatoon NA Box Art.jpg
North American box art
{{Infobox
|color     = {{SiteColor|Splatoon 2}}
|title     = Splatoon 2
|caption   = Example
}}

Output

<div class="rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15) tagInfobox" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 1px 10px 1px; border-style: solid; border-color: rgb(Erreur de script : le module « SiteColor » n’existe pas.); border-radius: 10px; padding: 15px; margin: 4px; background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15); width: 350px; padding: 8px; float: right;"> <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(Erreur de script : le module « SiteColor » n’existe pas., 0.5); background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.2); outline-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.3); ">Splatoon 2​ Erreur de script : le module « InfoboxTitle » n’existe pas.


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

Output

<div class="rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15) tagInfobox" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 1px 10px 1px; border-style: solid; border-color: rgb(Erreur de script : le module « SiteColor » n’existe pas.); border-radius: 10px; padding: 15px; margin: 4px; background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15); width: 350px; padding: 8px; float: right;"> <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(Erreur de script : le module « SiteColor » n’existe pas., 0.5); background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.2); outline-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.3); ">Moray Towers​ Erreur de script : le module « InfoboxTitle » n’existe pas.

S Stage Moray Towers.png
Horizontal image
{{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

<div class="rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15) tagInfobox" style="color:box-shadow: 0px 0px 15px #ffffff inset; border-width: 10px 1px 10px 1px; border-style: solid; border-color: rgb(Erreur de script : le module « SiteColor » n’existe pas.); border-radius: 10px; padding: 15px; margin: 4px; background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.15); width: 350px; padding: 8px; float: right;"> <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(Erreur de script : le module « SiteColor » n’existe pas., 0.5); background-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.2); outline-color: rgba(Erreur de script : le module « SiteColor » n’existe pas., 0.3); ">Infobox​ Erreur de script : le module « InfoboxTitle » n’existe pas.

Field 1 Text 1
Field 2 Text 2
Ci-dessous la documentation du modèle
N.B.: le modèle ci-dessus peut parfois être partiellement ou entièrement invisible.
Suivre Template:Infobox/doc pour modifier cette documentation. (Comment ça marche ?)
Modèle:Infobox/doc