Skip to content

Commit 98067ce

Browse files
committed
Only display screenshot if there's no videos added
1 parent 86e8ff2 commit 98067ce

File tree

4 files changed

+18
-35
lines changed

4 files changed

+18
-35
lines changed

_config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ app_icon : # assets/appicon.png
2525
header_image : assets/headerimage.png # Replace with alternative image path or image URL.
2626
device_color : black # Set to: blue, black, yellow, coral or white.
2727

28-
# Video
29-
enable_video_preview : true # Set to true to enable video preview instead of a static screenshot.
30-
# Add .ogg and .mov video files to assets/videos/
31-
3228
# Social Links # Enter usernames and email address. If set, they will be presented as links in the footer.
3329
facebook_username :
3430
instagram_username : ebaehr

_includes/screencontent.html

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
22

33
{% for file in site.static_files %}
4-
{% if file.path contains 'assets/videos' %}
4+
{% if file.path contains 'assets/screenshot/' %}
5+
<script>
6+
$(function() {
7+
$(".iphoneScreen").attr('src', '{{ file.path }}');
8+
$(".iphoneScreen").removeClass("hidden");
9+
console.log("{{ file.path }}");
10+
});
11+
</script>
12+
{% elsif file.path contains 'assets/videos/' %}
13+
<script>
14+
$(function() {
15+
$(".iphoneScreen").addClass("hidden");
16+
console.log("remove screenshot");
17+
});
18+
</script>
519
{% if file.extname == ".mov" %}
620
<script>
721
$(function() {
@@ -19,30 +33,5 @@
1933
});
2034
</script>
2135
{% endif %}
22-
{% else %}
23-
{% if file.path contains 'assets/screenshot' %}
24-
<script>
25-
(".iphoneScreen").removeClass("hidden");
26-
</script>
27-
{% endif %}
2836
{% endif %}
29-
{% endfor %}
30-
31-
32-
33-
34-
35-
<!--
36-
<div class="videoContainer">
37-
<video autoplay="autoplay" controls="controls">
38-
{% if video.extname == ".ogg" %}
39-
<source src="{{ video.path }}" type="video/ogg">
40-
{% endif %}
41-
42-
{% if video.extname == ".mov" %}
43-
<source src="{{ video.path }}" type="video/mp4">
44-
{% endif %}
45-
</video>
46-
</div>
47-
48-
-->
37+
{% endfor %}

_layouts/default.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818

1919
<div class="videoContainer hidden">
2020
<video class="screenvideo" autoplay="autoplay" controls="controls">
21-
<!--<source src="assets/videos/yourvideo.ogg" type="video/ogg">
22-
<source src="assets/videos/yourvideo.mov" type="video/mp4">-->
2321
</video>
2422
</div>
2523

26-
<img class="iphoneScreen hidden" src="{{ image.path }}" alt="">
24+
<img class="iphoneScreen hidden" src="" alt="">
2725

2826
{% include screencontent.html %}
2927

_sass/layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,5 +455,5 @@ footer {
455455
}
456456

457457
.hidden {
458-
visibility: hidden;
458+
display: none;
459459
}

0 commit comments

Comments
 (0)