Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Moved mascot to the left, made her clickable with sound

Cette révision appartient à :
kipukun 2017-05-17 21:37:10 -04:00
Parent cfee23bf70
révision b1824092ff
4 fichiers modifiés avec 30 ajouts et 6 suppressions

Voir le fichier

@ -56,7 +56,7 @@
background-color: #29363d;
}
li#mascot {
#mascot {
background-image: url(/img/megumin.png);
}

Voir le fichier

@ -59,11 +59,13 @@ padding:2px 0;
background: white;
}
li#mascot {
#mascot {
background-image: url(/img/renchon.png);
width: 125px;
height: 169px;
margin-bottom: -5px;
position: fixed;
bottom: 0px;
left: 2%;
}
/* This used to avoid usage of Javascript for switching images. */

Voir le fichier

@ -45,3 +45,13 @@ window.onload = function() {
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
};
$('#mascot').bind('touchstart mousedown click', function(e){
var night = localStorage.getItem("night");
if(night == "true") {
$('#explosion')[0].play();
} else {
$('#nyaapassu')[0].play();
}
});

Voir le fichier

@ -1,12 +1,24 @@
{{define "title"}}{{T "home"}}{{end}}
{{define "contclass"}}cont-home{{end}}
{{define "content"}}
<audio id="nyaapassu" hidden>
<source src="http://nyanpass.com/nyanpass.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<audio id="explosion" hidden>
<source src="https://megumin.love/sounds/explosion.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<span id="mascot" class="visible-lg-block"></span>
<div class="blockBody">
<nav>
<ul class="list-inline" aria-label="Page navigation">
<li id="mascot"></li>
<li style="padding-top: 7%;" class="pull-right"><ul class="pagination">
<li><ul class="pagination">
{{ genNav .Navigation .URL 5 }}
</ul></li>
</li></ul>
</nav>
<div class="table-responsive">