Options for donation and contact links
Some checks failed
Invidious CI / build (push) Failing after 1m4s

This commit is contained in:
Fijxu 2024-05-04 01:58:17 -04:00
parent e9fbc17ac1
commit 9753be50d3
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
5 changed files with 188 additions and 171 deletions

View file

@ -899,3 +899,9 @@ default_user_preferences:
## Default: false ## Default: false
## ##
#extend_desc: false #extend_desc: false
# redis_url: 127.0.0.1:6379
# redis_socket: /var/run/valkey/valkey.sock
# donation_url: "https://example.com/donate"
# contact_url: "https://example.com/contact"
# home_domain: "https://example.com/

View file

@ -497,5 +497,7 @@
"toggle_theme": "Toggle Theme", "toggle_theme": "Toggle Theme",
"carousel_slide": "Slide {{current}} of {{total}}", "carousel_slide": "Slide {{current}} of {{total}}",
"carousel_skip": "Skip the Carousel", "carousel_skip": "Skip the Carousel",
"carousel_go_to": "Go to slide `x`" "carousel_go_to": "Go to slide `x`",
"footer_contact_url": "Contact the Administrator"
} }

View file

@ -514,5 +514,6 @@
"The Popular feed has been disabled by the administrator.": "El feed Popular ha sido desactivado por el administrador.", "The Popular feed has been disabled by the administrator.": "El feed Popular ha sido desactivado por el administrador.",
"carousel_slide": "Diapositiva {{current}} de {{total}}", "carousel_slide": "Diapositiva {{current}} de {{total}}",
"carousel_skip": "Saltar el carrusel", "carousel_skip": "Saltar el carrusel",
"carousel_go_to": "Ir a la diapositiva `x`" "carousel_go_to": "Ir a la diapositiva `x`",
"footer_contact_url": "Contactar al Administrador"
} }

View file

@ -88,6 +88,10 @@ class Config
property hmac_key : String = "" property hmac_key : String = ""
# Domain to be used for links to resources on the site where an absolute URL is required # Domain to be used for links to resources on the site where an absolute URL is required
property domain : String? property domain : String?
property donation_url : String?
property contact_url : String?
property home_domain : String?
# Subscribe to channels using PubSubHubbub (requires domain, hmac_key) # Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
property use_pubsub_feeds : Bool | Int32 = false property use_pubsub_feeds : Bool | Int32 = false
property popular_enabled : Bool = true property popular_enabled : Bool = true

View file

@ -5,7 +5,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<%= locale %>"> <html lang="<%= locale %>">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<%= yield_content "header" %> <%= yield_content "header" %>
@ -23,9 +23,9 @@
<link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/carousel.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/carousel.css?v=<%= ASSET_COMMIT %>">
<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
</head> </head>
<body class="<%= dark_mode.blank? ? "no" : dark_mode %>-theme"> <body class="<%= dark_mode.blank? ? "no" : dark_mode %>-theme">
<span style="display:none" id="dark_mode_pref"><%= dark_mode %></span> <span style="display:none" id="dark_mode_pref"><%= dark_mode %></span>
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1 pure-u-xl-20-24" id="contents"> <div class="pure-u-1 pure-u-xl-20-24" id="contents">
@ -129,7 +129,7 @@
<a href="https://github.com/iv-org/documentation"><%= translate(locale, "footer_documentation") %></a> <a href="https://github.com/iv-org/documentation"><%= translate(locale, "footer_documentation") %></a>
</span> </span>
<span> <span>
<a href="https://nadeko.net"><u>nadeko.net</u></a> <a href="https://<%= CONFIG.home_domain %>"><u><%= CONFIG.home_domain %></u></a>
</span> </span>
</div> </div>
@ -148,13 +148,17 @@
</div> </div>
<div class="pure-u-1 pure-u-md-1-3"> <div class="pure-u-1 pure-u-md-1-3">
<% if CONFIG.donation_url %>
<span> <span>
<i class="icon ion-ios-wallet"></i> <i class="icon ion-ios-wallet"></i>
<a href="https://nadeko.net/donate"><b><%= translate(locale, "footer_donate_page") %></b></a> <a href="<%= CONFIG.donation_url %>"><b><%= translate(locale, "footer_donate_page") %></b></a>
</span> </span>
<% end %>
<% if CONFIG.contact_url %>
<span> <span>
<a href="https://nadeko.net/contact"><b>Contact the Owner</b></a> <a href="<%= CONFIG.contact_url %>"><b><%= translate(locale, "footer_contact_url") %></b></a>
</span> </span>
<% end %>
<span><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %></span> <span><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %></span>
</div> </div>
</div> </div>
@ -178,6 +182,6 @@
<script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
<% end %> <% end %>
<% end %> <% end %>
</body> </body>
</html> </html>