Bản mẫu:Element cell-compact/doc

Bách khoa toàn thư mở Wikipedia

Cách sử dụng[sửa mã nguồn]

The template produces format and content for a compact cell (to be used in a periodic table, navbox style). It is part of a series. Đã sử dụng trong:

Element cell templates
cell cell-compact cell-named cell-large cell property cell image cell-asterisk cell AQ
không có bài viết
cell-1
không có bài viết
80
Hg
Hg
Mer­cury80Hg20059
mercury
  • 20059
  • 200592(3)
Hg200592(3)
Hình: mercury
Hg
80
2 asterisks
80
Hg
Hg
Used in wikitable pattern: {| |- | {{element cell-abc|80|Hg}} |}
All cell templates produce a table cell output in pattern:
style="background:#12abdf; {{{style|}}};" | [[Gold]]
Note that there is the pipe symbol (|) in the middle, separating cell style and cell content.
{{element cell
|
|
|
|
|
|
|
| link=
| border=
| bg=
| style=
| title=
| legend=
}}
{{element cell
| 1= Atomic number
| 2= Element name (and default page link; see also 'link=' parameter)
| 3= Symbol
| 4= (not used)
| 5= State of matter (sets font color)
| 6= Metal–nonmetal category name (sets background color, see also bg=)
| 7= Occurrence (sets cell border style)
| link= Wikipedia page (links 2 different, like [[thủy ngân]])
| border= Sets border style (overrides 7. Like: border=3px solid red)
| bg= Background color (overrides 6; can look like bg=#aabbcc)
| style= Adds or overrides style settings (do not add the "" quotes)
| title= Mousehover text (overrides title composed from 2: 6; 5; 7)
| legend= Legend text in title (overrides text part that was composed from 6; 5; 7)
}}
Xem thêm: {{element cell-large/legend}} · {{Element color}} · Danh sách các ô nguyên tố

Các tham số[sửa mã nguồn]

Tất cả các tham số là tùy chọn.

{{element cell
| 1= số nguyên tử
| 2= tên nguyên tố
| 3= ký hiệu
| 4= (không sử dụng)
| 5= (trạng thái vật chất, không sử dụng)
| 6= tên phân loại kim loại–phi kim (thiết lập màu nền)
| 7= occurrence (không sử dụng)
| link= trang wikipedia (ghi đè 2; tạo một liên kết wikilink [[Thủy ngân]])
| bg= màu nền (ghi đè 6; có thể nhìn giống như bg=#aabbcc)
| border= (không sử dụng)
| style= thêm hoặc ghi đè kiểu thiết lập (không thêm dấu ngoặc kép "")
| title= (văn bản mousehoover, ghi đè tựa đề thành phần từ 2: 1; 6)
| legend= văn bản chú giải trong tựa đề (ghi đè phần văn bản thành phần từ 1; 6;)
}}

Plain cho c/e[sửa mã nguồn]

{{element cell
| 1=
| 2=
| 3=
| 4=
| 5=
| 6=
| 7=
| link=
| border=
| bg=
| style=
| title=
| legend=
}}

Ví dụ Hg, trong wikitable:

 {|
 |-
 | {{element cell|80|mercury|Hg||Liquid|Transition metals|Primordial|link=thủy ngân}}
 |}
80
Hg
Top row

Parameter 1, usually the atomic number, is put in the top row unlinked. If this parameter is present, a <br/> is added. The font color is set by parameter 5, usually the state of matter key.

Asterisk (*)

To add a plain asterisk, as is done to mark lanthanides and actinides, add them in &lt;nowiki> tags in parameter #1 like this:

 | {{element cell|<nowiki>*</nowiki>|Lanthanides}}
Page link

The cell links to parameter 2, usually the element name. If the page name is not the element name, as with [[thủy ngân]], the correct pagename can be set through link=thủy ngân.

Label

The link is labeled with parameter 3 (usually the symbol): link=[[Nhôm|Al]]. If there is no link provided (no parameter 2, no link=), parameter 3 will show as unlinked text.

Background

The background color is set by parameter 6, usually the category name. It can be set by parameter bg: bg=#aabbcc. Parameter bg is used for just a color, with no legend meaning (no text in the title).

Frame (cell border)

The frame style is set via parameter 7, usually the occurrence. It can be overridden by using {{{1}}}. This sets the border (frame), but does not have a legend meaning (no text in the title).

Style

All style can be set (and overridden) by using the style parameter: style=width:5em;. Do not add quotes ("").

Title

The title (mousehover text) is created from params 1: 6; 7; 5. (name: category; occurrence; state of matter).
The emercury example will give: Mercury: transition metals; primordeal; liquid
When parameters bg or border are used, their setting is not added to the title (they are meaningless). The title can be set (overridden) to any text, including a blank, by using title=...

Chú thích

The legend is composed from parameters 6, 5 and 7. It can be overridden by using legend=Special meaning. (This can be useful in combination with setting bg=...).

Ví dụng cách sử dụng các tham số
 {|
 |-
 | {{element cell|one|two|three|bg=yellow|border=3px solid red|link=Trang chính|title=Một vài ví dụ}}
 |}
one
three

Bị phản đối[sửa mã nguồn]

Deprecated parameters: unnamed parameter number 8, unnamed parameter number 9.

Xem thêm[sửa mã nguồn]

Element cell templates
cell cell-compact cell-named cell-large cell property cell image cell-asterisk cell AQ
không có bài viết
cell-1
không có bài viết
80
Hg
Hg
Mer­cury80Hg20059
mercury
  • 20059
  • 200592(3)
Hg200592(3)
Hình: mercury
Hg
80
2 asterisks
80
Hg
Hg
Used in wikitable pattern: {| |- | {{element cell-abc|80|Hg}} |}
All cell templates produce a table cell output in pattern:
style="background:#12abdf; {{{style|}}};" | [[Gold]]
Note that there is the pipe symbol (|) in the middle, separating cell style and cell content.
{{element cell
|
|
|
|
|
|
|
| link=
| border=
| bg=
| style=
| title=
| legend=
}}
{{element cell
| 1= Atomic number
| 2= Element name (and default page link; see also 'link=' parameter)
| 3= Symbol
| 4= (not used)
| 5= State of matter (sets font color)
| 6= Metal–nonmetal category name (sets background color, see also bg=)
| 7= Occurrence (sets cell border style)
| link= Wikipedia page (links 2 different, like [[thủy ngân]])
| border= Sets border style (overrides 7. Like: border=3px solid red)
| bg= Background color (overrides 6; can look like bg=#aabbcc)
| style= Adds or overrides style settings (do not add the "" quotes)
| title= Mousehover text (overrides title composed from 2: 6; 5; 7)
| legend= Legend text in title (overrides text part that was composed from 6; 5; 7)
}}
Xem thêm: {{element cell-large/legend}} · {{Element color}} · Danh sách các ô nguyên tố

Bản mẫu:Periodic table templates