Просмотр исходного кода

修改后台登录页面样式

sugar1569 7 лет назад
Родитель
Сommit
c979542cba

+ 10 - 13
application/admin/view/login/index.php

@@ -4,7 +4,9 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="renderer" content="webkit">
-    <title>登录 - CRMEB管理系统</title>
+    <title>登录管理系统 -  Powered by CRMEB!</title>
+    <meta name="generator" content="CRMEB! v2.5" />
+    <meta name="author" content="CRMEB! Team and CRMEB UI Team" />
     <link href="{__FRAME_PATH}css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
     <link href="{__FRAME_PATH}css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
     <link href="{__FRAME_PATH}css/animate.min.css" rel="stylesheet">
@@ -14,13 +16,13 @@
     </script>
 </head>
 <body class="gray-bg login-bg">
+<canvas id="canvas" width="900" height="300" style="position: fixed;top: -50px;width: 60%;left: 20%"></canvas>
 <div class="middle-box text-center loginscreen  animated fadeInDown">
     <div class="login-group">
         <h3 class="login-logo">
             <img src="{__ADMIN_PATH}images/logo.png">
-            <p>CRMEB管理系统</p>
         </h3>
-        <form class="m-t" role="form" action="{:url('verify')}" method="post">
+        <form role="form" action="{:url('verify')}" method="post">
             <div class="form-group">
                 <div class="input-group m-b"><span class="input-group-addon"><i class="fa fa-user"></i> </span>
                     <input type="text" id="account" name="account" placeholder="用户名" placeholder="用户名" class="form-control">
@@ -51,23 +53,18 @@
         </form>
     </div>
 </div>
-<div class="footer" style="    position: fixed;bottom: 0;width: 100%;left: 0;margin: 0;">
-    <div class="pull-right">© 2000-2019 <a href="http://www.crmeb.com/" target="_blank">西安众邦网络科技有限公司</a>
+<div class="footer" style=" position: fixed;bottom: 0;width: 100%;left: 0;margin: 0;opacity: 0.8;">
+    <div class="pull-right">© 2017-2019 <a href="http://www.crmeb.com/" target="_blank">CRMEB</a>
     </div>
 </div>
+
 <!-- 全局js -->
 <script src="{__PLUG_PATH}jquery-1.10.2.min.js"></script>
 <script src="{__FRAME_PATH}js/bootstrap.min.js?v=3.4.0"></script>
+<script src="{__MODULE_PATH}login/flaotfont.js"></script>
+<script src="{__MODULE_PATH}login/ios-parallax.js"></script>
 <script src="{__MODULE_PATH}login/index.js"></script>
 <!--统计代码,可删除-->
 <!--点击刷新验证码-->
-<script>
-    (function captcha(){
-        var $captcha = $('#verify_img'),src = $captcha[0].src;
-        $captcha.on('click',function(){
-            this.src = src+'?'+Date.parse(new Date());
-        });
-    })();
-</script>
 </body>
 </html>

+ 4 - 4
public/system/frame/css/style.min.css

