Template:Hubs and Template:Hubs/sandbox: Difference between pages
From Linux Web Expert
(Difference between pages)
imported>AKlapper (WMF) (Remove random icon size differences and lack of vertical alignment of text in random boxes, by not randomly making some icons 30px while others icons are only 20px.) |
imported>Shirayuki (Removed page from translation) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
< | </noinclude>{{#switch: | ||
| = | |||
<ul class="hubs hubs-pagedir-{{dir|{{pagelang}}}} hubs-align-{{#switch:{{{1|none}}}|left|right|center={{{1}}}|#default=none}}"> | |||
<templatestyles src="Hubs/styles.css" /> | <templatestyles src="Hubs/styles.css" /> | ||
<li {{#if:{{{user|}}}|class="hub-highlighted"}}>[[Image:Community_Noun_project_2280.svg|20px]] {{ll|User hub| | <li {{#if:{{{user|}}}|class="hub-highlighted"}}>[[Image:Community_Noun_project_2280.svg|{{#if:{{{user|}}}|30px|20px}}]] {{ll|User hub|Users}}</li> | ||
<li {{#if:{{{admin|}}}|class="hub-highlighted"}}>[[File:Octicons-terminal.svg|20px]] {{ll|Sysadmin hub| | <li {{#if:{{{admin|}}}|class="hub-highlighted"}}>[[File:Octicons-terminal.svg|{{#if:{{{admin|}}}|30px|20px}}]] {{ll|Sysadmin hub|System Administrators}}</li> | ||
<li {{#if:{{{dev|}}}|class="hub-highlighted"}}>[[File:Source code project 1171.svg|20px]] {{ll|Developer hub| | <li {{#if:{{{dev|}}}|class="hub-highlighted"}}>[[File:Source code project 1171.svg|{{#if:{{{dev|}}}|30px|20px}}]] {{ll|Developer hub|Developers}}</li> | ||
<li {{#if:{{{trans|}}}|class="hub-highlighted"}}>[[File:OOjs UI icon language-ltr.svg|20px]] {{ll|Translator hub| | <li {{#if:{{{trans|}}}|class="hub-highlighted"}}>[[File:OOjs UI icon language-ltr.svg|{{#if:{{{trans|}}}|30px|20px}}]] {{ll|Translator hub|Translators}}</li> | ||
</ul> | </ul> | ||
<noinclude> | | #default= | ||
{{#invoke:Template translation{{\sandbox}}|renderTranslatedTemplate|template=Template:Hubs|noshift=1}} | |||
}}<noinclude> | |||
{{Documentation|content= | {{Documentation|content= | ||
==Usage== | |||
The template can be centered or right aligned by passing in the alignment as its first parameter. | |||
If the page containing the template belongs to a specific area of documentation (i.e. user, administrator, developer or translator), an additional parameter can also be set which makes bold and enlarges the corresponding icon(s). | |||
<pre><nowiki> | <pre><nowiki> | ||
Line 26: | Line 26: | ||
</nowiki></pre> | </nowiki></pre> | ||
===Examples=== | |||
===Examples=== | |||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr> | <tr> | ||
<td>'''<nowiki>{{hubs|center}}</nowiki>'''</td> | <td>'''<nowiki>{{hubs|center}}</nowiki>'''</td> | ||
<td>{{hubs|center}}</td> | <td>{{hubs{{\sandbox}}|center}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>'''<nowiki>{{hubs|right}}</nowiki>'''</td> | <td>'''<nowiki>{{hubs|right}}</nowiki>'''</td> | ||
<td>{{hubs|right}}</td> | <td>{{hubs{{\sandbox}}|right}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>'''<nowiki>{{hubs|user=true}}</nowiki>'''</td> | <td>'''<nowiki>{{hubs|user=true}}</nowiki>'''</td> | ||
<td>{{hubs|user=true}}</td> | <td>{{hubs{{\sandbox}}|user=true}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>'''<nowiki>{{hubs|admin=true|dev=true}}</nowiki>'''</td> | <td>'''<nowiki>{{hubs|admin=true|dev=true}}</nowiki>'''</td> | ||
<td>{{hubs|admin=true|dev=true}}</td> | <td>{{hubs{{\sandbox}}|admin=true|dev=true}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>'''<nowiki>{{hubs|right|dev=true}}</nowiki>'''</td> | <td>'''<nowiki>{{hubs|right|dev=true}}</nowiki>'''</td> | ||
<td>{{hubs|right|dev=true}}</td> | <td>{{hubs{{\sandbox}}|right|dev=true}}</td> | ||
</tr> | </tr> | ||
</table> | </table> |