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.

CosmosΒΆ

The diagram places Global CSS Injection for NGINX in the Infinito.Nexus cosmos: the components it deploys (capabilities), the central services it consumes (dependencies), and its outward reach (federation and bridged external networks).

flowchart LR
    subgraph role [sys-front-inj-css πŸ’»]
        svc_css["css"]
    end

Solid 1:1 edges are fixed relationships; dashed 0..1 edges are conditional (enabled only in matching deployments); red 0..0 edges are turned off in this role. Node markers show the role’s deploy modes (πŸ’» host, 🐳 compose, 🐝 swarm); ❌ marks a service that is explicitly turned off, and βš™οΈ an Ansible role dependency declared in meta/main.yml.

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ΒΆ

Implemented by Kevin Veen-Birkenbach. Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).