PHP Classes

File: src/Http/Controllers/IndexController.php

Recommend this page to a friend!
  Packages of Alberto Arena   Laravel Truss   src/Http/Controllers/IndexController.php  
File: src/Http/Controllers/IndexController.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Laravel Truss
View a diagram of a Laravel application models
Author: By
Last change: feat: theming and custom palettes (#22)

Let a host redefine the dashboard's colours and fonts from config to
match the app Truss is embedded in. A new truss.theme block exposes a
small set of semantic knobs (accent, background, surface, text, border,
and more) plus two font-family knobs; a ThemeStylesheet service maps each
onto the internal design tokens and emits only the ones set, so a handful
of values re-skins the whole dashboard, chrome and diagram, in both light
and dark, while everything else stays on the shipped default.

The overrides are delivered as a gated, same-origin stylesheet, so a
strict Content-Security-Policy still needs only style-src 'self' and a
default install makes no extra request. Values are validated against a
strict allow-list before they are written into the CSS response, so a
malformed or hostile value is dropped and degrades to the default rather
than breaking or injecting the sheet. Fonts are family names only. The
unused truss.diagram.theme key is removed in favour of truss.theme.
Date: 7 days ago
Size: 923 bytes

You need to be a registered user and login to get this file.

Login Immediately with your account on: