Implementing Translation & Tweaking Mobile

This commit is contained in:
Denis 2015-01-10 13:53:49 +02:00
parent 8718179db1
commit e6f82fcaa8
7 changed files with 289 additions and 265 deletions

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head>
<head>
<title>Hagman</title> <title>Hagman</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="author" content="Niutenisu"> <meta http-equiv="author" content="Niutenisu">
@ -16,10 +15,8 @@
<script src="../js/words.js"></script> <script src="../js/words.js"></script>
<script src="../js/hangman.js"></script> <script src="../js/hangman.js"></script>
<script src="../js/main_en.js"></script> <script src="../js/main_en.js"></script>
</head> </head>
<body>
<body>
<div id="content"> <div id="content">
<h1>Hangman!</h1> <h1>Hangman!</h1>
<div id="game" class="game" style="display: none;"> <div id="game" class="game" style="display: none;">
@ -38,7 +35,6 @@
</select> </select>
<button class="">Switch</button> <button class="">Switch</button>
</div> </div>
<div id="left"> <div id="left">
<h2>Try to guess the word: <span class="word"></span></h2> <h2>Try to guess the word: <span class="word"></span></h2>
<h3>Type a key, any key!</h3> <h3>Type a key, any key!</h3>
@ -93,6 +89,14 @@
<span><a href="https://github.com/niutenisu/ro-hangman/" alt="Github" title="Github Project Link">Github</a><span> <span><a href="https://github.com/niutenisu/ro-hangman/" alt="Github" title="Github Project Link">Github</a><span>
</p> </p>
</div> </div>
<div class="language_menu">
<a href="#">
<img src="../img/usa.png" alt="English Language" title="English" />
</a>
<a href="../index.html">
<img src="../img/ro.png" alt="Romanian Language" title="Romana" />
</a>
</div>
</footer> </footer>
<script> <script>
// Sound initialization // Sound initialization
@ -125,7 +129,5 @@
alert("jQuery is not loaded"); alert("jQuery is not loaded");
</script> </script>
}--> }-->
</body>
</body>
</html> </html>

BIN
src/img/ro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

BIN
src/img/usa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head>
<head>
<title>Spanzuratoarea</title> <title>Spanzuratoarea</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="author" content="Niutenisu"> <meta http-equiv="author" content="Niutenisu">
@ -16,10 +15,8 @@
<script src="js/words.js"></script> <script src="js/words.js"></script>
<script src="js/hangman.js"></script> <script src="js/hangman.js"></script>
<script src="js/main.js"></script> <script src="js/main.js"></script>
</head> </head>
<body>
<body>
<div id="content"> <div id="content">
<h1>Spanzuratoarea!</h1> <h1>Spanzuratoarea!</h1>
<div id="game" class="game" style="display: none;"> <div id="game" class="game" style="display: none;">
@ -38,7 +35,6 @@
</select> </select>
<button class="">Schimba</button> <button class="">Schimba</button>
</div> </div>
<div id="left"> <div id="left">
<h2>Incearca sa ghicesti cuvantul: <span class="word"></span></h2> <h2>Incearca sa ghicesti cuvantul: <span class="word"></span></h2>
<h3>Apasa pe o litera de pe tastatura!</h3> <h3>Apasa pe o litera de pe tastatura!</h3>
@ -92,6 +88,14 @@
<p class="right"> <p class="right">
<span><a href="https://github.com/niutenisu/ro-hangman/" alt="Github" title="Github Project Link">Github</a><span> <span><a href="https://github.com/niutenisu/ro-hangman/" alt="Github" title="Github Project Link">Github</a><span>
</p> </p>
<div class="language_menu">
<a href="en/">
<img src="img/usa.png" alt="English Language" title="English" />
</a>
<a href="#">
<img src="img/ro.png" alt="Romanian Language" title="Romana" />
</a>
</div>
</div> </div>
</footer> </footer>
<script> <script>
@ -125,7 +129,5 @@
alert("jQuery is not loaded"); alert("jQuery is not loaded");
</script> </script>
}--> }-->
</body>
</body>
</html> </html>

View file

@ -11,7 +11,7 @@
<link rel="stylesheet" type="text/css" href="./styles.css"> <link rel="stylesheet" type="text/css" href="./styles.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="../sound/ion.sound.min.js"></script> <script src="../sound/ion.sound.min.js"></script>
<script src="../words.js"></script> <script src="words.js"></script>
<script src="./game.js"></script> <script src="./game.js"></script>
</head> </head>
<body> <body>

7
src/m/words.js Normal file
View file

@ -0,0 +1,7 @@
var animale_eu = ["pisica", "caine", "lup", "vulpe", "urs", "caprioara", "vaca", "cal", "oaie", "sobolan", "soarece"];
var tari_eu = ["romania", "moldova", "germania", "spania", "franta", "rusia","italia", "elvetia", "suedia", "norvegia"];
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", "perl", "lua"];

View file

@ -4,11 +4,11 @@
} }
html, body { html, body {
height: 100%; height: 100%;
}
body {
background-color: #eef7fb; background-color: #eef7fb;
} }
h1 { h1 {
margin: 0;
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-text-stroke: 1px #375449; -webkit-text-stroke: 1px #375449;
@ -30,7 +30,7 @@ h3, h5 {
color: #3b7998; color: #3b7998;
} }
footer, #content:after { footer, #content:after {
height: 50px; height: 30px;
} }
a { a {
text-decoration: none; text-decoration: none;
@ -48,12 +48,24 @@ footer {
color: #c9e7f3; color: #c9e7f3;
background-color: #8aa3c8; background-color: #8aa3c8;
} }
.language_menu a, img {
padding: 1px;
margin: 1px auto;
display: inline;
}
.language_menu {
display: inline;
padding: 2px;
height: 18px;
width: auto;
}
.game p { .game p {
color: #448aae; color: #448aae;
} }
.game { .game {
padding: 30px; padding: 30px;
margin: 20px 80px 20px; margin: 0 80px;
height: 400px; height: 400px;
border: solid 5px black; border: solid 5px black;
background-color: #C9E7F3; background-color: #C9E7F3;
@ -64,8 +76,8 @@ footer {
#content { #content {
min-height: 100%; min-height: 100%;
/* equal to footer height */ /* equal to footer height */
top: 0;
margin-bottom: -50px; margin-bottom: -30px;
} }
#left { #left {
float: left; float: left;
@ -146,6 +158,7 @@ margin-bottom: -50px;
right: 108px; right: 108px;
} }
.footer-content { .footer-content {
display: inline;
margin: 0px 10px 0px 10px; margin: 0px 10px 0px 10px;
padding-top: 15px; padding-top: 15px;
} }