Template:Fancy TOC: Difference between revisions
Template page
More actions
Created page with "<templatestyles src="Fancy TOC/styles.css" /><div class="fancy-toc" style="background: {{{background color|#F9F9F9}}}; border: {{{border width|1}}}px solid #777; width: {{{width|30}}}%; height: {{{height|229}}}px; clear: {{{float|right}}}; float: {{{float|right}}};"><div style="display: block; height: {{#expr:{{{height|229}}}{{#ifeq:{{{nav|yes}}}|no||-21}}}}px; overflow: auto;"><div id="TopTOC" style="display: block; position: relative; top: -20px;"></div>__TOC__<div id=..." |
No edit summary |
||
Line 1: | Line 1: | ||
<templatestyles src="Fancy TOC/styles.css" /><div class="fancy-toc" style="background: {{{background color|#F9F9F9}}}; border: {{{border width|1}}}px solid #777; width: {{{width|30}}}%; height: {{{height|229}}}px; clear: {{{float|right}}}; float: {{{float|right}}};"><div style="display: block; height: {{#expr:{{{height|229}}}{{#ifeq:{{{nav|yes}}}|no||-21}}}}px; overflow: auto;"><div id="TopTOC" style="display: block; position: relative; top: -20px;"></div>__TOC__<div id="BottomTOC" style="display: block; position: relative; top: -{{#expr:{{{height|229}}}-19}}px;"></div></div>{{#ifeq:{{{nav|yes}}}|no||<div style="display: block; background: {{{background|#F9F9F9}}}; text-align: center; border: {{{border width|1}}}px solid #AAA;">'''TOC''': [[#BottomTOC|'''↓''' Go to bottom '''↓''']] [[#TopTOC|'''↑''' Go to top '''↑''']]</div>}}</div><noinclude> | <templatestyles src="Template:Fancy TOC/styles.css" /><div class="fancy-toc" style="background: {{{background color|#F9F9F9}}}; border: {{{border width|1}}}px solid #777; width: {{{width|30}}}%; height: {{{height|229}}}px; clear: {{{float|right}}}; float: {{{float|right}}};"><div style="display: block; height: {{#expr:{{{height|229}}}{{#ifeq:{{{nav|yes}}}|no||-21}}}}px; overflow: auto;"><div id="TopTOC" style="display: block; position: relative; top: -20px;"></div>__TOC__<div id="BottomTOC" style="display: block; position: relative; top: -{{#expr:{{{height|229}}}-19}}px;"></div></div>{{#ifeq:{{{nav|yes}}}|no||<div style="display: block; background: {{{background|#F9F9F9}}}; text-align: center; border: {{{border width|1}}}px solid #AAA;">'''TOC''': [[#BottomTOC|'''↓''' Go to bottom '''↓''']] [[#TopTOC|'''↑''' Go to top '''↑''']]</div>}}</div><noinclude> | ||
{{Documentation}}</noinclude> | {{Documentation}}</noinclude> |
Latest revision as of 19:49, 15 March 2025
This template uses TemplateStyles: |
This template does not work properly in the Vector 2022 skin. Read the documentation for an explanation. |
The Fancy TOC template displays a table of contents box that can be limited to a set height and width, and will allow scrolling to see the remainder of the table of contents that doesn't fix within the size that is set.
Parameters
Parameter | Default value | Comments |
---|---|---|
height= | 299 | The height is set in pixels, but do not add px after the amount. |
width= | 30 | The width in percent. Do not add a % sign. |
float= | right | Other valid options are none and left. |
nav= | yes | Set to no to hide the links at the bottom of the table of contents to jump to the first and last entries |
background color= | #F9F9F9 | See Help:Colors for information about specifying colors. |
border width= | 1 | Set to 0 to hide the border. |
Limitations
Since the Vector 2022 skin forces the table of contents into a sidebar or a pop-up menu, this template does not control the placement of the TOC in that skin.