|
|
| (12 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| <templatestyles src="Chembox/styles.css"/> | | <!-- Template:Chembox --> |
| {| class="infobox ib-chembox" style="{{#if:{{{width|}}}|width:{{{width}}};}}{{#if:{{{style|}}}|{{{style}}}}}"
| | <div class="infobox" style="width: 22em; font-size: 90%; border: 1px solid #aaa; padding: 0.5em; background: #f9f9f9;"> |
| |+ {{{Name|{{PAGENAME}}}}}{{{Reference|}}}{{{Chembox_ref|}}}
| | {| style="width: 100%;" |
| | | ! colspan="2" style="text-align: center; background: #f0f0f0; font-weight: bold; font-size: 110%; padding: 0.5em;" | {{{name|Chemical Compound}}} |
| <!-- IMAGE SECTION -->
| |
| {{#if: {{{ImageFile|}}}{{{ImageFile1|}}}{{{ImageFile2|}}} |
| |
| |- | | |- |
| | style="text-align:center;" | | | | colspan="2" style="text-align: center;" | {{{image|}}} |
| [[File:{{{ImageFile|}}}|{{{ImageSize|frameless}}}|alt={{{ImageAlt|}}}]]<br>
| |
| {{#if: {{{ImageCaption|}}} | <small>{{{ImageCaption}}}</small> }}
| |
| }}
| |
| | |
| <!-- NAMES SECTION -->
| |
| {{#if: {{{OtherNames|}}}{{{IUPACName|}}}{{{PIN|}}}{{{SystematicName|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Names</b> | | | colspan="2" style="text-align: center;" | <small>{{{image_caption|}}}</small> |
| |- | | |- |
| | style="padding:5px;" | | | | colspan="2" style="text-align: center; background: #f0f0f0;" | <b>Identifiers</b> |
| {{#if: {{{IUPACName|}}} | <b>IUPAC Name:</b> {{{IUPACName}}}<br> }}
| |
| {{#if: {{{PIN|}}} | <b>PIN:</b> {{{PIN}}}<br> }}
| |
| {{#if: {{{SystematicName|}}} | <b>Systematic Name:</b> {{{SystematicName}}}<br> }}
| |
| {{#if: {{{OtherNames|}}} | <b>Other Names:</b> {{{OtherNames}}} }}
| |
| }}
| |
| | |
| <!-- SECTIONS -->
| |
| {{#if: {{{Section1|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 1</b>
| | | <b>CAS Number</b> || {{{cas_number|}}} |
| |- | | |- |
| | {{{Section1}}} | | | <b>PubChem CID</b> || {{{pubchem|}}} |
| }}
| |
| {{#if: {{{Section2|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 2</b>
| | | <b>ChemSpider ID</b> || {{{chemspider|}}} |
| |- | | |- |
| | {{{Section2}}} | | | <b>UNII</b> || {{{unii|}}} |
| }}
| |
| {{#if: {{{Section3|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 3</b>
| | | <b>ChEBI</b> || {{{chebi|}}} |
| |- | | |- |
| | {{{Section3}}} | | | <b>ChEMBL</b> || {{{chembl|}}} |
| }}
| |
| {{#if: {{{Section4|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 4</b> | | | colspan="2" style="text-align: center; background: #f0f0f0;" | <b>Properties</b> |
| |- | | |- |
| | {{{Section4}}} | | | <b>Chemical Formula</b> || {{{formula|}}} |
| }}
| |
| {{#if: {{{Section5|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 5</b>
| | | <b>Molar Mass</b> || {{{molar_mass|}}} |
| |- | | |- |
| | {{{Section5}}} | | | <b>Appearance</b> || {{{appearance|}}} |
| }}
| |
| {{#if: {{{Section6|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 6</b>
| | | <b>Density</b> || {{{density|}}} |
| |- | | |- |
| | {{{Section6}}} | | | <b>Melting Point</b> || {{{melting_point|}}} |
| }}
| |
| {{#if: {{{Section7|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 7</b>
| | | <b>Boiling Point</b> || {{{boiling_point|}}} |
| |- | | |- |
| | {{{Section7}}} | | | colspan="2" style="text-align: center; background: #f0f0f0;" | <b>Hazards</b> |
| }}
| |
| {{#if: {{{Section8|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 8</b>
| | | <b>GHS Pictograms</b> || [[File:{{{ghs_pictograms|}}}|50px]] |
| |- | | |- |
| | {{{Section8}}} | | | <b>GHS Signal Word</b> || {{{ghs_signal_word|}}} |
| }}
| |
| {{#if: {{{Section9|}}} |
| |
| |- | | |- |
| | style="background:#efefef;" | <b>Section 9</b>
| | | <b>GHS Hazard Statements</b> || {{{ghs_hazard_statements|}}} |
| |- | | |- |
| | {{{Section9}}} | | | <b>NFPA 704</b> || [[File:{{{nfpa704|}}}|50px]] |
| }} | |
| | |
| <!-- FOOTER -->
| |
| |- | | |- |
| | style="text-align:center; font-size:90%;" colspan="2" | | | | colspan="2" style="text-align: center; background: #f0f0f0;" | <b>References</b> |
| {{#if: {{{general_note|}}} | {{{general_note}}}<br> }}
| | |- |
| <small>This data is verified and monitored for accuracy.</small>
| | | colspan="2" | {{{references|}}} |
| |} | | |} |
| | | </div> |
| <noinclude>
| |
| == Usage ==
| |
| This template is a non-Lua version of `Chembox` for displaying chemical compound information.
| |
| | |
| === Example ===
| |
| <syntaxhighlight lang="mediawiki">
| |
| {{Chembox
| |
| | Name = Water
| |
| | ImageFile = Water_Molecule.png
| |
| | ImageSize = 150px
| |
| | ImageCaption = Structure of a water molecule
| |
| | IUPACName = Oxidane
| |
| | SystematicName = Water
| |
| | OtherNames = Dihydrogen monoxide
| |
| | Section1 = <b>Formula:</b> H₂O
| |
| | Section2 = <b>Boiling Point:</b> 100°C
| |
| | general_note = Common solvent in chemistry
| |
| }}
| |
| </syntaxhighlight>
| |
| | |
| === Parameters ===
| |
| * `Name` - The title or name of the compound.
| |
| * `ImageFile` - File name for the image.
| |
| * `ImageSize` - Size of the image.
| |
| * `ImageCaption` - Caption for the image.
| |
| * `IUPACName` - IUPAC-approved name.
| |
| * `SystematicName` - Systematic chemical name.
| |
| * `OtherNames` - Alternative names.
| |
| * `Section1`–`Section9` - Custom data sections.
| |
| * `general_note` - Footer note for the infobox.
| |
| | |
| == Notes ==
| |
| * This template does not use Lua modules.
| |
| * Sections 1–9 can be used to add custom content.
| |
| * Empty fields will not be displayed.
| |
| | |
| </noinclude> | |