diff --git a/config/config.example.yml b/config/config.example.yml index afd9773f..b3e8a09b 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -453,6 +453,16 @@ jobs: ## # footer_instance_privacy_policy_link: +## +## Instance donation URL. If your instance has a donation option. +## you can add it here so it will be present in the footer along +## with the donation link for the project itself. +## +## Accepted values: a string +## Default: +## +#footer_instance_donate_link: "" + ## ## Custom fields to be displayed within the footer's instance section ## diff --git a/locales/en-US.json b/locales/en-US.json index d3cdb10a..e13bc3bc 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -480,6 +480,7 @@ "footer_instance_section_modified_source_code": "Instance Source Code", "footer_instance_section_tos": "Terms of Service", "footer_instance_section_privacy_policy": "Privacy Policy", + "footer_instance_section_donate": "Donate (Instance)", "footer_licences_link": "Licences", "footer_privacy_policy_link": "Privacy", "adminprefs_modified_source_code_url_label": "URL to modified source code repository", diff --git a/src/invidious/config.cr b/src/invidious/config.cr index f4a753f2..50677546 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -124,6 +124,8 @@ class Config property footer_instance_tos_link : String? = nil # Link to the privacy policy of the instance (if any). Will be displayed in the footer. property footer_instance_privacy_policy_link : String? = nil + # Instance donation URL displayed in the "Instance" section of the footer + property footer_instance_donate_link : String? = nil # Custom fields to be displayed within the footer's instance section property footer_instance_section_custom_fields : Array(Array(String)) = [] of Array(String) diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 04cb7915..080ad882 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -272,6 +272,14 @@ <% end %> + <% if CONFIG.footer_instance_donate_link %> + + <% end %> + <% CONFIG.footer_instance_section_custom_fields.each do | field | %>