Difference between revisions of "Template:FileCaption/doc"
Jump to navigation
Jump to search
m |
m |
||
| Line 19: | Line 19: | ||
Gives the image at the top right of this page. | Gives the image at the top right of this page. | ||
{{Img Title|Influencers.svg|50|50}} | {{Img Title|Influencers.svg|50|50}} | ||
| + | |||
| + | === ToDo === | ||
| + | This template only works for external images, ie. not stored in the database. It doesn't seem possible to have an internal link - I want to link to the top-level Category, eg. "Category:Influencers". See https://www.mediawiki.org/wiki/Help:Images<br/> | ||
| + | For internal images, I will have to do the following; the downside is that the height is hard-wired in: | ||
| + | <pre> | ||
| + | Put a style in MediaWiki:Common.css | ||
| + | .img-title { position:absolute; top:-50px; right:0; } | ||
| + | Then: | ||
| + | [[File:Influencers.svg|50x50px|link=Category:Influencers]] | ||
| + | </pre> | ||
<includeonly>[[Category:WikiPolitiks templates]]</includeonly> | <includeonly>[[Category:WikiPolitiks templates]]</includeonly> | ||
Revision as of 12:00, 18 May 2018
Template Experimenting with an image at the top right of the page, on the same line as the Page Title.
How big the image can be is determined by (a) <h1> lineheight (1.3) and (b) <h1> top margin (0). An image taller than 50px is obscured by the Search box.
Path is set to http://wikipolitiks.local/Images/
Usage
{{Img Title
|image-name.png - the filename of the image
|50 - width
|50 - height
}}
Example
{{Img Title|Influencers.svg|50|50}}
Gives the image at the top right of this page. Template:Img Title
ToDo
This template only works for external images, ie. not stored in the database. It doesn't seem possible to have an internal link - I want to link to the top-level Category, eg. "Category:Influencers". See https://www.mediawiki.org/wiki/Help:Images
For internal images, I will have to do the following; the downside is that the height is hard-wired in:
Put a style in MediaWiki:Common.css
.img-title { position:absolute; top:-50px; right:0; }
Then:
[[File:Influencers.svg|50x50px|link=Category:Influencers]]