浏览代码

首页及UI美化

ly 2 月之前
父节点
当前提交
fe562f03b8
共有 1 个文件被更改,包括 22 次插入18 次删除
  1. 22 18
      src/main/resources/templates/login/login.html

+ 22 - 18
src/main/resources/templates/login/login.html

@@ -9,7 +9,7 @@
9
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
9
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
10
     <meta name="apple-mobile-web-app-capable" content="yes">
10
     <meta name="apple-mobile-web-app-capable" content="yes">
11
     <meta name="format-detection" content="telephone=no">
11
     <meta name="format-detection" content="telephone=no">
12
-    <link rel="icon" th:href="@{//images/logo.ico}">
12
+    <link rel="icon" th:href="@{/images/logo.ico}">
13
     <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
13
     <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
14
     <style th:inline="text">
14
     <style th:inline="text">
15
         .main-body {
15
         .main-body {
@@ -18,7 +18,6 @@
18
             left: 50%;
18
             left: 50%;
19
             transform: translate(-50%, -50%);
19
             transform: translate(-50%, -50%);
20
             width: 350px;
20
             width: 350px;
21
-
22
             background: #fff;
21
             background: #fff;
23
             border-radius: 20px;
22
             border-radius: 20px;
24
             box-shadow: 0 5px 10px rgba(0,0,0,0.2);
23
             box-shadow: 0 5px 10px rgba(0,0,0,0.2);
@@ -99,7 +98,7 @@
99
         }
98
         }
100
 
99
 
101
         .login-main .login-bottom .center .item {
100
         .login-main .login-bottom .center .item {
102
-            width: 288px;
101
+            width: 260px;
103
             height: 35px;
102
             height: 35px;
104
             border-bottom: 1px solid #dae1e6;
103
             border-bottom: 1px solid #dae1e6;
105
             margin-bottom: 35px;
104
             margin-bottom: 35px;
@@ -107,6 +106,7 @@
107
 
106
 
108
         .login-main {
107
         .login-main {
109
             width: 350px;
108
             width: 350px;
109
+            height: 500px;
110
             position: relative;
110
             position: relative;
111
             float: left;
111
             float: left;
112
         }
112
         }
@@ -184,7 +184,7 @@
184
         }
184
         }
185
 
185
 
186
         .login-main .login-bottom .center {
186
         .login-main .login-bottom .center {
187
-            width: 288px;
187
+            width: 260px;
188
             margin: 0 auto;
188
             margin: 0 auto;
189
             padding-top: 40px;
189
             padding-top: 40px;
190
             padding-bottom: 15px;
190
             padding-bottom: 15px;
@@ -195,7 +195,7 @@
195
             clear: both;
195
             clear: both;
196
             height: 16px;
196
             height: 16px;
197
             line-height: 16px;
197
             line-height: 16px;
198
-            width: 288px;
198
+            width: 260px;
199
             margin: 0 auto;
199
             margin: 0 auto;
200
         }
200
         }
201
 
201
 
@@ -233,7 +233,7 @@
233
             clear: both;
233
             clear: both;
234
             height: 16px;
234
             height: 16px;
235
             line-height: 16px;
235
             line-height: 16px;
236
-            width: 288px;
236
+            width: 260px;
237
             margin: 0 auto;
237
             margin: 0 auto;
238
         }
238
         }
239
 
239
 
@@ -245,6 +245,7 @@
245
             letter-spacing: 0;
245
             letter-spacing: 0;
246
             color: #9abcda;
246
             color: #9abcda;
247
             cursor: pointer;
247
             cursor: pointer;
248
+            margin-top: 5px;
248
         }
249
         }
249
 
250
 
250
         .login-main .login-bottom .tip .forget-password {
251
         .login-main .login-bottom .tip .forget-password {
@@ -257,7 +258,7 @@
257
         }
258
         }
258
 
259
 
