Skip to content

Commit 76ab46b

Browse files
committed
Add mobile menu
1 parent ea9aae0 commit 76ab46b

File tree

4 files changed

+76
-4
lines changed

4 files changed

+76
-4
lines changed

assets/css/custom.css

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4064,4 +4064,47 @@ ul.notifications {
40644064
min-height: 300px;
40654065
border: 1px solid #e5e5e5; }
40664066

4067-
/** /Dropzone.js **/
4067+
4068+
/* Mobile menu */
4069+
.mobilenav{
4070+
display:none;
4071+
}
4072+
@media only screen and (max-width: 991px) {
4073+
/* Style the navigation menu */
4074+
.mobilenav {
4075+
overflow: hidden;
4076+
background-color: black;
4077+
position: relative;
4078+
display: block;
4079+
}
4080+
/* Hide the links inside the navigation menu (except for logo/home) */
4081+
.mobilenav #mobileLinks {
4082+
display: none;
4083+
}
4084+
/* Style navigation menu links */
4085+
.mobilenav a {
4086+
color: white;
4087+
padding: 14px 16px;
4088+
text-decoration: none;
4089+
font-size: 17px;
4090+
display: block;
4091+
}
4092+
/* Style the hamburger menu */
4093+
.mobilenav a.icon {
4094+
background: black;
4095+
display: block;
4096+
position: absolute;
4097+
right: 0;
4098+
top: 0;
4099+
}
4100+
/* Add a grey background color on mouse-over */
4101+
.mobilenav a:hover {
4102+
background-color: #ddd;
4103+
color: black;
4104+
}
4105+
/* Style the active link (or home/logo) */
4106+
.mobilelogo {
4107+
background-color: #2A3F54;
4108+
color: white;
4109+
}
4110+
}

src/Peer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ function __construct($peer) {
8585
$this->inbound = checkBool($peer["inbound"]);
8686
$this->startingHeight = checkInt($peer["startingheight"]);
8787
$this->banScore = checkInt($peer["banscore"]);
88-
$this->syncedHeaders = checkInt($peer["synced_headers"]);
89-
$this->syncedBlocks = checkInt($peer["synced_blocks"]);
88+
//$this->syncedHeaders = checkInt($peer["synced_headers"]);
89+
//$this->syncedBlocks = checkInt($peer["synced_blocks"]);
9090
//$this->inflight = $peer["inflight"];
9191
$this->whitelisted = checkBool($peer["whitelisted"]);
9292
$this->bytessentPerMsg = checkArray($peer["bytessent_per_msg"]);

views/footer.phtml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<footer>
22
<div class="pull-right">
3-
<i class="fa fa-bitcoin orange"></i> <a href="https://github.com/mirobit/bitcoin-node-manager"> Node Manager v1.0.0</a> - © 2020
3+
<i class="fa fa-bitcoin orange"></i> <a href="https://github.com/mirobit/bitcoin-node-manager"> Node Manager v1.1.0</a> - © 2020
44
</div>
55
<div class="clearfix"></div>
66
</footer>
@@ -13,4 +13,13 @@
1313
}
1414
?>
1515
window.history.pushState("", "", "<?= $section ?>");
16+
17+
const openMobileMenu = () => {
18+
const x = document.getElementById("mobileLinks");
19+
if (x.style.display === "block") {
20+
x.style.display = "none";
21+
} else {
22+
x.style.display = "block";
23+
}
24+
}
1625
</script>

views/header.phtml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,26 @@
3232
<body class="nav-md">
3333
<div class="container body">
3434
<div class="main_container">
35+
<!-- Mobile Menu -->
36+
<div class="mobilenav">
37+
<a href="index.php" class="mobilelogo"><i class="fa fa-btc" style="color:orange"></i> Bitcoin Node Manger</a>
38+
<div id="mobileLinks">
39+
<a href="?p=peers"><i class="fa fa-list"></i> Peers </a>
40+
<a href="?p=rules"><i class="fa fa-file-text-o"></i> Rules </a>
41+
<a href="?p=hoster"><i class="fa fa-database"></i> Hoster </a>
42+
<a href="?p=banlist"><i class="fa fa-ban"></i> Ban List </a>
43+
<a href="?p=blocks"><i class="fa fa-cube"></i> Blocks</a>
44+
<a href="?p=forks"><i class="fa fa-arrows-h"></i> Forks </a>
45+
<a href="?p=mempool"><i class="fa fa-database"></i> Memory Pool </a>
46+
<a href="?p=wallet"><i class="fa fa-money"></i> Wallet </a>
47+
<a href="?p=settings" ><i class="fa fa-cog"></i> Settings </a>
48+
<a href="?p=about"><i class="fa fa-info"></i> About </a>
49+
</div>
50+
<a href="javascript:void(0);" class="icon" onclick="openMobileMenu()">
51+
<i class="fa fa-bars"></i>
52+
</a>
53+
</div>
54+
<!-- Logo -->
3555
<div class="col-md-3 left_col">
3656
<div class="left_col scroll-view">
3757
<div class="navbar nav_title" style="border-bottom: 1px solid #416182;">

0 commit comments

Comments
 (0)