# 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:<model> 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
```
```
- 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_<facet>_<value>` in `lang/*/lang.php`, else the slug (`8×8` → `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 : MAZ
Production : MAZ, KZKT
Période de production : 1958 à 1964
Usage : militaire
Parenté :
Description
MAZ-535A
Famille
Données techniques
- Poids à vide : 19,4 t
Sources
- Kochnev, 2008, p. 112
Galerie
maz-535 …
```
| 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:<id>` | `§` 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
← role “Parenté” À vérifier or À vérifiersource manquante ← “À vérifier” mark, no yellow smiley
| Moteur | D12A-375 |
|---|
← transparent table; normal tables unchanged ```
`<subtitle>` and `<parent>` 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 + `
`. - Index: `vehicles` or `vehicules` for the alphabetical list (shown in columns);
the facet filter is added by the template.
## Chronologie
Each fiche (box hidden by the template): ```
- debut:
- 1958
- fin:
- 1964
- usage:
- militaire
- pay:
- URSS
``` Chronology page: ```
| Titre | debut | fin | usage | ↑ pay |
|---|---|---|---|---|
| MAZ-529 | 1959 | 1973 | civil | URSS |
| DTU-10 | 1961 | 1961 | civil | URSS |
| MAZ-535 | 1958 | 1964 | militaire | URSS |
| MAZ-74106 | 1976 | 1994 | militaire | URSS |
| MAZ-7410 "Oplot-B" | 1974 | 1975 | militaire | URSS |
| MAZ-74101 "Oplot-T" | 1975 | 1989 | militaire | URSS |
| MAZ-7311 "Oplot-P" | 1975 | militaire | URSS | |
| MAZ-79111 "Oplot-V" | 1974 | 1985 | militaire | URSS |
| MAZ-7911 "Oplot-A" | 1973 | 1979 | militaire | URSS |
| MAZ-7910 | 1974 | 1986 | civil | URSS |
| MAZ-7313 | 1986 | 1991 | civil | URSS |
| MAZ-7310 "Uragan" | 1973 | 1986 | civil | URSS |
| MAZ-543P | 1966 | 1974 | civil | URSS |
| MAZ-543M | 1976 | 2005 | militaire | URSS |
| MAZ-543A | 1966 | 2005 | militaire | URSS |
| MAZ-543 | 1965 | 1991 | militaire | URSS |
| MAZ-547V | 1974 | 1984 | militaire | URSS |
| MAZ-547A | 1970 | 1985 | militaire | URSS |
| MAZ-545 | 1969 | 1977 | militaire | URSS |
| KrAZ-255L | 1969 | 1989 | civil | URSS |
| MAZ-541 | 1959 | 1959 | militaire | URSS |
| MAZ-538 | 1960 | 1990 | militaire | URSS |
| MAZ-537G | 1958 | 1989 | militaire | URSS |
| MAZ-536 | 1957 | 1957 | militaire | URSS |
| MAZ-537 | 1958 | 1990 | militaire | URSS |
| MAZ-535V | 1959 | 1964 | militaire | URSS |
| MAZ-535B | 1959 | 1962 | militaire | URSS |
| MAZ-535 "Tsiklop" | 1956 | 1964 | militaire | URSS |
| MAZ-532 | 1957 | 1959 | civil | URSS |
| MAZ-528 | 1955 | 1955 | militaire | URSS |
| MAZ-525 "Chetvertak" | 1951 | 1965 | industriel | URSS |
| KZKT-537L | 1976 | 1990 | militaire | URSS |
| KrAZ-258B | 1966 | 1989 | civil | URSS |
| KrAZ-257 | 1965 | 1995 | civil | URSS |
| KrAZ-256B | 1966 | 1994 | industriel | URSS |
| KrAZ-255 "Laptyezhnik" | 1967 | 1993 | militaire | URSS |
| KrAZ-222 "Dnepr" | 1958 | 1966 | industriel | URSS |
| KrAZ-221 | 1958 | 1966 | civil | URSS |
| KrAZ-219 | 1957 | 1965 | civil | URSS |
| KrAZ-214 | 1956 | 1967 | militaire | URSS |
| MAZ-530 | 1957 | 1963 | industriel | URSS |
```
## 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:<modele>` etc.), add facet tags, replace `[TODO]` with `statut:todo`.
`worldbuilding` and `recherche` are no longer in the menu.
