Module:Definitions/doc: Difference between revisions
From SpiritVale Wiki
More actions
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..." |
No edit summary Tags: Mobile edit Mobile web edit |
||
| 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><a></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 == | ||