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

Display category in the schedule cards #189

Merged
merged 1 commit into from
Jul 19, 2017
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
15 changes: 9 additions & 6 deletions pybay/templates/frontend/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ <h3 class="sch-timeslot-time">{{ time }}</h3>
{% elif slot.content_ptr %}
{% with talk=slot.content_ptr %}
<div class="sch-timeslot-slot sch-timeslot-kind-{{ slot.kind.label }} sch-talk-level-{{ talk.proposal.audience_level }} sch-talk-{% value_from_list_or_default talk.proposal.category|cut:" " allowed_categories "other" %}">
{% if talk.speaker.photo %}<p class="sch-speaker-photo"><img src="{% thumbnail talk.speaker.photo '50x50' %}" alt="{{ talk.speaker.name }}" /></p>{% endif %}
<h4><a href="{% url 'pybay_speakers_detail' talk.speaker.name_slug %}">{{ talk.title }}</a></h4>
<p class="sch-speaker">{{ talk.speaker.name }}</p>
{% if talk.speaker.photo %}<p class="sch-speaker-photo"><img src="{% thumbnail talk.speaker.photo '50x50' %}" alt="{{ talk.speaker.name }}" /></p>{% endif %}
<div class="sch-slot-inner">
{% if talk.speaker.photo %}<p class="sch-speaker-photo"><img src="{% thumbnail talk.speaker.photo '50x50' %}" alt="{{ talk.speaker.name }}" /></p>{% endif %}
<h4><a href="{% url 'pybay_speakers_detail' talk.speaker.name_slug %}">{{ talk.title }}</a></h4>
<p class="sch-speaker">{{ talk.speaker.name }}</p>
<p class="sch-category">{{ talk.proposal.category|title }}</p>
{% if talk.speaker.photo %}<p class="sch-speaker-photo"><img src="{% thumbnail talk.speaker.photo '50x50' %}" alt="{{ talk.speaker.name }}" /></p>{% endif %}
<p class="sch-room">{{ slot.rooms|join:', ' }}</p>
<p class="sch-duration">{{ slot.length_in_minutes }} mins</p>
</div>
<div class="sch-description">{{ talk.description|apply_markup:"markdown" }}</div>
<p class="sch-room">{{ slot.rooms|join:', ' }}</p>
<p class="sch-duration">{{ slot.length_in_minutes }} mins</p>
</div>
{% endwith %}
{% else %}
Expand Down
58 changes: 41 additions & 17 deletions static/new/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ p.question {
}

.sch-timeslot-kind-talk .sch-description {
text-align: left;
transition: all 0.2s ease-out;
transform: scaleY(1);
transform-origin: top;
Expand Down Expand Up @@ -274,21 +275,25 @@ p.question {
}

.sch-timeslot-kind-talk {
display: flex;
flex-flow: row wrap;
align-content: flex-start;
position: relative;
padding-top: 4px;
padding-bottom: 4px;
text-align: left;
transition: opacity 0.2s ease-out;
}

.sch-timeslot-kind-talk > * {
.sch-timeslot-kind-talk .sch-slot-inner {
display: flex;
flex-flow: row wrap;
align-content: flex-start;
text-align: left;
overflow: hidden;
}

.sch-timeslot-kind-talk .sch-slot-inner > * {
flex-basis: 100%;
}

.sch-room, .sch-duration {
.sch-timeslot-kind-talk .sch-room, .sch-timeslot-kind-talk .sch-duration {
flex: 1 0 auto;
white-space: nowrap;
font-size: 11px;
Expand All @@ -309,16 +314,36 @@ p.question {
margin: 0 .5em;
}

.sch-timeslot-kind-talk > h4 {
.sch-timeslot-kind-talk .sch-slot-inner > h4 {
font-weight: bold;
}

.sch-speaker {
.sch-timeslot-kind-talk .sch-speaker {
margin-right: 1.4em;
margin-bottom: 0;
}

.sch-timeslot-kind-talk .sch-speaker, .sch-timeslot-kind-talk .sch-category {
font-weight: bold;
margin-top: 4px;
white-space: nowrap;
flex: 0 1 auto;
align-self: baseline;
}

.sch-timeslot-kind-talk .sch-category {
position: relative;
line-height: 1;
}

.sch-timeslot-kind-talk .sch-category::before {
position: absolute;
right: 100%;
content: "\2022";
padding: 0 .5em;
}

.sch-speaker-photo {
.sch-timeslot-kind-talk .sch-speaker-photo {
width: 40px;
height: 40px;
overflow: hidden;
Expand All @@ -327,12 +352,11 @@ p.question {
right: 15px;
border-radius: 50%;
}
.sch-speaker-photo img {
.sch-timeslot-kind-talk .sch-speaker-photo img {
height: 100%;
}

.sch-speaker-photo + h4,
.sch-speaker-photo + h4 + .sch-speaker {
.sch-timeslot-kind-talk .sch-speaker-photo ~ h4 {
padding-right: 50px;
}

Expand Down Expand Up @@ -383,7 +407,7 @@ p.question {
margin: 0;
}

.sch-timeslot-kind-talk > h4 {
.sch-timeslot-kind-talk .sch-slot-inner > h4 {
flex: 1 0;
flex-basis: 100%;
}
Expand All @@ -392,17 +416,17 @@ p.question {
line-height: 1;
}

.sch-room {
.sch-timeslot-kind-talk .sch-room {
flex: 0 1;
}

.sch-speaker-photo {
.sch-timeslot-kind-talk .sch-speaker-photo {
right: 10px;
top: 33px;
}

.sch-speaker-photo + h4,
.sch-speaker-photo + h4 + .sch-speaker {
.sch-timeslot-kind-talk .sch-speaker-photo + h4,
.sch-timeslot-kind-talk .sch-speaker-photo + h4 + .sch-speaker {
padding: 0 46px 0 0;
}

Expand Down