Skip to content

Commit 7c57f00

Browse files
committed
dockerfile cleanup, added thedev and linksthedev pages, added the dev to mps family tree, subgroup supports 4 elements
1 parent dc50266 commit 7c57f00

File tree

9 files changed

+156
-18
lines changed

9 files changed

+156
-18
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ ENV PYTHONUNBUFFERED 1
55

66
WORKDIR /app
77

8-
COPY requirements.txt /app/
9-
RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt
10-
118
COPY . /app/
129

13-
RUN python manage.py collectstatic -v 3 --noinput
10+
RUN pip install --no-cache-dir -r requirements.txt
1411

15-
#RUN rm -rf /app/mps_site/static
12+
RUN python manage.py collectstatic -v 3 --noinput
1613

1714
EXPOSE 8000
1815

mps_site/data/homepage.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
]
99

1010
homepage_subgroups = {
11-
"title": "MPS Sub-Groups",
12-
"subtitle": "Explore the Pillars of MPS!",
11+
"title": "The MPS Family Tree",
12+
"subtitle": "Explore all the branches of MPS!",
1313
"groups": [
1414
{
1515
"name": "DCUfm",
@@ -43,6 +43,17 @@
4343
{"url": "https://www.instagram.com/thecollegeview", "icon_class": "fa-brands fa-instagram", "aria_label": "The College View Instagram"},
4444
{"url": "https://thecollegeview.ie/", "icon_class": "fa fa-link", "aria_label": "The College View Website"}
4545
]
46+
},
47+
{
48+
"name": "The Dev",
49+
"link": "/thedev",
50+
"image": "images/logos/dev_512.png",
51+
"alt_text": "MPS Sub-Group",
52+
"description": "Championing Sustainable Development, Made by students, for students!",
53+
"social_links": [
54+
{"url": "https://www.instagram.com/thedev.dcu/", "icon_class": "fa-brands fa-instagram", "aria_label": "The Dev Instagram"},
55+
{"url": "https://thecollegeview.ie/category/thedev/", "icon_class": "fa fa-link", "aria_label": "The College View Website"}
56+
]
4657
}
4758
]
4859
}
364 KB
Loading

mps_site/templates/base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@
104104
<li class="nav-item">
105105
<a class="nav-link" href="/thecollegeview">TCV</a>
106106
</li>
107+
<li>
108+
<a class="nav-link" href="/thedev">The Dev</a>
109+
</li>
107110
<li class="nav-item">
108111
<a class="nav-link" href="/gallery">Gallery</a>
109112
</li>

mps_site/templates/components/home/socials.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ <h5><i>Keep updated with all things MPS!</h5></i>
2323
<li><u><a href="/linksdcutv">View All DCUtv Links</a></u></li>
2424
<li><u><a href="/linksdcufm">View All DCUfm Links</a></u></li>
2525
<li><u><a href="/linkstcv">View All The College View Links</a></u></li>
26+
<li><u><a href="/linksthedev">View All The Dev Links</a></u></li>
2627
</div>
2728
</div>
2829
</div>

