Skip to content

Commit 5015192

Browse files
committed
Working on a way of automatically adding video
1 parent 83f0c84 commit 5015192

File tree

6 files changed

+69
-25
lines changed

6 files changed

+69
-25
lines changed

_config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ your_city : Copenhagen
2222

2323
# Icon, screenshot and header image
2424
app_icon : # assets/appicon.png # Automatically populates if not set and if iOS app ID is set. Otherwise enter path to icon file manually.
25-
app_video_mov : # assets/yourvideo.mov # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436. Use format .mov for Safari support.
26-
app_video_ogg : # assets/yourvideo.ogg # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436. Use format .ogg for Chrome support.
27-
app_screenshot : assets/yourscreenshot.png # Replace with alternateive image path. Does not automatically populate since Apple does not provide iPhone X/XS/XR screenshots in their iTunes lookup API.
2825
header_image : assets/headerimage.png # Replace with alternative image path or image URL.
29-
device_color : black # Set to: blue, black, yellow, coral or white
26+
device_color : black # Set to: blue, black, yellow, coral or white.
27+
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/
3031

3132
# Social Links # Enter usernames and email address. If set, they will be presented as links in the footer.
3233
facebook_username :

_includes/videoembed.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
2+
3+
{% for video in site.static_files %}
4+
{% if video.path contains 'assets/videos' %}
5+
6+
<script>
7+
8+
9+
$(function() {
10+
console.log("Hello, World!");
11+
});
12+
13+
</script>
14+
15+
{% endif %}
16+
{% endfor %}
17+
18+
19+
20+
21+
22+
23+
24+
<!--
25+
<div class="videoContainer">
26+
<video autoplay="autoplay" controls="controls">
27+
{% if video.extname == ".ogg" %}
28+
<source src="{{ video.path }}" type="video/ogg">
29+
{% endif %}
30+
31+
{% if video.extname == ".mov" %}
32+
<source src="{{ video.path }}" type="video/mp4">
33+
{% endif %}
34+
</video>
35+
</div>
36+
37+
-->

_layouts/default.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,16 @@
1616
</clipPath>
1717
</svg>
1818

19-
{% if site.app_video_mov or site.app_video_ogg %}
20-
<div class="videoContainer">
21-
<video autoplay="autoplay" controls="controls">
22-
<source src="{{ site.app_video_mov }}" type="video/mp4">
23-
<source src="{{ site.app_video_ogg }}" type="video/mp4">
24-
</video>
25-
</div>
19+
<div class="videoContainer hide">
20+
<video autoplay="autoplay" controls="controls">
21+
<source src="" type="video/ogg">
22+
<source src="" type="video/mp4">
23+
</video>
24+
</div>
25+
26+
<img class="iphoneScreen hide" src="{{ image.path }}" alt="">
2627

27-
{% else %}
28-
{% for image in site.static_files %}
29-
{% if image.path contains 'assets/screenshot' %}
30-
<img class="iphoneScreen" src="{{ image.path }}" alt="">
31-
{% endif %}
32-
{% endfor %}
33-
{% endif %}
28+
{% include videoembed.html %}
3429

3530
</div>
3631
<div class="appInfo">

_sass/layout.scss

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,16 @@ nav > ul li a:active {
251251
-webkit-clip-path: url(#screenMask);
252252
clip-path: url(#screenMask);
253253
margin-left: 26px;
254-
margin-top: 22px;
254+
margin-top: 23px;
255255
}
256256

257257
.videoContainer {
258258
width: 349px;
259259
height: 755px;
260260
-webkit-clip-path: url(#screenMask);
261261
clip-path: url(#screenMask);
262-
margin-left: 28px;
263-
margin-top: 3px;
262+
margin-left: 26px;
263+
margin-top: 23px;
264264
}
265265

266266
.videoContainer > video {
@@ -283,13 +283,13 @@ nav > ul li a:active {
283283
.videoContainer {
284284
width: 322px;
285285
height: 698px;
286-
margin-left: 28px;
287-
margin-top: 3px;
286+
margin-left: 24px;
287+
margin-top: 22px;
288288
}
289289

290290
.videoContainer > video {
291291
width: 322px;
292-
height: 398px;
292+
height: 698px;
293293
}
294294

295295
}
@@ -311,12 +311,19 @@ nav > ul li a:active {
311311
-webkit-clip-path: url(#screenMask);
312312
clip-path: url(#screenMask);
313313
margin: 0px;
314-
margin-top: 16px;
314+
margin-top: 17px;
315315
}
316316

317317
.videoContainer {
318318
width: 226px;
319319
height: 488px;
320+
margin-left: 0px;
321+
margin-top: 17px;
322+
}
323+
324+
.videoContainer > video {
325+
width: 226px;
326+
height: 488px;
320327
}
321328

322329
}
@@ -445,4 +452,8 @@ footer {
445452
.footerIcons {
446453
padding-bottom: 100px;
447454
display: flex;
455+
}
456+
457+
.hide {
458+
visibility: hidden;
448459
}
File renamed without changes.

assets/videos/yourvideo.ogg

481 KB
Binary file not shown.

0 commit comments

Comments
 (0)