Renamed server roles by osi they work on

This commit is contained in:
2025-07-10 12:33:46 +02:00
parent c94d623f8f
commit 96268e7161
120 changed files with 167 additions and 167 deletions

View File

@@ -0,0 +1,34 @@
# 🌍 Global CSS Injection for Nginx
## Description
This Ansible role ensures **consistent global theming** across all Nginx-served applications by injecting a unified `global.css` file.
The role leverages [`colorscheme-generator`](https://github.com/kevinveenbirkenbach/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 (`global.css`) 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`](https://github.com/kevinveenbirkenbach/colorscheme-generator/)
- 📁 **Unified global.css** 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](https://www.veen.world)
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)

View File

@@ -0,0 +1,29 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Global CSS injection for Nginx-based apps using dynamic colorschemes."
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Archlinux
versions:
- rolling
galaxy_tags:
- nginx
- css
- colors
- bootstrap
- theming
- dynamic
- frontend
- global
repository: https://s.veen.world/cymais
issue_tracker_url: https://s.veen.world/cymaisissues
documentation: https://s.veen.world/cymais
dependencies:
- srv-web-7-4-core

View File

@@ -0,0 +1,36 @@
# Load this role via srv-web-7-7-inj-compose for consistency
- name: Generate color palette with colorscheme-generator
set_fact:
color_palette: "{{ lookup('colorscheme', global_css_base_color, count=global_css_count, shades=global_css_shades) }}"
when: run_once_nginx_global_css is not defined
- name: Generate inverted color palette with colorscheme-generator
set_fact:
inverted_color_palette: "{{ lookup('colorscheme', global_css_base_color, count=global_css_count, shades=global_css_shades, invert_lightness=True) }}"
when: run_once_nginx_global_css is not defined
- name: Deploy global.css
template:
src: global.css.j2
dest: "{{ global_css_destination }}"
owner: "{{ nginx.user }}"
group: "{{ nginx.user }}"
mode: '0644'
when: run_once_nginx_global_css is not defined
- name: Get stat for global.css
stat:
path: "{{ global_css_destination }}"
register: global_css_stat
when: run_once_nginx_global_css is not defined
- name: Set global_css_version
set_fact:
global_css_version: "{{ global_css_stat.stat.mtime }}"
when: run_once_nginx_global_css is not defined
- name: Mark css as done
set_fact:
run_once_nginx_global_css: true
when: run_once_nginx_global_css is not defined

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
<link rel="stylesheet" type="text/css" href="/global.css?version={{global_css_version}}">

View File

@@ -0,0 +1,3 @@
location = /global.css {
root {{nginx.directories.data.global}};
}

View File

@@ -0,0 +1,4 @@
global_css_destination: "{{nginx.directories.data.global}}global.css"
global_css_base_color: "{{ design.css.colors.base }}"
global_css_count: 7
global_css_shades: 100