Template:Box-header: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Yandere-sliver
mNo edit summary
>Yandere-sliver
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="clear: both; <!--
<div style="clear: both; <!--
        -->border: {{{border-type|solid}}} {{{titleborder|var(--theme-border-color)}}}; <!--
  -->border: {{{border-type|solid}}} {{{titleborder|var(--theme-border-color)}}}; <!--
        -->border-width: {{{border-top|{{{border-width|1}}}}}}px {{{border-width|1}}}px 0; <!--
  -->border-width: {{{border-top|{{{border-width|1}}}}}}px {{{border-width|1}}}px 0; <!--
        -->background: {{{titlebackground|var(--theme-accent-color)}}};<!--
  -->background: {{{titlebackground|var(--theme-accent-color)}}};<!--
        -->color: {{{titleforeground|var(--theme-page-text-color)}}};<!--
  -->color: {{{titleforeground|var(--theme-page-text-color)}}};<!--
        -->padding: {{{padding|.1em}}};<!--
  -->padding: {{{padding|.1em}}};<!--
        -->padding-top: {{{padding-top|.1em}}};<!--
  -->padding-top: {{{padding-top|.1em}}};<!--
        -->padding-left: {{{padding-left|.1em}}};<!--
  -->padding-left: {{{padding-left|.1em}}};<!--
        -->padding-right: {{{padding-right|.1em}}};<!--
  -->padding-right: {{{padding-right|.1em}}};<!--
        -->padding-bottom: {{{padding-bottom|.1em}}};<!--
  -->padding-bottom: {{{padding-bottom|.1em}}};<!--
        -->text-align: {{{title-align|center}}};<!--
  -->text-align: {{{title-align|center}}};<!--
        -->font-family: {{{font-family|sans-serif}}};<!--
  -->font-family: {{{font-family|sans-serif}}};<!--
        -->font-size:{{{titlefont-size|100%}}};<!--
  -->font-size:{{{titlefont-size|100%}}};<!--
        -->margin-bottom: 0px;<!--
  -->margin-bottom: 0px;<!--
        -->">{{#if: {{{EDITLINK|}}} ||
  -->"><!--
<div class="plainlinks" <!--
-->{{#if: {{{EDITLINK|}}}||<div class="plainlinks" style="<!--
   -->style="float:right;<!--
   -->float:right;<!--
        -->margin-bottom:.1em;<!--
  -->margin-bottom:.1em;<!--
        -->font-size:{{{font-size|80%}}};<!--
  -->font-size:{{{font-size|80%}}};<!--
        --> color: {{{titleforeground|var(--theme-page-text-color)}}}">{{
  -->color: {{{titleforeground|var(--theme-page-text-color)}}}"><!--
#if: {{{noedit|1}}} || [{{fullurl:{{{editpage|{{FULLPAGENAME}}}}}|action=edit{{#if: {{{section|}}} |&section={{{section}}}}}}} <span style="color: {{{titleforeground|var(--theme-page-text-color)}}}">edit</span>]&nbsp;}}{{#if: {{{viewpage|}}} |'''·'''&nbsp;[[:{{{viewpage}}}|<span style="color:{{{titleforeground|var(--theme-page-text-color)}}};">view</span>]]&nbsp;}}{{{top|}}}&nbsp;
  -->{{#if: {{{noedit|1}}} || <!--
</div>}}<!-- endif EDITLINK
    -->[{{fullurl:{{{editpage|{{FULLPAGENAME}}}}}|action=edit{{#if: {{{section|}}} |&section={{{section}}} }}<!--
-->{{#if: {{{SPAN|}}} |<span style="font-family:{{{title-font-family|sans-serif}}}; font-size:{{{title-font-size|100%}}}; font-weight:{{{title-font-weight|bold}}}; margin: 0; padding:0; padding-bottom:.1em; color:{{{titleforeground|var(--theme-page-text-color)}}};{{{extra|}}}">{{{title}}}</span>|<h2 style="font-family:{{{title-font-family|sans-serif}}}; font-size:{{{title-font-size|100%}}}; font-weight:{{{title-font-weight|bold}}}; border: none; margin: 0; padding:0; padding-bottom:.1em; color:{{{titleforeground|var(--theme-page-text-color)}}};{{{extra|}}}">{{{title}}}</h2>}}
  -->}}<!--
</div>
  --><span style="color: {{{titleforeground|var(--theme-page-text-color)}}}">edit</span>]&nbsp;}}<!--
<div style="border: {{{border-width|1}}}px solid {{{border|var(--theme-border-color)}}}; <!--
  -->{{#if: {{{viewpage|}}} |'''·'''&nbsp;[[:{{{viewpage}}}|<!--
        -->border-top-width: {{{border-top|1}}}px; <!--
  --><span style="color:{{{titleforeground|var(--theme-page-text-color)}}};">view</span>]]&nbsp;}}<!--
        -->vertical-align: top;<!--
  -->{{{top|}}}&nbsp;
        -->background: {{{background|var(--theme-page-background-color--secondary)}}};<!--
</div>}}<!--  
        -->opacity: {{{background-opacity|1}}};<!--
