95 lines
2.4 KiB
HTML
95 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="author" content="flykhan" />
|
|
<meta name="keywords" content="green house" />
|
|
<title>首页</title>
|
|
|
|
<style>
|
|
html,
|
|
body{
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#top {
|
|
height: 60px;
|
|
background-color: rgb(150, 177, 186);
|
|
|
|
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
justify-items: center;
|
|
align-items: center;
|
|
padding: 5px;
|
|
border-bottom: 1px solid lightgray;
|
|
}
|
|
|
|
#main {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
background-color: lightgoldenrodyellow;
|
|
}
|
|
|
|
#foot {
|
|
height: 40px;
|
|
background-color: lightblue;
|
|
}
|
|
|
|
#logo>img {
|
|
width: 0px;
|
|
height: 50px;
|
|
/* width: 5%; */
|
|
/* height: 5%; */
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="top">
|
|
<div id="logo">
|
|
<img src="./logo.png" alt="logo" />
|
|
</div>
|
|
<div id="user_info">
|
|
<span id="userName"></span>
|
|
<!-- <span class="logout" onclick="logout()">登出</span> -->
|
|
<input type="button" value="登出" onclick="logout()" />
|
|
</div>
|
|
</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>
|
|
<a href="./green_house_info.html" target="content_frame" class="menu_item">大棚信息</a>
|
|
</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.login_user_name;
|
|
}
|
|
}
|
|
|
|
function logout() {
|
|
localStorage.clear();
|
|
open("./login.html", "_self");
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |