Files
computer-playbook/roles/sys-front-inj-css/README.md
Kevin Veen-Birkenbach 231fd567b3 feat(frontend): rename inj roles to sys-front-*, add sys-svc-cdn, cache-busting lookup
Introduce sys-svc-cdn (cdn_paths/cdn_urls/cdn_dirs) and ensure CDN directories + latest symlink.

Rename sys-srv-web-inj-* → sys-front-inj-*; update includes/templates; serve shared/per-app CSS & JS via CDN.

Add lookup_plugins/local_mtime_qs.py for mtime-based cache busting; split CSS into default.css/bootstrap.css + optional per-app style.css.

CSP: use style-src-elem; drop unsafe-inline for styles. Services: fix SYS_SERVICE_ALL_ENABLED bool and controlled flush.

BREAKING CHANGE: role names changed; replace includes and references accordingly.

Conversation: https://chatgpt.com/share/68b55494-9ec4-800f-b559-44707029141d
2025-09-01 10:10:23 +02:00

1.8 KiB
Raw Blame History

🌍 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