smart-green-house-server-an.../html/zhuti.html

144 lines
3.4 KiB
HTML
Raw Normal View History

2023-10-24 15:02:42 +08:00
<!DOCTYPE html>
<html>
2023-10-24 15:02:42 +08:00
<head>
<meta charset="utf-8">
<meta name="author" content="zifan">
<meta name="keywords" content="物联网">
<title>主页</title>
2023-10-24 15:02:42 +08:00
<style>
html,
body {
height: 100%;
2023-10-24 15:02:42 +08:00
margin: 0;
padding: 0;
}
body {
display: flex;
flex-direction: column;
justify-content: space-between;
2023-10-24 15:02:42 +08:00
}
#top {
height: 50px;
background-color: lightblue;
}
#foot {
height: 40px;
background-color: lightblue;
}
#main {
2023-10-24 15:02:42 +08:00
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; */
color: white;
/* background-color: aquamarine; */
background-color: dimgray;
border-radius: 5px;
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
2023-10-24 15:02:42 +08:00
}
</style>
</head>
<body>
<div id="top">
<div id="logo">
<img src="/logo.png" height="50px">
</div>
<div id="user_info"><span id="userName"></span>
<span class="logout" onclick="logout()">[登出]</span>
</div>
</div>
2023-10-24 15:11:37 +08:00
</div>
<div id="main">
<div id="menu">
<a href="green_house_info.html" target="content_frame" class="menu_item">大棚</a>
<a href="record_of_operations_history.html" target="content_frame" class="menu_item">历史操作</a>
</div>
<div id="content" style="width: 100%;">
<iframe name="content_frame" width="100%" height="100%" scrolling="No"></iframe>
</div>
2023-10-24 15:02:42 +08:00
</div>
<div id="foot" style="text-align: center;">
2023-10-24 15:02:42 +08:00
<b>版本所有@FLY-NOOB</b>
2023-10-24 15:11:37 +08:00
</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();
2023-10-25 14:04:49 +08:00
open("/login.html", "_self");
}
</script>
</body>
2023-10-24 15:02:42 +08:00
</html>