Files
computer-playbook/roles/sys-front-inj-css
Kevin Veen-Birkenbach c835ca8f2c refactor(front-injection): stabilize run_once flow and explicit web-service loading
- sys-front-inj-all: load web-svc-cdn and web-svc-logout once; reinitialize inj_enabled after services; move run_once block to top; reorder injections.
- sys-front-inj-css: move run_once call into 01_core; fix app_style_present default; simplify main.
- sys-front-inj-desktop/js/matomo: deactivate per-role run_once blocks; keep utils/run_once where appropriate.
- sys-front-inj-logout: switch to files/logout.js + copy; update head_sub mtime lookup; mark set_fact tasks unchanged.
- sys-svc-cdn: inline former 01_core tasks into main; ensure shared/vendor dirs and set run_once in guarded block; remove 01_core.yml.

Rationale: prevent cascading 'false_condition: run_once_sys_svc_cdn is not defined' skips by setting run-once facts only after the necessary tasks and avoiding parent-scope guards; improves determinism and handler flushing.

Conversation: https://chatgpt.com/share/68ecfaa5-94a0-800f-b1b6-2b969074651f
2025-10-13 15:12:23 +02:00
..

🌍 Global CSS Injection for Nginx

Description

This Ansible role ensures consistent global theming across all Nginx-served applications by injecting CSS files.
The role leverages colorscheme-generator to generate a dynamic, customizable color palette for light and dark mode, compatible with popular web tools like Bootstrap, Keycloak, Nextcloud, Taiga, Mastodon, and many more.

Overview

This role deploys a centralized global stylesheet that overrides the default theming of web applications served via Nginx. It's optimized to run only once per deployment and generates a cache-busting version number based on file modification timestamps.
It includes support for dark mode, custom fonts, and extensive Bootstrap and UI component overrides.

Purpose

The goal of this role is to provide a single source of truth for theming across your infrastructure.
It makes all applications feel like part of the same ecosystem — visually and functionally.

Features

  • 🎨 Dynamic Theming via colorscheme-generator
  • 📁 Unified CSS Base Configuration deployment for all Nginx applications
  • 🌒 Dark mode support out of the box
  • 🚫 No duplication tasks run once per deployment
  • ⏱️ Versioning logic to bust browser cache
  • 🎯 Bootstrap override compatibility
  • 🧩 Theme support for Keycloak, Nextcloud, Gitea, LAM, Peertube, and more

Credits 📝

Developed and maintained by Kevin Veen-Birkenbach.
Learn more at www.veen.world

Part of the Infinito.Nexus Project
License: Infinito.Nexus NonCommercial License