diff --git a/README.md b/README.md index 58fe9cb9e..18cc68fb0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MultiUserOpenRefine -![MultiUserOpenRefine](logo.svg) +![MultiUserOpenRefine](Serwer_django/static/images/logo.svg) MultiUserOpenRefine is an extension to open-source tool that, in addition to all the features described below, allows creating user accounts, each providing diff --git a/Serwer_django/Serwer_django/settings.py b/Serwer_django/Serwer_django/settings.py index 79217d3e5..18c94182a 100644 --- a/Serwer_django/Serwer_django/settings.py +++ b/Serwer_django/Serwer_django/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'crispy_forms' ] MIDDLEWARE = [ @@ -130,3 +131,4 @@ LOGOUT_REDIRECT_URL = 'home' # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +CRISPY_TEMPLATE_PACK = 'bootstrap4' diff --git a/Serwer_django/db.sqlite3 b/Serwer_django/db.sqlite3 index f7c223663..94342f0d9 100644 Binary files a/Serwer_django/db.sqlite3 and b/Serwer_django/db.sqlite3 differ diff --git a/Serwer_django/static/base.css b/Serwer_django/static/base.css index 682ef2f0e..62c12f26e 100644 --- a/Serwer_django/static/base.css +++ b/Serwer_django/static/base.css @@ -1,3 +1,7 @@ -body { - background-color: #818fb7; +.rounded_div { + border-radius: 25px; + background: #73AD21; + padding: 20px; + width: 200px; + height: 150px; } \ No newline at end of file diff --git a/Serwer_django/static/images/logo.jpg b/Serwer_django/static/images/logo.jpg deleted file mode 100644 index c478da7a3..000000000 Binary files a/Serwer_django/static/images/logo.jpg and /dev/null differ diff --git a/Serwer_django/static/images/logo.png b/Serwer_django/static/images/logo.png new file mode 100644 index 000000000..7920304f7 Binary files /dev/null and b/Serwer_django/static/images/logo.png differ diff --git a/logo.svg b/Serwer_django/static/images/logo.svg similarity index 100% rename from logo.svg rename to Serwer_django/static/images/logo.svg diff --git a/Serwer_django/static/registration/login.css b/Serwer_django/static/registration/login.css new file mode 100644 index 000000000..f9d137435 --- /dev/null +++ b/Serwer_django/static/registration/login.css @@ -0,0 +1,90 @@ +/* 'Open Sans' font from Google Fonts */ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700); + +body { + background: #456; + font-family: 'Open Sans', sans-serif; +} + +.login { + width: 400px; + margin: 16px auto; + font-size: 16px; +} + +/* Reset top and bottom margins from certain elements */ +.login-header, +.login p { + margin-top: 0; + margin-bottom: 0; +} + +/* The triangle form is achieved by a CSS hack */ +.login-triangle { + width: 0; + margin-right: auto; + margin-left: auto; + border: 12px solid transparent; + border-bottom-color: #28d; +} + +.login-header { + background: #28d; + padding: 20px; + font-size: 1.4em; + font-weight: normal; + text-align: center; + text-transform: uppercase; + color: #fff; +} + +.login-container { + background: #ebebeb; + padding: 12px; +} + +/* Every row inside .login-container is defined with p tags */ +.login p { + padding: 12px; +} + +.login input { + box-sizing: border-box; + display: block; + width: 100%; + border-width: 1px; + border-style: solid; + padding: 16px; + outline: 0; + font-family: inherit; + font-size: 0.95em; +} + +.login input[type="email"], +.login input[type="password"] { + background: #fff; + border-color: #bbb; + color: #555; +} + +/* Text fields' focus effect */ +.login input[type="email"]:focus, +.login input[type="password"]:focus { + border-color: #888; +} + +.login input[type="submit"] { + background: #28d; + border-color: transparent; + color: #fff; + cursor: pointer; +} + +.login input[type="submit"]:hover { + background: #17c; +} + +/* Buttons' focus effect */ +.login input[type="submit"]:focus { + border-color: #05a; +} \ No newline at end of file diff --git a/Serwer_django/templates/base.html b/Serwer_django/templates/base.html index 6c6137e50..bb3b175c6 100644 --- a/Serwer_django/templates/base.html +++ b/Serwer_django/templates/base.html @@ -2,17 +2,28 @@ - {% load static %} - - - + - {% block title %}Auth{% endblock %} + {% block title %}MultiUserOpenRefine{% endblock %}
- {% block content %} - {% endblock %} +
+
+
+
+ logo +

MultiUserOpenRefine

+
+ {% block content %} + {% endblock %} +
+
+
+
+
\ No newline at end of file diff --git a/Serwer_django/templates/home.html b/Serwer_django/templates/home.html index 8327f5bcf..6dd9f1a1a 100644 --- a/Serwer_django/templates/home.html +++ b/Serwer_django/templates/home.html @@ -5,11 +5,11 @@ {% block content %} {% if user.is_authenticated %} -Hi {{ user.username }}! -

Log Out

+

Hi {{ user.username }}!

+

Log Out

{% else %}

You are not logged in

-

Log In

-

Sign Up

+

Log In

+

Create an account

{% endif %} {% endblock %} \ No newline at end of file diff --git a/Serwer_django/templates/registration/login.html b/Serwer_django/templates/registration/login.html index ff1ed52eb..ab15b4ba6 100644 --- a/Serwer_django/templates/registration/login.html +++ b/Serwer_django/templates/registration/login.html @@ -8,6 +8,6 @@
{% csrf_token %} {{ form.as_p }} - +
{% endblock %} \ No newline at end of file diff --git a/Serwer_django/templates/registration/signup.html b/Serwer_django/templates/registration/signup.html index 81a73ea3a..de6856aca 100644 --- a/Serwer_django/templates/registration/signup.html +++ b/Serwer_django/templates/registration/signup.html @@ -8,6 +8,6 @@
{% csrf_token %} {{ form.as_p }} - +
{% endblock %} \ No newline at end of file