Skip to content

Commit 5bc8b13

Browse files
author
Kátia Nakamura
authored
Merge pull request #114 from PythonBalkan/bojan_p/speakers_page
Speaker list page
2 parents 92ec829 + eaf59c1 commit 5bc8b13

File tree

7 files changed

+74
-8
lines changed

7 files changed

+74
-8
lines changed

pyconbalkan/core/static/css/components/person.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
.speaker__image,
2424
.organizer__image,
2525
.sponsor__image {
26-
flex: 0 0 300px;
27-
width: 300px;
28-
height: 300px;
29-
margin: 40px 40px 20px 0;
26+
flex: 0 0 200px;
27+
width: 200px;
28+
height: 200px;
29+
margin: 20px 40px 20px 0;
3030
border-radius: 50%;
3131
background-color: #28aae1;
3232
overflow: hidden;

pyconbalkan/core/templates/base.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'img/favicon-32x32.png' %}">
1717
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'img/favicon-16x16.png' %}">
1818
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
19-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.9/css/all.css" integrity="sha384-5SOiIsAziJl6AWe0HWRKTXlfcSHKmYV4RBF18PPJ173Kzn7jzMyFuTtk8JA7QQG1" crossorigin="anonymous">
20-
19+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
2120
<!-- Styles -->
2221
<link rel="stylesheet" href="{% static 'css/_fonts.css' %}">
2322
<link rel="stylesheet" href="{% static 'css/components/event-sidebar.css' %}">

pyconbalkan/core/templates/includes/header.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<li class="menu__list__item">
88
<a class="menu__list__link {% if request.path == '/' %}active{% endif %}" href="/#" role="button">Home</a>
99
</li>
10+
<li class="menu__list__item">
11+
<a class="menu__list__link {% if request.path == '/speakers' %}active{% endif %}" href="/speakers" role="button">Speakers</a>
12+
</li>
1013
<li class="menu__list__item">
1114
<a class="menu__list__link {% if request.path == '/organizers' %}active{% endif %}" href="/organizers" role="button">Organizers</a>
1215
</li>

pyconbalkan/speaker/templates/speaker.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111

1212
<div class="speaker__details">
1313
<h1>
14+
{% if speaker.keynote %}<i class="fas fa-star"></i>{% endif %}
1415
{{ speaker.name }}
1516
{% if speaker.country %}<i class="flag em em-flag-{{ speaker.country.code|lower }}"></i>{% endif %}
1617
</h1>
17-
<h2>{{ speaker.job }}</h2>
18+
19+
<h2><i class="fas fa-laptop-code"></i> {{ speaker.job }} - {{ speaker.company }}</h2>
1820
<p class="speaker__description title--white">
1921
{{ speaker.description|safe }}
2022
</p>
23+
2124
<div class="social__links">
2225
{% if speaker.personal_website %}
2326
<a href="{{ speaker.personal_website }}" class="website" target="_ blank"></a>
@@ -35,6 +38,13 @@ <h2>{{ speaker.job }}</h2>
3538
<a href="{{ speaker.facebook }}" class="facebook" target="_ blank"></a>
3639
{% endif %}
3740
</div>
41+
42+
{% for presentation in speaker.presentation.all %}
43+
<h2><i class="fas fa-bullhorn"></i> {{ presentation.title }}</h2>
44+
<p class="speaker__description title--white">
45+
{{ presentation.description|safe }}
46+
</p>
47+
{% endfor %}
3848
</div>
3949
</div>
4050

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{% extends "base.html" %}
2+
3+
{% block main_content %}
4+
5+
{# Speakers #}
6+
7+
<h1 class="centered">Speakers</h1>
8+
<hr class="line line__centered">
9+
10+
{% if speakers %}
11+
<div class="card">
12+
{% for speaker in speakers %}
13+
<div class="speaker">
14+
<div class="speaker__image">
15+
<a href="{% url 'speaker_detail' slug=speaker.slug %}">
16+
<img src="{{ speaker.images.first.profile_picture.url }}">
17+
</a>
18+
</div>
19+
<div class="speaker__details">
20+
<a href="{% url 'speaker_detail' slug=speaker.slug %}"><h1>
21+
{% if speaker.keynote %}<i class="fas fa-star"></i>{% endif %}
22+
{{ speaker.name }}
23+
{% if speaker.country %}
24+
<i class="flag em em-flag-{{ speaker.country.code|lower }}"></i>
25+
{% endif %}
26+
, <span class="title-white"> {{ speaker.job }} - {{ speaker.company }}</span>
27+
</h1></a>
28+
{% for presentation in speaker.presentation.all %}
29+
<h2>{{ presentation.title }}</h2>
30+
<br>
31+
<a class="button button--yellow" href="{% url 'speaker_detail' slug=speaker.slug %}" role="button">
32+
View more
33+
</a>
34+
{% endfor %}
35+
</div>
36+
</div>
37+
<hr class="line long">
38+
{% endfor %}
39+
</div>
40+
{% else %}
41+
<h2>
42+
<span class="featured-letter featured-letter--blue">C</span>oming <span class="featured-letter featured-letter--yellow">S</span>oon
43+
</h2>
44+
{% endif %}
45+
{% endblock %}

pyconbalkan/speaker/views.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@ def speaker_detail(request, slug):
1515
context = {
1616
'speaker': speaker,
1717
}
18-
return render(request, 'speaker.html', context)
18+
return render(request, 'speaker.html', context)
19+
20+
21+
def speaker_list(request):
22+
speakers = Speaker.objects.filter(active=True).prefetch_related('presentation')
23+
context = {
24+
'speakers': speakers,
25+
}
26+
return render(request, 'speakers.html', context)

pyconbalkan/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
path('', views.home, name='index'),
4444
path('speaker/<slug:slug>/', speaker_detail, name='speaker_detail'),
4545
path('sponsors', sponsors_view, name='sponsor_list'),
46+
path('speakers', speaker_list, name='speakers'),
4647
path('sponsors/<int:id>/', sponsor_view, name='sponsor_detail'),
4748
path('sponsoring', sponsoring_view, name='sponsoring'),
4849
path('info', serve, {'path': 'pycon_brochure.pdf', 'document_root': PDF_ROOT}),

0 commit comments

Comments
 (0)