diff --git a/aula/models.py b/aula/models.py index 091fac9..0bb751d 100644 --- a/aula/models.py +++ b/aula/models.py @@ -26,6 +26,7 @@ class Group(tuple): self.name = group_data[1] self.leaveable = group_data[2] self.parents_can_post = group_data[3] + super().__init__() def get_posts(self): cur = conn.cursor() @@ -48,6 +49,7 @@ class Message(tuple): self.thread_id = message_data[2] self.author_id = message_data[3] self.created_date = message_data[4] + super().__init__() class Post(tuple): def __init__(self, post_data): @@ -57,6 +59,7 @@ class Post(tuple): self.title = post_data[3] self.content = post_data[4] self.created_date = post_data[5] + super().__init__() class Thread(tuple): def __init__(self, thread_data): @@ -64,6 +67,7 @@ class Thread(tuple): self.title = thread_data[1] self.group_id = thread_data[2] self.creator_id = thread_data[3] + super().__init__() class User(tuple, UserMixin): def __init__(self, user_data): @@ -74,6 +78,7 @@ class User(tuple, UserMixin): self.email = user_data[4] self.address = user_data[5] self.role = user_data[6] + super().__init__() def get_id(self): return self.user_id diff --git a/aula/static/Aula_logo.png b/aula/static/Aula_logo.png new file mode 100644 index 0000000..312fbc0 Binary files /dev/null and b/aula/static/Aula_logo.png differ diff --git a/aula/static/main.css b/aula/static/main.css index 44e1df8..7004c30 100644 --- a/aula/static/main.css +++ b/aula/static/main.css @@ -2,18 +2,39 @@ body { background: #fafafa; color: #333333; margin-top: 5rem; + font-family: Lato, sans-serif; } h1, h2, h3, h4, h5, h6 { color: #444444; } +.site-header { + margin-bottom: 120px; +} + +.navbar { + padding-top: 0; + padding-bottom: 0; +} + +.navbar-brand { + height: 80px; + margin-bottom: 5px; +} + .bg-steel { - background-color: #5f788a; + background-color: #18638f; } .site-header .navbar-nav .nav-link { color: #cbd5db; + width: 100px; + height: 100px; + margin-top: 0; + margin-bottom: 0; + text-align: center; + padding-top: 35px; } .site-header li > .nav-item.nav-link { @@ -22,6 +43,7 @@ h1, h2, h3, h4, h5, h6 { .site-header .navbar-nav .nav-link:hover { color: #ffffff; + background-color: #549ec7; } .site-header .navbar-nav .nav-link.active { diff --git a/aula/templates/home.html b/aula/templates/home.html index 9b418e3..d2e57f8 100644 --- a/aula/templates/home.html +++ b/aula/templates/home.html @@ -1,6 +1,9 @@ {% extends "layout.html" %} {% block content %} -

{{ current_user.name }}

+ {% if current_user.is_authenticated %} +

Hej, {{ current_user.first_name }} {{ current_user.first_name }}

+
+

Opslag

{% for post in posts %}
@@ -13,4 +16,6 @@
{% endfor %} + {% else %} + {% endif %} {% endblock content %} diff --git a/aula/templates/layout.html b/aula/templates/layout.html index 52f87c9..f40fecf 100644 --- a/aula/templates/layout.html +++ b/aula/templates/layout.html @@ -1,6 +1,10 @@ + + + + @@ -20,32 +24,21 @@