-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(LoginTemplate): add animation for temple5 #6434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,53 +23,80 @@ | |
| <div class="login-container"> | ||
| <div class="login-box animate-fade-in"> | ||
| <div class="header-row"> | ||
| @if (isEmailEntered) | ||
| @if (!isAuth) | ||
| { | ||
| <button @onclick="GoBack" aria-label="返回" class="back-button"> | ||
| <span> | ||
| <i class="fa-solid fa-arrow-left"></i> | ||
| </span> | ||
| </button> | ||
| if (isEmailEntered) | ||
| { | ||
| <button @onclick="GoBack" aria-label="返回" class="back-button"> | ||
| <span> | ||
| <i class="fa-solid fa-arrow-left"></i> | ||
| </span> | ||
| </button> | ||
| } | ||
|
|
||
| <div class="logo-container"> | ||
| <h1 class="blazor-text">BootstrapBlazor</h1> | ||
| </div> | ||
| } | ||
| else | ||
| { | ||
| <div class="logo-container"> | ||
| <h1 class="blazor-text">BootstrapBlazor</h1> | ||
| </div> | ||
| } | ||
| <div class="logo-container"> | ||
| <h1 class="blazor-text">BootstrapBlazor</h1> | ||
| </div> | ||
| </div> | ||
| @if (!isEmailEntered) | ||
| { | ||
| <h2>登录</h2> | ||
| <h3>登录</h3> | ||
| <p class="subtitle">使用你的 BootstrapBlazor 帐户。</p> | ||
| <BootstrapInput type="email" class="input" placeholder="电子邮件或电话号码" @bind-Value="email" /> | ||
| <BootstrapInput type="email" class="input" placeholder="电子邮件或电话号码" @bind-Value="email"></BootstrapInput> | ||
| <div class="error" hidden="@(!showEmailError)">请输入有效的电子邮件地址或电话号码</div> | ||
| <Button class="button" Color="Color.Primary" OnClick="OnEmailSubmit">下一步</Button> | ||
| <div class="links"> | ||
| <a href="#">忘记用户名?</a> | ||
| <a href="#" @onclick:preventDefault>忘记用户名?</a> | ||
| </div> | ||
| <div class="small"> | ||
| 不熟悉 BootstrapBlazor?<a href="/">去看文档</a> | ||
| </div> | ||
| } | ||
| else | ||
| else if (!isAuth) | ||
| { | ||
| <h2>输入你的密码</h2> | ||
| <h3>输入你的密码</h3> | ||
| <p class="email-display">@email</p> | ||
| <BootstrapInput type="password" class="input" placeholder="密码" @bind-Value="password" /> | ||
| <BootstrapInput type="password" class="input" placeholder="密码" @bind-Value="password"></BootstrapInput> | ||
| <div class="links"> | ||
| <a href="#">忘记了密码?</a> | ||
| <a href="#" @onclick:preventDefault>忘记了密码?</a> | ||
| </div> | ||
| <Button class="button" Color="Color.Primary">下一步</Button> | ||
| <Button class="button" Color="Color.Primary" OnClick="OnPasswordSubmit">下一步</Button> | ||
| <div class="links"> | ||
| <a href="#">其他登录方法</a> | ||
| <a href="#" @onclick:preventDefault>其他登录方法</a> | ||
| </div> | ||
| } | ||
| else | ||
| { | ||
| <div class="email-display2"><span>@email</span></div> | ||
| <h5 class="text-center mt-3 mb-0">欢迎,您已成功登录</h5> | ||
| <div class="login-video-wrap"> | ||
| <video class="login-video" autoplay="autoplay" playsinline="playsinline" disablepictureinpicture=""> | ||
| <source src="samples/login5/loading1.mp4" type="video/mp4; codecs=av01.0.05M.08"> | ||
| <source src="samples/login5/loading.mov" type="video/quicktime; codecs=hvc1.1.6.H120.b0"> | ||
| <source src="samples/login5/loading.webm" type="video/webm; codecs=vp9"> | ||
| <source src="samples/login5/loading.mp4" type="video/mp4; codecs=avc1.42E01E"> | ||
| <img src="samples/login5/loading.png" alt="" role="presentation"> | ||
| </video> | ||
| </div> | ||
| <p class="text-center text-muted" style="font-size: 0.75rem;">此登录高仿微软登录 UI</p> | ||
| <Button class="button" Color="Color.Primary" OnClick="OnEnterSubmit">进入</Button> | ||
ArgoZhang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| @code { | ||
| private bool isEmailEntered = false; | ||
| private string email = ""; | ||
| private string password = ""; | ||
| private bool isAuth = false; | ||
| private string email = "[email protected]"; | ||
| private string password = "123456"; | ||
| private bool showEmailError = false; | ||
|
|
||
| private void OnEmailSubmit() | ||
|
|
@@ -85,6 +112,18 @@ | |
| } | ||
| } | ||
|
|
||
| private void OnPasswordSubmit() | ||
| { | ||
| // 数据库检查密码逻辑可以在这里实现 | ||
| // 演示代码一律通过 | ||
| isAuth = true; | ||
| } | ||
|
|
||
| private void OnEnterSubmit() | ||
| { | ||
|
|
||
| } | ||
|
|
||
| private void GoBack() | ||
| { | ||
| isEmailEntered = false; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.