-->{{#if: {{{SPAN|}}} | <span style="<!--
        --> color: {{{foreground|var(--theme-page-text-color)}}}; <!--
  -->font-family:{{{title-font-family|sans-serif}}};<!--
        --> {{{bodystyle|}}}; <!--
  -->font-size:{{{title-font-size|100%}}};<!--
        -->text-align: {{{text-align|left}}};<!--
  -->font-weight:{{{title-font-weight|bold}}};<!--
        --> margin: 0 0 10px; <!--
  -->margin: 0; padding:0; padding-bottom:.1em; <!--
        -->padding: {{{padding|1em}}};<!--
  -->color:{{{titleforeground|var(--theme-page-text-color)}}};<!--
        -->padding-top: {{{padding-top|.3em;}}}"><!--
  -->{{{extra|}}}">{{{title}}}<!--
-->{{#if: {{{TOC|}}} | |__NOTOC__}}{{#if: {{{EDIT|}}} | |__NOEDITSECTION__}}<noinclude>
--></span>|<h2 style="<!--
  -->font-family:{{{title-font-family|sans-serif}}};<!--
  -->font-size:{{{title-font-size|100%}}};<!--
  -->font-weight:{{{title-font-weight|bold}}};<!--
  -->border: none; margin: 0; padding:0; padding-bottom:.1em;<!--
  -->color:{{{titleforeground|var(--theme-page-text-color)}}};<!--
  -->{{{extra|}}}">&nbsp;{{{title}}}<!--
--></h2>}}<!--
--></div><div style="<!--
  -->border: {{{border-width|1}}}px solid {{{border|var(--theme-border-color)}}};<!--
  -->border-top-width: {{{border-top|1}}}px;<!--
  -->vertical-align: top;<!--
  -->background: {{{background|var(--theme-page-background-color--secondary)}}};<!--
  -->opacity: {{{background-opacity|1}}};<!--
  -->color: {{{foreground|var(--theme-page-text-color)}}};<!--
  -->{{{bodystyle|}}}; <!--
  -->text-align: {{{text-align|left}}};<!--
  -->margin: 0 0 10px;<!--
  -->padding: {{{padding|1em}}};<!--
  -->padding-top: {{{padding-top|.3em;}}}"><!--
-->{{#if: {{{TOC|}}} | |__NOTOC__}}<!--
-->{{#if: {{{EDIT|}}} | |__NOEDITSECTION__}}<noinclude>
{{Box-footer}}
{{Box-footer}}
<!-- PLEASE PUT CATEGORIES AND INTERWIKI LINKS ON THE DOCUMENTATION PAGE. THANK YOU. -->
<!-- PLEASE PUT CATEGORIES AND INTERWIKI LINKS ON THE DOCUMENTATION PAGE. THANK YOU. -->
{{Documentation}}  
{{Documentation}}  
</noinclude>
</noinclude>

Latest revision as of 18:02, 20 June 2021

 {{{title}}}

 Template Documentation[view | edit | history | purge]
This is a template documentation subpage for Template:Box-header.
It contains usage information, categories, interlanguage links and other content that is not part of the original template page.


This template and its documentation are copied from Wikipedia. Some links within this documentation will be broken and should not be fixed.

Usage

A template standardizing the portal templates and for other purposes. If used for other purposes, note that if the TOC and EDIT parameters are missing or not set to yes, the table of contents and all section editing will be suppressed.

Syntax

The template is not a stand-alone template and so once the box header is typed or pasted the template Box-footer must immediately follow it.

This example assumes that you have a separate page containing the content, and transclude it onto the page.

{{Box-header
| title=
| editpage=  <!-- This data must be the same  -->
| titleforeground=
| titlebackground=
| background=
| viewpage= <!-- This data must be the same  -->
}}

{{ <!-- This data must be the same --> }}

{{Box-footer | text }}

This example assumes that the content is entered between the header and footer. Notice that viewpage is not in there. It will not work because it links to the page you are on, and therefore Wikipedia does not link it.

{{Box-header
| title=
| editpage=  <!-- This field must be the same as the name of the page it is on. -->
| titleforeground=
| titlebackground=
| background=
}}

Box Content

{{Box-footer | text }}

Sample

{{Box-header
| title= The Quotes of Quotes
| editpage= Box-header/sample
| titleforeground= white
| titlebackground= red
| background= white
}}

{{Box-header/sample}}

{{Box-footer| [[William Shakespeare|more...]] }}

 The Quotes of Quotes

Primary parameters

  • editpage – by default, the "edit" link applies to the page named Template:Box-header/. Use this parameter to specify a different page to edit. This will normally be the page where the {{box-header}} is used.
  • noedit – by default, an "edit" link is shown towards the right-hand side. Specify |noedit=yes (or any non-blank value) to hide this. The "edit" link is also hidden if |EDITLINK= is non-blank.
  • section – by default, the "edit" link applies to the whole page. Use this parameter to specify the number of a specific section, e.g. |section=2
  • title – the title of the box, for example |title=Portals
  • top – extra text to display after the "edit" and "view" links. Hidden if |EDITLINK= is non-blank.
  • viewpage – if non-blank, this should be a valid Wikipedia page name, it creates a "view" link after the "edit" link. Hidden if |EDITLINK= is non-blank.

Behaviour options

  • EDIT – by default, all section edit links are suppressed. Set |EDIT=yes (or any non-blank value) to override this.
  • EDITLINK – set |EDITLINK=no (or any non-blank value) to hide the "edit" and "view" links, and the text after those
  • SPAN – by default, the box title is enclosed in <h2>...</h2> tags. Set |SPAN=yes (or any non-blank value) to use <span>...</span> tags instead.
  • TOC – by default, the table of contents is suppressed. Set |TOC=yes (or any non-blank value) to override this.

Styling options

  • background
  • background-opacity
  • border
  • border-top
  • border-type
  • border-width
  • extra
  • font-family
  • font-size
  • foreground
  • padding
  • padding-top
  • padding-left
  • padding-right
  • padding-bottom
  • text-align
  • title-align
  • titlebackground
  • titleborder
  • title-font-family
  • title-font-size
  • titlefont-size
  • title-font-weight
  • titleforeground

These are all used to set CSS styling properties, in many cases the property of the same name – for instance, |background= is used to set the 'background' property.

See also

Box-footer

Box-header color palettes

The following box-headers are examples of HSV color palettes arranged by hue. They can be copied to your portal's /box-header subpage.

Template:Center

H0

Template:Box-header/1 Template:Box-header/1

Template:Box-header/2 Template:Box-header/2

Template:Box-header/3 Template:Box-header/3

H30

Template:Box-header/4 Template:Box-header/4

Template:Box-header/5 Template:Box-header/5

Template:Box-header/6 Template:Box-header/6

H60

Template:Center

Template:Box-header/7 Template:Box-header/7

Template:Box-header/8 Template:Box-header/8

Template:Box-header/9 Template:Box-header/9

H60

Template:Box-header/10 Template:Box-header/10

Template:Box-header/11 Template:Box-header/11

Template:Box-header/12 Template:Box-header/12

H90

Template:Box-header/13 Template:Box-header/13

Template:Box-header/14 Template:Box-header/14

Template:Box-header/15 Template:Box-header/15

H120

Template:Box-header/16 Template:Box-header/16

Template:Box-header/17 Template:Box-header/17

Template:Box-header/18 Template:Box-header/18

H150

Template:Box-header/19 Template:Box-header/19

Template:Box-header/20 Template:Box-header/20

Template:Box-header/21 Template:Box-header/21

H180

Template:Box-header/22 Template:Box-header/22

Template:Box-header/23 Template:Box-header/23

Template:Box-header/24 Template:Box-header/24

H210

Template:Box-header/25 Template:Box-header/25

Template:Box-header/26 Template:Box-header/26

Template:Box-header/27 Template:Box-header/27

H240

Template:Box-header/28 Template:Box-header/28

Template:Box-header/29 Template:Box-header/29

Template:Box-header/30 Template:Box-header/30

H270

Template:Box-header/31 Template:Box-header/31

Template:Box-header/32 Template:Box-header/32

Template:Box-header/33 Template:Box-header/33

H300

Template:Box-header/34 Template:Box-header/34

Template:Box-header/35 Template:Box-header/35

Template:Box-header/36 Template:Box-header/36

H330

Template:Box-header/37 Template:Box-header/37

Template:Box-header/38 Template:Box-header/38

Template:Box-header/39 Template:Box-header/39

H0 S0

Template:Center

Template:Box-header/40 Template:Box-header/40

Template:Box-header/41 Template:Box-header/41

Template:Box-header/42 Template:Box-header/42

Template:TemplateDataHeader

No description.

Template parameters

ParameterDescriptionTypeStatus
Border-typeborder-type

no description

Unknownoptional
Titlebordertitleborder

no description

Unknownoptional
Borderborder

no description

Unknownoptional
Border-topborder-top

no description

Unknownoptional
Border-widthborder-width

no description

Unknownoptional
Titlebackgroundtitlebackground

no description

Unknownoptional
Titleforegroundtitleforeground

no description

Unknownoptional
Paddingpadding

no description

Unknownoptional
Padding-toppadding-top

no description

Unknownoptional
Padding-leftpadding-left

no description

Unknownoptional
Padding-rightpadding-right

no description

Unknownoptional
Padding-bottompadding-bottom

no description

Unknownoptional
Title-aligntitle-align

no description

Unknownoptional
Font-familyfont-family

no description

Unknownoptional
Titlefont-sizetitlefont-size

no description

Unknownoptional
EDITLINKEDITLINK

no description

Unknownoptional
Font-sizefont-size

no description

Unknownoptional
Noeditnoedit

no description

Unknownoptional
Editpageeditpage

no description

Unknownoptional
Sectionsection

no description

Unknownoptional
Viewpageviewpage

no description

Unknownoptional
Toptop

no description

Unknownoptional
SPANSPAN

no description

Unknownoptional
Title-font-familytitle-font-family

no description

Unknownoptional
Title-font-sizetitle-font-size

no description

Unknownoptional
Title-font-weighttitle-font-weight

no description

Unknownoptional
Extraextra

no description

Unknownoptional
Titletitle

no description

Unknownrequired
Backgroundbackground

no description

Unknownoptional
Background-opacitybackground-opacity

no description

Unknownoptional
Foregroundforeground

no description

Unknownoptional
Text-aligntext-align

no description

Unknownoptional
TOCTOC

no description

Unknownoptional
EDITEDIT

no description

Unknownoptional

See also

Template:Portal template list

The above documentation is transcluded from Template:Box-header/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories and interwikis to the /doc subpage. Subpages of this template.