From 934c4f2a1dfab5c42f8f5f5b94e805bf0f90b53c Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Thu, 21 May 2020 10:18:40 +0200 Subject: [PATCH] adds favicon, changes menu --- app.db | Bin 49152 -> 53248 bytes .../calendarwatch/.docker-entrypoint.sh.swp | Bin 12288 -> 0 bytes docker/calendarwatch/docker-entrypoint.sh | 3 - server/static/css/main.css | 57 +++++++++++++++++- server/static/js/index.js | 9 +++ server/static/res/favicon.ico | Bin 0 -> 1150 bytes server/template/base.html | 5 +- server/template/sidebar.html | 14 +++-- 8 files changed, 78 insertions(+), 10 deletions(-) delete mode 100644 docker/calendarwatch/.docker-entrypoint.sh.swp create mode 100755 server/static/res/favicon.ico diff --git a/app.db b/app.db index c834ba8fe557b707439e5bd950ecccf13463b264..24e1da5f26432a9c28ad08cc8b56d0fdaf0d6475 100644 GIT binary patch delta 584 zcmZo@U~X8zJVBbbmw|zS7mArCYM3+jZcJFHug&4ZAjFo-z;&13hAo$mk#_;F1J5;{ zT&_w^Wo}3AMeLqjyqs&iK6#^s*yKjL4I*xdImM~U z7OqAnj*jWP>_Ayjh~!i&Z_Y+>0gy;3MC77*wFp-}*d0Kp070w}n|Y!tNK$-qmW8P> z#4K}XCu0+%OhGpDY-5mIgeXMZz`)YX!lIF#3uI&{*vQRJmb#2wTsIlGAO=o;XqCXt z-NL|<#K>k|Dh)Atx4jiN!~|nEQ$wf84%TOx_!2ks+xReXSvr|oI+^j$Ww<@D@%m&N z`)Dp#XEy^kL!fcV6C2|n4*kElMhtLZBD3N;50FSos|(73Ot(`H+Zy{F9VZ)!B4WgY}WVH_sDzf8DVnFD{srodfvGX-EZBq z2gXyE+ZgC`VS{eK0v>=Pth?^_JF#%#EZo57pvkBDi%LTr!PEJ8BDQwMiPz&c^@Y!e zPN--!o#J_Kl?a%_oQC1@TCOF_wUbXrNH_C@a9b?QV2NgyJn$hs2+uRqkem2S5kx02 zIZO5Ng;*k&Gw#rCv)E|aot~xknUhX73zJj#Soo!WSx3}C z7YVw!WBi0)HF;uFFa}89i!jOHFlQv$*Lvqzy+~3V581YCUHk1f6qmM9+C*2E zW@J?nWKl(hrYNiR3|dfxwp6bv)raD`ibfaJMp;8eMXHUV8F{VRsEc7Vce}*#sC080 zp$O8NRaq9tHzZN1Nb&|T6?99gOSX~yO{US5y;9KHrKa6IMX@OC>qCHat(zfx zX+WEP2JGR_NY yHE;apc+28waU3Uca>V$Ig%)j;RjH~@d~d@j&6p_EZN9php1K_|Dr@0((0>Cu++n}~ diff --git a/docker/calendarwatch/docker-entrypoint.sh b/docker/calendarwatch/docker-entrypoint.sh index 8d96ba4..a6a7281 100755 --- a/docker/calendarwatch/docker-entrypoint.sh +++ b/docker/calendarwatch/docker-entrypoint.sh @@ -2,9 +2,6 @@ cd /home/calendarwatch # uwsgi --http-socket 0.0.0.0:8084 -w wsgi --protocol=https -python3 routine.py & -echo "routine has been started" - python3 server.py echo "server has been started" diff --git a/server/static/css/main.css b/server/static/css/main.css index 01fd5f4..e72f121 100644 --- a/server/static/css/main.css +++ b/server/static/css/main.css @@ -12,6 +12,61 @@ width: 200px; } +/* top navigation */ +.topnav { + background-color: #333; + overflow: hidden; +} + +.topnav a { + float: left; + display: flex; + color: #f2f2f2; + text-align: center; + padding: 14px 16px; + text-decoration: none; + font-size: 17px; +} + +.topnav a:hover { + background-color: #ddd; + color: black; +} + +/* Add an active class to highlight the current page */ +.topnav a.active { + background-color: #4CAF50; + color: white; +} + +/* Hide the link that should open and close the topnav on small screens */ +.topnav .icon { + display: none; +} + + /* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */ +@media screen and (max-width: 600px) { + .topnav a:not(:first-child) {display: none;} + .topnav a.icon { + float: right; + display: block; + } +} + +/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */ +@media screen and (max-width: 600px) { + .topnav.responsive {position: relative;} + .topnav.responsive a.icon { + position: absolute; + right: 0; + top: 0; + } + .topnav.responsive a { + float: none; + display: block; + text-align: left; + } +} /* The sidebar menu */ .sidenav { height: 100%; /* Full-height: remove this if you want "auto" height */ @@ -115,4 +170,4 @@ .slider.round:before { border-radius: 50%; - } \ No newline at end of file + } diff --git a/server/static/js/index.js b/server/static/js/index.js index e69de29..412db9d 100644 --- a/server/static/js/index.js +++ b/server/static/js/index.js @@ -0,0 +1,9 @@ +/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */ +function menuBars() { + var x = document.getElementById("myTopnav"); + if (x.className === "topnav") { + x.className += " responsive"; + } else { + x.className = "topnav"; + } +} diff --git a/server/static/res/favicon.ico b/server/static/res/favicon.ico new file mode 100755 index 0000000000000000000000000000000000000000..d8252413ab309f22818d789ba0af773649042b14 GIT binary patch literal 1150 zcma)4Ur1A76hAX*kq?=z>1=J2GS{DhObBYTIn&LNu`&s(H``*NVIu@3f)POvLG;j5 zL4*(pneESArX^U4Qsk@An-E12EJ>sC-0ka}jeB!qvU~a6^WE?J&hPyD0chwgEd}~o zAXE&X2LLO9wrD4}PX>U_%1Uy`{?lh};x$~VvO=$|ZgZEZx;9i<Faa}MfvepY=I zp0Wzz@4O`r$1}na#VnjrTxy8p&DIet@g{Q|RIh__PObJ2ZY>vW9oK{-mR9|lhd7qq z3GBZ&m)5k8Aza>LGf=(n0+h4LLF@B+lkoKq<;7R>pn5(wOK59MAha6oz`de+e+DRL zj?2F7C&HqBaDn2>dGQqvcN}}|PY}G1Q{Ww5+{?Y@UKNx9e~ArLG)Bjv0R>x$!Dxbp{2jv}0XA!~{6X(4`mhh~7( zyEC+gt8Zms%i5s*#X>kJ)}-$l>J$z5pCfd?KJQ?jbV7Shu( z(iLf=kM4Y0&A~ZS+$r*HfQlcmQo{-fX&cUs%SEgWo-fac`^>%KdVNXM)eItpr~k!O zd{^3UzXVtwEyI-=xrk?UV^-F1pVoR_34n;1PPBv#1WgVRvJqNl!E3? - Index + + Longitude @@ -14,4 +15,4 @@ {% block content %}{% endblock %} - \ No newline at end of file + diff --git a/server/template/sidebar.html b/server/template/sidebar.html index 2d8fc66..aafab18 100644 --- a/server/template/sidebar.html +++ b/server/template/sidebar.html @@ -5,27 +5,33 @@ + - + + + - Index + Logitude -