Difference between revisions of "Template:FileCaption/doc"
Jump to navigation
Jump to search
m (→ToDo) |
m |
||
| Line 1: | Line 1: | ||
<small>[[Template:Img Title|Template]]</small> Experimenting with an image at the top right of the page, on the same line as the Page Title. | <small>[[Template:Img Title|Template]]</small> Experimenting with an image at the top right of the page, on the same line as the Page Title. | ||
| + | |||
| + | ToDo: Rename this to "Img Titlebar" or some such. | ||
How big the image can be is determined by (a) <nowiki><h1></nowiki> lineheight (1.3) and (b) <nowiki><h1></nowiki> top margin (0). An image taller than 50px is obscured by the Search box. | How big the image can be is determined by (a) <nowiki><h1></nowiki> lineheight (1.3) and (b) <nowiki><h1></nowiki> top margin (0). An image taller than 50px is obscured by the Search box. | ||
Revision as of 17:08, 26 May 2018
Template Experimenting with an image at the top right of the page, on the same line as the Page Title.
ToDo: Rename this to "Img Titlebar" or some such.
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 Mediawiki Help:Images
For internal images, I will have to do the following. The downside is that the height is hard-wired into the .css:
Put a style in MediaWiki:Common.css
.img-title { position:absolute; top:-50px; right:0; } (''done'')
Then:
[[File:Foreign-Policy-Centre.png|182x50px|class=img-title|link=Category:Influencers]]