Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions src/django_project/web/templates/web/partials/detail/group.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,51 @@
</div>
</section>

<section class="m-5 animate__fadeIn" style="animation-duration: 0.3s;">
<div style="align-items:center; gap:0.5rem; margin-bottom:0.5rem; width:100%;">
<h4 class="mb-0 fw-bold text-primary" style="margin:0;">About</h4>
<hr style="flex:1; border:none; height:1px; background-color:var(--bs-primary); margin-top:0.25rem;" />
</div>
<div style="width:100%; height:240px; max-height:240px; overflow-y:auto; padding:1rem; border-radius:6px; box-sizing:border-box; scrollbar-width:thin; scrollbar-color:rgba(var(--bs-primary-rgb), 0.25) transparent;">
<div class="about-content">
{% if object.description %}
{{ object.description|safe }}
{% else %}
<i>No description</i>
{% endif %}
<div style="display:flex; flex-direction:column; min-height:20vh;">
<section id="about_section" class="mx-5 my-3 animate__fadeIn" style="animation-duration: 0.3s; flex:1; min-height:240px;">
<div style="align-items:center; gap:0.5rem; margin-bottom:0.5rem; width:100%;">
<h4 class="mb-0 fw-bold text-primary" style="margin:0;">About</h4>
<hr style="flex:1; border:none; height:1px; background-color:var(--bs-primary); margin-top:0.25rem;" />
</div>
</div>
</section>

<section class="m-5 animate__fadeIn" style="animation-duration: 0.4s;">
<div class="row">
<div class="col-md-6 mb-4 mb-sm-5">
<h4 class="mb-0 fw-bold text-primary">Upcoming Events</h4>
<hr class="w-100 border-0" style="height: 1px; background-color: var(--bs-primary); margin-top: 0.25rem;" />
<div id="upcoming-events-{{ object.id }}">
{% with object.get_upcoming_events as queryset %}
{% if queryset %}
{% include "web/partials/li/events.htm" %}
<div style="width:100%; height:100%; overflow-y:auto; padding:1rem; border-radius:6px; box-sizing:border-box; scrollbar-width:thin; scrollbar-color:rgba(var(--bs-primary-rgb), 0.25) transparent;">
<div class="about-content">
{% if object.description %}
{{ object.description|safe }}
{% else %}
<i>No upcoming events</i>
<i>No description</i>
{% endif %}
{% endwith %}
</div>
</div>
<div class="col-md-6 mb-4">
<h4 class="mb-0 fw-bold text-primary">Past Events</h4>
<hr class="w-100 border-0" style="height: 1px; background-color: var(--bs-primary); margin-top: 0.25rem;" />
<div id="past-events-{{ object.id }}">
{% with object.get_past_events as queryset %}
{% if queryset %}
{% include "web/partials/li/events.htm" %}
{% else %}
<i>No past events</i>
{% endif %}
{% endwith %}
</section>

<section id="events_section" class="mx-5 my-3 animate__fadeIn" style="animation-duration: 0.4s; flex:0 0 25%;">
<div class="row">
<div class="col-md-6 mb-5 mb-md-0">
<h4 class="mb-0 fw-bold text-primary">Upcoming Events</h4>
<hr class="w-100 border-0" style="height: 1px; background-color: var(--bs-primary); margin-top: 0.25rem;" />
<div id="upcoming-events-{{ object.id }}">
{% with object.get_upcoming_events as queryset %}
{% if queryset %}
{% include "web/partials/li/events.htm" %}
{% else %}
<i>No upcoming events</i>
{% endif %}
{% endwith %}
</div>
</div>
<div class="col-md-6 mb-4">
<h4 class="mb-0 fw-bold text-primary">Past Events</h4>
<hr class="w-100 border-0" style="height: 1px; background-color: var(--bs-primary); margin-top: 0.25rem;" />
<div id="past-events-{{ object.id }}">
{% with object.get_past_events as queryset %}
{% if queryset %}
{% include "web/partials/li/events.htm" %}
{% else %}
<i>No past events</i>
{% endif %}
{% endwith %}
</div>
</div>
</div>
</div>
</section>
</section>
</div>
4 changes: 3 additions & 1 deletion src/django_project/web/utilities/scrapers/meetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def get_event_information(url: str) -> dict:
event_info["name"] = soup.find("h1", class_="ds2-b32 text-ds2-text-fill-primary-enabled lg:ds2-b48")
if event_info["name"]:
event_info["name"] = event_info["name"].text
description_div: PageElement | Tag | NavigableString | None = soup.find("div", class_="break-words")
description_div: PageElement | Tag | NavigableString | None = soup.find(
"div", class_="w-full break-words transition-all duration-300 line-clamp-[15]"
)
if description_div:
if isinstance(description_div, Tag): # Type check for Tag
event_info["description"] = "".join(str(child) for child in description_div.children)
Expand Down