Template:Bubble: Difference between revisions

From Red Faction Wiki
mNo edit summary
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<div class="bubble" id="{{{1}}}-bubble">
<div class="bubble" id="{{{1}}}-bubble">
<div class="bubble-label">EXPLORE</div>
<div class="bubble-label">EXPLORE</div>
{{#if: {{{3|}}}
{{#if: {{{3|}}}|<div class="bubble-image">[[Image:{{{3}}}|link={{{4}}}]]</div> }}
|<div class="bubble-image">[[Image:{{{3}}}|link={{{4}}}]]</div>
|}}
{{{2}}}
{{{2}}}
</div></includeonly><noinclude>
</div></includeonly><noinclude>
<pre>
<templatedata>
{{Bubble|}}
{
</pre>
"params": {
This template is intended to be used with [[Template:BubbleNav]]. Visit the page for more information on the bubble types.
"1": {
'''Guide to each parameter:'''
"label": "Type",
<pre>
"description": "Used to determine the bubble's style. Use \"explore\" for the title of a preset, \"link\" for the links section of the preset.",
{{Bubble| TYPE | TEXT | ICON | ICON LINK }}
"example": "explore",
 
"type": "string",
Each parameter is separated by the vertical bar/pipe symbol "|", there are no parameter names used in this template. The template will only work correctly if the order of parameters is also correct. Make sure to read the Usage section for more examples.
"suggestedvalues": [
 
"explore",
type:
"link",
"explore", "link" or "none".
"none"
 
],
text:
"required": true
The link or text that's going to show in the box to right of the icon.
},
 
"2": {
icon:
"label": "Text",
An image shown to the left of the text. Only write the image name with its extension and no other formatting, e.g. "Icon_RFG.png".
"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]]",
icon link:
"type": "string",
The link that the icon will redirect to. Make sure it's the SAME link you use inside "text" and write it without any brackets. For example, if the text was "[[Red Faction: Guerrilla Vehicles|Vehicles]]" or "[[Mount Vogel]]", the icon link would be "Red Faction: Guerrilla Vehicles" and "Mount Vogel" respectively.
"required": true
</pre>
},
 
"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:'''
'''Usage:'''
<pre>{{Bubble| TYPE | TEXT | ICON | ICON_LINK }}</pre>
<pre>
<pre>
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
{{Bubble|none|Locations of [[Red Faction: Guerrilla]]|Icon_RFGSafehouse.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)}}
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}
</pre>
</pre>


'''Output:'''
'''Output:'''
* "explore" bubble:
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
 
{{Bubble|explore|[[Red Faction: Guerrilla Locations]]|Icon_RFG.png|Red Faction: Guerrilla Locations}}
* "none" bubble:
{{Bubble|none|Locations of [[Red Faction: Guerrilla]]|Icon_RFGSafehouse.png|Red Faction: Guerrilla}}  
 
* "link" bubble:
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}
{{Bubble|link|[[Parker (Sector)|Parker]]|Icon_RFG.png|Parker (Sector)}}
</noinclude>
[[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: