Skip to content

Commit

Permalink
Fix grids and CSS for events and stories
Browse files Browse the repository at this point in the history
  • Loading branch information
amakarudze committed May 23, 2024
1 parent c4bb37e commit 94e0e5a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
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
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

0 comments on commit 94e0e5a

Please sign in to comment.