Help us get to over 8,768 articles in 2026.
If you know of a magician not listed in MagicPedia, start a New Biography for them. Contact us at magicpediahelp@gmail.com
Template:Css Image Crop: Difference between revisions
(Created page with "<includeonly><div class="{{#ifeq: {{{Location}}} | center |center"><div class="|{{#ifeq: {{{Description|}}}|||thumb}}}} {{#switch: {{{Location}}} | right = t | left = t | none...") |
mNo edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 30: | Line 30: | ||
Dew image with center formating: | Dew image with center formating: | ||
{{Css Image Crop | {{Css Image Crop | ||
|Image = | |Image = Genii_1964_May.jpg | ||
|bSize = 400px | |bSize = 400px | ||
|cWidth = 100 | |cWidth = 100 | ||
| Line 37: | Line 37: | ||
|oLeft = 45 | |oLeft = 45 | ||
|Location = center | |Location = center | ||
|Description = | |Description = cropped picture ) | ||
}} | }} | ||
<pre><nowiki>{{Css Image Crop | <pre><nowiki>{{Css Image Crop | ||
|Image = Genii_1964_May | |Image = Genii_1964_May.jpg | ||
|bSize = 400px | |bSize = 400px | ||
|cWidth = 100 | |cWidth = 100 | ||
| Line 53: | Line 53: | ||
You may also omit the Location and Description parameters to get: | You may also omit the Location and Description parameters to get: | ||
{{Css Image Crop | {{Css Image Crop | ||
|Image = Genii_1964_May | |Image = Genii_1964_May.jpg | ||
|bSize = 400px | |bSize = 400px | ||
|cWidth = 100 | |cWidth = 100 | ||
| Line 61: | Line 61: | ||
}} | }} | ||
<pre><nowiki>{{Css Image Crop | <pre><nowiki>{{Css Image Crop | ||
|Image = | |Image = Genii_1964_May.jpg | ||
|bSize = 400px | |bSize = 400px | ||
|cWidth = 100 | |cWidth = 100 | ||
| Line 69: | Line 69: | ||
}}</nowiki></pre> | }}</nowiki></pre> | ||
To use it withing the person template | |||
<pre><nowiki> | |||
{{Infobox person | |||
|image_crop = {{Css Image Crop | |||
|Image = GeniiCoverV48N7.jpg | |||
|Location = center | |||
|bSize = 500px | |||
|cWidth = 150 | |||
|cHeight = 150 | |||
|oTop = 200 | |||
|oLeft = 200 | |||
}} | |||
| caption = Cover of Genii (1984) | |||
| birth_name = John Ross Bertram | |||
| birth_day = July 28, | |||
| birth_year = 1912 | |||
| birth_place = Toronto, Canada | |||
| death_day = June 12, | |||
| death_year = 1992 | |||
| death_place = | |||
| resting_place = | |||
| resting_place_coordinates = | |||
| nationality = Canadian | |||
}} | |||
</nowiki></pre> | |||
</noinclude> | </noinclude> | ||
Latest revision as of 05:47, 24 April 2015
Preview Crop Template lets you create a crop of an image inline for previewing the look and feel of a page. If the edit is committed these crops should be replaced with server side cropped images to avoid sending extra image data to people.
Note: There was a previous glitch for which some people had to use "tleft" "tright" etc as a workaround because "left" and "right" did not work. As a result, to avoid having to fix all those pages that used the workaround, the template has been designed to function properly regardless of whether tright or right is used. See template talk for details.
Usage
{{Css Image Crop
|Image = The Name of the image.
|bSize = The Base Image size (the image we are cropping on)
|cWidth = Crop Image Width in pixels
|cHeight = Crop image Height in pixels
|oTop = Offset Top in pixels
|oLeft = Offset Left in pixels
|Location = 'right', 'left', 'center' or 'none'. Determines placement of the image on the page.
Defaults to 'right' when description is provided (as is default for thumb images).
When description is blank, location on left (as is default for non-thumbs).
|Description = Description (will render out using thumbnail class)
}}
Examples
Dew image with center formating:
{{Css Image Crop
|Image = Genii_1964_May.jpg
|bSize = 400px
|cWidth = 100
|cHeight = 100
|oTop = 200
|oLeft = 45
|Location = center
|Description = cropped picture
}}
You may also omit the Location and Description parameters to get:
{{Css Image Crop
|Image = Genii_1964_May.jpg
|bSize = 400px
|cWidth = 100
|cHeight = 100
|oTop = 150
|oLeft = 100
}}
To use it withing the person template
{{Infobox person
|image_crop = {{Css Image Crop
|Image = GeniiCoverV48N7.jpg
|Location = center
|bSize = 500px
|cWidth = 150
|cHeight = 150
|oTop = 200
|oLeft = 200
}}
| caption = Cover of Genii (1984)
| birth_name = John Ross Bertram
| birth_day = July 28,
| birth_year = 1912
| birth_place = Toronto, Canada
| death_day = June 12,
| death_year = 1992
| death_place =
| resting_place =
| resting_place_coordinates =
| nationality = Canadian
}}
