From: Michael Tremer Date: Wed, 29 Nov 2023 17:46:18 +0000 (+0000) Subject: index: Update the Christmas Banner X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c196d79a8424d64cd2616fbb1e55e53822296f18;p=ipfire.org.git index: Update the Christmas Banner Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 92e494ad..5cbb9d14 100644 --- a/Makefile.am +++ b/Makefile.am @@ -272,7 +272,6 @@ templates_messages_DATA = \ templates_messagesdir = $(templatesdir)/messages templates_modules_DATA = \ - src/templates/modules/christmas-banner.html \ src/templates/modules/ipfire-logo.html \ src/templates/modules/map.html \ src/templates/modules/progress-bar.html diff --git a/src/templates/index.html b/src/templates/index.html index 8601b793..2181ad8a 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -8,6 +8,31 @@ {% block title %}{{ _("Welcome to IPFire") }}{% end block %} {% block container %} + {# Christmas Banner #} + {% if now.month == 12 and now.day >= 10 %} +
+
+
+

+ + + + + This festive season, spread cheer and security! + Support IPFire with a holiday donation for a safer online world. + Merry Christmas! + +   + + + {{ _("Donate") }} + +

+
+
+
+ {% end %} + {% if latest_release %}
diff --git a/src/templates/modules/christmas-banner.html b/src/templates/modules/christmas-banner.html deleted file mode 100644 index 168be009..00000000 --- a/src/templates/modules/christmas-banner.html +++ /dev/null @@ -1,29 +0,0 @@ -{% if now.month == 12 %} -
-
-
-
-
- -
- -
-
{{ _("Give a gift to us for Christmas!") }}
- -

- {{ _("Support the IPFire Project with your donation") }} -

-
- - -
-
-
-
-{% end %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 04e71e9f..5c9b367c 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -97,7 +97,6 @@ class Application(tornado.web.Application): "VoIPRegistrations" : voip.RegistrationsModule, # Misc - "ChristmasBanner" : ui_modules.ChristmasBannerModule, "IPFireLogo" : ui_modules.IPFireLogoModule, "Markdown" : ui_modules.MarkdownModule, "Map" : ui_modules.MapModule, diff --git a/src/web/ui_modules.py b/src/web/ui_modules.py index 574f9ac9..a41ab371 100644 --- a/src/web/ui_modules.py +++ b/src/web/ui_modules.py @@ -15,11 +15,6 @@ class IPFireLogoModule(UIModule): return self.render_string("modules/ipfire-logo.html", suffix=suffix) -class ChristmasBannerModule(UIModule): - def render(self): - return self.render_string("modules/christmas-banner.html") - - class MarkdownModule(UIModule): def render(self, markdown): return self.backend.blog._render_text(markdown)