@model LoginModel
@using Nop.Core
@using Nop.Core.Domain.Customers

@inject IWebHelper webHelper
@{
    Layout = "_ColumnsOne";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Login").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-login-page");

    //register URL with return URL (if specified)
    var registerUrl = Url.RouteUrl("Register", new { returnUrl = this.Context.Request.Query["returnUrl"] }, webHelper.GetCurrentRequestProtocol());
}
<div class="page login-page">
    <div class="page-title">
        <h1>@T("Account.Login.Welcome")</h1>
    </div>
    @await Html.PartialAsync("_ExternalAuthentication.Errors")
    <div class="page-body">

         @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LoginTop, additionalData = Model })

        <div class="customer-blocks">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
                    @if (Model.RegistrationType == UserRegistrationType.Disabled)
                    {
                        <div class="new-wrapper">
                            <div class="title">
                                @T("Account.Register")
                            </div>
                            <div class="text">
                                @T("Account.Register.Result.Disabled")
                            </div>
                        </div>
                    }
                    else

                    if (Model.CheckoutAsGuest)
                    {
                        <div class="new-wrapper checkout-as-guest-or-register-block">
                            <div class="title">
                                <strong>@T("Account.Login.CheckoutAsGuestOrRegister")</strong>
                            </div>
                            <div class="text">
                                @await Component.InvokeAsync(typeof(TopicBlockViewComponent), new { systemName = "CheckoutAsGuestOrRegister" })
                                <div class="col-xl-12">
                                    <div class="buttons">
                                        <input type="button" class="btn btn-secondary button-1 checkout-as-guest-button" onclick="location.href='@Url.RouteUrl("Checkout")'" value="@T("Account.Login.CheckoutAsGuest")" />
                                        <input type="button" class="btn btn-primary button-1 register-button" onclick="location.href='@registerUrl'" value="@T("Account.Register")" />
                                    </div>
                                </div>
                            </div>

                        </div>
                    }

                    else
                    {
                        <div class="new-wrapper register-block">
                            <div class="title">
                                <strong>@T("Account.Login.NewCustomer")</strong>
                            </div>
                            <div class="text">
                                <div class="card">
                                    <div class="card-body">
                                        @T("Account.Login.NewCustomerText")
                                        <div class="mt-3">
                                            <div class="buttons">
                                                <button type="button" class="btn btn-primary button-1 register-button" onclick="location.href='@registerUrl'">@T("Account.Register")</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    }
                </div>
                <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
                    <div class="returning-wrapper fieldset">
                        <form asp-route="Login" asp-route-returnurl="@Context.Request.Query["ReturnUrl"]" method="post" autocomplete="off">
                            <div asp-validation-summary="ModelOnly" class="message-error">@T("Account.Login.Unsuccessful")</div>
                            <div class="title">
                                <strong>@T("Account.Login.ReturningCustomer")</strong>
                            </div>
                            <div class="text">
                                <div class="card">
                                    <div class="card-body">
                                        <div class="form-fields">
                                            <div asp-validation-summary="ModelOnly" class="message-error alert alert-danger">@T("Account.Login.Unsuccessful")</div>
                                            @if (Model.UsernamesEnabled)
                                            {
                                                <div class="row mb-3">
                                                    <label asp-for="Username" class="col-sm-12 col-md-12 col-lg-2 col-xl-2 pl-0 pr-0" asp-postfix=":"></label>
                                                    <div class="col-sm-12 col-md-12 col-lg-10 col-xl-10">
                                                        <input asp-for="Username" class="username form-control" autofocus="autofocus" />
                                                        <span asp-validation-for="Username"></span>
                                                    </div>
                                                </div>
                                            }
                                            else
                                            {
                                                <div class="row mb-3">
                                                    <label asp-for="Email" class="col-sm-12 col-md-12 col-lg-2 col-xl-2 pl-0 pr-0" asp-postfix=":"></label>
                                                    <div class="col-sm-12 col-md-12 col-lg-10 col-xl-10">
                                                        <input asp-for="Email" class="email form-control" autofocus="autofocus" />
                                                        <span asp-validation-for="Email"></span>
                                                    </div>
                                                </div>
                                            }
                                            <div class="row mb-3">
                                                <label asp-for="Password" class="col-sm-12 col-md-12 col-lg-2 col-xl-2 pl-0 pr-0" asp-postfix=":"></label>
                                                <div class="col-sm-12 col-md-12 col-lg-10 col-xl-10">
                                                    <input asp-for="Password" class="password form-control" />
                                                    <span asp-validation-for="Password"></span>
                                                </div>
                                            </div>
                                            <div class="row mb-3 mb-0">
                                                <div class="offset-md-0 offset-lg-2 offset-xl-2 remember-wrapper">
                                                    <div class="form-check mb-0">
                                                        <input asp-for="RememberMe" class="form-check-input" />
                                                        <label for="RememberMe" class="form-check-label" asp-for="RememberMe"></label>
                                                        <span class="forgot-password">
                                                            <a asp-route="PasswordRecovery">@T("Account.Login.ForgotPassword")</a>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
                                            @if (Model.DisplayCaptcha)
                                            {
                                                <div class="row mb-3">
                                                    <div class="offset-lg-2 offset-xl-2 col-md-5 col-lg-5 col-xl-4">
                                                        <div class="captcha-box">
                                                            <nop-captcha />
                                                        </div>
                                                    </div>
                                                </div>
                                            }
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="offset-lg-2 offset-xl-2 col-md-6 col-lg-6 col-xl-6">
                                        <div class="buttons">
                                            <button class="btn btn-primary button-1 login-button" type="submit">@T("Account.Login.LoginButton")</button>
                                        </div>
                                    </div>
                                </div>
                            </div>


                        </form>
                    </div>
                </div>
            </div>
            @if (Model.RegistrationType == UserRegistrationType.Disabled)
            {
                <div class="new-wrapper">
                    <div class="title">
                        @T("Account.Register")
                    </div>
                    <div class="text">
                        @T("Account.Register.Result.Disabled")
                    </div>
                </div>
            }

        </div>
        <div class="external-authentication">
            @await Component.InvokeAsync(typeof(ExternalMethodsViewComponent), "ExternalAuthentication")
        </div>
        @await Component.InvokeAsync(typeof(TopicBlockViewComponent), new { systemName = "LoginRegistrationInfo" })
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LoginBottom, additionalData = Model })
    </div>
</div>