mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 22:17:41 +00:00
show video img, <a role="button"> respond to spacebar
This commit is contained in:
1 parent
17a2e29774
commit
c73aaceb89
4 files changed
+8
-13
No files matched your search
@@ -50,12 +50,9 @@
|
||||
}
|
||||
|
||||
#clickForVideo {
|
||||
padding: 20px 30px;
|
||||
background-color: #DDD;
|
||||
cursor: pointer;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
pre {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 149 KiB |
@@ -1,14 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
(function($) {
|
||||
function clickToTap() {
|
||||
if (matchMedia && matchMedia('(hover: none)').matches) $(".clickToTap").each(function() {
|
||||
var x = $(this);
|
||||
if (x.text() === "Click") x.text("Tap");
|
||||
else x.text("tap");
|
||||
});
|
||||
}
|
||||
|
||||
function clickForVideo() {
|
||||
var cfv = $("#clickForVideo");
|
||||
var f = function() {
|
||||
@@ -41,7 +33,13 @@
|
||||
video.currentTime = (((h * 60) + m) * 60) + s;
|
||||
}
|
||||
|
||||
$(clickToTap);
|
||||
function aButtonsRespondToSpacebar() {
|
||||
$('a[role="button"]').keyup(function(e) {
|
||||
if (e.which == 32) e.target.click();
|
||||
});
|
||||
}
|
||||
|
||||
$(clickForVideo);
|
||||
$(seekVideo);
|
||||
$(aButtonsRespondToSpacebar);
|
||||
})($);
|
||||
@@ -10,7 +10,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="video text-center">
|
||||
<div id="clickForVideo"><span class="clickToTap">Click</span> to watch a 4 minute demo to learn more.</div>
|
||||
<a id="clickForVideo" href="#" role="button" aria-label="Watch Video"><img width="800" height="200" src="/img/video.png" alt="Watch video"></a>
|
||||
<video id="demoVideo" hidden="hidden" width="800" height="480" poster="/img/poster.png" controls="controls" preload="none">
|
||||
<source src="https://projectlombok.org/videos/lombok.mp4" type="video/mp4" />
|
||||
<@main.h1 title="Can't watch the video?" />
|
||||
|
||||
Reference in new issue
Block a user