Template:Chembox: Difference between revisions
From WikiMD's Wellness Encyclopedia
No edit summary Tag: Manual revert |
No edit summary |
||
| 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%;" | {| 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;" | {{{ | |+ style="font-weight:bold; font-size:110%; background:#efefef; padding:3px;" | {{{Name|{{PAGENAME}}}}} | ||
<!-- | <!-- IMAGES --> | ||
{{#if: {{{ImageFile|}}} | | |||
|- | |- | ||
| style="text-align:center;" | | | style="text-align:center;" | [[File:{{{ImageFile}}}|{{{ImageSize|200px}}}|alt={{{ImageAlt|}}}]] | ||
[[File:{{{ | <br><small>{{{ImageCaption|}}}</small> | ||
<small>{{{ | |||
}} | }} | ||
{{#if: {{{ | {{#if: {{{ImageFile1|}}} | | ||
|- | |||
<small>{{{ | | style="text-align:center;" | [[File:{{{ImageFile1}}}|{{{ImageSize1|200px}}}|alt={{{ImageAlt1|}}}]] | ||
<br><small>{{{ImageCaption1|}}}</small> | |||
}} | }} | ||
<!-- | <!-- IDENTIFIERS --> | ||
{{#if: {{{IUPACName|}}} | | |||
|- | |- | ||
| style="background:#efefef;" | IUPAC Name | | style="background:#efefef;" | IUPAC Name | ||
| {{{ | | {{{IUPACName}}} | ||
}} | |||
{{#if: {{{OtherNames|}}} | | |||
{{#if: {{{ | |||
|- | |- | ||
| style="background:#efefef;" | Other Names | | style="background:#efefef;" | Other Names | ||
| {{{ | | {{{OtherNames}}} | ||
}} | }} | ||
<!-- IDENTIFIERS --> | <!-- SECTION 1: IDENTIFIERS --> | ||
{{#if: {{{ | {{#if: {{{Section1|}}} | | ||
|- | |- | ||
| style="background:# | | colspan="2" style="background:#d9edf7; text-align:center; font-weight:bold;" | Identifiers | ||
|- | |- | ||
| style=" | | colspan="2" style="padding:5px;" | {{{Section1}}} | ||
}} | }} | ||
<!-- | <!-- SECTION 2: PROPERTIES --> | ||
{{#if: {{{Section2|}}} | | |||
|- | |- | ||
| style="background:# | | colspan="2" style="background:#d9edf7; text-align:center; font-weight:bold;" | Properties | ||
|- | |- | ||
| | | colspan="2" style="padding:5px;" | {{{Section2}}} | ||
| {{{ | |||
}} | }} | ||
<!-- | <!-- SECTION 3: HAZARDS --> | ||
{{#if: {{{ | {{#if: {{{Section3|}}} | | ||
|- | |- | ||
| style="background:# | | colspan="2" style="background:#d9534f; color:#fff; text-align:center; font-weight:bold;" | Hazards | ||
|- | |- | ||
| style=" | | colspan="2" style="padding:5px;" | {{{Section3}}} | ||
| {{{ | |||
}} | }} | ||
<!-- FOOTER --> | |||
|- | |- | ||
| style="text-align:center; font-size:85%; padding:5px; | | colspan="2" style="text-align:center; font-size:85%; padding:5px;" | <small>Data sourced from verified databases</small> | ||
<small>Data sourced from verified databases</small> | |||
|} | |} | ||
<noinclude> | <noinclude> | ||
== Usage == | == Usage == | ||
This | This template displays chemical information in a clean infobox. | ||
=== Example === | === Example === | ||
<syntaxhighlight lang="mediawiki"> | <syntaxhighlight lang="mediawiki"> | ||
{{Chembox | {{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 | ||
| ChEBI | | PubChem = 5287969 | ||
| ChEMBL | | ChEBI = 47344 | ||
| | | ChEMBL = 428690 | ||
| KEGG | | ChemSpiderID = 4450222 | ||
| DrugBank | | 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> | </syntaxhighlight> | ||
=== Parameters === | === 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 == | == Notes == | ||
* | * Sections like `Section1`, `Section2`, and `Section3` are optional. | ||
* | * Add as many sections as needed for chemical data. | ||
</noinclude> | </noinclude> | ||
Revision as of 17:59, 17 December 2024
Page Template:Chembox/styles.css has no content.
| Data sourced from verified databases |
Usage
This template displays chemical information in a clean infobox.
Example
{{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 =
}}
}}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.