Template
Tutorial
From Dogcraft Wiki
(navigation mode) |
m (start and end parameters optionally disabling previous and next buttons) |
||
Line 4: | Line 4: | ||
<div style="font-style:italic; font-size:14px; color:darkgray;">{{#if:{{{nav|}}}||{{{description|}}}}}</div> | <div style="font-style:italic; font-size:14px; color:darkgray;">{{#if:{{{nav|}}}||{{{description|}}}}}</div> | ||
<div id="tutorial-nav" class="flex-mobile-wrap" style="display:flex; flex-direction:row; align-items:center; justify-content:space-between; text-align:center; padding-top:0.3em;"> | <div id="tutorial-nav" class="flex-mobile-wrap" style="display:flex; flex-direction:row; align-items:center; justify-content:space-between; text-align:center; padding-top:0.3em;"> | ||
<span style="font-weight:600; white-space:nowrap;">[[{{{previous}}}|{{Clickable button|« Previous}}]]</span> | <span style="font-weight:600; white-space:nowrap;">{{#if:{{{start|}}}|{{Clickable button|« Previous|disabled=1}}|[[{{{previous}}}|{{Clickable button|« Previous}}]]}}</span> | ||
<div id="tutorial-chapters" style="flex-grow:1; margin:0 10px; font-size:85%; word-wrap:anywhere;">{{{chapters|}}}</div> | <div id="tutorial-chapters" style="flex-grow:1; margin:0 10px; font-size:85%; word-wrap:anywhere;">{{{chapters|}}}</div> | ||
<span style="font-weight: 600; white-space:nowrap;">[[{{{next}}}|{{Clickable button|Next »|color=blue}}]]</span> | <span style="font-weight: 600; white-space:nowrap;">{{#if:{{{end|}}}|{{Clickable button|Next »|color=blue|disabled=1}}|[[{{{next}}}|{{Clickable button|Next »|color=blue}}]]}}</span> | ||
</div></div></div></includeonly><noinclude> | </div></div></div></includeonly><noinclude> | ||
{{TemplateStyles}} | {{TemplateStyles}} | ||
Line 123: | Line 123: | ||
"default": "false", | "default": "false", | ||
"suggested": true | "suggested": true | ||
}, | |||
"start": { | |||
"label": "(Optional) Start", | |||
"description": "Trigger signifying start of tutorial, disabled \"Previous\" button.", | |||
"type": "boolean" | |||
}, | |||
"end": { | |||
"label": "(Optional) End", | |||
"description": "Trigger signifying end of tutorial, disabled \"Next\" button.", | |||
"type": "boolean" | |||
} | } | ||
}, | }, | ||
Line 134: | Line 144: | ||
"name", | "name", | ||
"nav", | "nav", | ||
"start", | |||
"end", | |||
"min_width", | "min_width", | ||
"border", | "border", |
Revision as of 10:50, 5 August 2022
This template uses TemplateStyles: |
Tutorial template
This template is for tying together multiple guide pages into a single tutorial one can step through.
Examples
{{Tutorial |title = Starting on Dogcraft |description = A guide to your first few days on the Dogcraft server & community.<br />Feel free to ask any {{Rank|Helper}}s or staff for assistance! |previous = Rules |next = Features beyond Vanilla |chapters = [[Guide:Linking|Account linking]] ([[Guide:Bedrock Account Linking|Bedrock]]) {{*}} [[Rules]] {{*}} [[Worlds]] {{*}} [[Features beyond Vanilla|Server information & features]] }}
generates:
Feel free to ask any [Helper]s or staff for assistance!
Useful for Previous/Next buttons at the bottom of pages.
{{Tutorial |previous = Rules |next = Features beyond Vanilla |chapters = [[Guide:Linking|Account linking]] ([[Guide:Bedrock Account Linking|Bedrock]]) {{*}} [[Rules]] {{*}} [[Worlds]] {{*}} [[Features beyond Vanilla|Server information & features]] |nav = true }}
generates:
Template data
For tying together multiple guide pages into a single step-through tutorial.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | The tutorial's title
| String | required |
Previous chapter | previous | Page name of the previous chapter (guide) for linking
| Page name | required |
Next chapter | next | Page name of the next chapter (guide) for linking
| Page name | required |
Chapters | chapters | A list of links to all the pages which are tied together into the tutorial, usually separated with {{*}}s.
| String | suggested |
(Optional) Description | description | A short description of the entire tutorial's purpose.
| String | suggested |
(Optional) Name | name | An alternative name to the gray 'Tutorial' line at the template's top. This should mostly be unused. | String | suggested |
(Optional) Navigation mode | nav | Trigger for navigation mode: If true, Title and Description are not shown and Name is set to "Tutorial navigation".
| Boolean | suggested |
(Optional) Start | start | Trigger signifying start of tutorial, disabled "Previous" button. | Boolean | optional |
(Optional) End | end | Trigger signifying end of tutorial, disabled "Next" button. | Boolean | optional |
Minimum width | min_width | The box's minimum width
| String | optional |
Border color | border | The color of the line at the box's bottom
| String | optional |
Background color | background | The box's background color
| String | optional |
Further styles | style | Free-form parameter for adding further CSS styles to the box. | String | optional |