Add config option for instance donation link

Co-authored-by: Arya K <arya@projectsegfau.lt>
This commit is contained in:
syeopite 2024-03-13 14:48:06 -07:00
parent 2a85afe93f
commit 3fef552008
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
4 changed files with 21 additions and 0 deletions

View File

@ -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: <none>
##
#footer_instance_donate_link: ""
##
## Custom fields to be displayed within the footer's instance section
##

View File

@ -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",

View File

@ -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)

View File

@ -272,6 +272,14 @@
</li>
<% end %>
<% if CONFIG.footer_instance_donate_link %>
<li class="pure-menu-item footer-section-item">
<a href="<%=HTML.escape(CONFIG.footer_instance_donate_link.not_nil!)%>" title="<%= translate(locale, "footer_instance_section_donate")%>">
<%= translate(locale, "footer_instance_section_donate") %>
</a>
</li>
<% end %>
<% CONFIG.footer_instance_section_custom_fields.each do | field | %>
<li class="pure-menu-item footer-section-item">
<a href="<%=HTML.escape(field[1])%>" title="<%= HTML.escape(field[0]) %>">