Template:ProjectCard: Difference between revisions
Template page
More actions
No edit summary |
(No difference)
|
Revision as of 00:31, 18 March 2026
[[|Project]]
ProjectCard
Displays a visual project card used on hub pages. Shows a cover image, project name, status/license badges, creator, optional custom fields, tags, and a hover description overlay. Contributor count and last-edited date are populated by MediaWiki:Gadget-projects.js. Tags are rendered from data-tags by the gadget.
Styles are loaded from Template:ProjectCard/styles.css.
β οΈ This template is called automatically by Cargo via #cargo_query on hub pages. You should not need to call it manually. See Template:ProjectInfobox for how projects are submitted to the database.
Called by Cargo β example query
{{#cargo_query:
tables = Projects
| fields = _pageName=pagename, name, categories, status, license, creator,
description, image, tags, field1label, field1value,
field2label, field2value, field3label, field3value, field4label, field4value
| where = categories HOLDS 'Audio'
| order by = Projects._pageName
| limit = 500
| format = template
| template = ProjectCard
| named args = yes
| no results text = <div class="project-hub-empty">No projects yet.</div>
}}
Parameters (passed by Cargo via named args=yes)
pagename- Full page name (aliased from
_pageNamein the query). Used for the card title link and gadget API calls. name- Project display name.
status- Project status. Supported values:
Active,Hiatus,Completed,Abandoned. Each has a distinct colour badge. license- License name shown as a badge (e.g.
CC-BY-SA 4.0). creator- Creator or team name.
description- Short description shown in the hover overlay.
image- Cover image filename (e.g.
MyProject.png). tags- Space-separated tag string. Rendered into
tags by the gadget. field1labelβfield4label- Optional custom field labels.
field1valueβfield4value- Optional custom field values.