Commit e2cfce4e authored by Charles Lim's avatar Charles Lim

Fixed static and template folder for homepage

parent 40a6f200
......@@ -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 %}
......@@ -14,6 +14,6 @@ Welcome to Widget!
{% block content %}
{% for user in all_widgetusers %}
<a class="details" href="{{user.id}}/details">{{forloop.counter}}. {{user.last_name}}, {{user.first_name}} {{user.middle_name}}</a> </br>
<a class="details" href="homepage/{{user.id}}/details">{{forloop.counter}}. {{user.last_name}}, {{user.first_name}} {{user.middle_name}}</a> </br>
{% endfor %}
{% endblock %}
\ No newline at end of file
......@@ -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"
@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
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