Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Join the Playtest on Steam Now: SpiritVale

Module:Definitions/doc: Difference between revisions

From SpiritVale Wiki
Created page with "== Module:Definitions == This module implements the Definitions v1 system used by Template:Def. It resolves a (Domain, Key) pair against a JSON database and outputs a small inline term with optional tooltip text. == Purpose == * Provide consistent, reusable definitions across the wiki. * Keep usage explicit to avoid collisions (no guessing). * Allow pages to show definitions without requiring navigation. == Usage == The public interface is the template Templat..."
 
m Protected "Module:Definitions/doc" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Tags: Mobile edit Mobile web edit
 
(One intermediate revision by the same user not shown)
Line 47: Line 47:


* If <code>Definition</code> is empty, no tooltip is shown.
* If <code>Definition</code> is empty, no tooltip is shown.
Link rule:
* If <code>Link</code> is non-empty, the term text is rendered as a real <code>&lt;a&gt;</code> (clickable).
* If <code>Link</code> is empty, the term text is rendered as plain text (tooltip-only).


=== 3) Definitions database (JSON) ===
=== 3) Definitions database (JSON) ===
Line 104: Line 109:


* <code>data-sv-def-tip</code> (tooltip text)
* <code>data-sv-def-tip</code> (tooltip text)
* <code>data-sv-def-link</code> (reserved)
* <code>data-sv-def-link</code> (reserved / optional)


== Fallback behavior ==
== Fallback behavior ==