Jump to content

Template:Neighbor Stories/Image: Difference between revisions

From The Petit Planet Wiki
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|128px}}}}}}]]</includeonly><noinclude>{{Documentation|type=Design|content=
<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}} &ndash; Story image.
* {{F|1}} / {{F|image}} &ndash; Story image.
* {{F|2}} / {{F|position}} &ndash; Position of story image. Default: {{F|left}}.
* {{F|2}} / {{F|position}} &ndash; Position of the story image. Default: {{F|left}}.
* {{F|3}} / {{F|size}} &ndash; Size of story image. Default: {{F|128px}}.
* {{F|3}} / {{F|size}} &ndash; Size of the story image {{Color|Old|excluding}} the length unit. Default: {{F|128}}.
* {{F|ext}} &ndash; Extension of the image. Default: {{F|png}}.
* {{F|unit}} &ndash; 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.
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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Image1 image

Story image.

Filerequired
Position2 position

Position of the story image.

Default
left
Example
left, right, center
Stringsuggested
Size3 size

Size of the story image.

Default
128
Example
64, 200
Numberoptional
Extensionext

Extension of the image.

Default
png
Example
jpg, svg
Stringoptional
Unitunit

Length unit of the size.

Default
px
Example
em, rem
Stringoptional