From a5d28e5888db776817551f68be0e372e3e6a0f67 Mon Sep 17 00:00:00 2001 From: Jackson Chadfield Date: Thu, 1 Aug 2019 01:55:27 +1200 Subject: [PATCH] Add noscript modal --- OpenLearn/static/css/noscript.css | 47 +++++++++++++++ OpenLearn/templates/layout.html | 31 +++++++++- OpenLearn/templates/public/index.html | 1 + OpenLearn/templates/public/register.html | 74 ++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 OpenLearn/static/css/noscript.css create mode 100644 OpenLearn/templates/public/register.html diff --git a/OpenLearn/static/css/noscript.css b/OpenLearn/static/css/noscript.css new file mode 100644 index 0000000..6d7beac --- /dev/null +++ b/OpenLearn/static/css/noscript.css @@ -0,0 +1,47 @@ +.noscript-modal { + position: fixed; + z-index: 999; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); /*Fallback*/ + background-color: rgba(0, 0, 0, 0.4); + display: none; +} + +#noscript-close:checked + .noscript-modal{ + display: block !important; +} + +.noscript-modal .modal-content { + position: relative; + top: 50%; + transform: translateY(-50%); +} + +.noscript-modal .modal-content .siimple-box { + margin: 0; + position: relative; + top: 0; + left: 0; +} + +.noscript-modal .modal-content .siimple-box-detail { + opacity: 0.9; +} + +.noscript-modal .close { + position: absolute; + right: 20px; + top: 20px; +} + +.noscript-modal .modal-content .siimple-link { + color: white !important; +} + +.noscript-modal .modal-content .siimple-link:hover { + color: rgba(255, 255, 255, 0.4) !important; +} \ No newline at end of file diff --git a/OpenLearn/templates/layout.html b/OpenLearn/templates/layout.html index b70e7ed..b7d441d 100644 --- a/OpenLearn/templates/layout.html +++ b/OpenLearn/templates/layout.html @@ -3,6 +3,7 @@ navbar_color - sets the colour of the navbar footer_color - sets the colour of the footer navbar_brand_hides - sets whether the brand in the navbar will hide on small screens +noscript_can_close - default false - whether the user can close the noscript modal #} @@ -22,8 +23,31 @@ {% block body %} + {% block nav %} -