Browse Source

登陆页迁移到vue

懒得勤快 1 month ago
parent
commit
35ffb4f6b7
22 changed files with 249 additions and 1074 deletions
  1. 2 1
      src/Masuit.MyBlogs.Core/Controllers/PassportController.cs
  2. 247 177
      src/Masuit.MyBlogs.Core/Views/Passport/Login.cshtml
  3. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/bg0.png
  4. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/bg1.png
  5. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/hx.png
  6. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/1.jpg
  7. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/2.jpg
  8. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/3.jpg
  9. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/4.jpg
  10. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/5.jpg
  11. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/6.jpg
  12. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/7.jpg
  13. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/8.jpg
  14. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/9.jpg
  15. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/input-checked.png
  16. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/input-unchecked.png
  17. BIN
      src/Masuit.MyBlogs.Core/wwwroot/Content/images/loading.gif
  18. 0 138
      src/Masuit.MyBlogs.Core/wwwroot/Content/jquery-labelauty.css
  19. 0 490
      src/Masuit.MyBlogs.Core/wwwroot/Content/login/style.css
  20. 0 236
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/jquery-labelauty.js
  21. 0 32
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/supersized-init.js
  22. 0 0
      src/Masuit.MyBlogs.Core/wwwroot/Scripts/supersized.3.2.7.min.js

+ 2 - 1
src/Masuit.MyBlogs.Core/Controllers/PassportController.cs

@@ -11,6 +11,7 @@ using Dispose.Scope;
 using FreeRedis;
 using Masuit.MyBlogs.Core.Extensions;
 using Masuit.MyBlogs.Core.Models;
+using Masuit.Tools.AspNetCore.ModelBinder;
 
 namespace Masuit.MyBlogs.Core.Controllers;
 
@@ -121,7 +122,7 @@ public sealed class PassportController : Controller
     /// <param name="remem"></param>
     /// <returns></returns>
     [HttpPost, ValidateAntiForgeryToken, DistributedLockFilter]
