Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
       🚧 True to our name, we’re still a work in progress. 🚧
   
       You’re welcome to explore, but account registration is currently invite-only as we finalize the setup. 
       Join our forum or follow Mastodon for updates. 
       Full Wiki launch coming soon!
   

Template:TutorialCard: Difference between revisions

Template page
Add <templatedata> for Visual Editor Usage.
No edit summary
Β 
Line 1: Line 1:
<templatestyles src="TutorialCard/styles.css"/><div class="tutorial-card-wrap" data-title="{{lc:{{{name|}}}}}" data-topic="{{lc:{{{topics|}}}}}" data-difficulty="{{lc:{{{difficulty|}}}}}" data-tags="{{lc:{{{tags|}}}}}" data-page="{{urlencode:{{{pagename|}}}|WIKI}}"><div class="tutorial-card"><div class="tutorial-card-image">{{#if:{{{image|}}}|[[File:{{{image}}}|200px|link=]]|<div class="tutorial-card-image-fallback">[[File:mimetypes-text-x-generic.png|48px|link=]]</div>}}</div><div class="tutorial-card-body"><div class="tutorial-card-title">[[{{{pagename|}}}|{{{name|Tutorial}}}]]</div><div class="tutorial-card-meta">{{#if:{{{topics|}}}|{{#arraymap:{{{topics|}}}|,|@@|<span class="tutorial-card-tag">@@</span>| }}|}}{{#if:{{{difficulty|}}}|<span class="tutorial-card-difficulty-{{lc:{{{difficulty|beginner}}}}}">{{{difficulty|Beginner}}}</span>|}}</div><div class="tutorial-card-stats"><span class="tutorial-card-contributors"></span><span class="tutorial-card-updated"></span></div></div><div class="tutorial-card-description">{{{description|}}}</div></div></div><noinclude>
<templatestyles src="TutorialCard/styles.css"/><div class="tutorial-card-wrap" data-title="{{lc:{{{name|}}}}}" data-topic="{{lc:{{{topics|}}}}}" data-difficulty="{{lc:{{{difficulty|}}}}}" data-tags="{{lc:{{{tags|}}}}}" data-page="{{urlencode:{{{pagename|}}}|WIKI}}"><div class="tutorial-card"><div class="tutorial-card-image">{{#if:{{{image|}}}|[[File:{{{image}}}|200px|link=]]|<div class="tutorial-card-image-fallback">[[File:mimetypes-text-x-generic.png|48px|link=]]</div>}}</div><div class="tutorial-card-body"><div class="tutorial-card-title">[[{{{pagename|}}}|{{{name|Tutorial}}}]]</div>{{#if:{{{tags|}}}|<div class="tutorial-card-meta">{{#arraymap:{{{tags|}}}|,|@@|<span class="tutorial-card-tag">@@</span>| }}</div>|}}<div class="tutorial-card-stats"><span class="tutorial-card-contributors"></span><span class="tutorial-card-updated"></span></div></div><div class="tutorial-card-description">{{{description|}}}</div></div></div><noinclude>
== TutorialCard ==
== TutorialCard ==
Displays a visual tutorial card used inside collapsible topic sections on the [[Tutorials]] hub. Shows a cover image, tutorial name, topic tag, difficulty badge, contributor stats, and a hover description overlay.
Displays a visual tutorial card used inside collapsible topic sections on the [[Tutorials]] hub. Shows a cover image, tutorial name, topic tag, difficulty badge, contributor stats, and a hover description overlay.

Latest revision as of 00:24, 3 April 2026

[[|Tutorial]]

TutorialCard

Displays a visual tutorial card used inside collapsible topic sections on the Tutorials hub. Shows a cover image, tutorial name, topic tag, difficulty badge, contributor stats, and a hover description overlay.

Styles are loaded from Template:TutorialCard/styles.css.

⚠️ This template is called automatically by Cargo via #cargo_query inside Template:TutorialSection. You should not need to call it manually. See Template:TutorialMeta for how tutorials are submitted to the database.

Called by Cargo β€” example query

{{#cargo_query:
  tables   = Tutorials
| fields   = _pageName=pagename, name, topics, difficulty, description, image, tags
| where    = topics HOLDS 'Audio'
| order by = Tutorials._pageName
| limit    = 500
| format   = template
| template = TutorialCard
| named args = yes
| no results text =
}}

Parameters (passed by Cargo via named args=yes)

pagename
Full page name (aliased from _pageName). Used for the card title link.
name
Tutorial display name.
topics
Topic string (e.g. Audio). Shown as an orange tag badge.
difficulty
Difficulty level. Values: Beginner (green), Intermediate (yellow), Advanced (red).
description
Short description shown in the hover overlay.
image
Cover image filename (e.g. MyThumbnail.png).
tags
Space-separated tags used for in-section filtering.

Displays a visual tutorial card. Normally called automatically by Cargo inside TutorialSection β€” see Template:TutorialMeta for submitting tutorials.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Page namepagename

Full wiki page name of the tutorial. Used for the card title link.

Page namerequired
Tutorial namename

Display name shown on the card.

Stringoptional
Topicstopics

Comma-separated topic string (e.g. Audio). Shown as tag badges on the card.

Stringoptional
Difficultydifficulty

Difficulty level shown as a coloured badge.

Suggested values
Beginner Intermediate Advanced
Default
Beginner
Stringoptional
Descriptiondescription

Short description shown in the hover overlay. Keep to 1-2 sentences.

Contentoptional
Cover imageimage

Cover image filename without File: prefix (e.g. MyThumbnail.png).

Fileoptional
Tagstags

Space-separated keywords used for filtering within tutorial sections.

Stringoptional