From a171fb6d146d387a2354c73c8ffdb83068079bf2 Mon Sep 17 00:00:00 2001 From: Anna Sidwell Date: Mon, 16 Apr 2018 12:59:48 +1000 Subject: [PATCH] Add hello overlay (closes #17) --- apps/map/templates/map/index.html | 151 +++++++++++++++--------------- 1 file changed, 76 insertions(+), 75 deletions(-) diff --git a/apps/map/templates/map/index.html b/apps/map/templates/map/index.html index dd0b660..5c545eb 100644 --- a/apps/map/templates/map/index.html +++ b/apps/map/templates/map/index.html @@ -32,7 +32,55 @@ html, body, #main { .popup-labels .label { font-size: 100%; } + +.hello { + position: fixed; + height: 100%; + width: 100%; + top: 0; + left: 0; + overflow: auto; + z-index: 1000; + background-color: rgba(0, 0, 0, 0.5); + background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHZpZXdCb3g9IjEwMCA1IDIwMCAyNTUiPg0KICA8cGF0aCBkPSJNMjM4IDEyN2g1M2wtMjYtMTUtMjcgMTUiIGZpbGw9InJnYmEoMjUyLCAyMTEsIDI5LCAwLjUpIi8+DQogIDxwYXRoIGQ9Ik0yOTQgMTIybC0yOS01MS0yOSA1MSAyOS0xNyAyOSAxNyIgZmlsbD0icmdiYSgxMDIsIDE5OCwgODcsIDAuNSkiLz4NCiAgPHBhdGggZD0iTTIyOCAxMjRsMzItNTZoLTY0bDMyIDU2IiBmaWxsPSJyZ2JhKDIyMSwgNjgsIDU4LCAwLjUpIi8+DQogIDxwYXRoIGQ9Ik0xODYgNjNMMTUzIDdsLTMyIDU2aDY1bTExMSAxOTNsLTMyLTU2LTMyIDU2aDY0IiBmaWxsPSJyZ2JhKDEwMiwgMTk4LCA4NywgMC41KSIvPg0KICA8cGF0aCBkPSJNMjIzIDEyN2wtMzItNTYtMzMgNTZoNjUiIGZpbGw9InJnYmEoMjUyLCAyMTEsIDI5LCAwLjUpIi8+DQogIDxwYXRoIGQ9Ik0yNjAgMTkxbC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L3N2Zz4='); + background-position: center; + background-blend-mode: luminosity; +} + +.hello--container { + max-width: 40em; + margin: 0 auto; +} + +.hello--text { + background-color: white; + margin-top: 5em; + margin-left: 1em; + margin-right: 1em; + margin-bottom: 1em; + padding: 1em; + z-index: 1100; +} + +/* Top margin on small screns should be same as the rest */ +@media (max-width: 768px) { + .hello--text { + margin-top: 1em; + } +} + +.hello--logo { + width: 200px; + margin-bottom: 16px; +} + +.hello--logo, .hello--hide { + display: block; + margin-left: auto; + margin-right: auto; +} + {% endblock %} {% block title %}{% trans "Ojuso Platform Map" %}{% endblock %} @@ -40,6 +88,20 @@ html, body, #main { {% block inner_content %}
+ + + {% endblock %} {% block footer %} @@ -48,7 +110,7 @@ html, body, #main { {% block scripts %} {% leaflet_map "main" callback="main_app_init" creatediv=False %} {% leaflet_js %} - + -{% endblock %} - + \ No newline at end of file +initOverlay() + +{% endblock %}