mps_site/templates/components/subgroup.html

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
{# templates/components/subgroup.html #}
22
{% load static %}
33

4-
<div class="container">
5-
<h1>{{ subgroups_data.title }}</h1>
6-
<h5><i>{{ subgroups_data.subtitle }}</i></h5>
7-
<div class="row justify-content-center">
8-
<div class="col-md-12 custom-box shadow-lg bg-body">
4+
<div class="container-fluid"> {# Full width to remove the big gaps #}
5+
<h1 class="text-center">{{ subgroups_data.title }}</h1>
6+
<h5 class="text-center"><i>{{ subgroups_data.subtitle }}</i></h5>
7+
8+
{% with subgroups_data.groups|length as total_groups %}
9+
<div class="row justify-content-center box-box">
10+
<div class="col-12 custom-box shadow-lg bg-body" style="max-width: 98%; padding: 30px;">
11+
{# Added padding to make the outer box larger and well-spaced #}
912
<div class="center-contents">
10-
<div class="container mt-4">
11-
<div class="row">
13+
<div class="container-fluid mt-4">
14+
{# Changed to container-fluid to allow full expansion #}
15+
<div class="row justify-content-center">
1216
{% for group in subgroups_data.groups %}
13-
<div class="col-md-4">
14-
<div class="committee-member shadow-lg bg-body" style="background-color: #202E4E; border-radius: 15px;">
17+
<div class="{% if total_groups == 3 %}col-md-4 col-lg-4{% else %}col-md-3 col-lg-3{% endif %}">
18+
{# Adjusts size dynamically: col-md-4 for 3 items, col-md-3 for 4+ items #}
19+
<div class="committee-member shadow-lg bg-body"
20+
style="background-color: #202E4E; border-radius: 15px; padding: 25px;">
1521
<a href="{{ group.link }}">
16-
<img src="{% static group.image %}" width="250px" height="250px" alt="{{ group.alt_text }}" style="border-radius: 50%; margin-top: 20px;">
22+
<img src="{% static group.image %}" width="300px" height="300px"
23+
alt="{{ group.alt_text }}" class="hover-image"
24+
style="border-radius: 50%; margin-top: 20px;">
1725
</a>
1826
<h3>{{ group.name }}</h3>
19-
<h5 style="padding-left: 10px; padding-right: 10px;"><i>{{ group.description|safe }}</i></h5>
27+
<h5 style="padding-left: 10px; padding-right: 10px;">
28+
<i>{{ group.description|safe }}</i>
29+
</h5>
2030
<div class="social-icons" style="padding-bottom: 15px;">
2131
<ul>
2232
{% for social in group.social_links %}
@@ -36,4 +46,27 @@ <h5 style="padding-left: 10px; padding-right: 10px;"><i>{{ group.description|saf
3646
</div>
3747
</div>
3848
</div>
49+
{% endwith %}
3950
</div>
51+
52+
<style>
53+
/* Image Hover Effect */
54+
.hover-image {
55+
transition: transform 0.3s ease-in-out;
56+
}
57+
.hover-image:hover {
58+
transform: scale(1.1); /* Increases image size on hover */
59+
}
60+
61+
/* Adjust padding for better spacing */
62+
.custom-box {
63+
padding: 40px;
64+
}
65+
66+
@media screen and (max-width: 768px) {
67+
.box-box {
68+
padding-left: 15px;
69+
padding-right: 15px;
70+
}
71+
}
72+
</style>

mps_site/templates/thedev.html

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{% extends 'base.html' %}
2+
{% load static %}
3+
{% block content %}
4+
5+
<div class="title-large">
6+
<h1>The Dev @ DCU</h1>
7+
<h3><i>Powered by DCU's Media Production Society, Championing Sustainable Development, Made by students, for students</i></h3>
8+
</div>
9+
10+
11+
12+
<div class="container">
13+
<div class="row d-flex align-items-start flex-nowrap">
14+
<!-- Left Column: Text Section -->
15+
<div class="col-md-6 custom-box">
16+
<h1>About The Dev</h1>
17+
<p>
18+
INTRODUCING: THE DEV
19+
<br><br>
20+
Launched by DCU’s Media Production Society as part of the university’s “Shout Out for Sustainable Development” Initiative, THE DEV is an all-new digital service dedicated to championing student-produced ESG content and sustainability initiatives across DCU!
21+
<br><br>
22+
THE DEV aims to promote real and relevant Sustainable Development news, increasing accessibility for students and the wider DCU community, while combating misinformation.
23+
<br><br>
24+
On Instagram, @thedev.dcu will serve as a centralised hub for all things ESG and Sustainable Development as we increase output across @dcufm 💚, @dcutvmps 💙, and @thecollegeview ❤
25+
<br><br>
26+
This will be supported by cross-platform content opportunities with @dcumps on Tik Tok, and our dedicated LinkedIn page 💜
27+
<br><br>
28+
I am so excited to be leading this new project and hope to see it thrive through shared collaboration with our members across each of the society’s existing branches!
29+
</p>
30+
<h4 style="text-align: center;"><i>The Dev Manager: Liam O'Keeffe</i></h4>
31+
</div>
32+
33+
<!-- Right Column: Subgroup -->
34+
<div class="col-md-6 custom-box shadow-lg bg-body">
35+
<div class="col-md-12">
36+
<div class="committee-member shadow-lg bg-body" style="background-color: #202E4E; border-radius: 15px;">
37+
<a href="/thedev">
38+
<img src="{% static 'images/logos/dev_512.png' %}" width="250px" height="250px" alt="MPS Sub-Group" style="border-radius: 50%; margin-top: 20px;">
39+
</a>
40+
<h3>The Dev</h3>
41+
<div class="social-icons" style="padding-bottom: 15px;">
42+
<ul>
43+
<li>
44+
<a href="https://www.instagram.com/thedev.dcu/" target="_blank" aria-label="The Dev Instagram">
45+
<i class="fa-brands fa-instagram hvr-bounce-in"></i>
46+
</a>
47+
<a href="https://thecollegeview.ie/category/thedev/" target="_blank" aria-label="The College View">
48+
<i class="fa fa-link hvr-bounce-in"></i>
49+
</a>
50+
</li>
51+
</ul>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
</div>
57+
</div>
58+
59+
60+
{% include 'components/managers.html' with title="Meet The Dev Managers" subtitle="The team behind MPS's latest initiative!" managers=managers %}
61+
62+
63+
{% include 'components/tcv_section.html' with title="The College View | The Dev" subtitle="Check out the latest sustainable development articles!" section=thedev %}
64+
65+
66+
67+
{% endblock %}
68+
{% block footer %}
69+
70+
{% endblock %}
71+
</body>
72+
</html>

mps_site/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
path('linksdcutv', views.links_tv, name="links_tv"),
1616
path('linkstcv', views.links_tcv, name="links_tcv"),
1717
path('linksdcufm', views.links_fm, name="links_fm"),
18+
path('linksthedev', views.links_dev, name="links_dev"),
1819
path('committee', views.committee, name="committee"),
1920
path('contact', views.contact, name="contact"),
2021
path('dcutv', views.dcutv, name="dcutv"),
2122
path('gallery', views.gallery, name="gallery"),
2223
path("swapweek", views.swapweek, name="swapweek"),
2324
path("memes", views.memes, name="memes"),
2425
path("dcufm", views.dcufm, name="dcufm"),
26+
path("thedev", views.thedev, name="thedev"),
2527
path("loans", views.loans, name="loans"),
2628
path("ads", views.ads, name="ads"),
2729
path('robots.txt', TemplateView.as_view(template_name="robots.txt", content_type='text/plain')),

mps_site/views.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ def dcutv(request):
125125
'committee_video_id': '1wiscXP9nw0',
126126
'current_donation_amount': current_donation_amount,
127127
'goal_amount': goal_amount})
128+
129+
def thedev(request):
130+
managers = [member for member in committee_list["members"] if member["position"] == "Brand Design Officer"]
131+
categories = {
132+
'thedev': construct_tcv_url(category=10473),
133+
}
134+
135+
with ThreadPoolExecutor() as executor:
136+
future_to_category = {executor.submit(tcv_posts, url): category for category, url in categories.items()}
137+
results = {category: future.result() for future, category in future_to_category.items()}
138+
139+
return render(request, 'thedev.html', {'page_name': 'The Dev',
140+
'managers': managers,
141+
**results})
128142

129143
def gallery(request):
130144
gallery_page_info = GalleryPage.objects.all().first()
@@ -173,6 +187,11 @@ def links_tcv(request):
173187
linktree = process_linktree_data(sheet_url)
174188
return render(request, 'links.html', {'page_name': 'The College View Links', 'linktree': linktree})
175189

190+
def links_dev(request):
191+
sheet_url = "https://docs.google.com/spreadsheets/d/1DhR09FjdZL2sNkYrPAm18dZOL6hhmmGtBrwbWWD0swQ/edit?usp=sharing"
192+
linktree = process_linktree_data(sheet_url)
193+
return render(request, 'links.html', {'page_name': 'The Dev Links', 'linktree': linktree})
194+
176195
def swapweek(request):
177196
return render(request, 'swapweek.html', {'page_name': 'Swap Week'})
178197

0 commit comments

Comments
 (0)