Template:Pill clickable: Difference between revisions

From Alpine Linux
m (fixed css)
(added more examples, replaced fullurl by wikilink)
Line 1: Line 1:
<noinclude>{{Template}}
<noinclude>{{Template}}


'''A clickable message Pill (wikilink).'''
'''A message Pill with clickable [[Help:Editing#Internal_links|wikilink]] based on [[:Template:Pill]].'''


====Usage====
====Usage====
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Installation}}</nowiki>}}
 
{{Codeline|1=<nowiki>{{Pill_clickable||<-v3.14.x|#DF0000|#FFDFDF||Release Notes for Alpine 3.14.0}}</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====
Line 15: Line 29:


====Example====
====Example====
{{Pill_clickable||v3.22.x|green|palegreen|right|Installation}}


</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></div></includeonly>
{{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}}
 
</noinclude><includeonly><div style="float: {{#if:{{{5|}}}|{{{5}}}|right}}; margin-left: 20px;">[[{{{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>]]</div></includeonly>

Revision as of 14:47, 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

{{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

  • {{{1}}} - Prefix text (optional)
  • {{{2}}} - Main text (also used as link display text)
  • {{{3}}} - Border color
  • {{{4}}} - Background color
  • {{{5}}} - Float position (left/right, default: right)
  • {{{6}}} - Wiki page name/anchor (required)

Example