Bản mẫu:NFPA 704 diamond
Bản mẫu này sử dụng TemplateStyles: |
This template produces a NFPA 704 fire diamond with optionally four hazard codes. It is designed to be used in a table.
Primary use is through {{Chembox}}, the {{NFPA 704}} box and {{OrganicBox complete}} (chemical data pages).
When used stand-alone (outside of a table), consider the {{NFPA 704}} box.
Parameters
sửa{{NFPA 704 diamond | H = | F = | I = | S = | ref = | showimage = | background = }} |
Health code, 0-4 or - (hyphen for blank) Flammability code Instability (reactivity) code ("R=" is also allowed) Special code W, OX, W+OX, ..., or - (hyphen for blank) References. Add the <ref> ... </ref> tags. Set =no to show text instead ('RA' only. Default: =yes, show image) background color (e.g., =yellow or =#ff7623) }} |
Input options
sửaMain rule: if the quarter must be blank, input is the hyphen, -. Do not depend on default behavior in this situation.
Basic 0–4 and - (hyphen)
sửafor |H= , |F= , |I=
| |||||
=0 |
=1 |
=2 |
=3 |
=4 |
=- (hyphen)
|
|H=
, |F=
, |I=
accept codes 0, 1, 2, 3, 4, -
. Code -
(hyphen) produces a blank ("no hazard code").
A blank can be set (enforced) by entering =-
, a hyphen. This is the preferred way to reflect what the source states (don't depend on the default blank in this situation).
Default code (blank)
sửa= <blank>
|
All four codes default to blank, that is: no NFPA code is present or shown. There is no specific text (just a link to the NFPA color section). Note that a blank is not the same as code "0". Code "0" is an explicit statement, while a blank is the absence of any statement.
A blank can also be enforced by entering =-
(hyphen). This is the preferred way to reflect what the source states (do not depend on default).
From the input, spaces and even newlines (all whitespace) are treated as blank. Note that =
code produces an error, but entering the nbsp character (>=
<) is accepted as a space (blank).
Special hazard options
sửa|S=W
|
|S=OX
|
|S=W+OX
|
|S=SA
|
|S=- (hyphen)
|
|S=ACID
|
|S=ALK
|
|S=BIO
|
|S=COR
|
|S=CRYO
|
|S=RA |showimage=<default>
|
|S=RA |showimage=yes
|
|S=RA |showimage=no
| ||
For
enter W|S=W
.
For
enter W OX|S=W+OX
, |S=W OX
or |S=WOX
.
The "Special" quarter is sometimes called "Other".
Unknown codes (error)
sửaThe diamond template checks for unknown codes.
=abc |
= |
=abc |cat=no
|
F=klm NFPA code error. H=abc NFPA code error. S=XYZ NFPA code error.
|
F= NFPA code error. H= NFPA code error. S=&NBSP; NFPA code error.
|
Articles with unknown codes are listed for maintenance (correction) in Thể loại:Articles with unknown NFPA 704 code (0). Other pages (like this documentation) are not categorized, but have a message instead. This categorizing can be switched off by setting |cat=no
Note that =
code produces an error, but entering the nbsp character (= ) is accepted as a space (blank).
Adding references
sửaReferences can be added using |ref=
.
|ref=<ref>{{cite web|url=http://chemlabs.uoregon.edu/Safety/NFPA_White.html|title=More on white codes}}</ref>
The <ref> ... </ref> tags should be added. Multiple references can be entered. Depending on cell width, the links show above or next to the diamond. While technically possible to enter plain text, this is not supported (and this could be disallowed in the future).
List of codes
sửaBản mẫu:NFPA 704 diamond/codes-overview
Color style
sửa- Option
|background=green
. Default istransparent
.
Colors used
Blue | Red | Yellow | White |
---|---|---|---|
1 | 4 | 3 | SA |
#6691ff
|
#ff6666
|
#fcff66
|
#ffffff
|
Better not to use RGB colors named blue, red, yellow
, because these produce a bad contrast with the text.
Template data
sửaDữ liệu bản mẫu cho NFPA 704 diamond
Không có miêu tả.
Tham số | Miêu tả | Kiểu | Trạng thái | |
---|---|---|---|---|
Health (blue) | H | không có miêu tả
| Chuỗi dài | tùy chọn |
Flammability (red) | F | không có miêu tả
| Chuỗi dài | tùy chọn |
Instability, Reactivity (yellow) | I R | không có miêu tả
| Chuỗi dài | tùy chọn |
Special code (white) | S | không có miêu tả
| Chuỗi dài | tùy chọn |
background | background | không có miêu tả | Không rõ | tùy chọn |
ref | ref | không có miêu tả | Không rõ | tùy chọn |
showimage | showimage | shows S image when available | Luận lý | tùy chọn |
cat | cat | không có miêu tả | Không rõ | tùy chọn |
Known issues
sửa- Is there an ENGVAR-like switch needed, eg for the order of °C - °F temperatures? (Currently, °C is first)
- For documentation, could use a diamond with the four letters in the quadrants.
- The non-standard S (on white) codes should be complete, and maybe listed for attention.
Tracking category
sửaSee also
sửa- File:NFPA 704.svg -- The background diamond image
- {{NFPA 704}} -- in a stand alone box
- {{NFPA 704 diamond/text}}
Tham khảo
- ^ “some title”.
- ^ [1]
- ^ [2]
- ^ [3]
- ^ “some title”.
- ^ [4]
- ^ [5]
- ^ “some title”.
- ^ [6]
- ^ “some title”.
- ^ [7]
- ^ [8]
- ^ “some title”.
- The references are from the demos in this documentation.