Template:Pill clickable: Difference between revisions

From Alpine Linux
(fixed the improper link)
(changed Template to take style from Template:Pill)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Template}}
<noinclude>{{Template}}
'''A message Pill with clickable [[Help:Editing#Internal_links|wikilink]] based on [[:Template:Pill]].'''


'''A clickable message Pill (wikilink).'''
====Usage====
 
The template supports both positional and named parameters. Named parameters are recommended for clarity.
 
'''Named parameters:'''
 
{{Codeline|1=<nowiki>{{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}}</nowiki>}}
 
'''Positional parameters:'''


====Usage====
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Installation}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}}</nowiki>}}
{{Codeline|1=<nowiki>{{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}}</nowiki>}}


====Parameters====
====Parameters====
* {{{1}}} - Prefix text (optional)
 
* {{{2}}} - Main text (also used as link display text)
{| class="wikitable"
* {{{3}}} - Border color
|+ Parameter reference (supports both positional and named parameters)
* {{{4}}} - Background color
|-
* {{{5}}} - Float position (left/right, default: right)
! Position !! Field Name !! Description !! Mandatory
* {{{6}}} - Wiki page name/anchor (required)
|-
| 1 || prefix || Prefix text || optional
|-
| 2 || text || Main text (also used as link display text) || required
|-
| 3 || border || Border color || optional (default: green)
|-
| 4 || bg || Background color || optional (default: palegreen)
|-
| 5 || float || Float position || optional (default: right)
|-
| 6 || link || Wiki page name/anchor || required
|}


====Example====
====Example====
{{Pill_clickable||v3.22.x|green|palegreen|right|Installation}}
{{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}}
 
{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}}
</noinclude><includeonly><div style="float: {{{5|right}}}; margin-left: 20px;">[{{fullurl:{{{6}}}}} <span style="padding:2px;background-color:{{{4}}};border:2px solid {{{3}}};border-radius:1em;display:inline-block;font-size:80%;"><strong>{{{1}}}</strong>{{{2}}}]</span></includeonly>
{{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}}
{{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}}
{{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}}
{{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}}
{{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}}
{{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}}
</noinclude><includeonly>[[{{{link|{{{6}}}}}}|{{Pill|prefix={{{prefix|{{{1|}}}}}}|text={{{text|{{{2}}}}}}|border={{{border|{{{3|}}}}}}|bg={{{bg|{{{4|}}}}}}|float={{{float|{{{5}}}}}}}}]]</includeonly>

Latest revision as of 16:17, 7 December 2025

Template Documentation for Pill clickable

This page is a template and should only be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

A message Pill with clickable wikilink based on Template:Pill.

Usage

The template supports both positional and named parameters. Named parameters are recommended for clarity.

Named parameters:

{{Pill_clickable|text=v3.22.x|link=Release Notes for Alpine 3.22.0}}

Positional parameters:

{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}} {{Pill_clickable||v3.15.x-v3.18.x|#aaa|#eee||Release Notes for Alpine 3.19.0}} {{Pill_clickable||v3.19.x-v3.20.x|orange|goldenrod||Release Notes for Alpine 3.21.0}} {{Pill_clickable||v3.21.x|cadetblue|lightblue||Release Notes for Alpine 3.21.0}} {{Pill_clickable||v3.22.x|green|palegreen||Release Notes for Alpine 3.22.0}} {{Pill_clickable|Version:|current|purple|cornflowerblue|left|Release Notes for Alpine 3.23.0}} {{Pill_clickable||WIP|goldenrod|yellow||Release Notes for Alpine 3.23.0}}

Parameters

Parameter reference (supports both positional and named parameters)
Position Field Name Description Mandatory
1 prefix Prefix text optional
2 text Main text (also used as link display text) required
3 border Border color optional (default: green)
4 bg Background color optional (default: palegreen)
5 float Float position optional (default: right)
6 link Wiki page name/anchor required

Example

v3.22.x <-v3.14.x v3.15.x-v3.18.x v3.19.x-v3.20.x v3.21.x v3.22.x Version:current WIP