Template:Infobox computer: Difference between revisions
Appearance
No edit summary |
Remove the newlines between infobox rows: when an optional parameter is omitted the #if collapses and the stray newline becomes an empty paragraph that the parser hoists above the table, producing the long-standing whitespace gap at the top of articles ย |
||
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
<!-- Title --><caption style="font-size:125%; font-weight:bold; text-align:center;">{{{name|Computer Model}}}</caption><!-- Logo (optional) -->{{#if:{{{logo|}}}|<tr><td colspan="2" style="text-align:center;">{{{logo}}}</td></tr>}} | <!-- Title --><caption style="font-size:125%; font-weight:bold; text-align:center;">{{{name|Computer Model}}}</caption><!-- Logo (optional) -->{{#if:{{{logo|}}}|<tr><td colspan="2" style="text-align:center;">{{{logo}}}</td></tr>}} | ||
<!-- Main image --><tr><td colspan="2" style="text-align:center;">{{{image|[[File:No_image.svg|260px|frameless]]}}}</td></tr>{{#if:{{{caption|}}}|<tr><td colspan="2" style="text-align:center; font-size:85%;">''{{{caption}}}''</td></tr>}}<!-- Header --><tr><th colspan="2" style="background:#ddd;">Specifications</th></tr><!-- Spec rows (each row appears only if the parameter is not blank) -->{{#if:{{{developer|}}}|<tr><th style="width:40%;">Developer</th><td>{{{developer}}}</td></tr>}} | <!-- Main image --><tr><td colspan="2" style="text-align:center;">{{{image|[[File:No_image.svg|260px|frameless]]}}}</td></tr>{{#if:{{{caption|}}}|<tr><td colspan="2" style="text-align:center; font-size:85%;">''{{{caption}}}''</td></tr>}}<!-- Header --><tr><th colspan="2" style="background:#ddd;">Specifications</th></tr><!-- Spec rows (each row appears only if the parameter is not blank) -->{{#if:{{{developer|}}}|<tr><th style="width:40%;">Developer</th><td>{{{developer}}}</td></tr>}}<tr><th>Manufacturer</th><td>{{{manufacturer|Unknown}}}</td></tr><tr><th>Type</th><td>{{{type|Personal computer}}}</td></tr>{{#if:{{{release_date|{{{release date|}}}}}}|<tr><th>Released</th><td>{{{release_date|{{{release date}}}}}}</td></tr>}}{{#if:{{{discontinued|}}}|<tr><th>Discontinued</th><td>{{{discontinued}}}</td></tr>}}{{#if:{{{price|}}}|<tr><th>Intro price</th><td>{{{price}}}</td></tr>}}{{#if:{{{units_sold|}}}|<tr><th>Units sold</th><td>{{{units_sold}}}</td></tr>}}<tr><th>CPU</th><td>{{{cpu|โ}}}</td></tr><tr><th>Memory</th><td>{{{memory|โ}}}</td></tr><tr><th>Storage</th><td>{{{storage|โ}}}</td></tr><tr><th>Display</th><td>{{{display|โ}}}</td></tr><tr><th>Sound</th><td>{{{sound|โ}}}</td></tr>{{#if:{{{dimensions|}}}|<tr><th>Dimensions</th><td>{{{dimensions}}}</td></tr>}}{{#if:{{{weight|}}}|<tr><th>Weight</th><td>{{{weight}}}</td></tr>}}<tr><th>OS /ย Firmware</th><td>{{{os|โ}}}</td></tr>{{#if:{{{predecessor|}}}|<tr><th>Predecessor</th><td>{{{predecessor}}}</td></tr>}}{{#if:{{{successor|}}}|<tr><th>Successor</th><td>{{{successor}}}</td></tr>}}{{#if:{{{codename|}}}|<tr><th>Codename</th><td>{{{codename}}}</td></tr>}}{{#if:{{{model|}}}|<tr><th>Model no.</th><td>{{{model}}}</td></tr>}}</table></includeonly><noinclude> | ||
ย | |||
<tr><th>Manufacturer</th><td>{{{manufacturer|Unknown}}}</td></tr> | |||
<tr><th>Type</th><td>{{{type|Personal computer}}}</td></tr> | |||
{{#if:{{{release_date|{{{release date|}}}}}}|<tr><th>Released</th><td>{{{release_date|{{{release date}}}}}}</td></tr>}} | |||
{{#if:{{{discontinued|}}}|<tr><th>Discontinued</th><td>{{{discontinued}}}</td></tr>}} | |||
{{#if:{{{price|}}}|<tr><th>Intro price</th><td>{{{price}}}</td></tr>}} | |||
<tr><th>CPU</th><td>{{{cpu|โ}}}</td></tr> | |||
<tr><th>Memory</th><td>{{{memory|โ}}}</td></tr> | |||
<tr><th>Storage</th><td>{{{storage|โ}}}</td></tr> | |||
<tr><th>Display</th><td>{{{display|โ}}}</td></tr> | |||
<tr><th>Sound</th><td>{{{sound|โ}}}</td></tr> | |||
{{#if:{{{dimensions|}}}|<tr><th>Dimensions</th><td>{{{dimensions}}}</td></tr>}} | |||
{{#if:{{{weight|}}}|<tr><th>Weight</th><td>{{{weight}}}</td></tr>}} | |||
<tr><th>OS /ย Firmware</th><td>{{{os|โ}}}</td></tr> | |||
{{#if:{{{predecessor|}}}|<tr><th>Predecessor</th><td>{{{predecessor}}}</td></tr>}} | |||
{{#if:{{{successor|}}}|<tr><th>Successor</th><td>{{{successor}}}</td></tr>}} | |||
{{#if:{{{codename|}}}|<tr><th>Codename</th><td>{{{codename}}}</td></tr>}} | |||
{{#if:{{{model|}}}|<tr><th>Model no.</th><td>{{{model}}}</td></tr>}}</table></includeonly><noinclude> | |||
== Usage == | == Usage == | ||
Place the infobox **as the very first line** of the article with no blank lines above it; otherwise MediaWiki will create an empty paragraph that pushes content down.Example skeletonย โ supply only the fields you need (blank ones are hidden automatically): | Place the infobox **as the very first line** of the article with no blank lines above it; otherwise MediaWiki will create an empty paragraph that pushes content down.Example skeletonย โ supply only the fields you need (blank ones are hidden automatically): | ||
Latest revision as of 23:25, 8 September 2026
Usage
[edit source]Place the infobox **as the very first line** of the article with no blank lines above it; otherwise MediaWiki will create an empty paragraph that pushes content down.Example skeleton โ supply only the fields you need (blank ones are hidden automatically):
{{Infobox computer
| name = Apple I
| logo = [[File:Apple Computer Inc Logo.svg|90px]]
| image = [[File:Apple_I_motherboard.jpg|260px|frameless]]
| caption = Original โNTIโ board
| developer = Apple Computer Company
| manufacturer = Apple Computer Company
| type = Singleโboard personal computer
| release_date = April 11, 1976
| discontinued = September 1977
| price = US$666.66
| cpu = MOS 6502 @ 1โฏMHz
| memory = 4โฏKB RAM (expandable to 48โฏKB)
| storage = Cassette interface @ 1200 baud
| display = Composite video, 40 ร 24 text
| os = WOZ Monitor ROM
| successor = [[Apple II]]
| model = Byte Shop & NTI revisions
}}