Skip to content

Commit b9732d2

Browse files
Add responsive visibility classes for mobile display of talks and slides (#87)
Co-authored-by: Juliano Costa <[email protected]>
1 parent 1a7cc80 commit b9732d2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

_layouts/event.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ <h2>Talks</h2>
3030
<div class="talkdetails">
3131
<strong>{{ talk.title }}</strong> <span class="label">by {{ talk.speaker }}</span>
3232
{% if talk.file %}
33-
<br><br><object data="{{ talk.file }}" width="100%" height="500" type="application/pdf"></object>
33+
<br><br><object data="{{ talk.file }}" width="100%" height="500" type="application/pdf" class="hide-on-mobile"></object>
34+
<p><a href="{{ talk.file }}" class="show-on-mobile">📄 Open/Download PDF</a></p>
3435
{% else %}
3536
<br><br>The speaker has not provided the slides (yet).
3637
{% endif %}
3738
{% if talk.recording %}
3839
{% assign rec = talk.recording | split: 'v=' %}
3940
{% assign video_id = rec[1] %}
4041
<center>
41-
<br><iframe width="560" height="315" src="https://www.youtube.com/embed/{{ video_id }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
42+
<br><iframe width="560" height="315" src="https://www.youtube.com/embed/{{ video_id }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen class="hide-on-mobile"></iframe>
43+
<iframe src="https://www.youtube.com/embed/{{ video_id }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen class="show-on-mobile"></iframe>
4244
</center>
4345
{% endif %}
4446
</div>

assets/style.scss

+12
Original file line numberDiff line numberDiff line change
@@ -1291,3 +1291,15 @@ Modules - reusable parts of our design
12911291
margin: 20px 0;
12921292
}
12931293

1294+
.hide-on-mobile {
1295+
display: block;
1296+
@include mobile {
1297+
display: none;
1298+
}
1299+
}
1300+
.show-on-mobile {
1301+
display: none;
1302+
@include mobile {
1303+
display: block;
1304+
}
1305+
}

0 commit comments

Comments
 (0)