-    public ActionResult Login([FromServices] IRedisClient cacheManager, string username, string password, string valid, string remem)
+    public ActionResult Login([FromServices] IRedisClient cacheManager, [FromBodyOrDefault, Required] string username, [FromBodyOrDefault, Required] string password, [FromBodyOrDefault, Required] string valid, [FromBodyOrDefault, Required] string remem)
     {
         string validSession = HttpContext.GetRedisSession<string>("valid") ?? string.Empty; //将验证码从Session中取出来,用于登录验证比较
         if (string.IsNullOrEmpty(validSession) || !valid.Trim().Equals(validSession, StringComparison.InvariantCultureIgnoreCase))

+ 247 - 177
src/Masuit.MyBlogs.Core/Views/Passport/Login.cshtml

@@ -1,191 +1,261 @@
 @{
-    ViewBag.Title = "统一登录";
-    Layout = null;
+  Layout = null;
 }
 <!DOCTYPE html>
-<html lang="zh-cn">
+<html lang="zh">
 <head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
-    <title>@ViewBag.Title</title>
-    <link href="~/Content/login/style.css" rel="stylesheet" />
-    <link href="~/Content/jquery-labelauty.css" rel="stylesheet" />
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-placeholder/2.3.1/jquery.placeholder.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.complexify.js/0.5.1/jquery.complexify.js"></script>
-    <script src="~/Scripts/supersized.3.2.7.min.js"></script>
-    <script src="~/Scripts/supersized-init.js"></script>
-    <script src="~/Scripts/jquery-labelauty.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jsencrypt/3.0.0-rc.1/jsencrypt.min.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
+  <meta charset="UTF-8">
+  <meta content="width=device-width,initial-scale=1.0" name="viewport">
+  <title>用户登录</title>
+  <style>
+    body {
+      /* 背景由js动态设置 */
+      font-family: 'Roboto', Arial, sans-serif;
+      min-height: 100vh;
+      margin: 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      transition: background 0.6s;
+    }
+    .login-container {
+      background: #fff;
+      border-radius: 16px;
+      box-shadow: 0 8px 32px rgba(44,62,80,0.12);
+      padding: 48px 40px;
+      width: 360px;
+      display: flex;
+      flex-direction: column;
+      gap: 24px;
+      animation: fadeIn 1s;
+    }
+    @@keyframes fadeIn {
+      from { opacity: 0; transform: translateY(40px);}
+      to { opacity: 1; transform: translateY(0);}
+    }
+    .login-title {
+      text-align: center;
+      font-weight: 700;
+      font-size: 2rem;
+      color: #2575fc;
+      margin-bottom: 8px;
+      letter-spacing: 1px;
+    }
+    .login-form {
+      display: flex;
+      flex-direction: column;
+      gap: 16px;
+    }
+    .input-group {
+      display: flex;
+      flex-direction: column;
+      gap: 6px;
+    }
+    label {
+      font-size: 1rem;
+      color: #444;
+      font-weight: 500;
+    }
+    input[type="text"], input[type="password"] {
+      padding: 12px;
+      border-radius: 8px;
+      border: 1px solid #e0e0e0;
+      font-size: 1rem;
+      outline: none;
+      transition: border 0.2s;
+    }
+    input:focus {
+      border: 1.5px solid #2575fc;
+      background: #f5f9ff;
+    }
+    .captcha-group {
+      display: flex;
+      gap: 8px;
+      align-items: center;
+    }
+    .captcha-img {
+      width: 100px;
+      height: 38px;
+      background: #eee;
+      border-radius: 6px;
+      cursor: pointer;
+      object-fit: cover;
+      border: 1px solid #e0e0e0;
+    }
+    .login-btn {
+      width: 100%;
+      margin-top: 10px;
+      background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
+      color: #fff;
+      border: none;
+      border-radius: 8px;
+      font-size: 1.1rem;
+      font-weight: 700;
+      padding: 14px 0;
+      cursor: pointer;
+      transition: box-shadow 0.2s;
+      box-shadow: 0 2px 8px rgba(44,62,80,0.08);
+    }
+    .login-btn:hover {
+      box-shadow: 0 6px 20px rgba(44,62,80,0.18);
+    }
+    .form-footer {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      font-size: 0.95rem;
+    }
+    .form-footer a {
+      color: #2575fc;
+      text-decoration: none;
+      font-weight: 500;
+      transition: text-decoration 0.2s;
+    }
+    .form-footer a:hover {
+      text-decoration: underline;
+    }
+    .options-row {
+      display: flex;
+      align-items: center;
+      gap: 10px;
+      margin-bottom: -6px;
+      font-size: 0.98rem;
+    }
+    .remember-checkbox {
+      accent-color: #2575fc;
+      width: 18px;
+      height: 18px;
+    }
+    .error-message {
+      color: #e74c3c;
+      background: #ffeaea;
+      border-radius: 6px;
+      padding: 8px 12px;
+      font-size: 0.98rem;
+      margin-bottom: -12px;
+      display: none;
+    }
+    .error-message.show {
+      display: block;
+    }
+  </style>
 </head>
 <body>
-    <div class="login-box">
-        <div class="box-con tran">
-            <form id="login-form" action="" method="POST" onsubmit="return false">
-                <div class="login-con f-l">
-                    <div class="form-group">
-                        <header>
-                            <h1>用户认证中心登录</h1>
-                        </header>
-                    </div>
-                    @Html.AntiForgeryToken()
-                    <div class="form-group">
-                        <input type="text" id="username" name="username" placeholder="用户名/邮箱" />
-                        <span class="error-notic">用户名/邮箱不正确</span>
-                    </div>
-                    <div class="form-group">
-                        <input type="password" name="password" id="password" placeholder="您的密码">
-                        <span class="error-notic">用户名或密码不正确</span>
-                    </div>
-                    <div class="form-group">
-                        <input type="text" placeholder="请输入6位验证码(点击图片刷新验证码)" id="validcode" name="valid" class="valid" maxlength="6" onkeyup="showLoginBtn()">
-                        <img class="validcode1" src="/Passport/ValidateCode" style="display: inline">
-                        <span class="error-notic">验证码不正确</span>
-                    </div>
-                    <ul class="dowebok">
-                        <li>
-                            <input type="checkbox" name="remem" id="rememberMe" checked data-labelauty="自动登录">
-                        </li>
-                    </ul>
-                    <div class="form-group" id="btnlogin" style="display: none">
-                        <button type="button" class="tran pr" onclick="login()">
-                            <a class="tran">登录</a>
-                            <img class="loading" id="status" src="~/Content/images/loading.gif" style="display: none">
-                        </button>
-                        <span id="loginStatus" class="error-notic">登录失败,请检查表单完整性!</span>
-                    </div>
-                </div>
-            </form>
-            <!-- 登录 -->
+<div id="app">
+  <div class="login-container">
+    <div class="login-title">用户登录</div>
+    @Html.AntiForgeryToken()
+    <div class="login-form">
+      <div :class="{show:errorMessage}" class="error-message">{{ errorMessage }}</div>
+      <div class="input-group">
+        <label for="username">用户名</label>
+        <input id="username" maxlength="20" placeholder="请输入用户名" required type="text" v-model="username">
+      </div>
+      <div class="input-group">
+        <label for="password">密码</label>
+        <input id="password" maxlength="20" placeholder="请输入密码" required type="password" v-model="password">
+      </div>
+      <div class="input-group">
+        <label for="captcha">验证码</label>
+        <div class="captcha-group">
+          <input autocomplete="off" id="captcha" maxlength="6" placeholder="请输入验证码" required type="text" v-model="captchaInput">
+          <img :src="captchaImgUrl" @@click="refreshCaptcha" alt="验证码" class="captcha-img" title="点击刷新">
         </div>
+      </div>
+      <div class="options-row">
+        <input class="remember-checkbox" id="remember" type="checkbox" v-model="remember">
+        <label for="remember">记住密码</label>
+      </div>
+      <button @@click="handleLogin" class="login-btn" type="submit" v-if="captchaInput.length === 6 && password.length>6 && username.length>2">登录</button>
     </div>
-</body>
-</html>
-<script type="text/javascript">
-    $(function () {
-        $(':input').labelauty(); //单选复选框美化插件初始化
-        $("#loginbtn").click(login); //登录按钮事件
-        $(".validcode1").click(flushcode); //刷新验证码
+  </div>
+</div>
+<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jsencrypt/3.5.4/jsencrypt.min.js"></script>
+<script>
+      // 生成随机颜色
+      function randomColor() {
+        const r = Math.floor(Math.random() * 200 + 30); // 保证较鲜明
+        const g = Math.floor(Math.random() * 200 + 30);
+        const b = Math.floor(Math.random() * 200 + 30);
+        return `rgb(${r},${g},${b})`;
+      }
+      // 设置随机渐变背景
+      function setRandomBg() {
+        const color1 = randomColor();
+        const color2 = randomColor();
+        document.body.style.background = `linear-gradient(135deg, ${color1} 0%, ${color2} 100%)`;
+      }
+      setRandomBg();
 
-        //绑定各表单事件
-        $("#validcode").on("keyup", function (e) {
-            if (e.keyCode == 13) {
-                //判断回车键
-                login();
+      const { createApp } = Vue;
+      createApp({
+        data() {
+          return {
+            username: '',
+            password: '',
+            captchaInput: '',
+            ramdom: Date.now(),
+            remember: false,
+            errorMessage: '',
+          }
+        },
+        computed: {
+          captchaImgUrl() {
+            return `/Passport/ValidateCode?t=${this.ramdom || Date.now()}`;
+          }
+        },
+        methods: {
+          refreshCaptcha() {
+            this.ramdom = Date.now();
+          },
+          async handleLogin() {
+            this.errorMessage = '';
+            if (this.username.trim().length < 3) {
+              this.errorMessage = "用户名长度需≥3位";
+              return;
             }
-        }); //验证码
-        $("#myPassword").on("change", function (e) {
-            document.querySelector("#myPassword2").value = "";
-        }); //密码框1内容改变事件
-
-        //表单事件
-        $(".signup-form input").on("focus", function () {
-            $(this).parent().addClass("border");
-        });
-        $(".signup-form input").on("blur", function () {
-            $(this).parent().removeClass("border");
-        });
-    });
-
-    //登录过程
-    function login() {
-        $(".tran").attr({ "disabled": "disabled" });
-        $("#status").fadeIn(100);
-        $("#status").parents("button").parents(".form-group").find(".error-notic").fadeOut(100);
-        var encrypt = new JSEncrypt();
-        encrypt.setPublicKey($.cookie("PublicKey"));
-        let form = $("#login-form").serialize();
-        form = form.replace(encodeURIComponent(getFormParam("password")), encodeURIComponent(encrypt.encrypt(getFormParam("password"))));
-        $.post("/Passport/Login", form, function (data) {
-            if (data.Success) {
-                location.href = data.Message || "/Home/Index"; //否则直接跳转
-                return;
-            } else {
-                $("#status").parents("button").parents(".form-group").find(".error-notic").html(data.Message);
-                $("#status").parents("button").parents(".form-group").find(".error-notic").fadeIn(100);
-                $("#status").fadeOut(200);
-                $(".tran").removeAttr("disabled");
-                flushcode();
+            if (this.password.length < 6) {
+              this.errorMessage = "密码长度需≥6位";
+              return;
             }
-        }).fail(function (data) {
-            $("#status").parents("button").parents(".form-group").find(".error-notic").html(data.Message);
-            $("#status").parents("button").parents(".form-group").find(".error-notic").fadeIn(100);
-            $("#status").fadeOut(200);
-        });
-    }
-
-    function getFormParam(name) {
-        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
-        var r = $("#login-form").serialize().match(reg);
-        return unescape(r[2]);
-    }
-
-    //刷新验证码
-    function flushcode() {
-        var code = "/Passport/ValidateCode?" + newGuid();
-        $(".validcode1").attr("src", code);
-    }
-
-    //创建一个guid值
-    function newGuid() {
-        var guid = "";
-        for (var i = 1; i <= 32; i++) {
-            var n = Math.floor(Math.random() * 16.0).toString(16);
-            guid += n;
-            if ((i == 8) || (i == 12) || (i == 16) || (i == 20)) {
-                guid += "-";
+            if (this.captchaInput.trim().length < 4) {
+              this.errorMessage = "请输入4位验证码";
+              return;
             }
+            const cookie = await cookieStore.get("PublicKey");
+            var encrypt = new JSEncrypt();
+            encrypt.setPublicKey(decodeURIComponent(cookie.value));
+            console.log(encrypt.encrypt(this.password));
+            axios.create({
+        headers: {
+          'RequestVerificationToken': document.querySelector('input[name="__RequestVerificationToken"]').value
         }
-        return guid;
-    }
-
-    //检查验证码
-    function CheckValidCode(_this) {
-        var code = $(_this).val();
-        $.post("/Passport/CheckValidateCode", {
-            "code": code
-        }, function (data) {
-            if (data.Success) {
-                hideNotic(_this);
-            } else {
-                $(_this).parents(".form-group").find(".error-notic").fadeIn(100);
-            }
-        });
-    }
-
-    var _handle = ''; //储存电话是否填写正确
-
-    //表单验证
-    function showNotic(_this) {
-        $(_this).parents(".form-group").find(".error-notic").fadeIn(100);
-        $(_this).focus();
-    } //错误提示显示
-
-    function hideNotic(_this) {
-        $(_this).parents(".form-group").find(".error-notic").fadeOut(100);
-    } //错误提示隐藏
-
-    var verify = {
-        VerifyCount: function (_this) {
-            var _count = "123456";
-            var _value = $(_this).val();
-            console.log(_value);
-            if (_value != _count) {
-                showNotic(_this);
-            } else {
-                hideNotic(_this);
-            }
-        }, //验证验证码
-
-    }
-
-    //显示登录按钮
-    function showLoginBtn() {
-        if ($(".valid").val().length >= 3) {
-            $("#btnlogin").fadeIn(1000);
-        } else {
-            $("#btnlogin").fadeOut(1000);
+      }).post('/Passport/Login', {
+              username: this.username.trim(),
+              password: encrypt.encrypt(this.password),
+              valid: this.captchaInput.trim(),
+              remem: this.remember
+            }).then(res => {
+              if (res.data.Success) {
+                window.location.href = new URLSearchParams(window.location.search).get("redirect") || "/Home/Index";
+              } else {
+                this.errorMessage = res.data.Message || '登录失败,请重试';
+                this.refreshCaptcha();
+                this.captchaInput = '';
+              }
+            }).catch(() => {
+              this.errorMessage = '网络异常,请稍后重试';
+              this.refreshCaptcha();
+              this.captchaInput = '';
+            });
+          }
+        },
+        mounted() {
+          this.refreshCaptcha();
         }
-    }
-</script>
+      }).mount('#app')
+    </script>
+</body>
+</html>

BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/bg0.png


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/bg1.png


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/common/images/hx.png


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/1.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/2.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/3.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/4.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/5.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/6.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/7.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/8.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/9.jpg


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/input-checked.png


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/input-unchecked.png


BIN
src/Masuit.MyBlogs.Core/wwwroot/Content/images/loading.gif


+ 0 - 138
src/Masuit.MyBlogs.Core/wwwroot/Content/jquery-labelauty.css

@@ -1,138 +0,0 @@
-ul { list-style-type: none;}
-li { display: inline-block;}
-input.labelauty + label { font: 16px "Microsoft Yahei";}
-
-/* Prevent text and blocks selection */
-input.labelauty + label ::selection { background-color: rgba(255, 255, 255, 0); }
-input.labelauty + label ::-moz-selection { background-color: rgba(255, 255, 255, 0); }
-
-/* Hide original checkboxes. They are ugly! */
-input.labelauty { display: none !important; }
-
-/*
- * Let's style the input
- * Feel free to work with it as you wish!
- */
-input.labelauty + label
-{
-	display: table;
-	font-size: 16px;
-	padding: 10px;
-	background-color: #efefef;
-	color: #b3b3b3;
-	cursor: pointer;
-
-	border-radius: 3px 3px 3px 3px;
-	-moz-border-radius: 3px 3px 3px 3px;
-	-webkit-border-radius: 3px 3px 3px 3px;
-
-
-	transition: background-color 0.25s;
-	-moz-transition: background-color 0.25s;
-	-webkit-transition: background-color 0.25s;
-	-o-transition: background-color 0.25s;
-
-	-moz-user-select: none;
-	-khtml-user-select: none;
-	-webkit-user-select: none;
-	-o-user-select: none;
-}
-
-/* Stylish text inside label */
-
-input.labelauty + label > span.labelauty-unchecked,
-input.labelauty + label > span.labelauty-checked
-{
-	display: inline-block;
-	line-height: 20px;
-	vertical-align: bottom;
-}
-
-/* Stylish icons inside label */
-
-input.labelauty + label > span.labelauty-unchecked-image,
-input.labelauty + label > span.labelauty-checked-image
-{
-	display: inline-block;
-	width: 20px;
-	height: 20px;
-	vertical-align: bottom;
-	background-repeat: no-repeat;
-	background-position: left center;
-
-	transition: background-image 0.5s linear;
-	-moz-transition: background-image 0.5s linear;
-	-webkit-transition: background-image 0.5s linear;
-	-o-transition: background-image 0.5s linear;
-}
-
-/* When there's a label, add a little margin to the left */
-input.labelauty + label > span.labelauty-unchecked-image + span.labelauty-unchecked,
-input.labelauty + label > span.labelauty-checked-image + span.labelauty-checked
-{
-	margin-left: 7px;
-}
-
-/* When not Checked */
-input.labelauty:not(:checked):not([disabled]) + label:hover
-{
-	background-color: #eaeaea;
-	color: #a7a7a7;
-}
-input.labelauty:not(:checked) + label > span.labelauty-checked-image
-{
-	display: none;
-}
-
-input.labelauty:not(:checked) + label > span.labelauty-checked
-{
-	display: none;
-}
-
-/* When Checked */
-input.labelauty:checked + label
-{
-	background-color: #3498db;
-	color: #ffffff;
-}
-
-input.labelauty:checked:not([disabled]) + label:hover
-{
-	background-color: #72c5fd;
-}
-input.labelauty:checked + label > span.labelauty-unchecked-image
-{
-	display: none;
-}
-
-input.labelauty:checked + label > span.labelauty-unchecked
-{
-	display: none;
-}
-
-input.labelauty:checked + label > span.labelauty-checked
-{
-	display: inline-block;
-}
-
-input.labelauty.no-label:checked + label > span.labelauty-checked
-{
-	display: block;
-}
-
-/* When Disabled */
-input.labelauty[disabled] + label
-{
-	opacity: 0.5;
-}
-
-/* Add a background to (un)checked images */
-input.labelauty + label > span.labelauty-unchecked-image
-{
-	background-image: url( ../Content/images/input-unchecked.png );
-}
-
-input.labelauty + label > span.labelauty-checked-image
-{
-	background-image: url( ../Content/images/input-checked.png );
-}

+ 0 - 490
src/Masuit.MyBlogs.Core/wwwroot/Content/login/style.css

@@ -1,490 +0,0 @@
-body, div, ul, ol, li, p, i, em, h1, h2, h3, h4, a, strong, span, img, form, input, textarea, button {
-    padding: 0;
-    margin: 0;
-}
-
-body {
-    font-family: "Microsoft YaHei", "Simsun", Tahoma, Arial,"Helvetica Neue","Hiragino Sans GB", "sans-self";
-    font-size: 14px;
-    line-height: 24px;
-}
-
-@font-face {
-    font-family: 'iconfont';
-    src: url('./font/iconfont.eot'); /* IE9*/
-    src: url('./font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
-    url('./font/iconfont.woff') format('woff'), /* chrome、firefox */
-    url('./font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
-    url('./font/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
-}
-
-input, textarea {
-    outline: none;
-}
-
-li {
-    list-style: none;
-}
-
-a {
-    text-decoration: none;
-    color: inherit;
-}
-
-img {
-    border: 0;
-}
-
-.pr {
-    position: relative;
-}
-
-.pa {
-    position: absolute;
-}
-
-.pf {
-    position: fixed;
-}
-
-.f-l {
-    float: left;
-}
-
-.f-r {
-    float: right;
-}
-
-li, div, ul {
-    *zoom: 1;
-}
-
-    li:after, div:after, ul:after {
-        content: '';
-        display: table;
-        clear: both;
-    }
-
-.tran {
-    transition: all 0.3s ease-out;
-    -webkit-transition: all 0.3s ease-out;
-    -moz-transition: all 0.3s ease-out;
-    -o-transition: all 0.3s ease-out;
-}
-
-.container {
-    width: 1000px;
-    margin: 0 auto;
-}
-/*--------------样式重置------------*/
-/***********/
-
-/*.login-banner{
-    width: 100%;
-    background: url(../images/banner.jpg) center bottom no-repeat \9;
-    background: url(../images/banner.jpg) center bottom/cover no-repeat;
-}*/
-@media screen and (min-width: 320px) {
-    .login-banner {
-        height: 100px;
-    }
-}
-
-@media screen and (min-width: 480px) {
-    .login-banner {
-        height: 120px;
-    }
-}
-
-@media screen and (min-width: 640px) {
-    .login-banner {
-        height: 160px;
-    }
-}
-
-@media screen and (min-width: 768px) {
-    .login-banner {
-        height: 180px;
-    }
-}
-
-@media screen and (min-width: 1024px) {
-    .login-banner {
-        height: 200px;
-    }
-}
-
-@media screen and (min-width: 1280px) {
-    .login-banner {
-        height: 220px;
-    }
-}
-
-@media screen and (min-width: 1366px) {
-    .login-banner {
-        height: 240px;
-    }
-}
-
-@media screen and (min-width: 1680px) {
-    .login-banner {
-        height: 260px;
-    }
-}
-
-.login-banner {
-    height: 260px \9;
-}
-
-.login-box {
-    width: 320px;
-    margin: 0 auto;
-    margin-top: 100px;
-    overflow-x: hidden;
-}
-
-.box-con {
-    width: 1600px;
-}
-
-.login-con {
-    width: 300px;
-    margin: 0 10px;
-    overflow: hidden;
-}
-
-.login-box .form-group {
-    margin-top: 20px;
-}
-
-.login-box input, .signup-form {
-    width: 300px;
-    height: 50px;
-    line-height: 48px \9;
-    padding-left: 10px;
-    border: 1px #d9d9d9 solid;
-    border-radius: 5px;
-    font-size: 14px;
-    box-sizing: border-box;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    transition: all 0.3s ease-out;
-    -webkit-transition: all 0.3s ease-out;
-    -moz-transition: all 0.3s ease-out;
-}
-
-    .login-box input:focus {
-        border-color: #03a9f4;
-        box-shadow: 0 0 15px #03a9f4;
-        -webkit-box-shadow: 0 0 15px #03a9f4;
-        -moz-box-shadow: 0 0 15px #03a9f4;
-    }
-
-.login-box button {
-    width: 300px;
-    height: 50px;
-    line-height: 50px;
-    font-size: 16px;
-    border: 0;
-    background-color: #03a9f4;
-    color: #fff;
-    border-radius: 5px;
-}
-
-    .login-box button a {
-        display: block;
-    }
-
-        .login-box button a:hover {
-            padding-top: 3px;
-        }
-
-    .login-box button:hover {
-        background-color: #0096da;
-    }
-
-.from-line {
-    height: 0;
-    overflow: hidden;
-    border-top: 1px #c2c2c2 solid;
-    margin-top: 20px;
-}
-
-.a-tag {
-    position: relative;
-    display: block;
-    height: 48px;
-    border: 1px #c2c2c2 solid;
-    text-align: center;
-    line-height: 48px;
-    color: #c2c2c2;
-    border-radius: 5px;
-    background-color: #fff;
-}
-
-.blue-border {
-    border: 1px #03a9f4 solid;
-    color: #03a9f4;
-}
-
-.a-tag:hover {
-    background-color: #aaa;
-    color: #fff;
-}
-
-.blue-border:hover {
-    background-color: #03a9f4;
-    color: #fff;
-}
-
-.a-tag i {
-    position: absolute;
-    right: 20px;
-    top: 0;
-    font-size: 24px;
-    color: #fff;
-}
-
-.a-tag:hover i {
-    right: 10px;
-}
-
-.signup, .other-way, .mimachongzhi, .mobile-success {
-    width: 300px;
-    margin: 0 10px;
-}
-
-.signup-form {
-    margin-top: 20px;
-}
-
-    .signup-form input {
-        border: 0;
-        height: 48px;
-        width: 210px;
-        margin-left: -10px;
-    }
-
-        .signup-form input:focus {
-            box-shadow: 0 0 0 #fff;
-        }
-
-    .signup-form.border {
-        border-color: #03a9f4;
-        box-shadow: 0 0 15px #03a9f4;
-        -webkit-box-shadow: 0 0 15px #03a9f4;
-        -moz-box-shadow: 0 0 15px #03a9f4;
-    }
-
-    .signup-form a {
-        color: #ffffff;
-    }
-
-.view-clause {
-    padding-top: 20px;
-    line-height: 14px;
-    text-align: center;
-    color: #808080;
-}
-
-    .view-clause a {
-        color: #03a9f4;
-    }
-
-        .view-clause a:hover {
-            text-decoration: underline;
-        }
-
-a.reacquire {
-    color: #ffffff;
-    text-shadow: 1px 2px 2px #000000;
-}
-
-.error-notic {
-    color: #ffffff;
-    text-shadow: 1px 2px 2px #111111;
-    padding-bottom: 5px;
-    font-size: 1.5em;
-    display: none;
-}
-
-.login-footer {
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    width: 100%;
-    padding: 10px 0;
-    border-top: 1px #c1c1c1 solid;
-    text-align: center;
-    font-size: 12px;
-    background-color: #fff;
-    line-height: 20px;
-}
-
-    .login-footer h1 {
-        font-size: 18px;
-        font-weight: normal;
-    }
-
-.login-nav {
-    width: 100%;
-    height: 30px;
-    background-color: rgba(0,0,0,0.7);
-    color: #fff;
-    border-bottom: 1px #c1c1c1 solid;
-}
-
-    .login-nav ul {
-        padding-right: 50px;
-    }
-
-    .login-nav li {
-        float: left;
-        line-height: 30px;
-        padding: 0 10px;
-    }
-
-    .login-nav a:hover {
-        text-decoration: underline;
-        color: #03a9f4;
-    }
-
-.mobile-success {
-    padding-top: 20px;
-}
-
-    .mobile-success p {
-        text-align: center;
-        color: #666;
-    }
-
-        .mobile-success p span {
-            font-weight: bold;
-            padding: 0 10px;
-        }
-
-        .mobile-success p a {
-            color: #03a9f4;
-            padding-left: 5px;
-        }
-
-            .mobile-success p a:hover {
-                text-decoration: underline;
-            }
-
-.loading {
-    position: absolute;
-    top: 10px;
-    right: 20px;
-    display: none;
-    width: 30px;
-    height: 30px;
-}
-
-.signup-select {
-    font-size: 1.1em;
-    color: #fff;
-    text-shadow: 1px 2px 2px #000;
-}
-
-/*密码强度条*/
-#complexitywrap {
-    border: 1px solid #C5C5C5;
-    padding: 0;
-    border-radius: 5px;
-}
-
-#complexity {
-    padding: 5px 5px;
-    font-size: 18px;
-    font-weight: bold;
-    margin: 0;
-    box-shadow: 0px 0px 5px #303030;
-    border-radius: 5px;
-    color: #CCC;
-}
-
-.valided {
-    background: green;
-}
-
-.invalid {
-    background: red;
-}
-/*密码强度条*/
-
-#supersized-loader {
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    z-index: 0;
-    width: 60px;
-    height: 60px;
-    margin: -30px 0 0 -30px;
-    text-indent: -999em;
-}
-
-#supersized {
-    display: block;
-    position: fixed;
-    left: 0;
-    top: 0;
-    overflow: hidden;
-    z-index: -999;
-    height: 100%;
-    width: 100%
-}
-
-    #supersized img {
-        width: auto;
-        height: auto;
-        position: relative;
-        display: none;
-        outline: 0;
-        border: none
-    }
-
-    #supersized.speed img {
-        -ms-interpolation-mode: nearest-neighbor;
-        image-rendering: -moz-crisp-edges
-    }
-
-    #supersized.quality img {
-        -ms-interpolation-mode: bicubic;
-        image-rendering: optimizeQuality
-    }
-
-    #supersized li {
-        display: block;
-        list-style: none;
-        z-index: -30;
-        position: fixed;
-        overflow: hidden;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        background: #111
-    }
-
-    #supersized a {
-        width: 100%;
-        height: 100%;
-        display: block
-    }
-
-    #supersized li.prevslide {
-        z-index: -20
-    }
-
-    #supersized li.activeslide {
-        z-index: -10
-    }
-
-        #supersized li.activeslide img, #supersized li.prevslide img {
-            display: inline
-        }
-
-    #supersized img {
-        max-width: none !important
-    }

+ 0 - 236
src/Masuit.MyBlogs.Core/wwwroot/Scripts/jquery-labelauty.js

@@ -1,236 +0,0 @@
-/*!
- * LABELAUTY jQuery Plugin
- *
- * @file: jquery-labelauty.js
- * @author: Francisco Neves (@fntneves)
- * @site: www.francisconeves.com
- * @license: MIT License
- */
-
-(function( $ ){
-
-	$.fn.labelauty = function( options )
-	{
-		/*
-		 * Our default settings
-		 * Hope you don't need to change anything, with these settings
-		 */
-		var settings = $.extend(
-		{
-			// Development Mode
-			// This will activate console debug messages
-			development: false,
-
-			// Trigger Class
-			// This class will be used to apply styles
-			class: "labelauty",
-
-			// Use text label ?
-			// If false, then only an icon represents the input
-			label: true,
-
-			// Separator between labels' messages
-			// If you use this separator for anything, choose a new one
-			separator: "|",
-
-			// Default Checked Message
-			// This message will be visible when input is checked
-			checked_label: "Checked",
-
-			// Default UnChecked Message
-			// This message will be visible when input is unchecked
-			unchecked_label: "Unchecked",
-
-			// Minimum Label Width
-			// This value will be used to apply a minimum width to the text labels
-			minimum_width: false,
-
-			// Use the greatest width between two text labels ?
-			// If this has a true value, then label width will be the greatest between labels
-			same_width: true
-		}, options);
-
-		/*
-		 * Let's create the core function
-		 * It will try to cover all settings and mistakes of using
-		 */
-		return this.each(function()
-		{
-			var $object = $( this );
-			var use_labels = true;
-			var labels;
-			var labels_object;
-			var input_id;
-
-			// Test if object is a check input
-			// Don't mess me up, come on
-			if( $object.is( ":checkbox" ) === false && $object.is( ":radio" ) === false )
-				return this;
-
-			// Add "labelauty" class to all checkboxes
-			// So you can apply some custom styles
-			$object.addClass( settings.class );
-
-			// Get the value of "data-labelauty" attribute
-			// Then, we have the labels for each case (or not, as we will see)
-			labels = $object.attr( "data-labelauty" );
-
-			use_labels = settings.label;
-
-			// It's time to check if it's going to the right way
-			// Null values, more labels than expected or no labels will be handled here
-			if( use_labels === true )
-			{
-				if( labels == null || labels.length === 0 )
-				{
-					// If attribute has no label and we want to use, then use the default labels
-					labels_object = new Array();
-					labels_object[0] = settings.unchecked_label;
-					labels_object[1] = settings.checked_label;
-				}
-				else
-				{
-					// Ok, ok, it's time to split Checked and Unchecked labels
-					// We split, by the "settings.separator" option
-					labels_object = labels.split( settings.separator );
-
-					// Now, let's check if exist _only_ two labels
-					// If there's more than two, then we do not use labels :(
-					// Else, do some additional tests
-					if( labels_object.length > 2 )
-					{
-						use_labels = false;
-						debug( settings.development, "There's more than two labels. LABELAUTY will not use labels." );
-					}
-					else
-					{
-						// If there's just one label (no split by "settings.separator"), it will be used for both cases
-						// Here, we have the possibility of use the same label for both cases
-						if( labels_object.length === 1 )
-							debug( settings.development, "There's just one label. LABELAUTY will use this one for both cases." );
-					}
-				}
-			}
-
-			/*
-			 * Let's begin the beauty
-			 */
-
-			// Start hiding ugly checkboxes
-			// Obviously, we don't need native checkboxes :O
-			$object.css({ display : "none" });
-
-			// We don't need more data-labelauty attributes!
-			// Ok, ok, it's just for beauty improvement
-			$object.removeAttr( "data-labelauty" );
-
-			// Now, grab checkbox ID Attribute for "label" tag use
-			// If there's no ID Attribute, then generate a new one
-			input_id = $object.attr( "id" );
-
-			if( input_id == null )
-			{
-				var input_id_number = 1 + Math.floor( Math.random() * 1024000 );
-				input_id = "labelauty-" + input_id_number;
-
-				// Is there any element with this random ID ?
-				// If exists, then increment until get an unused ID
-				while( $( input_id ).length !== 0 )
-				{
-					input_id_number++;
-					input_id = "labelauty-" + input_id_number;
-					debug( settings.development, "Holy crap, between 1024 thousand numbers, one raised a conflict. Trying again." );
-				}
-
-				$object.attr( "id", input_id );
-			}
-
-			// Now, add necessary tags to make this work
-			// Here, we're going to test some control variables and act properly
-			$object.after( create( input_id, labels_object, use_labels ) );
-
-			// Now, add "min-width" to label
-			// Let's say the truth, a fixed width is more beautiful than a variable width
-			if( settings.minimum_width !== false )
-				$object.next( "label[for=" + input_id + "]" ).css({ "min-width": settings.minimum_width });
-
-			// Now, add "min-width" to label
-			// Let's say the truth, a fixed width is more beautiful than a variable width
-			if( settings.same_width != false && settings.label == true )
-			{
-				var label_object = $object.next( "label[for=" + input_id + "]" );
-				var unchecked_width = getRealWidth(label_object.find( "span.labelauty-unchecked" ));
-				var checked_width = getRealWidth(label_object.find( "span.labelauty-checked" ));
-
-				if( unchecked_width > checked_width )
-					label_object.find( "span.labelauty-checked" ).width( unchecked_width );
-				else
-					label_object.find( "span.labelauty-unchecked" ).width( checked_width );
-			}
-		});
-	};
-
-	/*
-	 * Tricky code to work with hidden elements, like tabs.
-	 * Note: This code is based on jquery.actual plugin.
-	 * https://github.com/dreamerslab/jquery.actual
-	 */
-	function getRealWidth( element )
-	{
-		var width = 0;
-		var $target = element;
-		var style = 'position: absolute !important; top: -1000 !important; ';
-
-		$target = $target.clone().attr('style', style).appendTo('body');
-		width = $target.width(true);
-		$target.remove();
-
-		return width;
-	}
-
-	function debug( debug, message )
-	{
-		if( debug && window.console && window.console.log )
-			window.console.log( "jQuery-LABELAUTY: " + message );
-	};
-
-	function create( input_id, messages_object, label )
-	{
-		var block;
-		var unchecked_message;
-		var checked_message;
-
-		if( messages_object == null )
-			unchecked_message = checked_message = "";
-		else
-		{
-			unchecked_message = messages_object[0];
-
-			// If checked message is null, then put the same text of unchecked message
-			if( messages_object[1] == null )
-				checked_message = unchecked_message;
-			else
-				checked_message = messages_object[1];
-		}
-
-		if( label == true )
-		{
-			block = '<label for="' + input_id + '">' +
-						'<span class="labelauty-unchecked-image"></span>' +
-						'<span class="labelauty-unchecked">' + unchecked_message + '</span>' +
-						'<span class="labelauty-checked-image"></span>' +
-						'<span class="labelauty-checked">' + checked_message + '</span>' +
-					'</label>';
-		}
-		else
-		{
-			block = '<label for="' + input_id + '">' +
-						'<span class="labelauty-unchecked-image"></span>' +
-						'<span class="labelauty-checked-image"></span>' +
-					'</label>';
-		}
-
-		return block;
-	};
-
-}( jQuery ));

+ 0 - 32
src/Masuit.MyBlogs.Core/wwwroot/Scripts/supersized-init.js

@@ -1,32 +0,0 @@
-jQuery(function ($) {
-    $.supersized({//参数配置项
-        // 功能
-        slide_interval: 4000,    // 转换之间的长度
-        transition: 1,    // 0 - 无,1 - 淡入淡出,2 - 滑动顶,3 - 滑动向右,4 - 滑底,5 - 滑块向左,6 - 旋转木马右键,7 - 左旋转木马
-        transition_speed: 1000,    // 转型速度
-        performance: 1,    // 0 - 正常,1 - 混合速度/质量,2 - 更优的图像质量,三优的转换速度//(仅适用于火狐/ IE浏览器,而不是Webkit的)
-
-        // 大小和位置
-        min_width: 0,    // 最小允许宽度(以像素为单位)
-        min_height: 0,    // 最小允许高度(以像素为单位)
-        vertical_center: 1,    // 垂直居中背景
-        horizontal_center: 1,    // 水平中心的背景
-        fit_always: 0,    // 图像绝不会超过浏览器的宽度或高度(忽略分钟。尺寸)
-        fit_portrait: 1,    // 纵向图像将不超过浏览器高度
-        fit_landscape: 0,    // 景观的图像将不超过宽度的浏览器
-
-        // 组件
-        slide_links: 'blank',    // 个别环节为每张幻灯片(选项:假的,'民','名','空')
-        slides: [    // 幻灯片影像
-                { image: '../../Content/images/1.jpg' },
-                { image: '../../Content/images/2.jpg' },
-                { image: '../../Content/images/3.jpg' },
-                { image: '../../Content/images/4.jpg' },
-                { image: '../../Content/images/5.jpg' },
-                { image: '../../Content/images/6.jpg' },
-                { image: '../../Content/images/7.jpg' },
-                { image: '../../Content/images/8.jpg' },
-                { image: '../../Content/images/9.jpg' }
-        ]
-    });
-});

File diff suppressed because it is too large
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/Scripts/supersized.3.2.7.min.js


Some files were not shown because too many files changed in this diff