Template:SmartWrap: Difference between revisions
|  (Created page with "<includeonly><div style="float:right; shape-outside:circle() border-box; border-radius:50%; {{#ifeq:{{{shadow|}}}|yes|box-shadow:0rem 0rem 1rem 9px #dadada;}}">{{{1}}}</div></includeonly><noinclude> Call this template when you want to place an image of a circular object on the right side of a page. Normally MediaWiki will assume that an image should be treated as a box and will wrap any nearby text around it accordingly. This template will tell the browser to wrap the te...") |  (parameterized alignment) | ||
| Line 1: | Line 1: | ||
| <includeonly> | <includeonly>{| style="{{#ifeq:{{{place|center}}}|center|{{center}}|{{#ifeq:{{{place}}}|left|float:left|float:right}}}}; shape-outside:circle() border-box; border-radius:50%; {{#ifeq:{{{shadow|}}}|yes|box-shadow:0rem 0rem 1rem 9px #dadada;}}" | ||
| |{{{1}}} | |||
| |}</includeonly><noinclude> | |||
| Call this template when you want to place an image of a circular object on the right side of a page. Normally MediaWiki will assume that an image should be treated as a box and will wrap any nearby text around it accordingly. This template will tell the browser to wrap the text assuming that the image is a circle, so that text can run past the borders of the image where appropriate. See [[Music/CD]] for an example. | Call this template when you want to place an image of a circular object on the right side of a page. Normally MediaWiki will assume that an image should be treated as a box and will wrap any nearby text around it accordingly. This template will tell the browser to wrap the text assuming that the image is a circle, so that text can run past the borders of the image where appropriate. See [[Music/CD]] for an example. | ||
| Line 5: | Line 7: | ||
| Parameters: | Parameters: | ||
| *'''place''': Set this to "left", "center" or "right" to set the alignment; "center" is the default. | |||
| *'''shadow''': If set to "yes", the image will have a soft gray shadow underlying it on all sides. | *'''shadow''': If set to "yes", the image will have a soft gray shadow underlying it on all sides. | ||
| [[Category:Basic formatting templates]]</noinclude> | [[Category:Basic formatting templates]]</noinclude> | ||
Revision as of 03:24, 26 July 2025
Call this template when you want to place an image of a circular object on the right side of a page. Normally MediaWiki will assume that an image should be treated as a box and will wrap any nearby text around it accordingly. This template will tell the browser to wrap the text assuming that the image is a circle, so that text can run past the borders of the image where appropriate. See Music/CD for an example.
Sample usage: {{SmartWrap|[[Image:Something.png]]|shadow=yes}}
Parameters:
- place: Set this to "left", "center" or "right" to set the alignment; "center" is the default.
- shadow: If set to "yes", the image will have a soft gray shadow underlying it on all sides.