{* Visitor color mode switch. Every instance controls the same mode. Parameters: - view: "compact" (icon button, cycles System -> Light -> Dark), "icons" (three icon buttons in a pill), "choice" (three buttons with icon and label) or "dropdown" (icon button opening a menu with icon, label and check mark) - mode: operator default (system, light or dark) A stored visitor choice is applied early in index.html; bin/init.js handles clicks, the dropdown menu and keeps all instances in sync. *} {assign var=modes value=['system', 'light', 'dark']} {if $view === 'icons'} {assign var=icons value=['system' => 'monitor', 'light' => 'sun', 'dark' => 'moon-star']} {elseif $view === 'dropdown'} {assign var=icons value=['system' => 'sun-moon', 'light' => 'sun', 'dark' => 'moon-star']} {else} {assign var=icons value=['system' => 'sun-moon', 'light' => 'sun', 'dark' => 'moon']} {/if} {capture assign=groupLabel}{locale group="quiqqer/template-presentation" var="colorModeSwitch.label"}{/capture} {if $view === 'choice' || $view === 'icons'}