From e69eca6e71f77843b2afecb6846a1bbd501fff9a Mon Sep 17 00:00:00 2001 From: Laura B Date: Mon, 29 May 2023 14:58:40 +0200 Subject: [PATCH] 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 7ea80017..88f33b9b 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 9fc58409..0ade79cc 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 77265679..1817594d 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 %>