From 4c97a60326474805c4e17c3b5af0bd64f09f8024 Mon Sep 17 00:00:00 2001 From: unknown <zack@wongbox.internal.wongworks.net> Date: Fri, 3 Jan 2020 12:25:45 +0800 Subject: [PATCH] separate watermark --- src/templates/base.html | 24 +++--------------------- src/templates/watermark.html | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 src/templates/watermark.html diff --git a/src/templates/base.html b/src/templates/base.html index 6fa69b2..4967765 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -125,27 +125,9 @@ <a href="https://gitlab.ucc.asn.au/frekk/uccportal">source code</a> </div> </div> - {% endblock %} - <!-- END Footer --> -{% if DEPLOYMENT_ENV != "PROD" %} -<div class="watermark">{{DEPLOYMENT_ENV}}</div> -<style> - .watermark { - position: fixed; - transform: translate(-50%, -50%); - opacity: 0.3; - {% if DEPLOYMENT_ENV == "STAGE" %} - color: RED; - {% else %} - color: GREEN; - {% endif %} - font-size: 15em; - top: 50%; - left: 50%; - pointer-events: none; - } -</style> -{%endif %} + + + </div> <!-- END Container --> diff --git a/src/templates/watermark.html b/src/templates/watermark.html new file mode 100644 index 0000000..3278798 --- /dev/null +++ b/src/templates/watermark.html @@ -0,0 +1,24 @@ +{% if DEPLOYMENT_ENV != "PROD" and DEPLOYMENT_ENV != "MOCK" %} +<div class="watermark">{{DEPLOYMENT_ENV}}</div> + +<!-- must be inline as it uses django template tags --> +<style> + .watermark { + position: fixed; + transform: translate(-50%, -50%); + opacity: 0.3; + {% if DEPLOYMENT_ENV == "STAGE" %} + color: RED; + {% else %} + color: GREEN; + {% endif %} + font-size: 15em; + top: 50%; + left: 50%; + pointer-events: none; + box-sizing: unset; + } + +</style> + +{%endif %} -- GitLab