]> git.ipfire.org Git - ipfire.org.git/commitdiff
index: Update the Christmas Banner
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2023 17:46:18 +0000 (17:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2023 17:48:10 +0000 (17:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/index.html
src/templates/modules/christmas-banner.html [deleted file]
src/web/__init__.py
src/web/ui_modules.py

index 92e494ad156357f1b463428e169984df4b66b332..5cbb9d14c7bf78e73ce9829cdeb24f39637ce41d 100644 (file)
@@ -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
index 8601b79363b5603d07d436db9d0bd1ecd4a4b81b..2181ad8a8f9a1aa256623879bb78791aad765722 100644 (file)
@@ -8,6 +8,31 @@
 {% block title %}{{ _("Welcome to IPFire") }}{% end block %}
 
 {% block container %}
+       {# Christmas Banner #}
+       {% if now.month == 12 and now.day >= 10 %}
+               <section class="hero is-small is-primary">
+                       <div class="hero-body">
+                               <div class="container">
+                                       <p class="has-text-centered px-2 py-1">
+                                               <i class="fas fa-gifts"></i>
+                                               <i class="fa-solid fa-candy-cane"></i>
+                                               <i class="fa-solid fa-sleigh"></i>
+
+                                               This festive season, spread cheer and security!
+                                               Support IPFire with a holiday donation for a safer online world.
+                                               Merry Christmas!
+
+                                               &nbsp;
+
+                                               <a class="has-text-weight-bold" href="/donate">
+                                                       {{ _("Donate") }}
+                                               </a>
+                                       </p>
+                               </div>
+                       </div>
+               </section>
+       {% end %}
+
        {% if latest_release %}
                <section class="has-background-light">
                        <div class="container">
diff --git a/src/templates/modules/christmas-banner.html b/src/templates/modules/christmas-banner.html
deleted file mode 100644 (file)
index 168be00..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{% if now.month == 12 %}
-    <div class="container">
-        <div class="card glow-primary border-primary">
-            <div class="card-body">
-                <div class="row">
-                    <div class="col-2 d-flex align-items-center justify-content-center">
-                        <i class="fas fa-gifts fa-2x text-primary"></i>
-                    </div>
-
-                    <div class="col-10 col-lg-6 mb-3 mb-lg-0">
-                        <h6 class="mb-0">{{ _("Give a gift to us for Christmas!") }}</h6>
-
-                        <p class="card-text">
-                            {{ _("Support the IPFire Project with your donation") }}
-                        </p>
-                    </div>
-
-                    <div class="col-12 col-lg-4">
-                       <div class="d-grid">
-                                                       <a class="btn btn-primary" href="/donate">
-                                                               {{ _("Give A Gift Today") }}
-                                                       </a>
-                                               </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-{% end %}
index 04e71e9f9c06720559fa47c567b68c37efa69d1c..5c9b367c7404ac4380ed2bdddb3d23ce76c0b7b9 100644 (file)
@@ -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,
index 574f9ac918a036ea840477f42450ecaf6447207e..a41ab371fc1aef56dd1b71b2ca2ef7af696fd1ef 100644 (file)
@@ -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)