Template:InfoboxProductLine: Difference between revisions

various style fixes, might need more modification
added short description field for browser extension
Tag: 2017 source edit
 
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly><div class="infobox">
<div class="infobox" style="background: #eee;border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 0.5em; width: 22em;">
 
<div style="display:flex;gap:8px;flex-direction:column;">
<div style="display:flex;gap:8px;flex-direction:column;">
    <div class="infobox-title">{{{Title|{{PAGENAME}}}}}</div>
    <div class="infobox-image">[[File:{{{Logo}}}|200px]]</div>
    <table class="infobox-table">


    <div style="font-size: 2em; text-align: center; border-bottom: 1px solid #ccc; padding-bottom: .25em;"> {{{Title|{{PAGENAME}}}}} </div>
            <tr>
                <th colspan=2 class="infobox-table-caption" >Basic Information</th>
            </tr>


    <div style="text-align: center;">[[File:{{{Logo}}}|200px]]</div>
            <tr>
 
                <th>{{nowrap|Short description}}</th>
    <table style="width:100%;">
                 <td>{{{short_description}}}</td>
 
            <tr>  
                 <th colspan=2 style="text-align: left; border-bottom: 1px solid #ccc; font-size:125%;">Basic Information</th>  
             </tr>
             </tr>


Line 31: Line 31:
             <tr>
             <tr>
                 <th>{{nowrap|Official Website}}</th>
                 <th>{{nowrap|Official Website}}</th>
                 <td>{{nowrap|{{{Official Website}}}}}</td>
                 <td>{{{Official Website}}}</td>
             </tr>
             </tr>


     </table>
     </table>
</div>
</div>
</div></includeonly><noinclude>
== Usage ==
'''Short description:''' This appears as a browser alert when someone visits a site related to this product. Limit to 140 characters.


</div>
</includeonly><noinclude>
== Usage ==
{{InfoboxProductLine
{{InfoboxProductLine
| Title = Product Name
| Title = Product Name
| Release Year = 2000
| short_description = Brief alert text for browser extension when users visit this product’s site
| Release Year = 2000  
| Product Type = Type of product
| Product Type = Type of product
| In Production = Yes
| In Production = Yes
| Official Website = somewebsite.somewhere
| Official Website = https://example.com/
| Logo= QuestionMark.svg
| Logo = QuestionMark.svg
}}
}}
To have this infobox appear to the right of the page, add this to the page with the text you wish to appear on the box when using the source editor.


<pre>
<pre>
Line 56: Line 54:
{{InfoboxProductLine
{{InfoboxProductLine
| Title =  
| Title =  
| short_description =
| Release Year =  
| Release Year =  
| Product Type =  
| Product Type =  
Line 64: Line 63:
</nowiki>
</nowiki>
</pre>
</pre>
[[Category:Styling templates]]
{{Clear}}


== Template Data ==
== Template Data ==
Line 72: Line 73:
"type": "string",
"type": "string",
"description": "Name of Product Line",
"description": "Name of Product Line",
"required": true
},
"short_description": {
"type": "string",
"description": "Appears in the browser extension when a user visits a site related to this product. Limit to 140 characters.",
"required": true
"required": true
},
},
Line 82: Line 88:
"type": "string",
"type": "string",
"description": "Classification of product (line)",
"description": "Classification of product (line)",
"example": "Hardware, Software, Service,Laptop, Blender",
"example": "Hardware, Software, Service, Laptop, Blender",
"required": true
"required": true
},
},
Line 97: Line 103:
},
},
"Logo": {
"Logo": {
"description": "The logo accociated with this product. If there is no specific logo a picture of the product.",
"description": "The logo associated with this product. If there is no specific logo, use a picture of the product.",
"example": "filename.[jpg|png|svg]",
"example": "filename.[jpg|png|svg]",
"type": "wiki-file-name",
"type": "wiki-file-name",
Line 105: Line 111:
}
}
},
},
"description": "This is a a simple information box to use in product line articles.\nParameters are the information displayed on the infobox.",
"description": "This is a simple information box to use in product line articles. Includes structured data and a short description for external use.",
"format": "block"
"format": "block",
"paramOrder": [
"Title",
"short_description",
"Release Year",
"Product Type",
"In Production",
"Official Website",
"Logo"
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>