139 lines
3.2 KiB
HTML
Executable File
139 lines
3.2 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="author" content="zifan">
|
|
<meta name="keywords" content="物联网">
|
|
<title>主页</title>
|
|
<style>
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
#top {
|
|
height: 50px;
|
|
background-color: lightblue;
|
|
}
|
|
|
|
#foot {
|
|
height: 40px;
|
|
background-color: lightblue;
|
|
}
|
|
|
|
#main {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
background-color: lightcyan;
|
|
}
|
|
|
|
#top {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
justify-items: center;
|
|
align-items: center;
|
|
padding: 5px;
|
|
border-bottom: 1px solid lightgray;
|
|
}
|
|
|
|
#logo>img {
|
|
width: 180px;
|
|
height: 45px;
|
|
}
|
|
|
|
#foot {
|
|
border-top: 1px solid lightgray;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
#menu {
|
|
width: 300px;
|
|
border-right: 1px solid lightgray;
|
|
padding: 20px;
|
|
}
|
|
|
|
iframe {
|
|
outline: none;
|
|
border: none;
|
|
}
|
|
|
|
#menu,
|
|
.menu_item {
|
|
list-style: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.menu_item {
|
|
margin: 10px;
|
|
}
|
|
|
|
#menu>a {
|
|
display: block;
|
|
text-decoration: none;
|
|
color: black;
|
|
padding: 10px 20px;
|
|
width: 80%;
|
|
}
|
|
|
|
#menu>a:hover {
|
|
color: blue;
|
|
background-color: aquamarine;
|
|
border-radius: 5px;
|
|
border-top-right-radius: 30px;
|
|
border-bottom-right-radius: 30px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="top">
|
|
<div id="logo">
|
|
<img src="/logo.png">
|
|
</div>
|
|
<div id="user_info"><span id="userName"></span>
|
|
<span class="logout" onclick="logout()">[登出]</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="main">
|
|
<div id="menu">
|
|
<h3>路由配置</h3>
|
|
<a href="arp.html" target="content_frame" class="menu_item">ARP列表</a>
|
|
<a href="fw.html" target="content_frame" class="menu_item">黑名单</a>
|
|
</div>
|
|
<div id="content" style="width: 100%;">
|
|
<iframe name="content_frame" width="100%" height="100%"></iframe>
|
|
</div>
|
|
</div>
|
|
<div id="foot" style="text-align: center;">
|
|
<b>版本所有@FLY-NOOB</b>
|
|
</div>
|
|
<script>
|
|
window.onload = function () {
|
|
if (localStorage.getItem("login_user") == null) {
|
|
open("/login.html", "_self");
|
|
} else {
|
|
let login_user_str = localStorage.getItem("login_user");
|
|
let login_user = JSON.parse(login_user_str);
|
|
userName.innerText = login_user.nickname;
|
|
}
|
|
}
|
|
function logout() {
|
|
localStorage.clear();
|
|
open("/login.html", "_self");
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |