User:Radomianin/Photo credit box
Jump to navigation
Jump to search
About
A personal credit box template for the use with my (own) photographs. It is currently available in English, German and Polish. This template should be used directly below the general {{Information}} template, because it builds a special information box on its own; if we don’t add a blank line in between, the new box is visually merged with the {{Information}} box. Very nice!
Some hints about the implementation
- Around the individual {{Information field}} entries we put a
<table> ... </table>
element. This table gets the same CSS classes and some other attributes as the regular {{Information}} template or as the {{Location}} template. Using these CSS classes allows the additional information fields to be merged visually with the main Information box, just as e.g. the {{Location}} templates does. It also enables some other functions – e.g. in mobile display on small screens the table automatically switches to a single-column display. - It would be wise to check from time to time whether the CSS classes and attributes used in the {{Location}} template have been changed; then it could be necessary to update this template accordingly.
- The localization for the ‘Attribution’ field uses the same code as the {{Credit line}} template:
{{int:wm-license-cc-attribution|}}<br/><small>({{I18n/Credit line}})</small>
; so look out if that line in the {{Credit line}} template or if any of the subtemplates used there changes, because this may force us to update this template, too.
Template preview
This template {{User:Radomianin/Photo credit box}}
is rendered as follows:
Attribution (required by the license) | © Radomianin / Wikimedia Commons / CC BY-SA 4.0 |
Using this image | You can use this image file free of charge under the terms of the free license CC BY-SA 4.0. In particular, this means:
|
Editing this image |
|