Template:EditButton: Difference between revisions
No edit summary |
m (added option to set css styles on the button) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><div style="text-align: right; font-size: 10pt; margin-bottom: {{{margin-bottom|- | <includeonly><onlyinclude><div class="edit-button" style="text-align: {{{text-align|right}}}; font-size: 10pt; margin-bottom: {{{margin-bottom|0px}}}; {{{css-styles|}}}"><span class="plainlinks">{{#ifexist:{{{1|}}}|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit edit] <nowiki>]</nowiki>|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit <span style="color: #dd3333;">create</span>] <nowiki>]</nowiki>}}</span></div></onlyinclude></includeonly> | ||
==Usage== | ==Usage== | ||
Line 5: | Line 5: | ||
Place an edit button to a transcluded element. If Page does not exist, shows a "create" button. | Place an edit button to a transcluded element. If Page does not exist, shows a "create" button. | ||
'''Note:''' at the moment, the button floats all the way to the right. If the element it is supposed to make editable isn't extending all the way to the right, the button needs to be contained somehow - if possible with the same container that restricts the element - so it remains close to the element. | '''Note:''' at the moment, the button floats all the way to the page margin (right by default). If the element it is supposed to make editable isn't extending all the way to the right, the button needs to be contained somehow - if possible with the same container that restricts the element - so it remains close to the element. | ||
Optional parameters (and default value): | Optional css parameters (and default value): | ||
<pre> | <pre> | ||
{{EditButton|... | {{EditButton|... | ||
| margin-bottom = - | | margin-bottom = 0px | ||
| text-align = right | |||
| css-styles = | |||
}} | }} | ||
</pre> | </pre> | ||
The best way to include an edit button seems to be to set it as a table caption like | |||
<pre> | |||
{| class="horizon-table harvesting-table table-sm" | |||
|+ {{EditButton|Giddeus/Harvesting}} | |||
|- | |||
! Item !! Price | |||
... | |||
</pre> | |||
Looks like this: | |||
{| class="horizon-table harvesting-table table-sm" | |||
|+ {{EditButton|Giddeus/Harvesting}} | |||
|- | |||
! Item !! Abundance | |||
|- | |||
| ... || ... | |||
|} | |||
Examples: | |||
<pre> | <pre> | ||
{{EditButton|West Sarutabaruta/Chocobo Digging}} | {{EditButton|West Sarutabaruta/Chocobo Digging}} | ||
Line 23: | Line 45: | ||
{{EditButton|West Sarutabaruta/Chocobo Digging}} | {{EditButton|West Sarutabaruta/Chocobo Digging}} | ||
{{:West Sarutabaruta/Chocobo Digging}} | {{:West Sarutabaruta/Chocobo Digging}} | ||
|} | |||
<pre> | |||
{{EditButton|West Sarutabaruta/Chocobo Digging}} | |||
{{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}} | |||
</pre> | |||
{| | |||
{{EditButton|West Sarutabaruta/Chocobo Digging}} | |||
{{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}} | |||
|} | |} |
Latest revision as of 16:24, 29 November 2023
Usage
Place an edit button to a transcluded element. If Page does not exist, shows a "create" button.
Note: at the moment, the button floats all the way to the page margin (right by default). If the element it is supposed to make editable isn't extending all the way to the right, the button needs to be contained somehow - if possible with the same container that restricts the element - so it remains close to the element.
Optional css parameters (and default value):
{{EditButton|... | margin-bottom = 0px | text-align = right | css-styles = }}
The best way to include an edit button seems to be to set it as a table caption like
{| class="horizon-table harvesting-table table-sm" |+ {{EditButton|Giddeus/Harvesting}} |- ! Item !! Price ...
Looks like this:
Item | Abundance |
---|---|
... | ... |
Examples:
{{EditButton|West Sarutabaruta/Chocobo Digging}} {{:West Sarutabaruta/Chocobo Digging}}
Item | Abundance |
---|---|
Lauan Log | Common(15.3%) |
Little Worm | Very Common(24.2%) |
Pebble | Very Common(27.8%) |
Gysahl Greens | Very Rare(4.8%) |
Bird Feather | Very Rare(3.4%) |
Insect Wing | Rare(5.8%) |
Moko Grass | Rare(6.3%) |
Yagudo Feather | Very Rare(1.6%) |
Saruta Cotton | Very Rare(4.8%) |
Rosewood Log | Rare(5.6%) |
Ebony Log | Extremely Rare(0.4%) |
Tree Cuttings ● | Extremely Rare(0.2%) |
● = Requires Burrow ● = Requires Egg Helm ● = Requires Bore ● = Obtainable only at Night |
{{EditButton|West Sarutabaruta/Chocobo Digging}} {{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}}
Item | Abundance |
---|---|
Lauan Log | Common(15.3%) |
Little Worm | Very Common(24.2%) |
Pebble | Very Common(27.8%) |
Gysahl Greens | Very Rare(4.8%) |
Bird Feather | Very Rare(3.4%) |
Insect Wing | Rare(5.8%) |
Moko Grass | Rare(6.3%) |
Yagudo Feather | Very Rare(1.6%) |
Saruta Cotton | Very Rare(4.8%) |
Rosewood Log | Rare(5.6%) |
Ebony Log | Extremely Rare(0.4%) |
Tree Cuttings ● | Extremely Rare(0.2%) |
● = Requires Burrow ● = Requires Egg Helm ● = Requires Bore ● = Obtainable only at Night |