From 212b0008af3591f5a1fefd0e0ef9782c79329281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicja=20Ci=C4=99ciwa?= Date: Wed, 11 Nov 2020 00:46:00 +0100 Subject: [PATCH] form to input working hours --- .idea/workspace.xml | 22 +++++- config/__pycache__/urls.cpython-38.pyc | Bin 1173 -> 1135 bytes config/urls.py | 9 +-- db.sqlite3 | Bin 139264 -> 139264 bytes static/css/main.css | 87 +++++++++++++---------- templates/base.html | 13 ++-- templates/home.html | 58 ++++++++++++--- templates/inputhours.html | 24 +++++++ templates/registration/login.html | 2 +- work/__init__.py | 0 work/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 140 bytes work/__pycache__/forms.cpython-38.pyc | Bin 0 -> 1099 bytes work/__pycache__/models.cpython-38.pyc | Bin 0 -> 533 bytes work/__pycache__/views.cpython-38.pyc | Bin 0 -> 551 bytes work/admin.py | 3 + work/apps.py | 5 ++ work/forms.py | 45 ++++++++++++ work/migrations/__init__.py | 0 work/models.py | 15 ++++ work/tests.py | 3 + work/views.py | 15 ++++ 21 files changed, 240 insertions(+), 61 deletions(-) create mode 100644 templates/inputhours.html create mode 100644 work/__init__.py create mode 100644 work/__pycache__/__init__.cpython-38.pyc create mode 100644 work/__pycache__/forms.cpython-38.pyc create mode 100644 work/__pycache__/models.cpython-38.pyc create mode 100644 work/__pycache__/views.cpython-38.pyc create mode 100644 work/admin.py create mode 100644 work/apps.py create mode 100644 work/forms.py create mode 100644 work/migrations/__init__.py create mode 100644 work/models.py create mode 100644 work/tests.py create mode 100644 work/views.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ae4c663..877dde1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,21 @@ + + + + + + + + + + + - + + + - + + + @@ -63,4 +78,7 @@ + + \ No newline at end of file diff --git a/config/__pycache__/urls.cpython-38.pyc b/config/__pycache__/urls.cpython-38.pyc index ae7752d68366738c6782abca4d7e53cc96a080e8..1badd5e7a9695371a50d391074e87b4c964295ab 100644 GIT binary patch delta 128 zcmbQr`JRI}l$V!_0SM%tuZmZg$Scd3Hc>l5m@|tfg)4=-mpPp|iZ_KPm_d_wm#RVkyonNxj8VT9i{9C6u085}%Y|ZgIr$=nx`qY{M#fggmR1Jldd5cPW~SzwALKLFE0pGy zS(q7{SsG?n6&hMpWTzQdm=+ggm=zjSRYIr$<6x<=*-hDKH<7FNbadS<3Z21dr4ALKLFD^z6X zR+t%O6c!s9R92)HW|w9q<)@gZ8E2cBrx=!$6;5V;zu7Co-@nu<&(|U~H6^dYz}w&4 z#k(Xc#ow(mu*}yhtRN}f&p64#%d;pwttvIQG%Oityn(Kvp{}6;lBMRxmS)DAK0NqO V(9Ufi7~k;=V`}Ez%=qEIJOEt`N(}%2 diff --git a/static/css/main.css b/static/css/main.css index 7224176..47b8f4f 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,51 +1,21 @@ -body, html -{ - height: 100%; - - position: absolute; - margin: 0px; - overflow: hidden; - top: 0px; - bottom: 0px; - width: 100%; -} - -.bg -{ - /* The image used */ - background-image: url("../img/background.jpg"); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - background-attachment: fixed; -} - - - - - - - - -body { +body,html { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; - padding-top: 40px; background-color: #f5f5f5; - background-image: url("../img/background.jpg"); /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed; + height: 100%; + position: absolute; + margin: 0px; + overflow: hidden; + width: 100%; + padding-top: 90px; } .form-signin { @@ -54,7 +24,7 @@ body { padding: 20px; margin: auto; background-color: rgba(255,255,255,0.7); - margin-top: 10px; + margin-top: 30px; } .form-signin .checkbox { @@ -99,9 +69,16 @@ a:active { .container { height: 100%; + width: 100%; align-content: center; overflow: scroll; } +/* +@media (max-width: 979px) { + .container { + padding-top: 0px; + } +}*/ /* Hide scrollbar for Chrome, Safari and Opera */ .container::-webkit-scrollbar { @@ -112,4 +89,36 @@ a:active { .container { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ -} \ No newline at end of file +} + +/* navigation */ +.bg-nav{ + background-color: rgba(255,255,255,0.7); +} + +.navbar-wrapper { + position: absolute; + top: 0; + right: 0; + width: 100% !important; + left: 0; + z-index: 20; + margin-top: 0px; !important; +} + +.form-hours { + width: 100%; + max-width: 420px; + padding: 20px; + margin: auto; + background-color: rgba(255,255,255,0.7); + margin-top: 10px; +} + +.form-hours .form-control { + position: relative; + box-sizing: border-box; + height: auto; + padding: 10px; + font-size: 16px; +} diff --git a/templates/base.html b/templates/base.html index 8796e30..b79eb07 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,11 +14,13 @@ Aussen- und Innenausbau {% endif %} - + + - + + {% block content %} {% endblock %} - + \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index a3c1448..283febc 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,13 +1,51 @@ -{% extends 'base.html' %} - -{% block title %}Home{% endblock %} +{% extends "base.html" %} {% block content %} -{% if user.is_authenticated %} - Hi {{ user.username }}! -

Log Out

-{% else %} -

You are not logged in

- Log In -{% endif %} + +
+
+ {% if user.is_authenticated %} + Zalogowany: {{ user.username }}   +

Wyloguj

+ +
+ {% csrf_token %} + {{ form.as_p }} + + + + + +
+ + + + + + + + + + + + + + + + + {% else %} +

Nie jesteÅ› zalogowany  

+ Zaloguj + {% endif %} + + + + + + + + + +
+
{% endblock %} \ No newline at end of file diff --git a/templates/inputhours.html b/templates/inputhours.html new file mode 100644 index 0000000..ced9197 --- /dev/null +++ b/templates/inputhours.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block content %} + +
+
+ {% if user.is_authenticated %} + Zalogowany: {{ user.username }}   +

Wyloguj


+ {% endif %} +
+ + +
+
+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/registration/login.html b/templates/registration/login.html index 5eccacf..9f6a21c 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -27,7 +27,7 @@ -
+