Verified Commit a5055e7a authored by Angelo Esteban's avatar Angelo Esteban
parents 5cddc09f e2bd7dc7
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
.subtable { .subtable {
flex-wrap:wrap; flex-wrap:wrap;
align-items: center;
} }
.subtable>* { .subtable>* {
...@@ -40,3 +41,19 @@ ...@@ -40,3 +41,19 @@
#assignment-image { #assignment-image {
max-width:25em; max-width:25em;
} }
.assignment-name {
color: white;
text-decoration: none;
}
.table-links {
text-decoration: none;
transition: .2s ease-in-out;
}
.table-links:hover {
background-color: #9b00f5;
font-size: 25px;
font-weight: 700;
}
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<li>No assignments found.</li> <li>No assignments found.</li>
{% else %} {% else %}
{% for assignment in course.assignment_set.all %} {% for assignment in course.assignment_set.all %}
<a href='{{request.path}}{{assignment.pk}}/details'><li>{{assignment.name}}</li></a> <a class="table-links" href='{{request.path}}{{assignment.pk}}/details'><li class="assignment-name">{{assignment.name}}</li></a>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</ul> </ul>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block title %}Homepage{% endblock %} {% block title %}Homepage{% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{% static '/homepage.css' %}"> <link rel="stylesheet" href="{% static 'homepage/homepage.css' %}">
{% endblock %} {% endblock %}
{% block header %} {% block header %}
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
{% block title %}Homepage{% endblock %} {% block title %}Homepage{% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{% static '/widgetuser_details.css' %}"> <link rel="stylesheet" href="{% static 'homepage/widgetuser_details.css' %}">
{% endblock %} {% endblock %}
{% block header %} {% block header %}
<img width=60 height=60 src="{% static '/default_profilepic.png' %}"/> <img width=60 height=60 src="{% static 'homepage/default_profilepic.png' %}"/>
{{object.last_name}}, {{object.first_name}} {{object.middle_name}} {{object.last_name}}, {{object.first_name}} {{object.middle_name}}
{% endblock %} {% endblock %}
......
from django.urls import path from django.urls import path
from .views import HomepageView, WidgetUserDetailView from .views import HomepageView, WidgetUserDetailView
urlpatterns = [ urlpatterns = [
path('', HomepageView.as_view(), name='index'), path('', HomepageView.as_view(), name='index'),
path('<int:pk>/details', WidgetUserDetailView.as_view(),name='widgetuser_detail'), path('<int:pk>/details', WidgetUserDetailView.as_view(),
name='widgetuser_detail'),
] ]
app_name = "homepage" app_name = "homepage"
...@@ -9,7 +9,7 @@ class HomepageView(View): ...@@ -9,7 +9,7 @@ class HomepageView(View):
objects_set = { objects_set = {
"all_widgetusers": [obj for obj in WidgetUser.objects.all().order_by('last_name')] "all_widgetusers": [obj for obj in WidgetUser.objects.all().order_by('last_name')]
} }
return render(request, 'index.html', objects_set) return render(request, 'homepage/index.html', objects_set)
class WidgetUserDetailView(DetailView): class WidgetUserDetailView(DetailView):
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<body> <body>
<nav> <nav>
<ul> <ul>
<li><a class="links" href="/homepage">HOMEPAGE</a></li> <li><a class="links" href="/homepage/">HOMEPAGE</a></li>
<li><a class="links" href="/assignments">ASSIGNMENTS</a></li> <li><a class="links" href="/assignments/">ASSIGNMENTS</a></li>
<li><a class="links" href="/forum">FORUM</a></li> <li><a class="links" href="/forum/">FORUM</a></li>
<li><a class="links" href="/announcements">ANNOUNCEMENTS</a></li> <li><a class="links" href="/announcements/">ANNOUNCEMENTS</a></li>
</ul> </ul>
</nav> </nav>
<div class="content"> <div class="content">
......
<!-- project/template/base.html -->
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{% endblock %}</title>
<link href="{% static 'base_style.css' %}" rel="stylesheet" />
{% block styles %}{% endblock %}
</head>
<body>
<nav>
<ul>
<li><a class="links" href="/homepage">HOMEPAGE</a></li>
<li><a class="links" href="/assignments">ASSIGNMENTS</a></li>
<li><a class="links" href="/forum">FORUM</a></li>
<li><a class="links" href="/announcements">ANNOUNCEMENTS</a></li>
</ul>
</nav>
<div class="content">
<h1 class="header">{% block header %}{% endblock %}</h1>
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment