Template:Bubble: Difference between revisions

From Red Faction Wiki
mNo edit summary
mNo edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>
<includeonly>
<div class="bubble" {{#switch: {{{type|}}}
<div class="bubble" id="{{{1}}}-bubble">
  | link = id="link-bubble"
  | explore = id="explore-bubble"
  | none =
}}>
<div class="bubble-label">EXPLORE</div>
<div class="bubble-label">EXPLORE</div>
{{#if: {{{icon|}}}
{{#if: {{{3|}}}|<div class="bubble-image">[[Image:{{{3}}}|link={{{4}}}]]</div> }}
  | <div class="bubble-image">[[Image:{{{icon}}}|link={{{icon link}}}]]</div>
{{{2}}}
  |
</div></includeonly><noinclude>
}}
<templatedata>
<div class="bubble-link">{{{text}}}</div></div>
{
</onlyinclude><noinclude>
"params": {
{{Bubble
"1": {
|type         = none
"label": "Type",
|text         = Locations of [[Red Faction: Guerrilla]]
"description": "Used to determine the bubble's style. Use \"explore\" for the title of a preset, \"link\" for the links section of the preset.",
|icon         = Icon_RFGSafehouse.png
"example": "explore",
|icon link    = Red Faction: Guerrilla
"type": "string",
}}
"suggestedvalues": [
 
"explore",
"link",
"none"
],
"required": true
},
"2": {
"label": "Text",
"description": "Text that shows to the right of the bubble's icon. Write a link as the text if the bubble's type is \"link\". Either write a link and/or description if the bubble's type is \"explore\".",
"example": "[[Red Faction: Guerrilla Locations]]",
"type": "string",
"required": true
},
"3": {
"label": "Icon",
"description": "An icon shown to the left of the text. Omit if there is no icon.",
"example": "Icon_RFG.png",
"type": "wiki-file-name"
},
"4": {
"label": "Icon Link",
"description": "The page that the icon redirects to. It should be the same page that is linked inside the bubble's text. Omit if there is no icon.",
"example": "Red Faction: Guerrilla",
"type": "wiki-page-name"
}
},
"description": "A bubble with icon and text for use in BubbleNav templates.",
"paramOrder": [
"1",
"2",
"3",
"4"
],
"format": "inline"
}
</templatedata>
'''Usage:'''
<pre>{{Bubble| TYPE | TEXT | ICON | ICON_LINK }}</pre>
<pre>
<pre>
{{Bubble
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
|type        =
{{Bubble|explore|[[Red Faction: Guerrilla Locations]]|Icon_RFG.png|Red Faction: Guerrilla Locations}}
|text        =
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}
|icon        =
|icon link   =
}}
</pre>
</pre>
</noinclude>
 
'''Output:'''
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
{{Bubble|explore|[[Red Faction: Guerrilla Locations]]|Icon_RFG.png|Red Faction: Guerrilla Locations}}
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}
[[Category:Core Templates]]</noinclude>

Latest revision as of 11:18, 14 February 2024

A bubble with icon and text for use in BubbleNav templates.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type1

Used to determine the bubble's style. Use "explore" for the title of a preset, "link" for the links section of the preset.

Suggested values
explore link none
Example
explore
Stringrequired
Text2

Text that shows to the right of the bubble's icon. Write a link as the text if the bubble's type is "link". Either write a link and/or description if the bubble's type is "explore".

Example
[[Red Faction: Guerrilla Locations]]
Stringrequired
Icon3

An icon shown to the left of the text. Omit if there is no icon.

Example
Icon_RFG.png
Fileoptional
Icon Link4

The page that the icon redirects to. It should be the same page that is linked inside the bubble's text. Omit if there is no icon.

Example
Red Faction: Guerrilla
Page nameoptional

Usage:

{{Bubble| TYPE | TEXT | ICON | ICON_LINK }}
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
{{Bubble|explore|[[Red Faction: Guerrilla Locations]]|Icon_RFG.png|Red Faction: Guerrilla Locations}}
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}

Output: