From 86bc5595f27dad793287a725c6b1fb48dbe175d3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 20 Feb 2025 20:35:43 +0100 Subject: [PATCH] Solved portfolio bugs --- roles/docker-portfolio/tasks/main.yml | 6 +++-- .../docker-portfolio/templates/config.yaml.j2 | 22 ++++++++++++------- .../templates/global.css.j2 | 21 +++++++++--------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/roles/docker-portfolio/tasks/main.yml b/roles/docker-portfolio/tasks/main.yml index 99cf95ba..be2a8461 100644 --- a/roles/docker-portfolio/tasks/main.yml +++ b/roles/docker-portfolio/tasks/main.yml @@ -11,13 +11,15 @@ include_role: name: docker-repository-setup -- name: Check if host-specific config.yaml exists +- name: "Check if host-specific config.yaml exists in {{ config_inventory_path }}" stat: path: "{{ config_inventory_path }}" + delegate_to: localhost + become: false register: config_file - name: Copy host-specific config.yaml if it exists - copy: + template: src: "{{ config_inventory_path }}" dest: "{{docker_repository_path}}/app/config.yaml" notify: docker compose project setup diff --git a/roles/docker-portfolio/templates/config.yaml.j2 b/roles/docker-portfolio/templates/config.yaml.j2 index a76e4423..a3ae0659 100644 --- a/roles/docker-portfolio/templates/config.yaml.j2 +++ b/roles/docker-portfolio/templates/config.yaml.j2 @@ -16,7 +16,8 @@ accounts: icon: class: fa-solid fa-pen-nib children: -{% if service_provider.contact.mastodon is defined %} +{% if service_provider.contact.mastodon is defined and service_provider.contact.mastodon != "" %} + - name: Mastodon description: Follow {{ 'our' if service_provider.type == 'legal' else 'my' }} updates on Mastodon. @@ -26,7 +27,8 @@ accounts: identifier: "{{service_provider.contact.mastodon}}" {% endif %} -{% if service_provider.contact.bluesky is defined %} +{% if service_provider.contact.bluesky is defined and service_provider.contact.bluesky != "" %} + - name: Bluesky description: Follow {{ 'our' if service_provider.type == 'legal' else 'my' }} on Bluesky. @@ -37,7 +39,7 @@ accounts: identifier: "{{service_provider.contact.bluesky}}" {% endif %} -{% if service_provider.contact.pixelfed is defined %} +{% if service_provider.contact.pixelfed is defined and service_provider.contact.pixelfed != "" %} - name: Pictures description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} photo gallery on Pixelfed. @@ -47,7 +49,8 @@ accounts: url: "https://{{ service_provider.contact.pixelfed.split('@')[2] }}/@{{ service_provider.contact.pixelfed.split('@')[1] }}" {% endif %} -{% if service_provider.contact.peertube is defined %} +{% if service_provider.contact.peertube is defined and service_provider.contact.peertube != "" %} + - name: Peertube description: Discover {{ 'our' if service_provider.type == 'legal' else 'my' }} videos on Peertube. @@ -57,7 +60,8 @@ accounts: url: "https://{{ service_provider.contact.peertube.split('@')[2] }}/@{{ service_provider.contact.peertube.split('@')[1] }}" {% endif %} -{% if service_provider.contact.wordpress is defined %} +{% if service_provider.contact.wordpress is defined and service_provider.contact.wordpress != "" %} + - name: Blog description: Read {{ 'our' if service_provider.type == 'legal' else 'my' }} articles and stories. @@ -67,7 +71,8 @@ accounts: url: "https://{{ service_provider.contact.wordpress.split('@')[2] }}/@{{ service_provider.contact.wordpress.split('@')[1] }}" {% endif %} -{% if service_provider.legal.source_code is defined %} +{% if service_provider.contact.source_code is defined and service_provider.contact.source_code != "" %} + - name: Our Code description: Explore {{ 'our' if service_provider.type == 'legal' else 'my' }} code. @@ -76,7 +81,8 @@ accounts: url: "{{service_provider.legal.source_code}}" {% endif %} -{% if service_provider.contact.friendica is defined %} +{% if service_provider.contact.friendica is defined and service_provider.contact.friendica != "" %} + - name: Social Network description: Visit {{ 'our' if service_provider.type == 'legal' else 'my' }} friendica profile @@ -297,7 +303,7 @@ cards: class: "fa-solid fa-satellite-dish" title: "Matrix" text: "Step into the future of communication with Matrix, a dynamic and decentralized platform that delivers secure, real-time messaging and collaboration. Enjoy an innovative ecosystem that energizes your digital interactions and connects you globally." - url: https://{{domains.matrix}} + url: https://{{domains.matrix_synapse}} link_text: "Connect on Matrix Now!" {% endif %} diff --git a/roles/nginx-modifier-css/templates/global.css.j2 b/roles/nginx-modifier-css/templates/global.css.j2 index 231457c7..0b48df52 100644 --- a/roles/nginx-modifier-css/templates/global.css.j2 +++ b/roles/nginx-modifier-css/templates/global.css.j2 @@ -561,7 +561,8 @@ div.modal div.modal-content { /* Global Defaults (Colors Only) */ body, html[native-dark-active] { background-color: var(--color-93); - background: linear-gradient(45deg, var(--color-93), var(--color-91), var(--color-95), var(--color-93)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-93), var(--color-91), var(--color-95), var(--color-93)); + background-attachment: fixed; color: var(--color-40); /* Use the corporate-design font family */ font-family: "Liberation Sans", Arial, sans-serif; @@ -685,7 +686,7 @@ input:out-of-range, textarea:out-of-range, select:out-of-range { background-color: var(--color-10); - background: linear-gradient(45deg, var(--color-10), var(--color-30)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-10), var(--color-30)); color: var(--color-10); border-color: var(--color-50); } @@ -695,7 +696,7 @@ input:placeholder-shown, textarea:placeholder-shown, select:placeholder-shown { background-color: var(--color-82); - background: linear-gradient(45deg, var(--color-82), var(--color-90)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-82), var(--color-90)); color: var(--color-40); border-color: var(--color-70); } @@ -705,7 +706,7 @@ input:focus, textarea:focus, select:focus { background-color: var(--color-75); - background: linear-gradient(45deg, var(--color-75), var(--color-85)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-75), var(--color-85)); color: var(--color-40); border-color: var(--color-50); } @@ -715,7 +716,7 @@ input:hover, textarea:hover, select:hover { background-color: var(--color-78); - background: linear-gradient(45deg, var(--color-78), var(--color-88)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-78), var(--color-88)); color: var(--color-40); border-color: var(--color-65); } @@ -725,7 +726,7 @@ input:active, textarea:active, select:active { background-color: var(--color-68); - background: linear-gradient(45deg, var(--color-68), var(--color-78)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-68), var(--color-78)); color: var(--color-40); border-color: var(--color-60); } @@ -733,7 +734,7 @@ select:active { /* {# Checked state: specifically for radio buttons and checkboxes when selected. #} */ input:checked { background-color: var(--color-90); - background: linear-gradient(45deg, var(--color-90), var(--color-99)); + background: linear-gradient({{ range(0, 361) | random }}deg, var(--color-90), var(--color-99)); color: var(--color-40); border-color: var(--color-70); } @@ -819,10 +820,8 @@ div#app header, div#app header *{ /** LAM Specific **/ .lam-vertical-tabs-navigation li, .lam-vertical-tabs-navigation{ - background-color: transparent; - /* New Gradient with transparent values */ - background: linear-gradient({{ range(0, 361) | random }}deg, transparent, transparent, transparent, transparent); - border-color: transparent; + background-color: transparent !important; + border-color: transparent; } /* Not changable due to inline css */