# ViKZ: DokuWiki template Theme for **wiki.vikz.by**, an archive of industrial, civilian and military vehicles. Built on `lib/tpl/dokuwiki`. One template serves every page type; the type is read from the page id. ## Organisation (current scope: vehicles only) ``` start Portal → search, existing tags grouped by prefix, latest vehicle pages vehicles:start Index → alphabetical list + tag filter (sidebar) vehicles: Vehicle → header + infobox + relations, sections, tags en:… same tree (translation plugin) ``` Namespaces are in English. Manufacturers, families, engines, sources and the chronology are switched off: their namespace settings (`makerNS`, `familyNS`, `engineNS`, `sourceNS`, `annexNS`, `timelinePage`) are empty. Fill one in later to enable that page type; the code is already there. Menu: `navPages` (default `vehicles:start`). ## Facets = prefixed tags ``` {{tag>pays:urss conception:maz constructeur:maz constructeur:kzkt usage:militaire type:tracteur-artillerie config:8x8 moteur:d12a-375 famille:maz-535 periode:1950s periode:1960s}} ``` - Every tag already in the wiki is used: prefixed tags are grouped by prefix, tags without a prefix go under "Autres étiquettes". - Displayed at the bottom of the fiche and in the sidebar, grouped by facet, as clickable pills. - A pill opens `vehicles:start?tag=…`: the template lists the matching vehicles as cards, with the filter in the sidebar. Filters combine (AND); for `singleFacets` (config, statut) a new value replaces the old one. Only the tags of vehicle pages are used; the tag plugin is only needed for the `{{tag>…}}` syntax. - Value labels: `val__` in `lang/*/lang.php`, else the slug (`8x8` → `8×8`, `1950s` → `Années 1950`). - `statut:todo` shows a "Fiche en cours" badge on the fiche and its card (replaces `[TODO]` in titles). ## Fiche véhicule: what you write ``` ====== MAZ-535 ====== //Tracteur d'artillerie, tout-terrain, 19,4/6/50 t, 8×8/4//\\ **Pays d'origine :** URSS\\ **Conception :** [[constructeurs:maz|MAZ]]\\ **Production :** MAZ, KZKT\\ **Période de production :** 1958 à 1964\\ **Usage :** militaire {{vehicles:maz-535:principale.jpg?400}} **Parenté :** * [[maz-537]] (successeur) * [[maz-535a]] (dérivé) * [[kraz-255]] (similaire) ===== Description ===== ==== MAZ-535A ==== ===== Famille ===== ===== Données techniques ===== * Poids à vide : 19,4 t ===== Sources ===== * [[sources:kochnev-2008|Kochnev, 2008]], p. 112 ===== Galerie ===== {{vehicles:maz-535:…}} … {{tag>…}} ``` | Source | Result | |---|---| | first heading, `"Nickname"` | title, nickname on its own line | | `//…//` | subtitle | | `**Label :** value` lines + first image | infobox (image on top; a 16:9 image becomes a full-width band) | | `**Parenté :**` / `**Liens :**` list with `(role)` | typed relations, ordered prédécesseur → successeur → dérivé → similaire; missing pages are dashed and marked "fiche à créer" | | `===== Section =====` | numbered, collapsible (state remembered per browser) | | `Label : value` list | key/value block, same key column width on every fiche | | link to `sources:` | `§` marker | | `===== Galerie =====` | thumbnail grid | Missing parts are simply not shown. Without JS the page renders as plain styled wiki text. ## Custom tags (plugin `lib/plugins/vikz/`) ``` Camion lourd 8×8 pour systèmes de missiles vehicles:maz-537 vehicles:maz-535, vehicles:maz-535a|MAZ-535A vehicles:zil-135 ← role "Parenté" FIXME or source manquante ← "À vérifier" mark, no yellow smiley ^ Moteur | D12A-375 | ← transparent table; normal tables unchanged ``` `` and `` can sit anywhere; the template moves them into the header. Lists are always plain bullet lists (no automatic two-column layout). ## Hub pages - **Constructeur**: write the infobox (Sigle, Nom complet, Pays, Ville, Dates, Bureaux d'études) and `{{topic>conception:maz}}` / `{{topic>constructeur:maz}}` (tag plugin). Vehicle lists become cards (image = page's first image, subtitle = first line of the abstract, meta = pays · période · usage). - **Famille**: nested list for the tree, `^ Variante ^ … ^` table for the comparison. - **Moteur**: infobox + `{{topic>moteur:}}`. - **Index**: `{{nspages>vehicles}}` or `{{indexmenu>vehicules}}` for the alphabetical list (shown in columns); the facet filter is added by the template. ## Chronologie Each fiche (box hidden by the template): ``` ---- dataentry vehicule ---- debut : 1958 fin : 1964 usage : militaire pays : URSS ---- ``` Chronology page: ``` ---- datatable vehicule ---- cols : %pageid%, debut, fin, usage, pays sort : debut ---- ``` ## Light / dark Colours are CSS custom properties (`css/basic.less`). `darkMode = auto` follows the system and adds a ◐ toggle in the header (choice stored per browser). Plugin CSS that uses style.ini replacements stays light. ## Fonts PT Sans Narrow, PT Serif, IBM Plex Mono (`meta.html`, Google Fonts). All three include Cyrillic and Latin Extended (transliterations). Google serves the subsets on demand via `unicode-range`. ## Check on the live install 1. DokuWiki ≥ 2023-04-04 (CSS custom properties through the LESS compiler; `data-wiki-id` on links). 2. After updating: save Admin › Configuration once (invalidates the CSS/JS cache), then Ctrl+F5. 4. Data plugin table class (`table.dataplugin_table` / `.dataaggregation`). ## Plugins tag (+ pagelist), translation, data (sqlite). Optional: nspages or indexmenu. ## Installation 1. Back up `lib/tpl/vikz/`, then replace its contents with these files. Delete `css/vehicle.less` and `css/browse.less` if they are still there. 2. Remove old overrides: the `$conf['tpl']['vikz'][…]` lines in `conf/local.php`, and `conf/tpl/vikz/style.ini` if it exists. 3. Admin › Configuration Settings › `template` = `vikz`, save (clears the CSS cache), then Ctrl+F5. 4. Move pages to the new tree (`vehicles:` etc.), add facet tags, replace `[TODO]` with `statut:todo`. `worldbuilding` and `recherche` are no longer in the menu.