修改了页面的布局,把green_house页面也做了相应的修改

This commit is contained in:
chang 2023-10-26 17:00:37 +08:00
parent daea54f40f
commit e559f8926e
6 changed files with 215 additions and 54 deletions

11
cgi-bin/hello.c Normal file
View File

@ -0,0 +1,11 @@
#include <stdio.h>
int main(int argc, char const* argv[]) {
for (int i = 1; i < 3; i++) {
for (int j = 1; j <= i; j++) {
twoNumAdd(i, j); // help.c的外部函数
// _show_sum(i, j, i + j);
// 不能调用它是static函数是help.c的内部函数
}
}
return 0;
}

View File

@ -13,7 +13,7 @@
<input name="name" placeholder="请输入账号"> <input name="name" placeholder="请输入账号">
</div> </div>
<div class="row"> <div class="row">
<input name="password" type="password" placeholder="请输入密码"> <input name="password" placeholder="请输入密码">
</div> </div>
<div class="row center"> <div class="row center">
<button>确认</button> <button>确认</button>
@ -23,9 +23,22 @@
</body> </body>
<script> <script>
function login(form) { function login(form) {
// let login_data = {
// name: form.name.value.trim(),
// password: form.password.value.trim()
let name = form.name.value.trim();
let password = form.password.value.trim();
if (name == "" || password == "") {
alert("账号或密码不能为空");
return false;
}
let login_data = { let login_data = {
name: form.name.value.trim(), name: name,
password: form.password.value.trim() password: password
}; };
fetch("../cgi-bin/sqlite_cgi_insert_base.cgi", { fetch("../cgi-bin/sqlite_cgi_insert_base.cgi", {
method: "POST", method: "POST",

View File

@ -6,9 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title> <title>Document</title>
<style> <style>
* { /* * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} */
iframe {
border: none;
} }
html, html,
@ -21,16 +25,51 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
#main {
height: 100%;
display: flex;
flex-direction: column;
background-color: lightcyan;
}
#menu {
text-align: center;
width: 100%;
/* border-right: 5px solid lightgray; */
border-width: 10px;
padding: 30px;
}
#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;
}
</style> </style>
</head> </head>
<body> <body>
<div id="main">
<div id="menu"> <div id="menu">
<a href="hemp_hum_first_info.html" target="content_frame1" class="menu_item">大棚1</a> <a href="hemp_hum_first_info.html" target="content_frame" class="menu_item">大棚一号</a>
<a href="hemp_hum_second2_info.html" target="content_frame1" class="menu_item">大棚2</a> <a href="hemp_hum_second2_info.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>
<div class="content"> <div class="content">
<iframe name="content_frame1" width="100%" height="100%"></iframe> <iframe name="content_frame1" width="100%" height="100%" scrolling="No" border="none "></iframe>
</div> </div>
</body> </body>

View File

@ -61,7 +61,11 @@
border-radius: .3em; border-radius: .3em;
text-align: center; text-align: center;
margin: 5px 10px; margin: 5px 10px;
float: right float: left
}
.active_2 {
float: right;
} }
.active_1 { .active_1 {
@ -73,9 +77,12 @@
border-radius: .3em; border-radius: .3em;
text-align: center; text-align: center;
margin: 5px 10px; margin: 5px 10px;
float: center
} }
.main { .main {
height: 280px; height: 280px;
display: flex; display: flex;
@ -86,7 +93,7 @@
width: 180px; width: 180px;
height: 280px; height: 280px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 1.5em border-radius: 10%
} }
.wrap input { .wrap input {
@ -147,26 +154,25 @@
<script type="text/javascript" src="Arg_data.js"></script> <script type="text/javascript" src="Arg_data.js"></script>
<body onload="init_getdata()"> <body onload="init_getdata()">
<div class="schmenu"> <!-- <div class="schmenu">
<ul> <ul>
<li><a href="#top">返回首页</a></li> <li><a href="#top">返回首页</a></li>
<li><a onclick="on_button_show()">刷新</a></li> <li><a onclick="on_button_show()">刷新</a></li>
<li><a onclick="historical_data()" target="_self">历史数据</a></li> <li><a onclick="historical_data()" target="_self">历史数据</a></li>
<!-- <li><a id="Refresh_auto" onclick="on_button_auto()">无刷新</a></li> --> <li><a id="Refresh_auto" onclick="on_button_auto()">无刷新</a></li> -->
<li><a href="" target="_self">请打赏</a></li> <!-- <li><a href="" target="_self">请打赏</a></li> -->
</ul> <!-- </ul> -->
</div> <!-- </div> -->
<br><br><br> <!-- <br><br><br> -->
<h1 style="text-align:center;">智能大棚控制系统111 <h1 style="text-align:center;">智能大棚控制系统111
</h1> </h1>
<style type="text/css"> <style type="text/css">
.schmenu { .schmenu {
height: 33px; height: 33px;
line-height: 33px; line-height: 33px;
background: #2c56a3; background: #2c56a3;
opacity: 0.8; opacity: 0.8;
width: 100%; width: auto;
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
@ -208,7 +214,7 @@
} }
</style> </style>
<input type="button" class="active" value="注销" onclick="cancellation()" />
<div class="container"> <div class="container">
<p class="title"> <p class="title">
<input type="button" class="data1" value="历史数据" onclick="historical_data()" /> <input type="button" class="data1" value="历史数据" onclick="historical_data()" />
@ -277,9 +283,12 @@
<br> <br>
<br> <br>
<br> <br>
<th align="center"> <th style="display: inline-block;">
<input type="button" class="active_1" value="保存配置" onclick="on_button_seve()" /> <input type="button" class="active_1" value="保存配置" onclick="on_button_seve()" />
<!-- <input type="button" class="active" value="注销" onclick="cancellation()" /> -->
</th> </th>
</div> </div>
<div class="right"> <div class="right">
<h6> <h6>
@ -330,6 +339,16 @@
</th> </th>
</p> </p>
<!-- <br>
<br>
<br>
<br>
<br> -->
<!-- <th style="display: inline-block;">
<input type="button" class="active_1" value="保存配置" onclick="on_button_seve()" /> -->
<!-- <input type="button" class="active active_2" value="注销" onclick="cancellation()" /> -->
<!-- </th> -->
</div> </div>

View File

@ -1,24 +1,103 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="utf-8">
<title>主页面</title> <meta name="author" content="zifan">
<meta name="keywords" content="物联网">
<title>主页</title>
<style> <style>
* { html,
body {
height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
html,
body { body {
width: 100%; display: flex;
height: 100%; flex-direction: column;
justify-content: space-between;
} }
.container { #top {
width: 100%; height: 50px;
background-color: lightblue;
}
#foot {
height: 40px;
background-color: lightblue;
}
#main {
height: 100%; 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;
} }
</style> </style>
</head> </head>
@ -32,20 +111,19 @@
<span class="logout" onclick="logout()">[登出]</span> <span class="logout" onclick="logout()">[登出]</span>
</div> </div>
</div> </div>
</div>
<div id="main">
<div id="menu"> <div id="menu">
<h3>功能</h3>
<a href="green_house_info.html" target="content_frame" class="menu_item">大棚</a> <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="record_of_operations_history.html" target="content_frame" class="menu_item">历史操作</a>
</div> </div>
<div class="container"> <div id="content" style="width: 100%;">
<iframe name="content_frame" id="info-frame" width="100%" height="100%"></iframe> <iframe name="content_frame" width="100%" height="100%" scrolling="No"></iframe>
</div> </div>
</div> </div>
<div id="foot" style="text-align: botton;"> <div id="foot" style="text-align: center;">
<b>版本所有@FLY-NOOB</b> <b>版本所有@FLY-NOOB</b>
</div> </div>
</body>
<script> <script>
window.onload = function () { window.onload = function () {
if (localStorage.getItem("login_user") == null) { if (localStorage.getItem("login_user") == null) {
@ -61,5 +139,6 @@
open("/login.html", "_self"); open("/login.html", "_self");
} }
</script> </script>
</body>
</html> </html>

Binary file not shown.