@@ -817,7 +817,7 @@ body.modal-open{padding-right:inherit!important}
 .invoice-total>tbody>tr>td:last-child{border-bottom:1px solid #DDD;text-align:right;width:15%}
 .middle-box{max-width:400px;z-index:100;margin:0 auto;padding-top:40px}
 .lockscreen.middle-box{width:200px;padding-top:110px}
-.loginscreen.middle-box{width:300px}
+.loginscreen.middle-box{width:340px}
 .loginColumns{max-width:800px;margin:0 auto;padding:100px 20px 20px}
 .passwordBox{max-width:460px;margin:0 auto;padding:100px 20px 20px}
 .logo-name{color:#e6e6e6;font-size:180px;font-weight:800;letter-spacing:-10px;margin-bottom:0}
@@ -1366,8 +1366,8 @@ body.skin-3{background:#3e2c42}
 }
 .btn-default{background-color:#79c7e4;border-color:#79c7e4}
 .btn-default.btn-outline{background-color:#fff;border-color:#c2c2c2}
-.login-group{background-color: #2f4050;padding: 0 20px 20px;color: #111123;}
-.login-logo{font-family:"Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif;color:#fff;overflow:hidden;margin-top:80%}
+.login-group{margin-top: 30vh;background-color: #00111C;padding: 0 20px 20px;color: #111123;opacity: 0.8;border-radius: 7px;box-shadow: 0 0 10px #3FBEEB;  border: 1px solid #74B5C9;  }
+.login-logo{font-family:"Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif;color:#fff;overflow:hidden;margin-top:1vh}
 .login-logo img{width:90px}
 .login-logo p{color:#fff;font-weight:300;margin:0}
 .login-bg{background-image:url(../../images/bg-logo.jpg)}
@@ -1383,7 +1383,7 @@ body.skin-3{background:#3e2c42}
     .mini-navbar .dashbard-1{transform:translate3d(0,0,0)}
     .footer{position:fixed;width:100%;left:0;bottom:0;margin:0!important}
     #content-main{height:calc(100% - 80px)}
-    .login-logo{margin-top:21vh}
+    .login-logo{margin-top:1vh}
     .fixed-sidebar.mini-navbar .slimScrollDiv .nav{display: none;}
     .navbar-default .navbar-static-side{display: none;}
 }

BIN
public/system/images/bg-logo.jpg


Разница между файлами не показана из-за своего большого размера
+ 665 - 0
public/system/module/login/flaotfont.js


+ 13 - 1
public/system/module/login/index.js

@@ -10,4 +10,16 @@
         if(!account)return showError('请输入用户名!');
         if(!pwd) return showError('请输入密码');
     })
-})(window,jQuery);
+})(window,jQuery);
+$(document).ready(function() {
+    $('.login-bg').iosParallax({
+        movementFactor: 50
+    });
+});
+
+(function captcha(){
+    var $captcha = $('#verify_img'),src = $captcha[0].src;
+    $captcha.on('click',function(){
+        this.src = src+'?'+Date.parse(new Date());
+    });
+})();

+ 94 - 0
public/system/module/login/ios-parallax.js

@@ -0,0 +1,94 @@
+(function($){
+  $.iosParallax = function(el, options){
+    // To avoid scope issues, use 'base' instead of 'this'
+    // to reference this class from internal events and functions.
+    var base = this;
+
+    // Access to jQuery and DOM versions of element
+    base.$el = $(el);
+    base.el = el;
+
+    // Add a reverse reference to the DOM object
+    base.$el.data("iosParallax", base);
+
+    var centerCoordinates = {x: 0, y: 0};
+    var targetCoordinates = {x: 0, y: 0};
+    var transitionCoordinates = {x: 0, y: 0};
+
+    function getBackgroundImageUrl(){
+      var backgroundImage = base.$el.css('background-image').match(/url\(.*\)/ig);
+      if ( ! backgroundImage || backgroundImage.length < 1) {
+        throw 'No background image found';
+      }
+      return backgroundImage[0].replace(/url\(|'|"|'|"|\)$/ig, "");
+    }
+
+    function getBackgroundImageSize(){
+      var img = new Image;
+      img.src = getBackgroundImageUrl();
+      return {width: img.width, height: img.height};
+    }
+
+    function setCenterCoordinates(){
+      var bgImgSize = getBackgroundImageSize();
+      centerCoordinates.x = -1 * Math.abs(bgImgSize.width - base.$el.width()) / 2;
+      centerCoordinates.y = -1 * Math.abs(bgImgSize.height - base.$el.height()) / 2;
+      targetCoordinates.x = centerCoordinates.x;
+      targetCoordinates.y = centerCoordinates.y;
+      transitionCoordinates.x = centerCoordinates.x;
+      transitionCoordinates.y = centerCoordinates.y;
+    }
+
+    function bindEvents(){
+      base.$el.mousemove(function(e){
+        var width = base.options.movementFactor / base.$el.width();
+        var height = base.options.movementFactor / base.$el.height();
+        var cursorX = e.pageX - ($(window).width() / 2);
+        var cursorY = e.pageY - ($(window).height() / 2);
+        targetCoordinates.x = width * cursorX * -1 + centerCoordinates.x;
+        targetCoordinates.y = height * cursorY * -1 + centerCoordinates.y;
+      });
+
+      // Slowly converge the background image position to the target coordinates in 60 FPS
+      var loop = setInterval(function(){
+        transitionCoordinates.x += ((targetCoordinates.x - transitionCoordinates.x) / base.options.dampenFactor);
+        transitionCoordinates.y += ((targetCoordinates.y - transitionCoordinates.y) / base.options.dampenFactor);
+        base.$el.css("background-position", transitionCoordinates.x+"px "+transitionCoordinates.y+"px");
+      }, 16);
+
+      $(window).resize(function(){
+        // Re-center the image
+        setCenterCoordinates();
+      });
+
+      // There's a problem with getting image height and width when the image isn't loaded.
+      var img = new Image;
+      img.src = getBackgroundImageUrl();
+      $(img).load(function(){
+        setCenterCoordinates();
+      });
+    };
+
+    base.init = function(){
+      base.options = $.extend({}, $.iosParallax.defaultOptions, options);
+      bindEvents();
+    };
+
+    base.init();
+  };
+
+  $.iosParallax.defaultOptions = {
+    // How fast the background moves
+    movementFactor: 50,
+    // How much to dampen the movement (higher is slower)
+    dampenFactor: 36
+  };
+
+  $.fn.iosParallax = function(options){
+    return this.each(function(){
+      (new $.iosParallax(this, options));
+    });
+  };
+
+})(jQuery);
+