diff --git a/roles/koji_hub/tasks/main.yaml b/roles/koji_hub/tasks/main.yaml index ba937e7..4f50c37 100644 --- a/roles/koji_hub/tasks/main.yaml +++ b/roles/koji_hub/tasks/main.yaml @@ -393,3 +393,112 @@ name: koji-sweep-db.timer state: started enabled: true + +- name: "Generate: MxOS Theme Graphic Assets on Localhost" + delegate_to: localhost + run_once: true + block: + - name: Ensure librsvg2-tools is installed on localhost (Fedora) + ansible.builtin.dnf: + name: librsvg2-tools + state: present + become: true + + - name: Convert main logo SVG to PNG + ansible.builtin.command: + cmd: "rsvg-convert -w 250 --keep-aspect-ratio -o /tmp/mxos-koji.png /home/renich/Projects/MxOS/mxos.svg" + creates: /tmp/mxos-koji.png + + - name: Convert favicon logo SVG to PNG + ansible.builtin.command: + cmd: "rsvg-convert -w 32 --keep-aspect-ratio -o /tmp/mxos-favicon.png /home/renich/Projects/MxOS/mxos-reducido.svg" + creates: /tmp/mxos-favicon.png + +- name: "Deploy: Koji Web MxOS Branding Theme" + block: + - name: Create MxOS theme directories on Hub + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: root + group: root + mode: "0755" + loop: + - /usr/share/koji-web/static/themes/mxos + - /usr/share/koji-web/static/themes/mxos/images + + - name: Copy logo PNG to theme images directory + ansible.builtin.copy: + src: /tmp/mxos-koji.png + dest: /usr/share/koji-web/static/themes/mxos/images/koji.png + owner: root + group: root + mode: "0644" + notify: Restart httpd + + - name: Copy favicon PNG to theme images directory as favicon.ico + ansible.builtin.copy: + src: /tmp/mxos-favicon.png + dest: /usr/share/koji-web/static/themes/mxos/images/favicon.ico + owner: root + group: root + mode: "0644" + notify: Restart httpd + + - name: Deploy MxOS koji.css style overrides + ansible.builtin.copy: + dest: /usr/share/koji-web/static/themes/mxos/koji.css + owner: root + group: root + mode: "0644" + content: | + @import url("../default/koji.css"); + + body { + font-family: 'Inter', system-ui, -apple-system, sans-serif; + } + + #header { + background-color: #0f172a; /* Pizarra oscuro */ + border-bottom: 3px solid #10b981; /* Verde esmeralda de MxOS */ + } + + #header a { + color: #10b981; + } + + #header h1 { + background-image: url("images/koji.png"); + background-repeat: no-repeat; + background-position: left center; + height: 60px; + padding-left: 270px; /* Suficiente espacio para la imagen de 250px */ + } + + /* Cambiar colores de enlaces y botones */ + a { + color: #10b981; + } + + a:hover { + color: #059669; /* Verde oscuro */ + } + + th { + background-color: #1e293b !important; + color: #f8fafc !important; + } + + .button, input[type="submit"], input[type="button"] { + background-color: #10b981; + color: white; + border: none; + border-radius: 4px; + padding: 4px 12px; + cursor: pointer; + } + + .button:hover, input[type="submit"]:hover, input[type="button"]:hover { + background-color: #059669; + } + notify: Restart httpd diff --git a/roles/koji_hub/templates/web.conf.j2 b/roles/koji_hub/templates/web.conf.j2 index 7aaa8ae..1f889e7 100644 --- a/roles/koji_hub/templates/web.conf.j2 +++ b/roles/koji_hub/templates/web.conf.j2 @@ -1,5 +1,6 @@ [web] SiteName = MxOS koji +KojiTheme = mxos KojiHubURL = https://{{ koji_hub_fqdn }}/kojihub KojiFilesURL = https://{{ koji_hub_fqdn }}/kojifiles WebAuthType = ssl