Skip to content

Commit 7082ea2

Browse files
authored
Merge pull request #422 from frstrtr/dashboard/d-web4-mobile-viewport-legacy
web(d-web4): viewport meta + mobile shim for legacy index/graphs pages
2 parents fc9342b + d50ddf2 commit 7082ea2

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

web-static/graphs.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
56
<title>c2pool Graphs</title>
67
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
78
<script type="text/javascript" src="d3.v2.min.js"></script>
@@ -34,6 +35,18 @@
3435
.pool-tab-add { background: transparent !important; color: #8888a0 !important; border: 1px dashed #3a3a5a !important; font-size: 1rem; padding: 2px 10px; opacity: 0.6; box-shadow: none !important; }
3536
.pool-tab-add:hover { opacity: 1; border-color: #008de4 !important; color: #008de4 !important; }
3637
</style>
38+
<style type="text/css">
39+
/* D-WEB.4 mobile-responsive shim (dashboard-steward) */
40+
@media screen and (max-width: 760px) {
41+
body { margin: 8px; -webkit-text-size-adjust: 100%; }
42+
h1 { font-size: 1.4em; word-wrap: break-word; }
43+
/* keep wide tables on their own horizontal scroll instead of
44+
forcing the whole page wide (the mobile-clip the operator hit) */
45+
table { display: block; max-width: 100%; overflow-x: auto;
46+
-webkit-overflow-scrolling: touch; }
47+
img, canvas { max-width: 100%; height: auto; }
48+
}
49+
</style>
3750
</head>
3851

3952
<body style="margin: 0;">

web-static/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
67
<title>c2pool</title>
78
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
89
<script type="text/javascript" src="d3.v2.min.js"></script>
@@ -486,6 +487,18 @@
486487
fill('../web/tails', '#tails');
487488
fill('../web/my_share_hashes50', '#my_share_hashes');
488489
</script>
490+
<style type="text/css">
491+
/* D-WEB.4 mobile-responsive shim (dashboard-steward) */
492+
@media screen and (max-width: 760px) {
493+
body { margin: 8px; -webkit-text-size-adjust: 100%; }
494+
h1 { font-size: 1.4em; word-wrap: break-word; }
495+
/* keep wide tables on their own horizontal scroll instead of
496+
forcing the whole page wide (the mobile-clip the operator hit) */
497+
table { display: block; max-width: 100%; overflow-x: auto;
498+
-webkit-overflow-scrolling: touch; }
499+
img, canvas { max-width: 100%; height: auto; }
500+
}
501+
</style>
489502
</head>
490503
<body>
491504
<h1>c2pool <span class="symbol"></span></h1>

0 commit comments

Comments
 (0)