Template:Neighbor Stories/Image: Difference between revisions
Appearance
Created Template:Neighbor Stories/Image |
Added template data |
||
| Line 1: | Line 1: | ||
<includeonly>[[File:{{{image|{{{1|}}}}}}.{{{ext|png}}}|class=neighbor-story-image|{{{position|{{{2|left}}}}}}|{{{size|{{{3| | <includeonly>[[File:{{{image|{{{1|}}}}}}.{{{ext|png}}}|class=neighbor-story-image|{{{position|{{{2|left}}}}}}|{{{size|{{{3|128}}}}}}{{{unit|px}}}]]</includeonly><noinclude>{{Documentation|type=Design|content= | ||
{{CSS|Template:Neighbor Stories/styles}} | |||
Template that formats images for {{T|Neighbor Stories}}. | Template that formats images for {{T|Neighbor Stories}}. | ||
| Line 8: | Line 9: | ||
This template has up to 3 unnamed parameters: | This template has up to 3 unnamed parameters: | ||
* {{F|1}} / {{F|image}} – Story image. | * {{F|1}} / {{F|image}} – Story image. | ||
* {{F|2}} / {{F|position}} – Position of story image. Default: {{F|left}}. | * {{F|2}} / {{F|position}} – Position of the story image. Default: {{F|left}}. | ||
* {{F|3}} / {{F|size}} – Size of story image. Default: {{F| | * {{F|3}} / {{F|size}} – Size of the story image {{Color|Old|excluding}} the length unit. Default: {{F|128}}. | ||
* {{F|ext}} – Extension of the image. Default: {{F|png}}. | |||
* {{F|unit}} – Length unit of the size. Default: {{F|px}}. | |||
==Example== | ==Example== | ||
| Line 19: | Line 22: | ||
{{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|right}} | {{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|right}} | ||
</nowiki>}} | </nowiki>}} | ||
{{Clr}} | |||
{{Example|<nowiki> | |||
{{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|center|200}} | |||
</nowiki>}} | |||
==Template Data== | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"aliases": [ | |||
"image" | |||
], | |||
"label": "Image", | |||
"description": "Story image.", | |||
"type": "wiki-file-name", | |||
"required": true | |||
}, | |||
"2": { | |||
"aliases": [ | |||
"position" | |||
], | |||
"label": "Position", | |||
"description": "Position of the story image.", | |||
"example": "left, right, center", | |||
"type": "string", | |||
"default": "left", | |||
"suggested": true | |||
}, | |||
"3": { | |||
"aliases": [ | |||
"size" | |||
], | |||
"label": "Size", | |||
"description": "Size of the story image.", | |||
"example": "64, 200", | |||
"type": "number", | |||
"default": "128" | |||
}, | |||
"ext": { | |||
"label": "Extension", | |||
"description": "Extension of the image.", | |||
"example": "jpg, svg", | |||
"type": "string", | |||
"default": "png" | |||
}, | |||
"unit": { | |||
"label": "Unit", | |||
"description": "Length unit of the size.", | |||
"example": "em, rem", | |||
"type": "string", | |||
"default": "px" | |||
} | |||
}, | |||
"description": "Template that formats images for Template:Neighbor Stories." | |||
} | |||
</templatedata> | |||
<templatestyles src="Template:Neighbor Stories/styles.css" /> | <templatestyles src="Template:Neighbor Stories/styles.css" /> | ||
}}</noinclude> | }}</noinclude> | ||
Latest revision as of 07:50, 5 May 2026
Template documentation
Note: parts of or the entire template might not be visible without values provided.
Note: parts of or the entire template might not be visible without values provided.
| Main | Usage |
This template uses CSS found at Template:Neighbor Stories/styles.css.
Template that formats images for {{Neighbor Stories}}.
Syntax
{{Neighbor Stories/Image}}
This template has up to 3 unnamed parameters:
- 1 / image – Story image.
- 2 / position – Position of the story image. Default: left.
- 3 / size – Size of the story image excluding the length unit. Default: 128.
- ext – Extension of the image. Default: png.
- unit – Length unit of the size. Default: px.
Example
{{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|left}}

{{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|right}}

{{Neighbor Stories/Image|Nerina Stars at Just the Right Warmth Image 01|center|200}}

Template Data
Template that formats images for Template:Neighbor Stories.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Image | 1 image | Story image. | File | required |
| Position | 2 position | Position of the story image.
| String | suggested |
| Size | 3 size | Size of the story image.
| Number | optional |
| Extension | ext | Extension of the image.
| String | optional |
| Unit | unit | Length unit of the size.
| String | optional |