Difference between revisions of "Template:Layouts/ImagesLeftContentRight"
DesignerThan (talk | contribs) |
DesignerThan (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><templatestyles src="Layouts/ImagesLeftContentRight/style.css" /><div id="imgLeft-contentRight-container" class="mw-parser-output"> | + | <includeonly><onlyinclude><templatestyles src="Layouts/ImagesLeftContentRight/style.css" /><div id="imgLeft-contentRight-container" class="mw-parser-output"> |
<div class="images-container"> | <div class="images-container"> | ||
{{#forargs: image_ | {{#forargs: image_ | ||
Line 8: | Line 8: | ||
</div> | </div> | ||
<div class="content-container"> | <div class="content-container"> | ||
− | {{#if: content_heading|<h3>{{{content_heading}}}</h3>}} | + | {{#if: {{{content_heading|}}}|<h3>{{{content_heading}}}</h3>}} |
{{{content}}} | {{{content}}} | ||
</div> | </div> | ||
− | </div></includeonly> | + | </div></onlyinclude></includeonly> |
<noinclude> | <noinclude> | ||
− | [[Category: | + | [[Category:Layout Components]][[Category:UsesLoops]] |
Usage: | Usage: | ||
:<nowiki>{{Layouts/ImagesLeftContentRight</nowiki> | :<nowiki>{{Layouts/ImagesLeftContentRight</nowiki> | ||
Line 23: | Line 23: | ||
::<nowiki>|imageCaption_n = </nowiki> | ::<nowiki>|imageCaption_n = </nowiki> | ||
::<nowiki>|content_heading = </nowiki> | ::<nowiki>|content_heading = </nowiki> | ||
− | ::<nowiki>| | + | ::<nowiki>|content = </nowiki> |
:<nowiki>}}</nowiki> | :<nowiki>}}</nowiki> | ||
Line 43: | Line 43: | ||
</noinclude> | </noinclude> | ||
{{clear}} | {{clear}} | ||
+ | <templatedata> | ||
+ | { | ||
+ | "params": { | ||
+ | "content_heading": { | ||
+ | "label": "Heading of the Text", | ||
+ | "description": "Heading of the Text on the right of the images", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "content": { | ||
+ | "label": "Text", | ||
+ | "description": "The text which shall go on the right of the images. It should be possible to pass in every wikitext.", | ||
+ | "type": "unbalanced-wikitext" | ||
+ | }, | ||
+ | "image_n": { | ||
+ | "label": "Image n", | ||
+ | "description": "Replace the n with a number starting at 1. That way it is possible to add multiple images into the template.", | ||
+ | "type": "wiki-file-name" | ||
+ | }, | ||
+ | "imageWidth_n": { | ||
+ | "label": "Width of Image n", | ||
+ | "description": "Replace n with the number of the image you want to define the width. Normally that shouldn't be needed." | ||
+ | }, | ||
+ | "imageCaption_n": { | ||
+ | "label": "Caption of Image n", | ||
+ | "description": "Replace n with the number of the image you want to define the caption. The caption is a short description of what the image shows.", | ||
+ | "type": "string" | ||
+ | } | ||
+ | }, | ||
+ | "description": "This Template creates a Layout where the images are on the left side of the page and the text on the right. It is mobile friendly, that means that as the screen gets smaller the images will then go on top of the text and the text will follow.", | ||
+ | "paramOrder": [ | ||
+ | "content_heading", | ||
+ | "content", | ||
+ | "image_n", | ||
+ | "imageWidth_n", | ||
+ | "imageCaption_n" | ||
+ | ] | ||
+ | } | ||
+ | </templatedata> |
Latest revision as of 15:58, 3 April 2022
Usage:
- {{Layouts/ImagesLeftContentRight
- |image_1 =
- |imageWidth_1 =
- |imageCaption_1 =
- |image_n =
- |imageWidth_n =
- |imageCaption_n =
- |content_heading =
- |content =
- }}
Example:
Amaranth
Amaranth, is a cosmopolitan genus of annual or short-lived perennial plants. Catkin-like cymes of densely packed flowers grow in summer or autumn. Approximately 60 species are recognized, with inflorescences and foliage ranging from purple and red to green or gold. Although several species are often considered weeds, people around the world value amaranths as leaf vegetables and cereals.
Evening Primrose
Evening primrose (Oenothera biennis) is a biennial (living for two years) flowering plant growing to 30–150 cm tall. The leaves are lanceolate, 5–20 cm long and 1–2.5 cm broad, produced in a tight rosette in the first year, and spirally on the stem in the second year. The flowers are pale yellow, 2.5–5 cm diameter, with four petals; they are produced on a tall spike from late spring to late summer. They open in the evening, hence the name "evening primrose", and close by the following noon.
This Template creates a Layout where the images are on the left side of the page and the text on the right. It is mobile friendly, that means that as the screen gets smaller the images will then go on top of the text and the text will follow.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Heading of the Text | content_heading | Heading of the Text on the right of the images | String | optional |
Text | content | The text which shall go on the right of the images. It should be possible to pass in every wikitext. | Unbalanced wikitext | optional |
Image n | image_n | Replace the n with a number starting at 1. That way it is possible to add multiple images into the template. | File | optional |
Width of Image n | imageWidth_n | Replace n with the number of the image you want to define the width. Normally that shouldn't be needed. | Unknown | optional |
Caption of Image n | imageCaption_n | Replace n with the number of the image you want to define the caption. The caption is a short description of what the image shows. | String | optional |