Dosiero demo: theme matrix

Demo only. Everything you upload is visible to every other visitor of this demo, and is deleted again within minutes. Actions are logged, including your IP address. Do not upload anything private, unlawful, or that you are not entitled to share.

Every cell is a separate instance in its own iframe, so the page also shows that the appearance options are per instance: no cell can influence its neighbours. The last cell changes the look through styles alone, without forking the shipped stylesheet.

Integration

Each cell is one instance with two options set; nothing else differs between them:

new Dosiero({
    mode: Dosiero.MODE_IFRAME,
    iframe: iframe,
    endpoint: window.location.origin + '/endpoint/index.php',

    os: 'mac',            // 'auto' (default), 'win', 'mac' or 'linux'
    colorScheme: 'dark',  // 'auto' (default), 'light' or 'dark'
}).open();

auto reads the host system and falls back to the neutral linux set when it cannot tell. colorScheme exists because inside an iframe prefers-color-scheme reports the operating system, not the hosting page — an application with its own dark mode switch would otherwise disagree with the manager, so pass the scheme the page is currently in. Both land on the root element of the manager's document as data-os and data-color-scheme, so your own CSS can key off them.

The last cell sets neither, and changes the look through tokens alone:

new Dosiero({
    // …
    styles: `
        :root {
            --dsr-background: #10182a;
            --dsr-text-color: #e6edff;
            --dsr-icon-color: #7aa2ff;
            --dsr-header-background: #0b1120;
            --dsr-files-background-selected: #2b4c9b;
            --dsr-border: 1px solid #2b3a5c;
        }
    `,
}).open();

The options are read when the manager opens, so switching at runtime means destroy() and a new instance.

back