Sticky – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Template creation)
 
m (Text replacement - "<tt>([^ =]+)<\/tt>" to "{{hl|$1}}")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}
<includeonly>{{#if:{{{1|}}}
| <div style="background-color: #FFF; border-{{#ifeq:{{lc:{{{2|top}}}}}|bottom|top|bottom}}: solid 0.0625em #888; padding: 0.25em 2em; min-height: 2em; position: sticky; {{#ifeq:{{lc:{{{2|top}}}}}|bottom|bottom|top}}: 0; right: 0">{{{1}}}</div>
| <div class="sticky-{{#ifeq:{{lc:{{{2|top}}}}}|bottom|bottom|top}}">{{{1}}}</div>
|-no content provided-
| -no content provided-
}}</includeonly><noinclude>{{Doc/Template
}}</includeonly><noinclude>{{Doc/Template
|descr= Creates a sticky note - an information that sticks to the page, even after scrolling.
|descr= Creates a sticky note - an information that sticks to the page, even after scrolling.
Line 7: Line 7:
|descr1= the sticky note content
|descr1= the sticky note content
|param2= position
|param2= position
|descr2= (Optional, default <tt>top</tt>) can be <tt>top</tt> or <tt>bottom</tt>.
|descr2= (Optional, default {{hl|top}}) can be {{hl|top}} or {{hl|bottom}}.
|example1= <nowiki>{{Sticky}}</nowiki>
|example1= <nowiki>{{Sticky}}</nowiki>
|result1= {{Sticky}}
|result1= {{Sticky}}

Latest revision as of 11:33, 16 November 2021

Creates a sticky note - an information that sticks to the page, even after scrolling.

This template is used on these pages.

Usage

{{Sticky|content|position}}

  • content: the sticky note content
  • position: (Optional, default top) can be top or bottom.
Examples
Code Result
{{Sticky}} -no content provided-
{{Sticky|{{Feature|warning|Use '''on'''EventName in [[Config]]!}}}}
Use onEventName in Config!
{{Sticky|Jump to [[#top|the top]] of the page|bottom}}
Jump to the top of the page