模板:Box-header
{{{title}}}
用途
A template standardizing the portal templates and for other purposes.
語法
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 }}
範例
{{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-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.
Border: Hn/S15/V75 • Background: Hn/S4/V100 • Header 1: Hn/S40/V85 • Header 2: Hn/S15/V95 • Header 3: Hn/S10/V100
H0
{{Box-header{{{watch|}}} | title={{{1}}} |editpage={{{2}}} |border=#BFA3A3 <!-- 邊框的顏色 --> |titleforeground=black <!-- 標題字的顏色 --> |titlebackground=#F2CECE <!-- 標題背景的顏色 --> |background=#FFF5F5 <!-- 內文背景的顏色 --> |foreground=black}} <!-- 內文字的顏色 --> {{Box-footer|{{{1|}}}}}
沒有描述。
參數 | 描述 | 類型 | 狀態 | |
---|---|---|---|---|
Border-type | border-type | 沒有描述 | 不明 | 非必填 |
Titleborder | titleborder | 沒有描述 | 不明 | 非必填 |
Border | border | 沒有描述 | 不明 | 非必填 |
Border-top | border-top | 沒有描述 | 不明 | 非必填 |
Border-width | border-width | 沒有描述 | 不明 | 非必填 |
Titlebackground | titlebackground | 沒有描述 | 不明 | 非必填 |
Titleforeground | titleforeground | 沒有描述 | 不明 | 非必填 |
Padding | padding | 沒有描述 | 不明 | 非必填 |
Padding-top | padding-top | 沒有描述 | 不明 | 非必填 |
Padding-left | padding-left | 沒有描述 | 不明 | 非必填 |
Padding-right | padding-right | 沒有描述 | 不明 | 非必填 |
Padding-bottom | padding-bottom | 沒有描述 | 不明 | 非必填 |
Title-align | title-align | 沒有描述 | 不明 | 非必填 |
Font-family | font-family | 沒有描述 | 不明 | 非必填 |
Titlefont-size | titlefont-size | 沒有描述 | 不明 | 非必填 |
EDITLINK | EDITLINK | 沒有描述 | 不明 | 非必填 |
Font-size | font-size | 沒有描述 | 不明 | 非必填 |
Noedit | noedit | 沒有描述 | 不明 | 非必填 |
Editpage | editpage | 沒有描述 | 不明 | 非必填 |
Section | section | 沒有描述 | 不明 | 非必填 |
Viewpage | viewpage | 沒有描述 | 不明 | 非必填 |
Top | top | 沒有描述 | 不明 | 非必填 |
SPAN | SPAN | 沒有描述 | 不明 | 非必填 |
Title-font-family | title-font-family | 沒有描述 | 不明 | 非必填 |
Title-font-size | title-font-size | 沒有描述 | 不明 | 非必填 |
Title-font-weight | title-font-weight | 沒有描述 | 不明 | 非必填 |
Extra | extra | 沒有描述 | 不明 | 非必填 |
Title | title | 沒有描述 | 不明 | 必填 |
Background | background | 沒有描述 | 不明 | 非必填 |
Background-opacity | background-opacity | 沒有描述 | 不明 | 非必填 |
Foreground | foreground | 沒有描述 | 不明 | 非必填 |
Text-align | text-align | 沒有描述 | 不明 | 非必填 |
TOC | TOC | 沒有描述 | 不明 | 非必填 |
EDIT | EDIT | 沒有描述 | 不明 | 非必填 |
See also
上述文檔嵌入自Template:Box-header/doc。 (編輯 | 歷史) 編者可以在本模板的沙盒 (創建 | 鏡像)和測試樣例 (創建)頁面進行實驗。 請在/doc子頁面中添加分類。 本模板的子頁面。 |