diff --git a/css/base.scss b/css/base.scss
index fae9e62..b7ade34 100644
--- a/css/base.scss
+++ b/css/base.scss
@@ -323,6 +323,7 @@ body {
z-index: 10;
top: 50%;
transform: translateY(-50%);
+ pointer-events: none;
h1 {
font-weight: bold;
line-height: 0.98;
@@ -339,7 +340,8 @@ body {
.carousel-inner{
.video-container {
- height: 90%;
+ width: 70%;
+ padding: 2%;
}
> .item > img {
@@ -550,4 +552,4 @@ footer {
font-weight: 500;
font-size: 1.9em;
}
-}
\ No newline at end of file
+}
diff --git a/index.html b/index.html
index a571074..a813abe 100644
--- a/index.html
+++ b/index.html
@@ -73,10 +73,10 @@ title: "Home"
-
@@ -97,4 +97,5 @@ title: "Home"
Next
+
diff --git a/js/application.js b/js/application.js
index d8eea4b..f359344 100644
--- a/js/application.js
+++ b/js/application.js
@@ -6,3 +6,23 @@ $(function() {
$(this).addClass(imgClass);
})
});
+
+function onYouTubeIframeAPIReady() {
+ $('.youtube-video').each(function() {
+ var id = $(this).data('id');
+
+ var player = new YT.Player('youtube-video-' + id, {
+ events: {
+ 'onStateChange': onPlayerStateChange
+ }
+ });
+
+ function onPlayerStateChange(event) {
+ if(event.data === YT.PlayerState.ENDED || event.data === YT.PlayerState.PAUSED)
+ $('#youtube-title-' + id).show();
+ else
+ $('#youtube-title-' + id).hide();
+ }
+
+ });
+}