Skip to content

Commit c870b2a

Browse files
committed
minor changes for mobile site
1 parent 5385464 commit c870b2a

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

index.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,7 @@ <h1 class="title">2048</h1>
7373
</div>
7474

7575
<p class="game-explanation">
76-
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
77-
</p>
78-
<hr>
79-
<p>
80-
<strong class="important">Note:</strong> This site is the official version of 2048. You can play it on your phone via <a href="http://git.io/2048">http://git.io/2048.</a> All other apps or sites are derivatives or fakes, and should be used with caution.
81-
</p>
82-
<hr>
83-
<p>
84-
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
76+
<strong class="important">How to play:</strong> Swipe <strong>left, right, up and down</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
8577
</p>
8678
</div>
8779

js/keyboard_input_manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ KeyboardInputManager.prototype.listen = function () {
7575

7676
// Respond to swipe events
7777
var touchStartClientX, touchStartClientY;
78-
var gameContainer = document.getElementsByClassName("game-container")[0];
78+
var gameContainer = document.getElementsByClassName("container")[0];
7979

8080
gameContainer.addEventListener(this.eventTouchstart, function (event) {
8181
if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||

style/main.css

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ html, body {
77
font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
88
font-size: 18px; }
99

10-
body {
11-
margin: 80px 0; }
12-
1310
.heading:after {
1411
content: "";
1512
display: block;
1613
clear: both; }
1714

1815
h1.title {
19-
font-size: 80px;
16+
font-size: 72px;
2017
font-weight: bold;
2118
margin: 0;
2219
display: block;
@@ -54,7 +51,7 @@ h1.title {
5451
position: relative;
5552
display: inline-block;
5653
background: #bbada0;
57-
padding: 15px 25px;
54+
padding: 12px 20px;
5855
font-size: 25px;
5956
height: 25px;
6057
line-height: 47px;
@@ -97,7 +94,7 @@ h1.title {
9794

9895
p {
9996
margin-top: 0;
100-
margin-bottom: 10px;
97+
margin-bottom: 5px;
10198
line-height: 1.65; }
10299

103100
a {
@@ -112,8 +109,8 @@ strong.important {
112109
hr {
113110
border: none;
114111
border-bottom: 1px solid #d8d4d0;
115-
margin-top: 20px;
116-
margin-bottom: 30px; }
112+
margin-top: 10px;
113+
margin-bottom: 10px; }
117114

118115
.container {
119116
width: 500px;
@@ -138,7 +135,7 @@ hr {
138135
100% {
139136
opacity: 1; } }
140137
.game-container {
141-
margin-top: 40px;
138+
margin-top: 10px;
142139
position: relative;
143140
padding: 15px;
144141
cursor: default;
@@ -500,7 +497,7 @@ hr {
500497
float: right; }
501498

502499
.game-explanation {
503-
margin-top: 50px; }
500+
margin-top: 10px; }
504501

505502
@media screen and (max-width: 520px) {
506503
html, body {

0 commit comments

Comments
 (0)