-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
270 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/CG/PlatformBundle/Resources/public/css/home_overlay.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#overlay | ||
{ | ||
width: 500px; | ||
height: 500px; | ||
position: absolute; | ||
margin: 0; | ||
padding: 0; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
background-color: transparent; | ||
display: none; | ||
z-index: 3; | ||
background-repeat: no-repeat; | ||
|
||
-moz-animation-duration: 3s; | ||
-moz-animation-delay: 0s; | ||
-moz-animation-iteration-count: 1; | ||
|
||
-webkit-animation-duration: 3s; | ||
-webkit-animation-delay: 0s; | ||
-webkit-animation-iteration-count: 1; | ||
|
||
-ms-animation-duration: 3s; | ||
-ms-animation-delay: 0s; | ||
-ms-animation-iteration-count: 1; | ||
|
||
-o-animation-duration: 3s; | ||
-o-animation-delay: 0s; | ||
-o-animation-iteration-count: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
$(document).ready(function() { | ||
|
||
//Sound initialization | ||
ion.sound({ | ||
sounds: [ | ||
{name: "helicopter"} | ||
], | ||
path: "../sounds/", | ||
preload: true, | ||
volume: 1.0 | ||
}); | ||
|
||
|
||
|
||
/** | ||
* Sets the image background of the div | ||
**/ | ||
var setImage = function(_imageName) { | ||
$("#overlay").css("background", "url(../img/"+ _imageName + ")"); | ||
$("#overlay").css("background-repeat", "no-repeat"); | ||
|
||
//resize object according to document size | ||
var object_width = $( document ).width(); | ||
var object_height = $( document ).height(); | ||
object_width = object_width.toString() + "px"; | ||
object_height = object_height.toString() + "px"; | ||
$("#overlay").css("width", object_width); | ||
$("#overlay").css("height", object_height); | ||
|
||
$("#overlay").css("background-size", "100%"); | ||
} | ||
|
||
/** | ||
* Displays the overlay panel | ||
**/ | ||
var displayOverlay = function() { | ||
$("#overlay").show(); | ||
} | ||
|
||
var hideOverlay = function() { | ||
$('#overlay').addClass('animated fadeOutLeft'); | ||
//$("#overlay").hide(); | ||
} | ||
|
||
var startAnimation = function(_animation) { | ||
$('#overlay').addClass('animated ' + _animation); | ||
} | ||
|
||
|
||
|
||
if ( window.addEventListener ) | ||
{ | ||
var kkeys = [], konami = ["caae34a5e81031268bcdaf6f1d8c04d37b7f2c349afb705b575966f63e2ebf0fd910c3b05160ba087ab7af35d40b7c719c53cd8b947c96111f64105fd45cc1b2","caae34a5e81031268bcdaf6f1d8c04d37b7f2c349afb705b575966f63e2ebf0fd910c3b05160ba087ab7af35d40b7c719c53cd8b947c96111f64105fd45cc1b2"]; | ||
window.addEventListener("keydown", function(e){ | ||
var length = kkeys.length; | ||
var strKeyCode = e.keyCode.toString(); | ||
var shaObj = new jsSHA(strKeyCode, "TEXT"); | ||
var hash = shaObj.getHash("SHA-512", "HEX"); | ||
|
||
//alert(strKeyCode); | ||
if (konami[length] == hash ) | ||
{ | ||
kkeys.push(hash); | ||
length++; | ||
} | ||
else | ||
{ | ||
kkeys = []; | ||
} | ||
|
||
if (length == konami.length) | ||
{ | ||
ion.sound.play("helicopter"); | ||
setImage("helico.png"); | ||
displayOverlay(); | ||
startAnimation('fadeInRight'); | ||
$('#overlay').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', | ||
function(){ | ||
$('#overlay').addClass('animated fadeOutLeft'); | ||
|
||
}); | ||
|
||
kkeys = []; | ||
} | ||
}, | ||
true); | ||
} | ||
}); |
Oops, something went wrong.