From: Michael Tremer Date: Wed, 20 Nov 2019 09:57:17 +0000 (+0000) Subject: Add a Christmas banner X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6563eb496989399c1d47d81474eabfda55abd18a;p=ipfire.org.git Add a Christmas banner Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index dcd08a0d..05b95d92 100644 --- a/Makefile.am +++ b/Makefile.am @@ -213,6 +213,7 @@ templates_mirrors_DATA = \ templates_mirrorsdir = $(templatesdir)/mirrors templates_modules_DATA = \ + src/templates/modules/christmas-banner.html \ src/templates/modules/map.html \ src/templates/modules/progress-bar.html diff --git a/src/scss/style.scss b/src/scss/style.scss index 401590f1..fac51312 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -59,7 +59,7 @@ body { } @each $color, $value in $theme-colors { - .btn-glow-#{$color} { + .glow-#{$color} { color: white; background-color: rgba($value, .15); } @@ -140,7 +140,7 @@ header { position: relative; width: 100%; height: auto; - min-height: 35rem; + min-height: 42rem; @include media-breakpoint-up(lg) { height: calc(100vh - #{$navbar-height}); diff --git a/src/templates/index.html b/src/templates/index.html index e88688a4..d76bea9f 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -9,8 +9,10 @@ {% block container %}
-
-
+
+ {% module ChristmasBanner() %} + +
diff --git a/src/templates/modules/christmas-banner.html b/src/templates/modules/christmas-banner.html new file mode 100644 index 00000000..ad7e67da --- /dev/null +++ b/src/templates/modules/christmas-banner.html @@ -0,0 +1,27 @@ +{% 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 be51b6a9..4cead780 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -97,6 +97,7 @@ class Application(tornado.web.Application): "WikiList" : wiki.WikiListModule, # Misc + "ChristmasBanner" : ui_modules.ChristmasBannerModule, "Markdown" : ui_modules.MarkdownModule, "Map" : ui_modules.MapModule, "ProgressBar" : ui_modules.ProgressBarModule, diff --git a/src/web/ui_modules.py b/src/web/ui_modules.py index a0ae5e35..b2cbeb78 100644 --- a/src/web/ui_modules.py +++ b/src/web/ui_modules.py @@ -10,6 +10,11 @@ class UIModule(tornado.web.UIModule): return self.handler.backend +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)