Template

Tutorial

From Dogcraft Wiki

(Created page with "<includeonly><div id="tutorial" style="display:flex; justify-content:center; align-items:center; margin:10px 0;"> <div style="border-bottom:3px solid {{{border|#8b0024}}}; bac...")
Ā 
(navigation mode)
Line 1: Line 1:
<includeonly><div id="tutorial" style="display:flex; justify-content:center; align-items:center; margin:10px 0;">
<includeonly><templatestyles src="Tutorial/styles.css" /><div id="tutorial" style="display:flex; justify-content:center; align-items:center; margin:10px 0;">
<div style="border-bottom:3px solid {{{border|#8b0024}}}; background:{{{background|#e9edef}}}; padding:0.3em 1rem; text-align:center; min-width:{{{min_width|50%}}}; {{{style|}}}">
<div style="border-{{#if:{{{nav|}}}|top|bottom}}:3px solid {{{border|#8b0024}}}; background:{{{background|#e9edef}}}; padding:0.3em 1rem; text-align:center; min-width:{{{min_width|50%}}}; {{{style|}}}">
<div style="font-size:20px; font-weight:bold;"><div style="color:gray; font-size:small; margin-bottom:-5px;">{{{name|Tutorial}}}</div>{{{title|Title}}}</div>
<div style="font-size:20px; font-weight:bold;"><div style="color:gray; font-size:small; margin-bottom:-5px;">{{{name|{{#if:{{{nav|}}}|Tutorial navigation|Tutorial}}}}}</div>{{#if:{{{nav|}}}||{{{title|Title}}}}}</div>
<div style="font-style:italic; font-size:14px; color:darkgray;">{{{description|}}}</div>
<div style="font-style:italic; font-size:14px; color:darkgray;">{{#if:{{{nav|}}}||{{{description|}}}}}</div>
<div id="tutorial-nav" style="display:flex; flex-direction:row; align-items:center; justify-content:space-between; text-align:center; padding-top:0.6em;">
<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}}}|Ā« Previous]]</span>
<span style="font-weight:600; white-space:nowrap;">[[{{{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}}}|Next Ā»]]</span>
<span style="font-weight: 600; white-space:nowrap;">[[{{{next}}}|{{Clickable button|Next Ā»|color=blue}}]]</span>
</div></div></div></includeonly><noinclude>
</div></div></div></includeonly><noinclude>
{{TemplateStyles}}


==Tutorial template==
==Tutorial template==
This template is for tying together multiple guide pages into a single tutorial one can step through. Ā 
This template is for tying together multiple guide pages into a single tutorial one can step through. Ā 


==Example==
==Examples==
<pre style="white-space:pre-line;">{{Tutorial
<pre style="white-space:pre-line;">{{Tutorial
|titleĀ  Ā  Ā  = Starting on Dogcraft
|titleĀ  Ā  Ā  = Starting on Dogcraft
Line 27: Line 28:
|chaptersĀ  Ā  = [[Guide:Linking|Account linking]] ([[Guide:Bedrock Account Linking|Bedrock]]) {{*}} [[Rules]] {{*}} '''Worlds''' {{*}} [[Features beyond Vanilla|Server information & features]]
|chaptersĀ  Ā  = [[Guide:Linking|Account linking]] ([[Guide:Bedrock Account Linking|Bedrock]]) {{*}} [[Rules]] {{*}} '''Worlds''' {{*}} [[Features beyond Vanilla|Server information & features]]
}}
}}
===Navigation mode===
Useful for Previous/Next buttons at the bottom of pages.
<pre style="white-space:pre-line;">{{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
}}</pre> generates:
{{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
}}


==Template data==
==Template data==
Line 98: Line 115:
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true,
"required": true,
"suggested": true
},
"nav": {
"label": "(Optional) Navigation mode",
"description": "Trigger for navigation mode: If true, Title and Description are not shown and Name is set to \"Tutorial navigation\".",
"type": "boolean",
"default": "false",
"suggested": true
"suggested": true
}
}
Line 109: Line 133:
"description",
"description",
"name",
"name",
"nav",
"min_width",
"min_width",
"border",
"border",

Revision as of 18:21, 4 August 2022

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:

Tutorial
Starting on Dogcraft
A guide to your first few days on the Dogcraft server & community.
Feel free to ask any [Helper]s or staff for assistance!

Navigation mode

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:

Tutorial navigation


Template data

For tying together multiple guide pages into a single step-through tutorial.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

The tutorial's title

Example
Server economy
Stringrequired
Previous chapterprevious

Page name of the previous chapter (guide) for linking

Example
Guide:Account_Linking
Page namerequired
Next chapternext

Page name of the next chapter (guide) for linking

Example
Guide:Claiming_land
Page namerequired
Chapterschapters

A list of links to all the pages which are tied together into the tutorial, usually separated with {{*}}s.

Example
[[Guide:Account Linking]] {{*}} [[Rules]] {{*}} [[Guide:Claiming land]]
Stringsuggested
(Optional) Descriptiondescription

A short description of the entire tutorial's purpose.

Example
A guide to your first few days on Dogcraft.
Stringsuggested
(Optional) Namename

An alternative name to the gray 'Tutorial' line at the template's top. This should mostly be unused.

Stringsuggested
(Optional) Navigation modenav

Trigger for navigation mode: If true, Title and Description are not shown and Name is set to "Tutorial navigation".

Default
false
Booleansuggested
Minimum widthmin_width

The box's minimum width

Default
50%
Stringoptional
Border colorborder

The color of the line at the box's bottom

Example
crimson
Stringoptional
Background colorbackground

The box's background color

Example
yellow
Stringoptional
Further stylesstyle

Free-form parameter for adding further CSS styles to the box.

Stringoptional
This page was last modified on 4 August 2022, at 18:21. (11 months ago)
Background Valentine's Day Event 2024 by TheWhiteTigerNL