Template:Userbox: Difference between revisions
m (add maintenance notice, will update it later) |
(new layout) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{ | {{wip}} | ||
{{Documentation/sandbox|doc = | {{Documentation/sandbox|doc = | ||
This template can be used to quickly create a [[wikipedia:Wikipedia:Userboxes|userbox]] for display on a user's [[wikipedia:Wikipedia:User pages|user page]] without having to know HTML or Wikitable syntax. | This template can be used to quickly create a [[wikipedia:Wikipedia:Userboxes|userbox]] for display on a user's [[wikipedia:Wikipedia:User pages|user page]] without having to know HTML or Wikitable syntax. | ||
Line 7: | Line 7: | ||
This template is used to create a new userbox. If you want to add an existing userbox to your user page, please check templates in {{ll|PZwiki:Userboxes}}. | This template is used to create a new userbox. If you want to add an existing userbox to your user page, please check templates in {{ll|PZwiki:Userboxes}}. | ||
===Syntax=== | |||
Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here: | Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here: | ||
<pre> | <pre> | ||
{{Userbox | {{Userbox | ||
| logo = | | logo = | ||
| logo-color = | | logo-color = | ||
| info = | | info = | ||
| info-color = | | info-color = | ||
| cat = | | cat = | ||
}} | }} | ||
Line 29: | Line 20: | ||
===Parameters=== | ===Parameters=== | ||
;<code> | ;<code>logo</code> {{sup|required}} | ||
:logo image and/or text. | |||
:logo image and/or text | |||
;<code>logo-color</code> | ;<code>logo-color</code> | ||
:logo | :logo background color. | ||
;<code> | ;<code>info</code> {{sup|required}} | ||
:info text. | |||
: | |||
;<code>info-color</code> | ;<code>info-color</code> | ||
:info background color. | |||
:info background color | |||
;<code>cat</code> | ;<code>cat</code> | ||
:user category, | :user category, omit "Category:" prefix. | ||
==Examples== | ==Examples== | ||
*{{tll|Userbox}} | |||
{{Userbox}} | {{Userbox}} | ||
*{{tll|Userbox}} | *{{tll|Userbox|logo=[[File:SpiffoWave.png|link=]]|info=Spiffo welcomes you to the wiki!}} | ||
{{Userbox|logo=[[File:SpiffoWave.png|link=]]|info=Spiffo welcomes you to the wiki!}} | |||
{{Translation guide}} | {{Translation guide}} | ||
Line 72: | Line 44: | ||
{{ll|Category:Userbox}} | {{ll|Category:Userbox}} | ||
{{ll|Category:Metatemplates}} | {{ll|Category:Metatemplates}} | ||
</noinclude><includeonly> | </noinclude><includeonly><div class="userbox" style="max-width: 320px;">{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}} | ||
<div {{#if:{{{logo-color|}}}|style="background-color: {{{logo-color}}};"}}>{{{logo}}}</div> | |||
<div {{#if:{{{info-color|}}}|style="background-color: {{{info-color}}};"}}>{{{info}}}</div> | |||
</div></includeonly> |
Revision as of 10:22, 10 January 2024
{{Improve}}
. Last edit was 10/01/2024.This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.
Usage
This template is used to create a new userbox. If you want to add an existing userbox to your user page, please check templates in PZwiki:Userboxes.
Syntax
Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here:
{{Userbox | logo = | logo-color = | info = | info-color = | cat = }}
Parameters
logo
Required- logo image and/or text.
logo-color
- logo background color.
info
Required- info text.
info-color
- info background color.
cat
- user category, omit "Category:" prefix.
Examples
{{Userbox}}
{{Userbox}}
How to translate
This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:
- Create a subpage of this template with the language code of the language you want to translate to.
- Copy the code wrapped in the
<noinclude>
tag in this template into the page you created.{{Translation guide}}
template should be removed from the translated documentation.
- Translate the page according to the translation requirements of normal pages.