Template:Userbox: Difference between revisions

From PZwiki
m (add maintenance notice, will update it later)
(new layout)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Maintenance}}
{{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
| border-color =
| border-width =
| logo =  
| logo =  
| logo-width =
| logo-height =
| logo-color =  
| logo-color =  
| logo-background =
| logo-size =
| logo-padding =
| info =  
| info =  
| info-color =  
| info-color =  
| info-background =
| info-size =
| info-padding =
| cat =  
| cat =  
}}
}}
Line 29: Line 20:


===Parameters===
===Parameters===
;<code>border-color</code>
;<code>logo</code> {{sup|required}}
:border color, default to {{Abbr|#000000|black}}.
:logo image and/or text.
;<code>border-width</code>
:border width, default to 1px.
;<code>logo</code>
:logo image and/or text, default to ''logo'' text.
;<code>logo-width</code>
:logo box width, default to 60px.
;<code>logo-height</code>
:logo box height, default to 60px.
:Images should normally be scaled to 60px or less.
;<code>logo-color</code>
;<code>logo-color</code>
:logo font color, default to {{Abbr|#000000|black}}.
:logo background color.
;<code>logo-background</code>
;<code>info</code> {{sup|required}}
:logo background color, default to {{Abbr|#ffffff|white}}.
:info text.
;<code>logo-size</code>
:logo text size, default to 14pt.
;<code>logo-padding</code>
:logo cell padding, default to 1px.
;<code>info</code>
:info text and/or image, default to ''info'' text.
;<code>info-color</code>
;<code>info-color</code>
:info font color, default to {{Abbr|#000000|black}}.
:info background color.
;<code>info-background</code>
:info background color, default to #f6f6f6.
;<code>info-size</code>
:info text size, default to 8pt.
;<code>info-padding</code>
:info padding, default to 4px.
;<code>cat</code>
;<code>cat</code>
:user category, default to ''empty''.
:user category, omit "Category:" prefix.


==Examples==
==Examples==
*{{tll|Userbox}}
{{Userbox}}
{{Userbox}}
*{{tll|Userbox}} will produce as shown right.
*{{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>{| style="clear: right; float: right; border: {{{border-width|1px}}} solid {{{border-color|#000000}}}; margin-left: .5em; margin-bottom: 2px; width: 250px; background: {{{info-background|#f6f6f6}}}; vertical-align: middle;" cellspacing=0
</noinclude><includeonly><div class="userbox" style="max-width: 320px;">{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}}
! style="width: {{{logo-width|60px}}}; height: {{{logo-height|60px}}}; background: {{{logo-background|#ffffff}}}; text-align: center; font-size: {{{logo-size|14pt}}}; color: {{{logo-color|black}}}; padding: {{{logo-padding|1px}}};" | {{{logo|logo}}}
  <div {{#if:{{{logo-color|}}}|style="background-color: {{{logo-color}}};"}}>{{{logo}}}</div>
| style="font-size: {{{info-size|8pt}}}; padding: {{{info-padding|4px}}}; color: {{{info-color|black}}};" | {{{info|''info''}}}
  <div {{#if:{{{info-color|}}}|style="background-color: {{{info-color}}};"}}>{{{info}}}</div>
|}{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}}</includeonly>
</div></includeonly>

Revision as of 10:22, 10 January 2024

Hammer.png
This template is currently under construction.
It is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
If this page has not been updated in a while, please replace this notice with {{Improve}}. Last edit was 10/01/2024.
Notebook.pngTemplate Documentation

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

{{{logo}}}
{{{info}}}
SpiffoWave.png
Spiffo welcomes you to the wiki!

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:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. 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.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.