From e69eca6e71f77843b2afecb6846a1bbd501fff9a Mon Sep 17 00:00:00 2001 From: Laura B Date: Mon, 29 May 2023 14:58:40 +0200 Subject: [PATCH 1/4] Add footer banner message support --- config/config.example.yml | 10 ++++++++++ src/invidious/config.cr | 2 ++ src/invidious/views/template.ecr | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/config/config.example.yml b/config/config.example.yml index 7ea800177..88f33b9b6 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -435,6 +435,16 @@ jobs: ## #banner: +## +## Custom footer displayed on the bottom of every page. +## Similar to the banner option but at the bottom of the page +## Useful for putting contact info of a/the maintainer for example. +## +## Accepted values: any string. HTML is accepted. +## Default: +## +#footer: + ## ## Subscribe to channels using PubSubHub (Google PubSubHubbub service). ## PubSubHub allows Invidious to be instantly notified when a new video diff --git a/src/invidious/config.cr b/src/invidious/config.cr index 9fc584097..0ade79cc4 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -106,6 +106,8 @@ class Config property cache_annotations : Bool = false # Optional banner to be displayed along top of page for announcements, etc. property banner : String? = nil + # Optional footer banner to be displayed along the bottom of the page. Can be used for maintainer contact info, etc. + property footer : String? = nil # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely property hsts : Bool? = true # Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local' diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 772656795..1817594dd 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -153,6 +153,11 @@ <%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %> + <% if CONFIG.footer %> +
+

<%= CONFIG.footer %>

+
+ <% end %> From b42fae7e573f68fc31c88c2867a4692020c62923 Mon Sep 17 00:00:00 2001 From: Aural Glow <125497673+auralglow@users.noreply.github.com> Date: Tue, 30 May 2023 08:06:09 +0200 Subject: [PATCH 2/4] Little me forgot to change the elements on both sides --- src/invidious/views/template.ecr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 1817594dd..e24623a6e 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -155,7 +155,7 @@ <% if CONFIG.footer %>
-

<%= CONFIG.footer %>

+

<%= CONFIG.footer %>

<% end %> From 8ec75fcfda7b795f28075834e514fafe41d1a0fe Mon Sep 17 00:00:00 2001 From: Aural Glow <125497673+auralglow@users.noreply.github.com> Date: Fri, 9 Jun 2023 22:13:15 +0200 Subject: [PATCH 3/4] Found a way to make the footer accessible while also being cute --- src/invidious/views/template.ecr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index e24623a6e..af257e318 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -154,8 +154,8 @@ <% if CONFIG.footer %> -
-

<%= CONFIG.footer %>

+
+
<% end %> From f51a435f75e7a4980e0d77dda78e58e7761a599a Mon Sep 17 00:00:00 2001 From: Aural Glow <125497673+auralglow@users.noreply.github.com> Date: Sat, 15 Jul 2023 09:05:48 +0200 Subject: [PATCH 4/4] Thank you @realcharmer for the suggested changes Co-authored-by: Emil Miler <118818237+realcharmer@users.noreply.github.com> --- src/invidious/views/template.ecr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index af257e318..c8f4d9a6f 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -153,11 +153,11 @@ <%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %>
- <% if CONFIG.footer %> -
- -
- <% end %> + <% if CONFIG.footer %> + + <% end %>