diff --git a/Bootstrap.Admin/Controllers/AccountController.cs b/Bootstrap.Admin/Controllers/AccountController.cs index 8de99fcd..fb75ee99 100644 --- a/Bootstrap.Admin/Controllers/AccountController.cs +++ b/Bootstrap.Admin/Controllers/AccountController.cs @@ -1,7 +1,5 @@ using Bootstrap.Admin.Models; -using Bootstrap.DataAccess; using Bootstrap.Security; -using Longbow.Web; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authorization; @@ -33,9 +31,7 @@ namespace Bootstrap.Admin.Controllers await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity), new AuthenticationProperties() { IsPersistent = remember == "true" }); return Redirect("~/"); } - var mobile = Request.IsMobileDevice(); - var model = Request.IPad(); - return mobile && !model ? View("Loginm", new ModelBase()) : View("Login", new ModelBase()); + return View("Login", new ModelBase()); } /// /// Logout this instance. diff --git a/Bootstrap.Admin/Views/Account/Login.cshtml b/Bootstrap.Admin/Views/Account/Login.cshtml index a1d6a8fd..737eadad 100644 --- a/Bootstrap.Admin/Views/Account/Login.cshtml +++ b/Bootstrap.Admin/Views/Account/Login.cshtml @@ -1,8 +1,111 @@ @model ModelBase @{ ViewBag.Title = Model.Title; - Layout = "~/Views/Shared/_Login.cshtml"; + Layout = "~/Views/Shared/_Root.cshtml"; } @section css { + + + + + + + + + + -} \ No newline at end of file + + @if (!string.IsNullOrEmpty(Model.Theme)) + { + + } +} +@section javascript { + + + + + + + + + + + + + + + +} +@await Html.PartialAsync("SignIn") + diff --git a/Bootstrap.Admin/Views/Account/Loginm.cshtml b/Bootstrap.Admin/Views/Account/Loginm.cshtml deleted file mode 100644 index b743fa86..00000000 --- a/Bootstrap.Admin/Views/Account/Loginm.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@model ModelBase -@{ - ViewBag.Title = Model.Title; - Layout = "~/Views/Shared/_Login.cshtml"; -} -@section css { - -} \ No newline at end of file diff --git a/Bootstrap.Admin/Views/Shared/_Login.cshtml b/Bootstrap.Admin/Views/Shared/_Login.cshtml deleted file mode 100644 index c384d58d..00000000 --- a/Bootstrap.Admin/Views/Shared/_Login.cshtml +++ /dev/null @@ -1,110 +0,0 @@ -@model ModelBase -@{ - ViewBag.Title = Model.Title; - Layout = "~/Views/Shared/_Root.cshtml"; -} -@section css { - - - - - - - - - - - @RenderSection("css", false) - @if (!string.IsNullOrEmpty(Model.Theme)) - { - - } -} -@section javascript { - - - - - - - - - - - - - - - -} -@await Html.PartialAsync("SignIn") - diff --git a/Bootstrap.Admin/wwwroot/css/login-responsive.css b/Bootstrap.Admin/wwwroot/css/login-responsive.css index 72cc3416..49b661a7 100644 --- a/Bootstrap.Admin/wwwroot/css/login-responsive.css +++ b/Bootstrap.Admin/wwwroot/css/login-responsive.css @@ -1,12 +1,18 @@ -@media (min-width: 375px) { +@media (max-width: 767px) { .form-signin { - width: 320px; + margin: 0 auto; + background: #fff; + border-radius: 5px; + max-width: 320px; + border: solid 1px #ddd; } } @media (min-width: 768px) { body { - background: url('../images/bg2.jpg') fixed repeat; + background-color: #5bc0de; + background: url('../images/bg2.jpg') fixed no-repeat; + background-size: 100% 100%; } .container { @@ -17,22 +23,15 @@ margin: 0 auto; } - .form-signin { - border: none; - background: none; - width: auto; + .form-signin-heading { + padding: 28px 0; + background-color: transparent; } - .form-signin .form-signin-heading { - background: none; - margin-top: 10px; - } - - .form-signin .input-group { - border: solid 1px #286090; - } - .login-wrap { - margin: 30px 0 0 370px; + padding: 0; + margin: 36px 0 0 370px; + width: 280px; + height: 200px; } } diff --git a/Bootstrap.Admin/wwwroot/css/login.css b/Bootstrap.Admin/wwwroot/css/login.css index 02f5001c..ebbcc735 100644 --- a/Bootstrap.Admin/wwwroot/css/login.css +++ b/Bootstrap.Admin/wwwroot/css/login.css @@ -1,27 +1,19 @@ body { - background-color: #5bc0de; - background: url('../images/bg2.jpg') fixed no-repeat; - background-size: 100% 100%; -} - -.container { - background: url('../images/bg3.png') no-repeat; - background-size: contain; - width: 704px; - height: 404px; - margin: 0 auto; + color: #797979; + background-color: #f1f2f7; } .form-signin-heading { - padding: 28px 0; + margin: 0; + padding: 20px 15px; text-align: center; + background-color: #41cac0; + border-radius: 5px 5px 0 0; color: #fff; } .login-wrap { - margin: 36px 0 0 370px; - width: 280px; - height: 200px; + padding: 20px; } .login-footer a:last-child { @@ -33,8 +25,10 @@ color: #fff; text-transform: uppercase; font-weight: 300; - box-shadow: 1px 1px #e56b60; + font-family: 'Open Sans', sans-serif; + box-shadow: 0 4px #e56b60; margin-bottom: 20px; + outline: none !important; margin-top: -8px; } diff --git a/Bootstrap.Admin/wwwroot/css/loginm.css b/Bootstrap.Admin/wwwroot/css/loginm.css deleted file mode 100644 index 3b2a0705..00000000 --- a/Bootstrap.Admin/wwwroot/css/loginm.css +++ /dev/null @@ -1,62 +0,0 @@ -body { - color: #797979; - background-color: #f1f2f7; -} - -/*Login*/ -.form-signin { - margin: 0 auto; - background: #fff; - border-radius: 5px; - -webkit-border-radius: 5px; - border: solid 1px #ddd; -} - -.form-signin-heading { - margin: 0; - padding: 20px 15px; - text-align: center; - background: #41cac0; - border-radius: 5px 5px 0 0; - color: #fff; -} - -.login-wrap { - padding: 20px; -} - -.login-footer a:last-child { - float: right; -} - -.btn-login { - background: #f67a6e; - color: #fff; - text-transform: uppercase; - font-weight: 300; - font-family: 'Open Sans', sans-serif; - box-shadow: 0 4px #e56b60; - margin-bottom: 20px; - outline: none !important; - margin-top: -8px; -} - -@media (min-width: 375px) { - .form-signin { - width: 320px; - } -} - -.form-control:focus, .form-control.is-valid:focus, .form-control.is-invalid:focus, .btn:focus, .btn:focus:active { - box-shadow: none; -} - -.input-group-text { - background-color: #6bc3f4; - border-color: #1ca0e9; - line-height: 1.5; -} - -.form-control { - border-color: #1ca0e9; -}