模板: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.

本示例假假您有一個包含內容的單獨頁面,並將其嵌入在頁面中。

{{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-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.

Border: Hn/S15/V75 • Background: Hn/S4/V100 • Header 1: Hn/S40/V85 • Header 2: Hn/S15/V95 • Header 3: Hn/S10/V100

H0

Template:Box-header/1

{{Box-header{{{watch|}}} | title={{{1}}} 
|editpage={{{2}}} 
|border=#BFA3A3            <!-- 邊框的顏色 -->
|titleforeground=black     <!-- 標題字的顏色 -->
|titlebackground=#F2CECE   <!-- 標題背景的顏色 -->
|background=#FFF5F5        <!-- 內文背景的顏色 -->
|foreground=black}}        <!-- 內文字的顏色 -->

{{Box-footer|{{{1|}}}}}

{{{1}}}

以下是該模板的模板資料,適用於視覺化編輯器等工具。

Box-header模板資料

沒有描述。

模板參數[編輯模板資料]

參數描述類型狀態
Border-typeborder-type

沒有描述

不明非必填
Titlebordertitleborder

沒有描述

不明非必填
Borderborder

沒有描述

不明非必填
Border-topborder-top

沒有描述

不明非必填
Border-widthborder-width

沒有描述

不明非必填
Titlebackgroundtitlebackground

沒有描述

不明非必填
Titleforegroundtitleforeground

沒有描述

不明非必填
Paddingpadding

沒有描述

不明非必填
Padding-toppadding-top

沒有描述

不明非必填
Padding-leftpadding-left

沒有描述

不明非必填
Padding-rightpadding-right

沒有描述

不明非必填
Padding-bottompadding-bottom

沒有描述

不明非必填
Title-aligntitle-align

沒有描述

不明非必填
Font-familyfont-family

沒有描述

不明非必填
Titlefont-sizetitlefont-size

沒有描述

不明非必填
EDITLINKEDITLINK

沒有描述

不明非必填
Font-sizefont-size

沒有描述

不明非必填
Noeditnoedit

沒有描述

不明非必填
Editpageeditpage

沒有描述

不明非必填
Sectionsection

沒有描述

不明非必填
Viewpageviewpage

沒有描述

不明非必填
Toptop

沒有描述

不明非必填
SPANSPAN

沒有描述

不明非必填
Title-font-familytitle-font-family

沒有描述

不明非必填
Title-font-sizetitle-font-size

沒有描述

不明非必填
Title-font-weighttitle-font-weight

沒有描述

不明非必填
Extraextra

沒有描述

不明非必填
Titletitle

沒有描述

不明必填
Backgroundbackground

沒有描述

不明非必填
Background-opacitybackground-opacity

沒有描述

不明非必填
Foregroundforeground

沒有描述

不明非必填
Text-aligntext-align

沒有描述

不明非必填
TOCTOC

沒有描述

不明非必填
EDITEDIT

沒有描述

不明非必填

See also

主題內容模板

主題頁面格式模板

設置連結的模板

所選頁面模板,用於較舊門戶的子頁面

相關模板