From 250daddcc6768f7ec1f846202ec06ed39b4a9b95 Mon Sep 17 00:00:00 2001
From: Kumi
Date: Tue, 24 Sep 2024 14:43:17 +0200
Subject: [PATCH] feat: add 'membership-rallly' template and enhance matching
Expanded the template matching condition to support templates starting with "membership". Added a new 'membership-rallly' template that extends the base 'membership' template, providing information about the Rallly Pro benefit for logged-in users and encouraging community support through donations.
This change improves the flexibility of template handling and introduces a specialized membership page aimed at enhancing user experience and engagement.
---
main.py | 2 +-
templates/membership-rallly.html | 11 +++++++++++
templates/membership.html | 3 +++
3 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 templates/membership-rallly.html
diff --git a/main.py b/main.py
index 0c44857..b8bb31c 100644
--- a/main.py
+++ b/main.py
@@ -106,7 +106,7 @@ def generate_static_site(development_mode=False, theme="plain"):
if template_name == "bridges":
context.update({"bridges": bridges})
- if template_name == "membership":
+ if template_name.startswith("membership"):
allow_current = development_mode
finances_month, finances_year = get_latest_month(finances, allow_current)
finances_period = datetime.date(finances_year, finances_month, 1)
diff --git a/templates/membership-rallly.html b/templates/membership-rallly.html
new file mode 100644
index 0000000..8774796
--- /dev/null
+++ b/templates/membership-rallly.html
@@ -0,0 +1,11 @@
+{% extends "membership.html" %}
+{% block serviceinfo %}
+
+
+ Welcome to Private.coffee! Rallly Pro is free for all logged-in users. Upon first login, it may take up to five minutes for your account to be upgraded. If you have any issues, please contact us at support@private.coffee
+
+
+ If you find our services useful, please consider supporting us through a donation or becoming a supporting member. This will help us keep our free services running and improve our offerings. See below for more information.
+
+
+{% endblock %}
diff --git a/templates/membership.html b/templates/membership.html
index 5f58401..edc59a1 100644
--- a/templates/membership.html
+++ b/templates/membership.html
@@ -11,6 +11,9 @@
+ {% block serviceinfo %}
+ {% endblock %}
+