259
         .login-main .login-bottom .login-btn {
260
         .login-main .login-bottom .login-btn {
260
-            width: 288px;
261
+            width: 260px;
261
             height: 40px;
262
             height: 40px;
262
             background-color: #2980b9;
263
             background-color: #2980b9;
263
             border-radius: 16px;
264
             border-radius: 16px;
@@ -339,7 +340,6 @@
339
     <h2>科研管控平台</h2>
340
     <h2>科研管控平台</h2>
340
 </div>
341
 </div>
341
 <div class="main-body">
342
 <div class="main-body">
342
-
343
     <div class="login-main">
343
     <div class="login-main">
344
         <div class="login-top">
344
         <div class="login-top">
345
             <div class="avatar">
345
             <div class="avatar">
@@ -354,25 +354,17 @@
354
                     <input type="text" name="username" id="username" lay-verify="required" placeholder="请输入登录账号"
354
                     <input type="text" name="username" id="username" lay-verify="required" placeholder="请输入登录账号"
355
                            maxlength="24" autocomplete="current-password" />
355
                            maxlength="24" autocomplete="current-password" />
356
                 </div>
356
                 </div>
357
-
358
                 <div class="item">
357
                 <div class="item">
359
                     <span class="icon icon-3"></span>
358
                     <span class="icon icon-3"></span>
360
                     <input type="password" name="password" id="password" lay-verify="required" placeholder="请输入密码"
359
                     <input type="password" name="password" id="password" lay-verify="required" placeholder="请输入密码"
361
                            maxlength="20" autocomplete="current-password">
360
                            maxlength="20" autocomplete="current-password">
362
                     <span class="bind-password icon icon-4"></span>
361
                     <span class="bind-password icon icon-4"></span>
363
                 </div>
362
                 </div>
364
-
365
-                <!--                <div id="validatePanel" class="item" style="width: 167px;">-->
366
-                <!--                    <span class="icon icon-1"></span>-->
367
-                <!--                    <input type="text" id="captcha" name="captcha" placeholder="请输入验证码" autocomplete="off" maxlength="4">-->
368
-                <!--                    <img id="ver_btn" class="validateImg" alt="看不清? 点击刷新" title="看不清? 点击刷新"/>-->
369
-                <!--                </div>-->
370
-
371
             </div>
363
             </div>
372
             <div class="tip">
364
             <div class="tip">
373
                 <span class="icon-nocheck"></span>
365
                 <span class="icon-nocheck"></span>
374
-                <span class="login-tip">记住密码</span><!--
375
-                <a href="javascript:" class="forget-password">忘记密码?</a>-->
366
+                <span class="login-tip">记住密码</span>
367
+                <!--<a href="javascript:" class="forget-password">忘记密码?</a>-->
376
             </div>
368
             </div>
377
             <div class="layui-form-item" style="text-align:center; width:100%;height:100%;margin:0px;">
369
             <div class="layui-form-item" style="text-align:center; width:100%;height:100%;margin:0px;">
378
                 <button id="btn_login" class="login-btn" lay-submit lay-filter="login">
370
                 <button id="btn_login" class="login-btn" lay-submit lay-filter="login">
@@ -387,6 +379,18 @@
387
 <div class="footer">
379
 <div class="footer">
388
     Copyright© 2023 <span class="padding-5">|</span>
380
     Copyright© 2023 <span class="padding-5">|</span>
389
 </div>
381
 </div>
382
+<script>
383
+    const  inputs = [
384
+        document.getElementById('username'),
385
+        document.getElementById('password')
386
+    ]
387
+
388
+    inputs.forEach(input =>{
389
+        input.addEventListener('input',function () {
390
+            this.value = this.value.replace(/\s+/g,'');
391
+        })
392
+    })
393
+</script>
390
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
394
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
391
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
395
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
392
 <script th:src="@{/lib/md5/md5.min.js}" charset="utf-8"></script>
396
 <script th:src="@{/lib/md5/md5.min.js}" charset="utf-8"></script>