Commit 40a6f200 authored by Charles Lim's avatar Charles Lim

Changed static and template folder for homepage

parent 6369fd8c
@font-face {
font-family: 'Oxygen';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/oxygen/v15/2sDfZG1Wl4LcnbuKjk0m.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.details {
color: black;
padding: 10px 20px 10px 20px;
text-decoration: none;
font-family: Oxygen;
width: fit-content;
background-size: 200% 100%;
background-image: linear-gradient(to right, #ffffff 50%, #000000 50%);
transition: background-position 0.3s ease-in-out, color 0.2s ease-in-out;
}
.details:hover {
background-color: black;
background-position: -100% 0;
color: white;
}
\ No newline at end of file
@font-face {
font-family: 'Oxygen';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/oxygen/v15/2sDfZG1Wl4LcnbuKjk0m.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
p {
margin-top: 0;
margin-bottom: 20px;
font-family: Oxygen;
}
h1 {
display: flex;
flex-direction: row;
align-items: center;
}
img {
border-radius: 50%;
border: 1px solid black;
margin-right: 30px;
margin-top: -10px;
}
\ No newline at end of file
......@@ -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):
......
<!-- 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>
......@@ -19,12 +19,12 @@ from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('homepage/', include("homepage.urls", namespace='homepage')),
path('admin/', admin.site.urls),
path('forum/', include("forum.urls", namespace='forum')),
path('announcements/', include("announcement_board.urls",
path('homepage', include("homepage.urls", namespace='homepage')),
path('admin', admin.site.urls),
path('forum', include("forum.urls", namespace='forum')),
path('announcements', include("announcement_board.urls",
namespace='announcement_board')),
path('assignments/', include("assignments.urls", namespace='assignments')),
path('assignments', include("assignments.urls", namespace='assignments')),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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