Difference between revisions of "Template:InlineItemImage"
Jump to navigation
Jump to search
(Trying to fix extra new lines....) |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexist: File:{{{1|}}}.png|[[File:{{{1}}}.png|32px{{#if:{{{2|}}}|link={{{2}}}}}]]|[[File:No_block_image.png|32px|link=File:{{{1}}}.png]]}}</includeonly> | + | <includeonly><span {{#if: {{{background|}}} | style="background: #8b8b8b; margin: -2px 0 0 -4px; border-style: solid solid solid solid; border-top-color: #5f5f5f; border-left-color: #5f5f5f; width: 32px; padding-top: 6.5px; |
+ | padding-bottom: 9.5px;"}} > {{#ifexist: File:{{{1|}}}.png|[[File:{{{1}}}.png|32px{{#if:{{{2|}}}|{{!}}link={{{2}}} }}]]|[[File:No_block_image.png|32px|link=File:{{{1}}}.png]]}} </span></includeonly> | ||
+ | <noinclude> | ||
+ | =Template Data= | ||
+ | <templatedata> | ||
+ | { | ||
+ | "params": { | ||
+ | "1": { | ||
+ | "label": "File Name", | ||
+ | "description": "File used as the image, Will be scaled to 32px. Missing files will use the missing block texture.", | ||
+ | "type": "wiki-file-name", | ||
+ | "required": true | ||
+ | }, | ||
+ | "2": { | ||
+ | "label": "Page Link", | ||
+ | "description": "Page this icon links to.", | ||
+ | "type": "wiki-page-name", | ||
+ | "required": true | ||
+ | }, | ||
+ | "background": { | ||
+ | "label": "Background", | ||
+ | "description": "Does this need a background?", | ||
+ | "type": "boolean", | ||
+ | "suggested": true | ||
+ | } | ||
+ | }, | ||
+ | "description": "Adds an inline texture to any content line! Has optional background.", | ||
+ | "format": "inline" | ||
+ | } | ||
+ | </templatedata> | ||
+ | =Examples= | ||
+ | |||
+ | <code><nowiki>{{InlineItemImage|Oak Log|Log}}</nowiki></code> | ||
+ | |||
+ | words words words {{InlineItemImage|Oak Log|Log}}is good! | ||
+ | |||
+ | <code><nowiki>{{InlineItemImage|Oak Log|Log|background=sure}}</nowiki></code> | ||
+ | |||
+ | Look mawh, {{InlineItemImage|Oak Log|Log|background=sure}}I have a background! | ||
+ | |||
+ | <code><nowiki>{{InlineItemImage|Nope Log|Log|background=}}</nowiki></code> | ||
+ | |||
+ | and now I don't {{InlineItemImage|Nope Log|Log|background=}}sad face. | ||
+ | |||
+ | </noinclude> |
Latest revision as of 05:05, 29 January 2020
Template Data
Adds an inline texture to any content line! Has optional background.
Parameter | Description | Type | Status | |
---|---|---|---|---|
File Name | 1 | File used as the image, Will be scaled to 32px. Missing files will use the missing block texture. | File | required |
Page Link | 2 | Page this icon links to. | Page | required |
Background | background | Does this need a background? | Boolean | suggested |
Examples
{{InlineItemImage|Oak Log|Log}}
{{InlineItemImage|Oak Log|Log|background=sure}}
Look mawh, I have a background!
{{InlineItemImage|Nope Log|Log|background=}}