Skip to content

Commit d361b3c

Browse files
stickzrumblefrog
authored andcommitted
Add mobile design enhancements
This pull requests starts on mobile design enhancements. It maintains a desktop first philosophy. [*] On the dashboard tab, the player ban blocks and comm block sections are separated bellow 1279px. [*] The header is compressed bellow 1279px to better use screen space. To re-simulate these changes, visit https://develop.bans.redstonend.uk/ Afterwards, reduce the size of your web browser until the width stops scaling on the source-bans interface.
1 parent 59b7894 commit d361b3c

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

web/themes/default/core/header.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
56
<title>{$title}</title>
67
<link rel="Shortcut Icon" href="themes/{$theme}/images/favicon.ico" />
78
<script type="text/javascript" src="./scripts/fontawesome-all.min.js"></script>

web/themes/default/css/main.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,3 +1243,52 @@ hr {
12431243
.tabcontent:first-of-type {
12441244
display: block;
12451245
}
1246+
1247+
/** ======= Mobile Design Styles ======= **/
1248+
1249+
@media only screen and (min-width: 1280px) {
1250+
.dashboard-comm-blocks {
1251+
float: left;
1252+
width: 49%;
1253+
}
1254+
.dashboard-ban-blocks {
1255+
float: right;
1256+
width: 49%;
1257+
}
1258+
.dashboard-blocks-separate {
1259+
display: none;
1260+
}
1261+
.dashboard-ban-block-date {
1262+
text-align: center;
1263+
}
1264+
}
1265+
1266+
@media only screen and (max-width: 1279px) {
1267+
.dashboard-comm-blocks {
1268+
width: 100%;
1269+
}
1270+
.dashboard-ban-blocks {
1271+
width: 100%;
1272+
}
1273+
.dashboard-blocks-separate {
1274+
display: block;
1275+
}
1276+
.dashboard-ban-block-date {
1277+
text-align: left;
1278+
}
1279+
1280+
#header {
1281+
width: 984px;
1282+
margin: 0 auto 0 auto; /*centers the box, no matter the overall width */
1283+
height: 150px;
1284+
border: 0;
1285+
}
1286+
#head-logo {
1287+
float: left;
1288+
margin-top: 60px;
1289+
}
1290+
#search {
1291+
text-align: right;
1292+
margin-top: 40px;
1293+
}
1294+
}

web/themes/default/page_dashboard.tpl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</table>
5353
</div>
5454
<br /><br /><br />
55-
<div class="front-module" style="float:right;width:49%">
55+
<div class="front-module dashboard-ban-blocks">
5656
<table width="100%" cellpadding="1" class="listtable">
5757
<tr>
5858
<td colspan="3">
@@ -70,7 +70,7 @@
7070
</tr>
7171
<tr>
7272
<td width="16px" height="16" class="listtable_top">&nbsp;</td>
73-
<td height="25%" class="listtable_top" align="center"><b>Date/Time</b></td>
73+
<td height="25%" class="listtable_top dashboard-ban-block-date"><b>Date/Time</b></td>
7474
<td height="16" class="listtable_top"><b>Name</b></td>
7575
</tr>
7676
{foreach from=$players_blocked item=player}
@@ -83,7 +83,11 @@
8383
</table>
8484
</div>
8585

86-
<div class="front-module" style="float:left;width:49%">
86+
<div class="dashboard-blocks-separate">
87+
<br /><br /><br />
88+
</div>
89+
90+
<div class="front-module dashboard-comm-blocks">
8791
<table width="100%" cellpadding="1" class="listtable">
8892
<tr>
8993
<td colspan="4">

0 commit comments

Comments
 (0)