Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix grids and CSS for events and stories #1002

Merged
merged 2 commits into from
May 23, 2024
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
2 changes: 1 addition & 1 deletion static/source/css/global.styl
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ span.highlighted-number
padding: 0
background: url('../img/global/krakow.png') no-repeat
background-size: cover
width: calc(33% - 30px)
width: 90%
height: 210px
text-align: center
color: white
Expand Down
2 changes: 2 additions & 0 deletions templates/admin/organize/eventapplication/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{% endblock %}

{% block object-tools %}
{% if original %}
<div class="row mb-3">
<h4 class="italic-title">{% trans "Triaging" %}</h4>
<div class="box save-box">
Expand All @@ -30,5 +31,6 @@ <h4 class="italic-title">{% trans "Triaging" %}</h4>
{% endif %}
</div>
</div>
{% endif %}
{{ block.super }}
{% endblock %}
22 changes: 12 additions & 10 deletions templates/core/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ <h2>
</div>
</div>

<div class="row">
{% for event in future_events %}
{% include 'includes/_event.html' with event=event %}
{% if forloop.counter|divisibleby:3 %}</div><div class="row">{% endif %}
{% endfor %}
</div>
{% for event in future_events %}
{% if forloop.first %}<div class="row">{% endif %}
<div class="col event">
{% include 'includes/_event.html' with event=event %}</div>
{% if forloop.counter|divisibleby:3 %}</div><div class="row">{% endif %}
{% if forloop.last %}</div>{% endif %}
{% endfor %}

<section id="organize">
{% include 'includes/_no_event.html' %}
Expand All @@ -31,12 +32,13 @@ <h2>{% trans "Past events" %}</h2>
</div>
</div>

<div class="row">
{% for event in past_events %}
{% include 'includes/_event.html' with event=event %}
{% if forloop.first %}<div class="row">{% endif %}
<div class="col event">
{% include 'includes/_event.html' with event=event %}</div>
{% if forloop.counter|divisibleby:3 %}</div><div class="row">{% endif %}
{% endfor %}
</div>
{% if forloop.last %}</div>{% endif %}
{% endfor %}
</section>
</div>
{% endblock %}
18 changes: 10 additions & 8 deletions templates/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ <h2>

<div class="upcoming-events">
<div class="row-container">
<div class="row">
{% for event in future_events %}
{% include 'includes/_event.html' with event=event %}
{% if forloop.first %}<div class="row">{% endif %}
<div class="col event">
{% include 'includes/_event.html' with event=event %}</div>
{% if forloop.counter|divisibleby:3 %}</div><div class="row">{% endif %}
{% endfor %}
</div>
{% if forloop.last %}</div>{% endif %}
{% endfor %}
</div>
<div class="show-more"><a href="javascript:;">
{% blocktrans %}Show all {{ future_events_count }} upcoming events{% endblocktrans %} »
Expand All @@ -116,12 +117,13 @@ <h2>
<h2>{% trans "Badass Django Ladies" %}</h2>
<p>{% trans "Each week we try to introduce one badass lady who uses Python or Django and highlight her work:" %}</p>

<div class="row">
{% for story in stories %}
{% include 'includes/_story.html' with story=story %}
{% if forloop.first %}<div class="row">{% endif %}
<div class="col story">
{% include 'includes/_story.html' with story=story %}</div>
{% if forloop.counter|divisibleby:2 %}</div><div class="row">{% endif %}
{% if forloop.last %}</div>{% endif %}
{% endfor %}
</div>

<p><a href="{% url 'story:stories' %}">{% trans "Read all Django Stories" %} »</a></p>
</div>
<div class="col-md-6">
Expand Down
24 changes: 9 additions & 15 deletions templates/event/menu.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
{% load core_tags i18n static %}

<div class="navbar navbar-default" role="navigation">
<div class="navbar navbar-expand-lg navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target=".navbar-collapse">
<span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand" href="/">
<a href="/"><img src="{% static 'img/logo.png' %}" width="200" alt="Django Girls" /></a>
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<a class="navbar-brand" href="/"><img src="{% static 'img/logo.png' %}" width="200" alt="Django Girls" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent">{% trans "Toggle navigation" %}
<span class="navbar-toggler-icon"></span>
</button>

<div class="navbar-collapse collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
{% for item in menu %}
<li><a href="{% build_menu_item_url item.url event.page_url %}">{{ item.title }}</a></li>
<li class="nav-item px-2"><a href="{% build_menu_item_url item.url event.page_url %}">{{ item.title }}</a></li>
{% endfor %}
</ul>
</div><!--/.nav-collapse -->
Expand Down
2 changes: 1 addition & 1 deletion templates/global/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nav class="navbar navbar-expand-lg navbar-light bg-white" role="navigation">
<div class="container">
<a class="navbar-brand logo" href="{% url 'core:index' %}"><img src="{% static 'img/global/logo.png' %}" alt="Django Girls" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false">{% trans "Toggle navigation" %}
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
Expand Down
Loading