diff --git a/club/static/club/detail.scss b/club/static/club/detail.scss
new file mode 100644
index 00000000..48ecb36f
--- /dev/null
+++ b/club/static/club/detail.scss
@@ -0,0 +1,66 @@
+#club-detail {
+ img.club-logo {
+ display: block;
+ max-height: 200px;
+ max-width: 200px;
+ }
+ #club-attributes {
+ ul {
+ list-style: none;
+ margin-left: 0;
+ display: flex;
+ flex-direction: column;
+ gap: .75rem;
+
+ li i {
+ margin-right: .5rem;
+ }
+ }
+ }
+
+ &:not(.has-links) {
+ #club-attributes {
+ float: right;
+ margin: 1em 0 1em 2em;
+
+ @media screen and (max-width: 650px) {
+ margin-left: 1em;
+ }
+ @media screen and (max-width: 400px) {
+ float: unset;
+ img.club-logo {
+ margin: auto;
+ }
+ }
+ }
+ }
+
+ &.has-links {
+ display: flex;
+ flex-direction: row-reverse;
+ gap: 2em;
+
+ @media screen and (max-width: 650px) {
+ flex-direction: column;
+ gap: 1em;
+ }
+
+ #club-attributes {
+ display: flex;
+ flex-direction: column;
+ gap: 1em;
+ min-width: 200px;
+ @media screen and (max-width: 650px) {
+ margin-top: 1em;
+ flex-direction: row-reverse;
+ justify-content: flex-end;
+ h4 {
+ margin: 0;
+ }
+ img.club-logo {
+ margin-left: auto;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/club/templates/club/club_detail.jinja b/club/templates/club/club_detail.jinja
index 14a5a384..c1e1f583 100644
--- a/club/templates/club/club_detail.jinja
+++ b/club/templates/club/club_detail.jinja
@@ -21,15 +21,43 @@
{% endif %}
{% endblock %}
+{% block additional_css %}
+
+{% endblock %}
+
{% block content %}
-
- {% if club.logo %}
-
- {% endif %}
-
{{ club.name }}
- {% if page_revision %}
- {{ page_revision|markdown }}
- {% endif %}
+
{{ club.name }}
+
+
+ {% if club.logo %}
+

+ {% endif %}
+ {% if links %}
+
+
{% trans %}Links{% endtrans %}
+
+
+ {% endif %}
+
+
+ {% if page_revision %}
+ {{ page_revision|markdown }}
+ {% endif %}
+
{% endblock %}
diff --git a/club/tests/test_page.py b/club/tests/test_page.py
index 699a3e9e..6567a690 100644
--- a/club/tests/test_page.py
+++ b/club/tests/test_page.py
@@ -21,7 +21,7 @@ def test_page_display_on_club_main_page(client: Client):
assert res.status_code == 200
soup = BeautifulSoup(res.text, "lxml")
- detail_html = soup.find(id="club_detail").find(class_="markdown")
+ detail_html = soup.find(id="club-page").find(class_="markdown")
assertHTMLEqual(detail_html.decode_contents(), markdown(content))
@@ -34,7 +34,7 @@ def test_club_main_page_without_content(client: Client):
assert res.status_code == 200
soup = BeautifulSoup(res.text, "lxml")
- detail_html = soup.find(id="club_detail")
+ detail_html = soup.find(id="club-page")
assert detail_html.find_all("markdown") == []
diff --git a/club/views.py b/club/views.py
index 2e8f831f..297fe201 100644
--- a/club/views.py
+++ b/club/views.py
@@ -244,6 +244,7 @@ class ClubView(ClubTabsMixin, DetailView):
.values_list("content", flat=True)
.first()
)
+ kwargs["links"] = list(self.object.links.select_related("link_type").all())
return kwargs
diff --git a/core/static/core/style.scss b/core/static/core/style.scss
index 67f03898..2a1857b1 100644
--- a/core/static/core/style.scss
+++ b/core/static/core/style.scss
@@ -398,6 +398,28 @@ body {
}
}
+ /* Fontawesome icons */
+ .fa-brands, .fa-link {
+ color: black;
+ }
+
+ .fa-facebook {
+ color: $faceblue;
+ }
+
+ .fa-discord {
+ color: $discordblurple;
+ }
+
+ .fa-square-instagram::before, .fa-instagram::before {
+ background: $instagradient;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .fa-bluesky, .fa-square-bluesky {
+ color: #0f73ff;
+ }
}
@media screen and (max-width: $small-devices) {
@@ -749,16 +771,3 @@ textarea {
vertical-align: middle;
}
}
-
-/*--------------------------------JQuery-------------------------------*/
-#club_detail {
- .club_logo {
- float: right;
-
- img {
- display: block;
- max-height: 10em;
- max-width: 10em;
- }
- }
-}
\ No newline at end of file