Template:Box-header
{{{title}}}
|  | 此模板使用Lua语言: | 
用途
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.
本示例假假您有一个包含内容的单独页面,并将其嵌入在页面中。
{{Box-header
| title= 
| editpage=  <!-- 这些数据必须相同  -->
| titleforeground=
| titlebackground=
| background=
| viewpage= <!-- 这些数据必须相同  -->
}}
{{ <!-- 这些数据必须相同 --> }}
{{Box-footer | text }}
本示例假设内容是在Box-header和Box-footer之间输入的。请注意,viewpage不在其中。由于它链接到您所在的页面,所以它不会起作用,因此维基百科不会链接它。
{{Box-header
| title= 
| editpage=  <!-- 此字段必须与其所在页的名称相同。 -->
| 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
Doubt thou the stars are fire. Doubt that the sun doth move. Doubt truth to be a liar. But never doubt my love.
你可以懷疑星星是否為火焰;你可以懷疑太陽是否會移動;你可以懷疑真理是否謊言;但絕對不要懷疑我的愛。
主要参数
- editpage – 默认情况下,“编辑”链接将应用于名为Template:Box-header/的页面。使用此参数可以指定编辑的其他页面。This will normally be the page where the {{Box-header}}is used.
- noedit – 默认情况下,“编辑”链接显示在右侧。设定|noedit=yes(或任何不为空的值)以隐藏链接。如果|EDITLINK=非空值,则“编辑”链接也将被隐藏。
- section – 默认情况下,“编辑”链接将应用于整个页面。使用此参数可以指定特定段落的编号,例如|section=2。
- title – 框的标题,例如|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|}}}}}
{{{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
主題内容模板
- {{Box portal skeleton}}—用於創建專題頁面的主頁面。
- 在主题首页展示“精选内容”
- {{Transclude list item excerpts as random slideshow}}—transcludes excerpts from recognized content lists, which are populated by a bot.
- {{Transclude random subpage}}—transcludes random portal subpage.
- {{Random portal component}}—transcludes random portal subpage.
- {{Random portal component with nominate}}—Used on the portal main page to randomly display articles from the portal sub-pages, adding the option to nominate other Featured foo articles.
- {{Random subpage}}—transcludes random portal subpages.
- {{Portal pictures}}—transcludes a slideshow of pictures, utilizing a single-page gallery.
 
- To organize "selected content" on subpages
- {{Subpage}}—Used to output a box containing a link to subpage.
- {{Numbered subpages}}—outputs an automatic index, transcluding numbered subpages.
- {{Portal subpage}}—outputs a box linking to and transcluding a single subpage.
- {{Portal subpage inline}}—outputs an unordered list item linking to and transcluding a single subpage.
 
主題頁面格式模板
- {{Box-header}}
- {{Box-header-plain}}
- {{Box-header-round}}
- {{Box-header-square}}
- {{Box-header-watch}}
- {{Box-footer}}
設置連結的模板
- {{Portal}}
- {{Portal bar}}
- {{Portal-inline}}
- {{Portals}}
- {{Portal-image}}
- {{Portals browsebar}}
- {{Related portals}}
- {{Related portals2}}
- {{Wikimedia for portals}}
所選頁面模板,用於較舊門戶的子頁面
- {{Selected article}}
- {{Selected biography}}
- {{Selected business}}
- {{Selected DYK}}
- {{Selected ingredient}}
- {{Selected location}}
- {{Selected picture}}
- {{Selected product}}
- {{Selected publication}}
- {{Selected quote}}
- {{Selected recipe}}
- {{Selected X}}
相關模板
- {{Project template list}}
- {{Random box-header subpage}}—randomized selection from {{Box-header/1}} to {{Box-header/42}}.
 
	

