Template:Editlink: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with "Puts a small "e" edit link in a subscript-like position. ;Usage :{{t|editlink|page to edit}} * 1= internal link page, like 'Template:Somenav' * 2= (Optional) char or text ...")
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Puts a small "e" edit link in a subscript-like position.  
Puts a small "e" edit link in a subscript-like position in a table cell. Intended for transcluded tables, but theoretically could be used for other things.


;Usage
;Usage
:{{t|editlink|page to edit}}
* 1 - internal link page, like 'Template:Somenav'
* 1internal link page, like 'Template:Somenav'
* 2 - (optional) char or text to use as link. Default is 'e'
* 2= (Optional) char or text to use as link. Default is 'e'.
* color - (optional) text color link. Default is regular link color
* color= (Optional) text color link. Default is regular link color.
* float - (optional) Default is 'right'. both|right|left|none
* float= [both,right,left,none] (Optional) Default is 'right'.
* tight - (optional) render the "e" that fits better in tight space, doesn't disturb flow
* tight= [1] (Optional) render the "e" that fits better in tight space, doesn't disturb flow.
* style - (optional) additional style, like margins or as necessary
* style= (Optional) additional style, like margins or as necessary.


;Example
;Examples
<pre>
<pre>
{| class="darktable" width="30%"
{| class="darktable" width="30%"
|-
|-
! Table with edit link {{editlink|Template:editlink}}
! Table with edit link {{{{PAGENAME}}|{{PAGENAME}}}}
|-
|-
| Cell 1
| Cell 1
Line 22: Line 21:
{| class="darktable" width="30%"
{| class="darktable" width="30%"
|-
|-
! style="position:relative" | Table with edit link {{editlink|Template:editlink}}
! style="position:relative" | Table with edit link {{{{PAGENAME}}|{{PAGENAME}}}}
|-
|-
| Cell 1
| Cell 1
Line 28: Line 27:


<pre>
<pre>
:Some kind of heading {{editlink|Template:editlink}}
:<div style="position:relative">Some kind of heading {{{{PAGENAME}}|{{PAGENAME}}}}</div>
:I like unicorn.
:I like unicorn.
:I like princess.
:I like princess.
</pre>
</pre>


:Some kind of heading {{editlink|Template:editlink}}
:<div style="position:relative">Some kind of heading {{{{PAGENAME}}|{{PAGENAME}}}}</div>
:I like unicorn.
:I like unicorn.
:I like princess.  
:I like princess.  
Line 42: Line 41:
<onlyinclude><includeonly><!--
<onlyinclude><includeonly><!--


--><span style="font-weight:normal; {{#if:{{{tight|}}}|font-size:.76em; position:absolute; right:.2em; top:.2em;|font-size:.83em; float:{{{float|right}}}; margin:.2em 0 -2em 0;}} {{{style|}}}">[{{fullurl:{{{1|{{FULLPAGENAME}}}}}|action=edit}} {{#if:{{{color|}}}|<span style="color:{{{color|}}};">}}{{{2|e}}}{{#if:{{{color|}}}|</span>}}]</span><!--
--><div class="editlink" style="{{{style|}}}">[{{fullurl:{{{1|{{FULLPAGENAME}}}}}|action=edit}} <span style="color:{{{color|#56a}}}">e</span>]</div><!--
 
<span class="{{#if:{{{tight|}}}|editlink}}" style="{{#if:{{{tight|}}}||font-size:.83em; float:{{{float|right}}}; margin:.2em 0 -2em 0;}} {{{style|}}}">[{{fullurl:{{{1|{{FULLPAGENAME}}}}}|action=edit}} {{#if:{{{color|}}}|<span style="color:{{{color|}}};">}}{{{2|e}}}{{#if:{{{color|}}}|</span>}}]</span>


--></includeonly></onlyinclude>
--></includeonly></onlyinclude>

Latest revision as of 17:32, 5 August 2023

Puts a small "e" edit link in a subscript-like position in a table cell. Intended for transcluded tables, but theoretically could be used for other things.

Usage
  • 1 - internal link page, like 'Template:Somenav'
  • 2 - (optional) char or text to use as link. Default is 'e'
  • color - (optional) text color link. Default is regular link color
  • float - (optional) Default is 'right'. both|right|left|none
  • tight - (optional) render the "e" that fits better in tight space, doesn't disturb flow
  • style - (optional) additional style, like margins or as necessary
Examples
{| class="darktable" width="30%"
|-
! Table with edit link {{{{PAGENAME}}|{{PAGENAME}}}}
|-
| Cell 1
|}
Table with edit link
Cell 1
:<div style="position:relative">Some kind of heading {{{{PAGENAME}}|{{PAGENAME}}}}</div>
:I like unicorn.
:I like princess.
Some kind of heading
I like unicorn.
I like princess.

Template