Difference between revisions of "Template:FileCaption/doc"
Jump to navigation
Jump to search
BBC Guide to UK Nuclear Power
| Line 1: | Line 1: | ||
| − | Experimenting with a template found on [https://www.mediawiki.org/wiki/Template:Image MediaWiki].<br/> | + | Experimenting with a template found on [https://www.mediawiki.org/wiki/Template:Image MediaWiki], which looks very similar to MediaWiki's [https://www.mediawiki.org/wiki/Template:Image_frame own version]. MediaWiki started something similar in 2014, but ditched it due to problems with videos. See [https://www.mediawiki.org/wiki/Thumbnail_style_update Thumbnail style update].<br/> |
Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki. | Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki. | ||
| − | ToDo: Rename to "FileCaption" to | + | ToDo: Rename to "FileCaption" to denote this template is used with "File:..." syntax. |
=== Usage === | === Usage === | ||
* <code>file=</code> Sets which file to use. Default value is Dept-for-BEIS-RWM.svg. | * <code>file=</code> Sets which file to use. Default value is Dept-for-BEIS-RWM.svg. | ||
| − | * <code> | + | * <code>sz=</code> width x height of the image. |
| − | + | * <code>align=</code> Sets alignment of the caption ''only''. Options are right, left, centre, and none. Default is centre. | |
| − | * <code>align=</code> Sets alignment of | + | * <code>caption=</code> Places a caption beneath the image. Optional. |
| − | * <code>caption=</code> Places a caption beneath the image | + | * <code>padding=</code> Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; default set to 0.5em;; turn off by setting parameter to "no". |
| − | * <code>padding=</code> Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; turn off by setting parameter to "no". | ||
<pre> | <pre> | ||
{{FileCaption | {{FileCaption | ||
| Line 17: | Line 16: | ||
|50 - height | |50 - height | ||
}} | }} | ||
| + | #808080 = 128,128,128 = gray | ||
| + | #bebebe = 190,190,190 | ||
| + | #a0a0a0 | ||
</pre> | </pre> | ||
=== Example === | === Example === | ||
<pre>{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}</pre> | <pre>{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}</pre> | ||
| − | Gives | + | Gives: |
| − | {{Img Title| | + | {{Img Title|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm}}}} {{img|Nuclear-Waste-Low-Level-Site.png|200|137|border=gray|caption=[http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm BBC Guide] to UK Nuclear Power}} |
<includeonly>[[Category:WikiPolitiks templates]]</includeonly> | <includeonly>[[Category:WikiPolitiks templates]]</includeonly> | ||
Revision as of 23:37, 20 December 2019
Experimenting with a template found on MediaWiki, which looks very similar to MediaWiki's own version. MediaWiki started something similar in 2014, but ditched it due to problems with videos. See Thumbnail style update.
Used to provide images with captions as an alternative to the ugly ones with a frame that come with MediaWiki.
ToDo: Rename to "FileCaption" to denote this template is used with "File:..." syntax.
Usage
file=Sets which file to use. Default value is Dept-for-BEIS-RWM.svg.sz=width x height of the image.align=Sets alignment of the caption only. Options are right, left, centre, and none. Default is centre.caption=Places a caption beneath the image. Optional.padding=Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; default set to 0.5em;; turn off by setting parameter to "no".
{{FileCaption
|file - the filename of the image
|50 - width
|50 - height
}}
#808080 = 128,128,128 = gray
#bebebe = 190,190,190
#a0a0a0
Example
{{Img Title|Dept-for-BEIS-RWM.svg|180|37}}
Gives:
BBC Guide to UK Nuclear Power