Template:Colored box: Difference between revisions
m (1 revision imported) |
No edit summary |
||
| Line 5: | Line 5: | ||
{{{style|}}} | {{{style|}}} | ||
"><templatestyles src="Colored box/style.css"/><!-- | "><templatestyles src="Colored box/style.css"/><!-- | ||
--><div class="mw-tpl-colorbox-title {{#if: {{{title-link|}}} | mw-tpl-colorbox-title--linked }}" style=" | -->{{#if: {{{title|}}} | <div class="mw-tpl-colorbox-title {{#if: {{{title-link|}}} | mw-tpl-colorbox-title--linked }}" style=" | ||
{{#if: {{{background-title-color|}}} | {{#if: {{{background-title-color|}}} | ||
| background-color: {{{background-title-color|#eaecf0}}}; | | background-color: {{{background-title-color|#eaecf0}}}; | ||
| Line 18: | Line 18: | ||
}} | }} | ||
}} | }} | ||
</div><!-- | </div>|}}<!-- | ||
--><div class="mw-tpl-colorbox-content"> | --><div class="mw-tpl-colorbox-content"> | ||
{{{content}}} | {{{content}}} | ||
Latest revision as of 21:44, 4 March 2024
{{{content}}}
Lua error: callParserFunction: function "#translation" was not found.
This template is for community pages
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| background-content-color | background-content-color | no description | Unknown | optional |
| extra classes | class | Extra CSS classes to apply to the outermost box (space-separated). This is mainly for other templates using TemplateStyles so that they can scope their CSS to the box, but it may be useful in other cases as well. | Line | optional |
| extra styles | style | Extra inline CSS rules to apply to the outermost element. Prefer TemplateStyles and using CSS classes if possible when using this template in another template. | Line | optional |
| background-title-color | background-title-color | no description | Unknown | optional |
| icon | icon | no description | File | optional |
| Title text | title | no description | String | required |
| Title link | title-link | Turn title area into a clickable link | Page name | optional |
| title-color | title-color | no description | String | optional |
| view-link | view-link link | Create a "view" corner link to a given page. | Page name | optional |
| view-extlink | view-extlink link2 | Create a "view" corner link to a external URL. This cannot be used together with "view-link". | URL | optional |
| view-text | view-text | Replace link text for "view-link" with something other than "view". | String | optional |
| link-color | link-color | no description | Unknown | optional |
| Content | content | no description | Content | required |
Examples
Example: Title
{{Colored box|title=TITLE|content=CONTENT}}
{{Colored box
|title=TITLE
|title-link=MediaWiki
|content=CONTENT
}}
CONTENT
CONTENT
Example: View link
{{Colored box|title=TITLE|view-link=MediaWiki|content=CONTENT}}
{{Colored box|title=TITLE|view-link=MediaWiki|view-text=HELLO|content=CONTENT}}
{{Colored box|title=TITLE|view-extlink=https://mediawiki.org|view-text=HELLO|content=CONTENT}}
CONTENT
CONTENT
CONTENT
Example: Everything
Icon, title link, custom view-link text
{{Colored box
|icon=OOjs_UI_icon_download-progressive.svg
|title=TITLE
|title-link=MediaWiki
|view-link=MediaWiki
|view-text=HELLO
|content=CONTENT
}}
See also
- This template was originally based on w:en:Template:Colored box.
