From 8bc4f56385eeb7ff45e41f7985940875f1f76b43 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 19:01:43 +0100 Subject: [PATCH 1/4] Improve customization of welcome page --- roles/matrix-riot-web/defaults/main.yml | 6 ++++++ roles/matrix-riot-web/templates/welcome.html.j2 | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index be19fef9..8b19f297 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,6 +32,12 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" +matrix_riot_web_welcome_logo: "welcome/images/logo.svg" +matrix_riot_web_welcome_logo_link: "https://riot.im" + +matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" +matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collaboration powered by [matrix]')" + # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. matrix_riot_web_embedded_pages_home_path: ~ diff --git a/roles/matrix-riot-web/templates/welcome.html.j2 b/roles/matrix-riot-web/templates/welcome.html.j2 index 319f9795..48a0f532 100644 --- a/roles/matrix-riot-web/templates/welcome.html.j2 +++ b/roles/matrix-riot-web/templates/welcome.html.j2 @@ -153,11 +153,11 @@ h1::after {
- - + + -

_t("Welcome to Riot.im")

-

_t("Decentralised, encrypted chat & collaboration powered by [matrix]")

+

{{ matrix_riot_web_welcome_headline }}

+

{{ matrix_riot_web_welcome_text }}

From 0322a5443a6b05ef0e4c6ec5b76d4a46792198a8 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 22:16:52 +0100 Subject: [PATCH 2/4] additional customizations of welcome page --- roles/matrix-riot-web/defaults/main.yml | 13 +++++++++++++ roles/matrix-riot-web/templates/config.json.j2 | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 8b19f297..4fe8703a 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,7 +32,20 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" +# Links, shown in footer of welcome page: +# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] +matrix_riot_web_welcome_footerlinks: false + +# URL to image, shown during Login +matrix_riot_web_welcome_authlogo: false + +# URL to Wallpaper, shown in background of welcome page +matrix_riot_web_welcome_background: false + +# URL to Logo on welcome page matrix_riot_web_welcome_logo: "welcome/images/logo.svg" + +# URL of link on welcome image matrix_riot_web_welcome_logo_link: "https://riot.im" matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index 635c06f5..a950f70e 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -29,5 +29,10 @@ {% endif %} "embeddedPages": { "homeUrl": {{ matrix_riot_web_embedded_pages_home_url|string|to_json }} + }, + "branding": { + "authFooterLinks": {{ matrix_riot_web_welcome_footerlinks|to_json }}, + "authHeaderLogoUrl": {{ matrix_riot_web_welcome_authlogo|to_json }}, + "welcomeBackgroundUrl": {{ matrix_riot_web_welcome_background|to_json }} } } From 054e6fed0cef8e883d99351539cd3ade1c5a3f50 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 22:27:39 +0100 Subject: [PATCH 3/4] rearrange main.yml of riot-web and use same logo URL for both logos --- roles/matrix-riot-web/defaults/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 4fe8703a..828532f5 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,16 +32,6 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" -# Links, shown in footer of welcome page: -# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] -matrix_riot_web_welcome_footerlinks: false - -# URL to image, shown during Login -matrix_riot_web_welcome_authlogo: false - -# URL to Wallpaper, shown in background of welcome page -matrix_riot_web_welcome_background: false - # URL to Logo on welcome page matrix_riot_web_welcome_logo: "welcome/images/logo.svg" @@ -51,6 +41,16 @@ matrix_riot_web_welcome_logo_link: "https://riot.im" matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collaboration powered by [matrix]')" +# Links, shown in footer of welcome page: +# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] +matrix_riot_web_welcome_footerlinks: false + +# URL to image, shown during Login +matrix_riot_web_welcome_authlogo: "{{ matrix_riot_web_welcome_logo }}" + +# URL to Wallpaper, shown in background of welcome page +matrix_riot_web_welcome_background: false + # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. matrix_riot_web_embedded_pages_home_path: ~ From 46664c4758a5e51545850f8f298525caf654fafc Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Fri, 6 Mar 2020 14:31:15 +0100 Subject: [PATCH 4/4] Adjust variable names --- roles/matrix-riot-web/defaults/main.yml | 6 +++--- roles/matrix-riot-web/templates/config.json.j2 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 828532f5..981978d2 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -43,13 +43,13 @@ matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collabora # Links, shown in footer of welcome page: # [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] -matrix_riot_web_welcome_footerlinks: false +matrix_riot_web_branding_authFooterLinks: ~ # URL to image, shown during Login -matrix_riot_web_welcome_authlogo: "{{ matrix_riot_web_welcome_logo }}" +matrix_riot_web_branding_authHeaderLogoUrl: "{{ matrix_riot_web_welcome_logo }}" # URL to Wallpaper, shown in background of welcome page -matrix_riot_web_welcome_background: false +matrix_riot_web_branding_welcomeBackgroundUrl: ~ # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index a950f70e..b82d53e0 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -31,8 +31,8 @@ "homeUrl": {{ matrix_riot_web_embedded_pages_home_url|string|to_json }} }, "branding": { - "authFooterLinks": {{ matrix_riot_web_welcome_footerlinks|to_json }}, - "authHeaderLogoUrl": {{ matrix_riot_web_welcome_authlogo|to_json }}, - "welcomeBackgroundUrl": {{ matrix_riot_web_welcome_background|to_json }} + "authFooterLinks": {{ matrix_riot_web_branding_authFooterLinks|to_json }}, + "authHeaderLogoUrl": {{ matrix_riot_web_branding_authHeaderLogoUrl|to_json }}, + "welcomeBackgroundUrl": {{ matrix_riot_web_branding_welcomeBackgroundUrl|to_json }} } }