|
|
| Line 1: |
Line 1: |
| <templatestyles src="Chembox/styles.css"/> | | <templatestyles src="Chembox/styles.css"/> |
| {| class="infobox" style="width:22em; background:#f9f9f9; border:1px solid #aaa; padding:5px; font-size:90%;"
| |
| |+ style="font-weight:bold; font-size:110%; background:#efefef; padding:3px;" | {{{Name|{{PAGENAME}}}}}
| |
|
| |
|
| <!-- IMAGES -->
| | {| class="infobox ib-chembox" style="{{#if:{{{width|}}}|width:{{{width}}};}}{{{style|}}}" |
| {{#if: {{{ImageFile|}}} |
| | |+ {{{Name|{{PAGENAME}}}}} {{{Reference|}}} |
| |- | |
| | style="text-align:center;" | [[File:{{{ImageFile}}}|{{{ImageSize|200px}}}|alt={{{ImageAlt|}}}]]
| |
| <br><small>{{{ImageCaption|}}}</small>
| |
| }} | |
| {{#if: {{{ImageFile1|}}} | | |
| |- | |
| | style="text-align:center;" | [[File:{{{ImageFile1}}}|{{{ImageSize1|200px}}}|alt={{{ImageAlt1|}}}]]
| |
| <br><small>{{{ImageCaption1|}}}</small>
| |
| }} | |
|
| |
|
| <!-- IDENTIFIERS --> | | <!-- Image Section --> |
| {{#if: {{{IUPACName|}}} | | | {{#if:{{{ImageFile|}}}|- |
| |- | | | colspan="2" style="text-align:center;" | [[File:{{{ImageFile|}}}|{{{ImageSize|250px}}}|alt={{{ImageAlt|}}}]] |
| | style="background:#efefef;" | IUPAC Name | | {{#if:{{{ImageCaption|}}}|<div style="font-size:smaller;">{{{ImageCaption}}}</div>}}}} |
| | {{{IUPACName}}} | |
| }} | |
| {{#if: {{{OtherNames|}}} | | |
| |-
| |
| | style="background:#efefef;" | Other Names
| |
| | {{{OtherNames}}}
| |
| }} | |
|
| |
|
| <!-- SECTION 1: IDENTIFIERS --> | | <!-- Names Section --> |
| {{#if: {{{Section1|}}} | | | {{#if:{{{IUPACName|}}}{{{OtherNames|}}}|- |
| |- | | | colspan="2" style="text-align:left;" | '''Names:''' {{#if:{{{IUPACName|}}}|IUPAC: {{{IUPACName}}}{{#if:{{{OtherNames|}}}|, }}}}{{{OtherNames|}}}}}} |
| | colspan="2" style="background:#d9edf7; text-align:center; font-weight:bold;" | Identifiers | |
| |- | |
| | colspan="2" style="padding:5px;" | {{{Section1}}} | |
| }} | |
|
| |
|
| <!-- SECTION 2: PROPERTIES --> | | <!-- Dynamic Sections --> |
| {{#if: {{{Section2|}}} | | | {{#if:{{{Section1|}}}|{{{Section1}}}}} |
| |- | | {{#if:{{{Section2|}}}|{{{Section2}}}}} |
| | colspan="2" style="background:#d9edf7; text-align:center; font-weight:bold;" | Properties
| | {{#if:{{{Section3|}}}|{{{Section3}}}}} |
| |- | | {{#if:{{{Section4|}}}|{{{Section4}}}}} |
| | colspan="2" style="padding:5px;" | {{{Section2}}} | | {{#if:{{{Section5|}}}|{{{Section5}}}}} |
| }} | |
|
| |
|
| <!-- SECTION 3: HAZARDS --> | | <!-- Footer --> |
| {{#if: {{{Section3|}}} | | | {{#if:{{{show_footer|yes}}}|- |
| |- | | | colspan="2" style="text-align:left;" | {{#if:{{{general_note|}}}|{{{general_note}}}}}}} |
| | colspan="2" style="background:#d9534f; color:#fff; text-align:center; font-weight:bold;" | Hazards | |
| |- | |
| | colspan="2" style="padding:5px;" | {{{Section3}}}
| |
| }} | |
|
| |
|
| <!-- FOOTER --> | | |} <!-- End of table --> |
| |-
| |
| | colspan="2" style="text-align:center; font-size:85%; padding:5px;" | <small>Data sourced from verified databases</small>
| |
| |}
| |
| <noinclude>
| |
| == Usage ==
| |
| This template displays chemical information in a clean infobox.
| |
|
| |
|
| === Example ===
| | <noinclude>{{documentation}}</noinclude> |
| <syntaxhighlight lang="mediawiki"> | |
| {{Chembox | |
| | Name = Flavopiridol
| |
| | ImageFile = Flavopiridol.svg
| |
| | ImageSize = 200px
| |
| | ImageFile1 = Alvocidib ball-and-stick.png
| |
| | ImageSize1 = 200px
| |
| | IUPACName = 2-(2-chlorophenyl)-5,7-dihydroxy-8-[(3S,4R)-3-hydroxy-1-methyl-4-piperidinyl]-4-chromenone
| |
| | OtherNames = Flavopiridol, HMR 1275, L-868275
| |
| | |
| | Section1 = {{Chembox Identifiers
| |
| | UNII = 45AD6X575G
| |
| | CASNo = 146426-40-6
| |
| | PubChem = 5287969
| |
| | ChEBI = 47344
| |
| | ChEMBL = 428690
| |
| | ChemSpiderID = 4450222
| |
| | KEGG = D09868
| |
| | StdInChI = 1S/C21H20ClNO5/...
| |
| | DrugBank = DB03496
| |
| | SMILES = Clc4ccccc4C=2Oc1c(c(O)cc(O)c1...)
| |
| }}
| |
| | |
| | Section2 = {{Chembox Properties
| |
| | Formula = C<sub>21</sub>H<sub>20</sub>ClNO<sub>5</sub>
| |
| | MolarMass = 401.8402
| |
| }} | |
| | |
| | Section3 = {{Chembox Hazards
| |
| | MainHazards =
| |
| }}
| |
| }}
| |
| </syntaxhighlight>
| |
| | |
| === Parameters ===
| |
| * `Name` - Title displayed in the infobox header.
| |
| * `ImageFile`, `ImageFile1` - Chemical structure or other images.
| |
| * `ImageSize` - Image size (default 200px).
| |
| * `IUPACName` - Official IUPAC name.
| |
| * `OtherNames` - Alternate names.
| |
| * `Section1` - Identifier section using `Chembox Identifiers`.
| |
| * `Section2` - Properties section using `Chembox Properties`.
| |
| * `Section3` - Hazards section using `Chembox Hazards`.
| |
| | |
| == Notes ==
| |
| * Sections like `Section1`, `Section2`, and `Section3` are optional.
| |
| * Add as many sections as needed for chemical data.
| |
| </noinclude> | |
Page Template:Chembox/styles.css has no content.
Chembox
colspan="2" style="text-align:center;"
colspan="2" style="text-align:left;"}
-
|