Improve
Improved some things.
This commit is contained in:
parent
e0ef78ba4c
commit
8c344bf5f5
4 changed files with 27 additions and 38 deletions
|
@ -58,7 +58,7 @@ function newGame(wordList) {
|
|||
|
||||
// DOM Elements & Events
|
||||
$(document).ready(function() {
|
||||
$('.footer-content').append("<p><span>Spanzuratoarea</span> <em>created by</em>" + "<span>@<a href=\"http://www.twitter.com/niutenisu\">Niutenisu</a></span><p>");
|
||||
//$('.footer-content').append("<p><span>Spanzuratoarea</span> <em>created by</em>" + "<span>@<a href=\"http://www.twitter.com/niutenisu\">Niutenisu</a></span><p>");
|
||||
|
||||
var listaCuvinte = localStorage.getItem("listaCuvinte");
|
||||
if (listaCuvinte != null) {
|
||||
|
@ -74,6 +74,9 @@ $(document).ready(function() {
|
|||
// eval for transforming string into object ref!!!
|
||||
newGame(eval($(this).prev().val())); // POSSIBLE EXPLOIT!!
|
||||
// prev for mobile <3
|
||||
/* On the page are two elements that have select[name=lista_cuvinte]
|
||||
* We use next() for the button and prev() to get the value of the
|
||||
* sellection. */
|
||||
});
|
||||
|
||||
$('#game').fadeIn("slow");
|
||||
|
@ -135,7 +138,7 @@ function gameWon() {
|
|||
$(document).on("keypress", function(e) {
|
||||
var key = e.keyCode || e.which;
|
||||
if (key == 13)
|
||||
window.location.reload(); // Da reset la handlere :-)
|
||||
window.location.reload(); // Reset handlers :-)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -23,54 +23,26 @@
|
|||
<div id="game" class="game" style="display: none;">
|
||||
<div class="mobile">
|
||||
<h3>Incearca sa ghicesti cuvantul: <span class="word"></span></h3>
|
||||
|
||||
<h4>Introdu aici litera:</h4>
|
||||
|
||||
<input name="mobile" type="text">
|
||||
|
||||
<h4 class="litera_msg" style="display: none;">Ai apasat pe "
|
||||
|
||||
|
||||
|
||||
<span class="litera" style="color: red;"></span>
|
||||
|
||||
|
||||
|
||||
<span class="litera_msg2"></span>"</h4>
|
||||
|
||||
<h4 class="litera_msg" style="display: none;">Ai apasat pe "<span class="litera" style="color: red;"></span>
|
||||
<span class="litera_msg2"></span></h4>
|
||||
<h4 class="litere" style="color: red;"></h4>
|
||||
|
||||
<select name="lista_cuvinte" class="change_words">
|
||||
|
||||
<option value="animale_eu">Animale din Europa</option>
|
||||
|
||||
<option value="tari_eu">Tari din Europa</option>
|
||||
|
||||
<option value="firme">Companii</option>
|
||||
|
||||
<option value="ldp">Limbaje de programare</option>
|
||||
|
||||
</select>
|
||||
|
||||
<button class="">Schimba</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="left">
|
||||
|
||||
<h2>Incearca sa ghicesti cuvantul: <span class="word"></span></h2>
|
||||
|
||||
<h3>Apasa pe o litera de pe tastatura!</h3>
|
||||
<br>
|
||||
<h4 class="litera_msg" style="display: none;">Ai apasat pe "
|
||||
|
||||
|
||||
|
||||
<span class="litera red" style="color: red;"></span>
|
||||
|
||||
|
||||
|
||||
"<span class="litera_msg2"></span>"</h4>
|
||||
<h4 class="litera_msg" style="display: none;">Ai apasat pe "<span class="litera red" style="color: red;"></span>"
|
||||
<span class="litera_msg2"></span></h4>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -110,7 +82,14 @@
|
|||
</div>
|
||||
<footer>
|
||||
<div class="footer-content">
|
||||
|
||||
<p>
|
||||
<span>Spanzuratoarea</span>
|
||||
<em>created by</em>
|
||||
<span> @<a href="http://www.twitter.com/niutenisu">Niutenisu</a></span>
|
||||
</p>
|
||||
<p class="right">
|
||||
<span><a href="https://github.com/niutenisu/ro-hangman/" alt="Github" title="Github Project Link">Github</a><span>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
@ -122,9 +101,9 @@
|
|||
} else {
|
||||
// jQuery is not loaded
|
||||
alert("jQuery is not loaded");
|
||||
|
||||
</script>
|
||||
}-->
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -154,14 +154,21 @@
|
|||
margin: 0px 10px 0px 10px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
.footer-content * {
|
||||
display: inline;
|
||||
}
|
||||
.footer-content span {
|
||||
color: #e9f5fa;
|
||||
font-weight: bold;
|
||||
}
|
||||
.right {
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.mobile {
|
||||
display: none;
|
||||
}
|
||||
/* Mobile shit */
|
||||
/* Mobile CSS */
|
||||
|
||||
@media only screen and (max-width: 930px) {
|
||||
.mobile {
|
||||
|
|
|
@ -4,4 +4,4 @@ var tari_eu = ["romania", "moldova", "germania", "spania", "franta", "rusia","it
|
|||
|
||||
var firme = ["google", "yahoo", "microsoft", "oracle", "amazon", "emag", "ebay", "apple", "siemens", "intel", "toyota", "dacia", "volvo"];
|
||||
|
||||
var ldp = ["javascript", "html", "css", "java", "c", "c++", "ruby", "pascal", "lisp", "erlang", "sql", "python"];
|
||||
var ldp = ["javascript", "html", "css", "java", "c", "c++", "ruby", "pascal", "lisp", "erlang", "sql", "python", "perl", "lua"];
|
||||
|
|
Loading…
Reference in a new issue