Template:Miragebox: Difference between revisions
No edit summary |
No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!--{{ | <!--{{Miragebox}} begin--> | ||
<table style=" | <table style="border-width: 2px; border-style: solid; border-radius: 15px; border-color:{{{bordercolor}}}; background-color:{{{boxcolor}}};" class="metadata plainlinks ambox"> | ||
<tr> | <tr> | ||
<td class="mbox-image" {{#ifeq:{{{image|}}}|none|style="padding:0 !important"}}> | <td class="mbox-image" {{#ifeq:{{{image|}}}|none|style="padding:0 !important"}} {{#ifeq:{{{image|}}}|blank|style="width:62px !important"}}> | ||
{{#ifeq:{{{image}}}|none | {{#ifeq:{{{image}}}|none | ||
| <!-- no image cell; empty cell necessary for text cell to have 100% width --> | | <!-- no image cell; empty cell necessary for text cell to have 100% width --> | ||
| <div style="width: | | <div style="width:62px;"> {{#switch:{{{image|{{{type|}}}}}} | ||
| #default = {{{image|[[File:Logo beilstein mirage.png|50px]]}}} | |||
}}</div> | }}</div> | ||
}}</td> | }}</td> | ||
<td class="mbox-text"> {{#if:{{{with|{{{for|{{{ | <td class="mbox-text"> {{#if:{{{with|{{{for|{{{header|}}}}}}}}}|'''{{{with|{{{for|{{{header}}}}}}}}}'''}} <br> | ||
{{#if:{{{with|{{{for|{{{ | {{#if:{{{with|{{{for|{{{text|}}}}}}}}} | ||
| {{{with|{{{for|{{{ | | {{{with|{{{for|{{{text}}}}}}}}}}}{{#ifeq:{{{punctuation|{{{period|}}}}}}|no||.}} {{#if:{{{with|{{{for|{{{signature|}}}}}}}}}|''{{{with|{{{for|{{{signature}}}}}}}}}''}} {{#if:{{{with|{{{for|{{{date|}}}}}}}}}|''<small>({{{with|{{{for|{{{date}}}}}}}}})</small>''}} | ||
</td> | |||
{{#if:{{{imageright|}}}| | {{#if:{{{imageright|}}}| | ||
<td class="mbox-imageright"><div style="width:52px;"> {{{imageright}}} </div></td> | <td class="mbox-imageright"><div style="width:52px;"> {{{imageright}}} </div></td> | ||
Line 17: | Line 18: | ||
</tr> | </tr> | ||
</table> | </table> | ||
<noinclude> | |||
{{Documentation}} | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | |||
</noinclude> | |||
[[Category:Glygen templates]] |
Latest revision as of 20:43, 4 December 2019
. |
Common parameters
The box below shows the most common parameters that are accepted by {{Mirage}}
template. The purpose of each is described below.
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | image = none/blank/[[Image:Some image.svg|40px]] | imageright = [[Image:Some image.svg|40px]] | header = Mirage headline | text = This is your custom text | signature = Your signature | date = {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
style
Default Mirage template {{Miragebox}}
- results in
. |
Use CSS3 to customize the style of this template.
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; }}
- results in
. |
message
Add your custom message using parameters header and detail.
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | header = Mirage headline | text = This is your custom text. This template will automatically add comma at the end of your last sentence }}
- results in
Mirage headline This is your custom text. This template will automatically add comma at the end of your last sentence. |
image
You can choose a specific image to use for the template by using the image parameter.
| image = none/blank/[[Image:Some image.svg|40px]]
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | image = [[Image:Info non-talk.png|40px]] | header = Mirage headline | text = This is your custom text }}
- results in
Mirage headline This is your custom text. |
- No parameter = means that no image parameter is given and the template uses a default Mirage image.
- An image = usual width of an image is 40px - 50px.
- none = means that no image is used.
image = none
- results in
Mirage headline This is your custom text. |
- blank = means that no image is used but an empty area the same size as a default image is used, which means that text in the message box gets aligned well with other article message boxes.
image =
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | image = | header = Mirage headline | text = This is your custom text }}
- results in
|
Mirage headline This is your custom text. |
imageright
To display image at the right parameter imageright can be used imageright = [[Image:Some image.svg|40px]]
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | imageright = [[File:Glycoprotein.png|50px]] | header = Mirage headline | text = This is your custom text }}
- results in
Mirage headline This is your custom text. |
signature
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | header = Mirage headline | text = This is your custom text | signature = Your signature }}
- results in
Mirage headline This is your custom text. Me |
date
{{Miragebox | boxcolor = #F79646; | bordercolor = #B66D31; | header = Mirage headline | text = This is your custom text | signature = Your signature | date = {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }}
- results in
Mirage headline This is your custom text. Tatiana (July 2024) |
The above documentation is transcluded from Template:Miragebox/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |