Template:Box3/sandbox

From Cannabis
Jump to navigation Jump to search

Top[edit source]

Changes made in Template:box3 show up right away here when this sandbox page is reloaded, or with a null edit. That is where the page is opened for editing, nothing is changed, and the page is saved anyway.

View this page on a desktop PC and in a cell phone. Viewed on a cell phone the padding is different inside the colored boxes.

The order of the parameters does not matter:

{{Box3
| text=
| link=
| color=
| background=
|}
  • "text" is the text seen by the reader.
  • "link" is the URL under the text link.
  • "color" is the color of the border.
  • "background" is background color.

Bolding[edit source]

Return to top.

Bolding can be added later to text and links wrapped within this template.

'''{{box3|text=Portugal}}'''

Portugal

'''{{box3|link=Portugal}}'''

Portugal

'''{{box3|link=Portugal|color=blue}}'''

Portugal

Background color and border color[edit source]

Return to top.

Default background color is yellow. Default border color is red. Both can be changed:

{{box3|link=Portugal}}

Portugal

{{box3|link=Portugal|background=honeydew}}

Portugal

{{box3|link=Portugal|color=lime|background=honeydew}}

Portugal

Some more background colors: peachpuff, palegreen, lightcyan.
Portugal Portugal Portugal

Wikipedia: Web colors. Named colors and hex colors work. Capitalization does not matter in named colors. Put # in front of hex colors. Spaces must be removed from hex numbers. The 3-digit shorthand versions of hex colors work too.

Border color:
Portugal Red (default).
Portugal Lime.
Portugal Green.
Portugal Blue.
Portugal Fuchsia.

Padding within the template is different on a cell phone versus on a desktop PC. So the above overlap is unavoidable in order to avoid worse problems when viewed on a cell phone.

Info[edit source]

Return to top.

See these discussions:

For Firefox-only wrapping problem see these discussions:

"border-radius" in the template code determines how rounded the corners are.

Note: Nothing below is in tables in order to avoid the table CSS from overriding padding and other settings in Template:Box3.

Text only, no links[edit source]

Return to top.

{{box3|text=Portugal}}

PortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugalPortugal

Linked text[edit source]

Return to top.

{{box3|link=Portugal}}

Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal

With link, and blue border[edit source]

Return to top.

{{box3|link=Portugal|color=blue}}

Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal

With link, blue border, background color[edit source]

Return to top.

{{box3|link=Portugal|color=blue|background=peachpuff}}

Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal Portugal

Border color[edit source]

Return to top.

{{box3|link=Portugal|color=green}} Portugal

{{box3|link=[[Portugal]]|color=green}} Portugal

No border or yellow[edit source]

Return to top.

{{box3|link=Portugal|color=}} Portugal

{{box3|link=Portugal|color= }} Portugal

{{box3|link=Portugal|color=-}} Portugal

{{box3|link=Portugal|color=transparent}} Portugal

{{box3|link=Portugal|color=yellow}} Portugal

Links. Various formats[edit source]

Return to top.

[[Portugal]]

Portugal

[[wikipedia:Portugal]]

wikipedia:Portugal

http://en.wikipedia.org/wiki/Portugal

http://en.wikipedia.org/wiki/Portugal

[http://en.wikipedia.org/wiki/Portugal]

[1]

No brackets. See last entry. Categories do not work[edit source]

Return to top.

{{Box3}}

{{box3|}}

{{box3||}}

{{box3|link=Portugal}} - "Portugal" linked. Portugal

{{box3|text=Portugal}} - "Portugal" unlinked. Portugal

Interwiki link plus label:
{{box3|link=wikipedia:Portugal|text=Portugal}} Portugal

External link plus label:
{{box3|link=http://en.wikipedia.org/wiki/Portugal|text=Portugal}} Portugal

External link as linked bare URL:
{{box3|link=http://en.wikipedia.org/wiki/Portugal|text=http://en.wikipedia.org/wiki/Portugal}} http://en.wikipedia.org/wiki/Portugal

Unlinked black bold text:
{{box3|text=$4,753}} $4,753

{{box3|link=Category:Flat list of templates|text=Flat list of templates}}

{{box3|link=:Category:Flat list of templates|text=Flat list of templates}} [[

Category:Flat list of templates | Flat list of templates]]

Brackets. Note last entry. Categories do not work[edit source]

Return to top.

{{box3|link=[[Portugal]]}} Portugal

{{box3|link=[[wikipedia:Portugal]]|text=Portugal}} Portugal

{{box3|link=[http://en.wikipedia.org/wiki/Portugal]|text=Portugal}} Portugal

{{box3|link=[[:Category:Flat list of templates]]|text=Flat list of templates}} [[

Category:Flat list of templates | Flat list of templates]]

Full bare URL by itself[edit source]

Return to top.

{{box3|link=http://en.wikipedia.org/wiki/Portugal}} [2]

{{box3|text=http://en.wikipedia.org/wiki/Portugal}} http://en.wikipedia.org/wiki/Portugal

Use text parameter (text=) with categories as internal links[edit source]

Return to top.

'''{{box3|text=[[:Category:Flat list of templates|<span style=color:blue;>Flat list of templates</span>]]}}'''

Flat list of templates

Use text parameter (text=) with complex mix of plain text and external links[edit source]

Return to top.

{{box3|text='''[http://cannabis.shoutwiki.com/wiki/Cities <span style=color:blue;>Cities</span>]''' and '''[http://cannabis.shoutwiki.com/wiki/Nations <span style=color:blue;>nations</span>]''' holding '''[http://cannabis.shoutwiki.com/wiki/420 <span style=color:blue;>4/20 events</span>]''' are also included in the maps and lists for later years.}}

Cities and nations holding 4/20 events are also included in the maps and lists for later years.

Using text parameter (text=) also works with complex mix of plain text and internal links[edit source]

Return to top.

{{box3|text='''[[Cities|<span style=color:blue;>Cities</span>]]''' and '''[[nations|<span style=color:blue;>nations</span>]]''' holding '''[[420 event lists|<span style=color:blue;>4/20 events</span>]]''' are also included in the maps and lists for later years.}}

Cities and nations holding 4/20 events are also included in the maps and lists for later years.

It will not work if you try to add the wikitext for bolding (''') around all of a complex mix. Bolding has to be added to the parts within.