Skip to content

Commit 51cfd47

Browse files
committed
Polish UI a bit
1 parent 69e3d4f commit 51cfd47

File tree

1 file changed

+44
-17
lines changed

1 file changed

+44
-17
lines changed

index.html

+44-17
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,13 @@
112112
font-weight: bold;
113113
}
114114

115-
.dialog,
116-
#close-button {
115+
.dialog {
117116
transition:
118117
left 0.25s ease-out,
119118
top 0.25s ease-out;
120-
}
121-
122-
.dialog {
123119
font-size: 48px;
124120
background-color: #4f4444;
125121
}
126-
127122
.landscape .dialog {
128123
top: -1096px;
129124
left: 0;
@@ -132,12 +127,22 @@
132127
top: 0;
133128
left: -1096px;
134129
}
135-
136130
.dialog.visible {
137131
top: 0;
138132
left: 0;
139133
}
134+
@media (max-width: 720px) {
135+
.dialog {
136+
font-size: 72px;
137+
}
138+
}
140139

140+
#close-button {
141+
transition:
142+
left 0.25s ease-out,
143+
top 0.25s ease-out,
144+
transform 0.25s ease-out;
145+
}
141146
.landscape #close-button {
142147
top: -124px;
143148
left: 24px;
@@ -146,15 +151,21 @@
146151
top: 24px;
147152
left: -124px;
148153
}
149-
150154
#close-button.visible {
151155
top: 24px;
152156
left: 24px;
157+
transform: rotate(90deg);
153158
}
154159

155160
.dialog strong {
161+
margin-bottom: 24px;
156162
font-size: 72px;
157163
}
164+
@media (max-width: 720px) {
165+
.dialog strong {
166+
font-size: 96px;
167+
}
168+
}
158169

159170
.dialog p {
160171
margin: 24px 0 0 0;
@@ -163,15 +174,22 @@
163174
#map-dialog {
164175
display: flex;
165176
flex-direction: column;
177+
flex-wrap: wrap;
166178
justify-content: center;
167179
align-items: center;
168-
text-align: center;
180+
box-sizing: border-box;
181+
}
182+
.landscape #map-dialog {
183+
padding: 24px 72px 24px 148px;
184+
}
185+
.portrait #map-dialog {
186+
padding: 148px 24px 72px 24px;
169187
}
170188

171189
#map-list {
172190
display: flex;
173191
flex-wrap: wrap;
174-
justify-content: center;
192+
justify-content: space-between;
175193
align-items: center;
176194
}
177195

@@ -180,11 +198,12 @@
180198
justify-content: center;
181199
align-items: center;
182200
box-sizing: border-box;
183-
margin: 8px;
201+
margin-top: 8px;
184202
padding: 16px;
185203
width: 256px;
186204
height: 128px;
187205
border-radius: 16px;
206+
text-align: center;
188207
font-size: 56px;
189208
line-height: 48px;
190209
background-color: #fea2;
@@ -206,6 +225,11 @@
206225
.created {
207226
font-size: 32px;
208227
}
228+
@media (max-width: 720px) {
229+
.created {
230+
font-size: 48px;
231+
}
232+
}
209233
</style>
210234
</head>
211235
<body>
@@ -221,10 +245,13 @@
221245
<div id="help-dialog" class="dialog">
222246
<strong>OSM 15 Puzzle</strong>
223247
<p>
224-
This is the classic <a href="https://en.wikipedia.org/wiki/15_puzzle">15 puzzle</a> game using standard OpenStreetMap tiles.<br>
248+
This is the classic <a href="https://en.wikipedia.org/wiki/15_puzzle">15 puzzle</a>
249+
game using standard <a href="https://www.openstreetmap.org">OpenStreetMap</a> tiles.
225250
Solve the puzzle by sliding the pieces to create the original map image.
226251
</p>
227-
<p>Move pieces by clicking or tapping on them.<br>If you have a keyboard, you may also use the arrow keys.</p>
252+
<p>
253+
Move pieces by clicking or tapping on them.
254+
If you have a keyboard, you may also use the arrow keys.</p>
228255
<p class="created">
229256
Created by <a href="https://en.osm.town/@seav">Eugene Alvin Villar</a>
230257
<a href="https://github.com/seav/osm-15-puzzle">Source code in GitHub</a>
@@ -256,11 +283,11 @@
256283
frisco : { z0: 13, x0: 1308, y0: 3165, space: 'SE', title: 'San Francisco' },
257284
barcelona: { z0: 14, x0: 8289, y0: 6118, space: 'SE', title: 'Barcelona' },
258285
london : { z0: 14, x0: 8185, y0: 5447, space: 'SE', title: 'London' },
259-
schiphol : { z0: 14, x0: 8407, y0: 5387, space: 'SE', title: 'Schiphol [AMS]' },
260-
haneda : { z0: 15, x0: 29105, y0: 12916, space: 'SW', title: 'Haneda [HND]' },
286+
schiphol : { z0: 14, x0: 8407, y0: 5387, space: 'SE', title: 'Schiphol [ams]' },
287+
haneda : { z0: 15, x0: 29105, y0: 12916, space: 'SW', title: 'Haneda [hnd]' },
261288
paris : { z0: 15, x0: 16596, y0: 11271, space: 'NW', title: 'Paris' },
262-
pentagon : { z0: 18, x0: 74960, y0: 100305, space: 'SE', title: 'Pentagon' },
263-
moma : { z0: 18, x0: 77212, y0: 98495, space: 'SE', title: 'MoMa New York' },
289+
pentagon : { z0: 18, x0: 74960, y0: 100305, space: 'SE', title: 'The Pentagon' },
290+
moma : { z0: 18, x0: 77212, y0: 98495, space: 'SE', title: 'MoMA New York City' },
264291
shibuya : { z0: 19, x0: 465597, y0: 206491, space: 'NE', title: 'Shibuya Station' },
265292
stpeters : { z0: 19, x0: 280279, y0: 194814, space: 'NE', title: 'St. Peter’s Basilica' },
266293
};

0 commit comments

Comments
 (0)