Difference between revisions of "Template:Infobox/doc"

From Emulation General Wiki
Jump to navigation Jump to search
m (1 revision)
(Samples: Renamed OS X to macOS.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
This template is a sample infobox, to aid in the creation of new infoboxes.
+
This template is an infobox for an emulator.
 
 
Recommended usage: copy the template code to a new template page, and edit it there.
 
 
 
===Infobox and template background===
 
See [[Help:Templates]], [[Help:Infobox]] and [[Help:Tables]] for some background on how templates and infoboxes work.
 
 
 
===Building blocks===
 
The infobox is made of the following basic building blocks:
 
 
 
* Overall table class: <code>class="wikia-infobox"</code>
 
* Table heading cell class: <code>class="wikia-infobox-header"</code>
 
* Use row header marks ("<code>!</code>") for row title cells ''(and "<code>|</code>" for normal cells)''
 
* Section separator line: give the header below it a wrapping <code>div</code> with <code>class="wikia-infobox-section-header"</code>
 
* Image cell class: <code>class="wikia-infobox-image"</code>
 
* Image caption cell class: <code>class="wikia-infobox-caption"</code>
 
 
 
===Other notes===
 
* The Title, First, Second, and Third rows show ''"Unknown"'' if their values are not specified.
 
* The Image, Imagecaption, Fourth, Fifth, and Sixth rows won't show up if their values are not specified: they are each completely enclosed in an 'if' statement.
 
  
 
==Syntax==
 
==Syntax==
 
<pre>
 
<pre>
 
{{infobox
 
{{infobox
| title        =
+
  | image = [Icon of the emulator, e.g. "Example.png"]
  | image         = [e.g. "Example.jpg"]
+
| imagecaption = [This text is displayed below the icon (Optional)]
  | imagewidth   = [e.g. "150"] [default: 210 pixels]
+
  | imagewidth = [Width of the icon in pixels, e.g. "150"] [default: 210 pixels]
| imagecaption  =
+
  | first = [Current version]
  | first         =
+
  | second = [Active]
  | second       =
+
  | third = [OS]
  | third         =
+
  | fourth = [Authors]
  | fourth       =
+
  | fifth = [Official website]
  | fifth         =
+
  | sixth = [Source code]
  | sixth         =
 
 
}}
 
}}
 
</pre>
 
</pre>
Line 40: Line 20:
 
<pre>
 
<pre>
 
{{infobox
 
{{infobox
  | title        = A pretty flower
+
  | image = Icon.png
  | image        = Example.jpg
+
  | imagecaption = The name higan stands for 'Hero of Fire'
  | imagewidth   = 100
+
  | imagewidth = 160
  | imagecaption = Floweris flowerum
+
| first = 0.95
  | first        = Pink and green
+
  | second = Yes
  | second        = Outdoors
+
  | third = Windows, Linux, macOS
  | fourth        = Annual
+
  | fourth = byuu
 +
  | fifth = [http://byuu.org/emulation/higan/ byuu.org]
 +
  | sixth = [https://code.google.com/p/higan/ Google Code]
 
}}
 
}}
 
</pre>
 
</pre>
Line 53: Line 35:
  
 
{{infobox
 
{{infobox
  | title        = A pretty flower
+
  | image = Icon.png
  | image        = Example.jpg
+
  | imagecaption = The name higan stands for 'Hero of Fire'
  | imagewidth   = 100
+
  | imagewidth = 160
  | imagecaption = Floweris flowerum
+
| first = 0.95
  | first        = Pink and green
+
  | second = Yes
  | second        = Outdoors
+
  | third = Windows, Linux, macOS
  | fourth        = Annual
+
  | fourth = byuu
 +
  | fifth = [http://byuu.org/emulation/higan/ byuu.org]
 +
  | sixth = [https://code.google.com/p/higan/ Google Code]
 
}}
 
}}
  
 
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]][[Category:Infobox templates| ]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
 
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]][[Category:Infobox templates| ]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 10:07, 4 November 2018

Description[edit]

This template is an infobox for an emulator.

Syntax[edit]

{{infobox
 | image = [Icon of the emulator, e.g. "Example.png"]
 | imagecaption = [This text is displayed below the icon (Optional)]
 | imagewidth = [Width of the icon in pixels, e.g. "150"] [default: 210 pixels]
 | first = [Current version]
 | second = [Active]
 | third = [OS]
 | fourth = [Authors]
 | fifth = [Official website]
 | sixth = [Source code]
}}

Samples[edit]

{{infobox
 | image = Icon.png
 | imagecaption = The name higan stands for 'Hero of Fire'
 | imagewidth = 160
 | first = 0.95
 | second = Yes
 | third = Windows, Linux, macOS
 | fourth = byuu
 | fifth = [http://byuu.org/emulation/higan/ byuu.org]
 | sixth = [https://code.google.com/p/higan/ Google Code]
}}

Results in...

The name higan stands for 'Hero of Fire'
The name higan stands for 'Hero of Fire'
Current version: 0.95
Active: Yes
OS: Windows, Linux, macOS
Authors: byuu
Official website: byuu.org
Source code: Google Code