a lil skip button

This commit is contained in:
Nicky Case 2018-04-18 17:00:04 -04:00
parent 59fcab06c6
commit ff8275efc5
4 changed files with 34 additions and 1 deletions

View File

@ -96,6 +96,25 @@ b, strong{
background-position: 0% 0%;
}
/* Skip */
#container > #skip{
display: none;
position: absolute;
right:10px;
bottom:10px;
width: 80px;
height: 25px;
font-size: 25px;
line-height: 25px;
color: #aaa;
text-align: right;
}
#container > #skip:hover{
color: #ccc;
}
/* Peep Icon */
.peep_icon{
height:1em;
@ -253,6 +272,9 @@ b, strong{
user-select: none;
}
#navigation{
display: none;
position: absolute;
top: 10px;
left: calc(50% - 300px);

View File

@ -34,6 +34,9 @@ MY "WHY" FOR MAKING THIS:
<!-- Scratch Transition -->
<div id="scratch"></div>
<!-- Skip -->
<div id="skip">skip &gt;</div>
<!-- Modal -->
<div id="modal_container">
<div id="modal_bg"></div>

View File

@ -40,7 +40,14 @@ subscribe("START", function(){
SOUNDS.bg_music.loop(true);
SOUNDS.bg_music.play();
// Navigation
// Show Navigation
$("#navigation").style.display = "block";
// Show Skip Button
$("#skip").style.display = "block";
$("#skip").onclick = function(){
slideshow.next();
};
// Introduction
slideshow.next();

View File

@ -154,6 +154,7 @@ function Slideshow(){
self.goto(index, true);
};
self.next = function(){
if(self.slideIndex >= SLIDES.length-1) return; // there's no next
self.goto(self.slideIndex+1);
};