Skip to content

Commit 1440a5e

Browse files
committed
Showing event photos in past-events slider
1 parent fe7bb51 commit 1440a5e

File tree

2 files changed

+34
-17
lines changed

2 files changed

+34
-17
lines changed

pythonkc_site/static/screen.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ h3{
117117
color: #646565;
118118
margin-bottom: 5px;
119119
}
120+
.past-event .details {
121+
width: 400px;
122+
float: left;
123+
}
124+
.past-event .event-photo {
125+
float: left;
126+
width: 500px;
127+
height: 375px;
128+
margin: 10px;
129+
border: 6px solid white;
130+
}
131+
*/
120132

121133
footer {
122134
color: #FFFFFF;
@@ -187,6 +199,7 @@ article.past-event{
187199
display: inline-block;
188200
width: 945px;
189201
vertical-align: top;
202+
margin: 0 auto;
190203
}
191204
.slider-controls {
192205
position: absolute;

pythonkc_site/templates/index.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,30 @@ <h1>Past Events</h1>
4545
<div id="evt-wrapper">
4646
{% for event in past_events %}
4747
<article class="past-event">
48-
<header>
49-
<h1><time datetime>{{ event.time|date:"F j, Y" }}</time></h1>
50-
</header>
51-
52-
<h2><a href="{{ event.event_url }}">{{ event.name|safe }}</a></h2>
53-
{% if event.description %}
54-
<p>{{ event.description|safe|truncatewords_html:25 }}</p>
55-
{% endif %}
56-
<a href="{{ event.event_url }}" class="read-more">Read more at the Meetup event page &rarr;</a>
57-
<div class="attendees clearfix">
58-
<h3>Attendees ({{event.attendees|length}})</h3>
59-
{% for attendee in event.attendees %}
60-
{% if attendee.photo.thumb_url %}
61-
<div title="{{ attendee.name }}" style="background-image: url( {{ attendee.photo.thumb_url }} );" class="attendee"></div>
48+
<div class="details">
49+
<header>
50+
<h1><time datetime>{{ event.time|date:"F j, Y" }}</time></h1>
51+
</header>
52+
<h2><a href="{{ event.event_url }}">{{ event.name|safe }}</a></h2>
53+
{% if event.description %}
54+
<p>{{ event.description|safe|truncatewords_html:25 }}</p>
55+
{% endif %}
56+
<a href="{{ event.event_url }}" class="read-more">Read more at the Meetup event page &rarr;</a>
57+
<div class="attendees clearfix">
58+
<h3>Attendees ({{event.attendees|length}})</h3>
59+
{% for attendee in event.attendees %}
60+
{% if attendee.photo.thumb_url %}
61+
<div title="{{ attendee.name }}" style="background-image: url( {{ attendee.photo.thumb_url }} );" class="attendee"></div>
62+
{% endif %}
63+
{% endfor %}
64+
</div>
65+
</div>
66+
{% if event.photos.0.url %}
67+
<img class="event-photo" src="{{ event.photos.0.url }}" />
6268
{% endif %}
69+
</article>
6370
{% endfor %}
6471
</div>
65-
</article>
66-
{% endfor %}
67-
</div>
6872
</div>
6973
</section>
7074
<section class="resources clearfix">

0 commit comments

Comments
 (0)