Skip to content
Open
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
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
source "https://rubygems.org"
gem 'github-pages'
gem 'github-pages'
gem "jekyll", "~> 3.9"

gem "webrick", "~> 1.7"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Things you can customise in `_config.yml`:
- Link to Website
- Social Links and Contact Info
- Feature List (Title, text, icon)
- Apple TV App mode



Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ app_description : Write a short tagline for your app.

enable_smart_app_banner : true # Set to true to show a smart app banner at top of page on mobile devices.

# Apple TV
enable_apple_tv_mode : true # Set to true to hide the iphone preview and show a tv preview instead.


# Information About Yourself
Expand Down
50 changes: 50 additions & 0 deletions _includes/tvscreen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

{% if site.enable_apple_tv_mode %}
{% for file in site.static_files %}
{% if file.path contains 'assets/screenshot/' %}
<script>
$(function() {
$(".tvScreen").attr('src', '{{ site.github.baseurl }}{{ file.path }}');
$(".tvScreen").removeClass("hidden");
console.log("{{ file.path }}");
});
</script>
{% elsif file.path contains 'assets/videos/' %}
{% unless file.path contains 'assets/videos/Place-video-files-here.txt' %}
<script>
$(function() {
$(".tvScreen").addClass("hidden");
console.log("remove screenshot");
});
</script>
{% endunless %}
{% if file.extname == ".mov" or file.extname == ".mp4" %}
<script>
$(function() {
$(".tvVideoContainer").removeClass("hidden");
$(".screenvideo").append('<source src="{{ site.github.baseurl }}{{ file.path }}" type="video/mp4">');
console.log("{{ file.path }}");
});
</script>
{% elsif file.extname == ".ogg" %}
<script>
$(function() {
$(".tvVideoContainer").removeClass("hidden");
$(".screenvideo").append('<source src="{{ site.github.baseurl }}{{ file.path }}" type="video/ogg">');
console.log("{{ file.path }}");
});
</script>
{% elsif file.extname == ".webm" %}
<script>
$(function() {
$(".tvVideoContainer").removeClass("hidden");
$(".screenvideo").append('<source src="{{ site.github.baseurl }}{{ file.path }}" type="video/webm">');
console.log("{{ file.path }}");
});
</script>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
18 changes: 17 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
<div class="headerBackground">
<div class="container">
{% include header.html %}

{% if site.enable_apple_tv_mode %}
<div class="tvPreview">
<div class="tvVideoContainer hidden">
<video loop class="screenvideo" autoplay="autoplay" >
</video>
</div>

<img class="tvScreen hidden" src="" alt="">
{% include tvscreen.html %}
</div>

{% else %}

<div class="iphonePreview">

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 0 0" style="position: absolute;">
Expand All @@ -24,8 +38,10 @@
<img class="iphoneScreen hidden" src="" alt="">

{% include screencontent.html %}

</div>

{% endif %}

<div class="appInfo">
<div class="appIconShadow">
<svg width="0" height="0">
Expand Down
87 changes: 86 additions & 1 deletion _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ nav > ul li a:active {
margin-top: 23px;
}


.videoContainer {
width: 349px;
height: 755px;
Expand All @@ -408,6 +409,38 @@ nav > ul li a:active {
height: 755px;
}

// Apple TV Device Preview

.tvPreview {
grid-area: p;
background-image: url($tv-image);
background-size: 450px auto;
background-repeat: no-repeat;
margin-top: 100px;
grid-area: p;
}

.tvScreen {
width: 401px;
height: 226px;
margin-left: 11px;
margin-top: 12px;
}

.tvVideoContainer {
width: 550px;
height: 400px;
-webkit-clip-path: url(#screenMask);
clip-path: url(#screenMask);
margin-left: 11px;
}

.tvVideoContainer > video {
width: 402px;
height: auto;
margin-top: 12.5px;
}

@media only screen and (max-width: 1070px) {

.iphonePreview {
Expand All @@ -431,6 +464,29 @@ nav > ul li a:active {
width: 322px;
height: 698px;
}

// Apple TV Device Preview

.tvPreview {
background-size: 370px auto;
}

.tvScreen {
width: 328px;
height: 184px;
}

.tvVideoContainer {
width: 546px;
height: 394px;
}

.tvVideoContainer > video {
width: 330px;
height: auto;
margin-left: -2px;
margin-top: 11px;
}

}

Expand Down Expand Up @@ -465,7 +521,36 @@ nav > ul li a:active {
width: 226px;
height: 488px;
}


.tvPreview {
display: flex;
background-size: 260px auto;
background-position: center 0;
margin-top: 47px;
justify-content: center;
padding-bottom: 75px;
}

.tvScreen {
width: 230px;
height: 129px;
margin-right: 26px;
margin-top: 8px;
}

.tvVideoContainer {
width: 226px;
height: 488px;
margin-left: 0px;
margin-top: 17px;
}

.tvVideoContainer > video {
width: 232px;
height: auto;
margin-left: -11px;
margin-top: -10px;
}
}


Expand Down
Binary file removed assets/screenshot/yourscreenshot.png
Binary file not shown.
Binary file added assets/tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions assets/videos/Place-video-files-here.txt

This file was deleted.

1 change: 1 addition & 0 deletions main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $body-color: {{ site.body_background_color }};

$header-image: "{{ site.cover_image }}";
$device-color: "assets/{{ site.device_color }}.png";
$tv-image: "assets/tv.png";

$accent-color: {{ site.link_color }};

Expand Down