Verified Commit a5055e7a authored by Angelo Esteban's avatar Angelo Esteban
parents 5cddc09f e2bd7dc7
......@@ -18,6 +18,7 @@
.subtable {
flex-wrap:wrap;
align-items: center;
}
.subtable>* {
......@@ -40,3 +41,19 @@
#assignment-image {
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 @@
<li>No assignments found.</li>
{% else %}
{% 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 %}
{% endif %}
</ul>
......
......@@ -5,7 +5,7 @@
{% block title %}Homepage{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{% static '/homepage.css' %}">
<link rel="stylesheet" href="{% static 'homepage/homepage.css' %}">
{% endblock %}
{% block header %}
......
......@@ -5,11 +5,11 @@
{% block title %}Homepage{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{% static '/widgetuser_details.css' %}">
<link rel="stylesheet" href="{% static 'homepage/widgetuser_details.css' %}">
{% endblock %}
{% 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}}
{% endblock %}
......
from django.urls import path
from .views import HomepageView, WidgetUserDetailView
urlpatterns = [
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"
......@@ -9,7 +9,7 @@ class HomepageView(View):
objects_set = {
"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):
......
......@@ -10,10 +10,10 @@
<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>
<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">
......
<!-- 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