Browse Source

前端样式修改 login main

1037015548@qq.com 2 years ago
parent
commit
9d60dfe76f

+ 24 - 0
ruoyi-admin/src/main/resources/static/ruoyi/index.js

@@ -509,6 +509,30 @@ $(function() {
     	storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id'));
     	location.href  = ctx + "lockscreen";
     });
+    var menuFlag = false;//是否隐藏
+    // 隐藏左侧菜单
+    $('#hideMenu').on('click', function () {
+        //找到菜单栏元素以及右侧部分
+        let $menu = $("#navMenu");
+        let $right = $("#page-wrapper");
+        if(!menuFlag){
+            menuFlag = true;
+            $("#hideMenu").text("显示左侧菜单");
+            $menu.hide(300);
+            setTimeout(function () {
+                // $menu.addClass("menuClass");
+                $right.addClass("rightClass");
+            },500);
+        }else{
+            menuFlag = false;
+            $("#hideMenu").text("隐藏左侧菜单");
+            $menu.show(300);
+            setTimeout(function () {
+                // $menu.removeClass("menuClass");
+                $right.removeClass("rightClass");
+            },500);
+        }
+    });
 
     // 页签刷新按钮
     $('.tabReload').on('click', refreshTab);

+ 11 - 1
ruoyi-admin/src/main/resources/templates/index.html

@@ -15,12 +15,21 @@
     <link th:href="@{/css/style.min.css}" rel="stylesheet"/>
     <link th:href="@{/css/skins.css}" rel="stylesheet"/>
     <link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
+	<style type="text/css">
+		.menuClass{
+			width: 0px!important;
+		}
+		.rightClass{
+			width: 100%px!important;
+			margin: 0px!important;
+		}
+	</style>
 </head>
 <body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
 <div id="wrapper">
 
     <!--左侧导航开始-->
-    <nav class="navbar-default navbar-static-side" role="navigation">
+    <nav id="navMenu" class="navbar-default navbar-static-side" role="navigation">
         <div class="nav-close">
             <i class="fa fa-times-circle"></i>
         </div>
@@ -196,6 +205,7 @@
 <!--                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li>-->
                     <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="#" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>
 	                <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="#" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>
+	                <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="隐藏左侧菜单" href="#" id="hideMenu"><i class="fa fa-th-list"></i> 隐藏左侧菜单</a></li>
                     <li class="dropdown user-menu">
 						<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
 							<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">

+ 17 - 2
ruoyi-admin/src/main/resources/templates/login.html

@@ -19,9 +19,25 @@
     <script>
         if(window.top!==window.self){alert('未登录或登录超时。请重新登录');window.top.location=window.location};
     </script>
+    <style type="text/css">
+        .hClass{
+            position:absolute;
+            left:10%;
+            top:6%;
+            font-size: 25px;
+        }
+        .divFoot{
+            position: absolute!important;
+            bottom: 6%!important;
+            margin: auto 0!important;
+            width: 50%!important;
+            font-size: 10px!important;
+        }
+    </style>
 </head>
 <body class="signin">
     <div class="signinpanel">
+        <h4 class="hClass">欢迎使用 <strong>智慧水务系统-认证系统</strong></h4>
         <div class="row">
             <div class="col-sm-7">
                 <div class="signin-info">
@@ -29,7 +45,6 @@
                         <h1><img alt="[ 水务系统 ]" src="../static/img/logo.png" th:src="@{/img/logo.png}"></h1>
                     </div>
                     <div class="m-b"></div>
-                    <h4>欢迎使用 <strong>智慧水务系统-认证系统</strong></h4>
 
                     <strong th:if="${isAllowRegister}">还没有账号? <a th:href="@{/register}">立即注册&raquo;</a></strong>
                 </div>
@@ -62,7 +77,7 @@
                 </form>
             </div>
         </div>
-        <div class="signup-footer">
+        <div class="signup-footer divFoot">
             <div class="pull-left">
                 CopyRight ©2021-2030 重庆远通科技有限公司 版权所有<br>
             </div>

+ 39 - 1
ruoyi-admin/src/main/resources/templates/main.html

@@ -11,6 +11,43 @@
 	<link href="../static/css/animate.min.css" th:href="@{/css/animate.min.css}" rel="stylesheet"/>
 	<link href="../static/css/style.min862f.css" th:href="@{/css/style.min862f.css}" rel="stylesheet"/>
 	<th:block th:include="include :: header('首页')" />
+	<style type="text/css">
+		.aInput {
+			position: relative;
+			color: rgba(255,255,255,1);
+			text-decoration: none;
+			background-color: rgba(60,141,188,1);
+			font-family: 'Yanone Kaffeesatz';
+			/*font-weight: 700;*/
+			/*font-size: 2em;*/
+			display: block;
+			padding: 4px;
+			-webkit-border-radius: 20px;
+			-moz-border-radius: 20px;
+			border-radius: 20px;
+			-webkit-box-shadow: 0px 9px 0px rgba(60,141,188,1), 0px 9px 25px rgba(60,64,81,.7);
+			-moz-box-shadow: 0px 9px 0px rgba(60,141,188,1), 0px 9px 25px rgba(60,64,81,.7);
+			box-shadow: 0px 9px 0px rgba(60,141,188,1), 0px 9px 25px rgba(60,64,81,.7);
+			margin: 20px auto;
+			width: 60px;
+			height: 60px;
+			text-align: center;
+
+			-webkit-transition: all .1s ease;
+			-moz-transition: all .1s ease;
+			-ms-transition: all .1s ease;
+			-o-transition: all .1s ease;
+			transition: all .1s ease;
+		}
+
+		.aInput:active {
+			-webkit-box-shadow: 0px 3px 0px rgba(60,141,188,1), 0px 3px 6px rgba(60,64,81,.9);
+			-moz-box-shadow: 0px 3px 0px rgba(60,141,188,1), 0px 3px 6px rgba(60,64,81,.9);
+			box-shadow: 0px 3px 0px rgba(60,141,188,1), 0px 3px 6px rgba(60,64,81,.9);
+			position: relative;
+			top: 6px;
+		}
+	</style>
 </head>
 
 
@@ -28,7 +65,8 @@
 						<div class="float-e-margins" style="text-align: center;border: none">
 							<div     >
 								<!--<input type="text" th:value="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()}">-->
-								<button class="btn btn-primary dim" type="button" th:style="'background:url(' +${dangan.dangan==null?'':dangan.dangan.iconInfo}+') no-repeat center center;width:50px;height:50px;background-size:100% 100%'" th:onclick="opennewpage([[${dangan.danganUrl}]] ,[[${dangan.danganNums} ]]);">
+								<!--<button class="btn btn-primary dim" type="button" th:style="'background:url(' +${dangan.dangan==null?'':dangan.dangan.iconInfo}+') no-repeat center center;width:50px;height:50px;background-size:100% 100%'" th:onclick="opennewpage([[${dangan.danganUrl}]] ,[[${dangan.danganNums} ]]);">-->
+									<a class="aInput" th:style="'background:url(' +${dangan.dangan==null?'':dangan.dangan.iconInfo}+') no-repeat center center;background-size:100% 100%'" th:onclick="opennewpage([[${dangan.danganUrl}]] ,[[${dangan.danganNums} ]]);"></a>
 								</button>
 								<h3 class="no-margins" style="color:#1e9fff" th:text="${dangan.danganName}"></h3>
 								<h4 th:text="${@dict.getLabel('sys_dangan_status', dangan.danganStatus)}" ></h4><br>