Skip to content

Commit 5ce83b4

Browse files
committed
update admin login interface
1 parent 3df8b31 commit 5ce83b4

File tree

2 files changed

+51
-54
lines changed

2 files changed

+51
-54
lines changed

CoreHome.Admin/Views/Home/Index.cshtml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34,55 +34,56 @@
3434
</head>
3535
<body>
3636

37-
<div id="imgbg" style="background-image:url('@await BingWallpaperService.GetUrl()');"></div>
37+
<div id="imgbg" style="background-image:url('@await BingWallpaperService.GetUrl()');">
38+
<div id="content">
39+
40+
<img id="user" src="@OssService.GetAvatar()" />
41+
42+
<div id="loginCarousel" class="carousel slide pl-4 pr-4" data-ride="carousel" data-interval="false">
43+
<div class="carousel-inner">
44+
45+
<div class="carousel-item">
46+
<h4>Login with Password</h4>
47+
<form method="post" asp-controller="home" asp-action="VerifyPassword">
48+
<div class="form-group pt-2">
49+
<input name="pwd" type="password" class="form-control" placeholder="Enter the password" />
50+
</div>
51+
<button type="submit" class="btn btn-dark" onclick="changeLoginFunc(0)">Login</button>
52+
</form>
53+
</div>
54+
55+
<div class="carousel-item">
56+
<h4>Login with verification code</h4>
57+
<form method="post" asp-controller="home" asp-action="VerifyPassword">
58+
<button id="btn_login" type="button" class="btn btn-dark mt-2" onclick="login()">Get verification code</button>
59+
<div class="form-group mt-3">
60+
<input name="pwd" type="password" class="form-control" placeholder="Enter the verification code" />
61+
</div>
62+
<button type="submit" class="btn btn-dark" onclick="changeLoginFunc(1)">Login</button>
63+
</form>
64+
</div>
3865

39-
<div id="content">
40-
41-
<img id="user" src="@OssService.GetAvatar()" />
42-
43-
<div id="loginCarousel" class="carousel slide pl-4 pr-4" data-ride="carousel" data-interval="false">
44-
<div class="carousel-inner">
45-
46-
<div class="carousel-item">
47-
<h4>Login with Password</h4>
48-
<form method="post" asp-controller="home" asp-action="VerifyPassword">
49-
<div class="form-group pt-2">
50-
<input name="pwd" type="password" class="form-control" placeholder="Enter the password" />
51-
</div>
52-
<button type="submit" class="btn btn-dark" onclick="changeLoginFunc(0)">Login</button>
53-
</form>
54-
</div>
55-
56-
<div class="carousel-item">
57-
<h4>Login with verification code</h4>
58-
<form method="post" asp-controller="home" asp-action="VerifyPassword">
59-
<button id="btn_login" type="button" class="btn btn-dark mt-2" onclick="login()">Get verification code</button>
60-
<div class="form-group mt-3">
61-
<input name="pwd" type="password" class="form-control" placeholder="Enter the verification code" />
62-
</div>
63-
<button type="submit" class="btn btn-dark" onclick="changeLoginFunc(1)">Login</button>
64-
</form>
6566
</div>
6667

68+
<a class="carousel-control-prev" href="#loginCarousel" role="button" data-slide="prev">
69+
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="black" class="bi bi-chevron-compact-left" viewBox="0 0 16 16">
70+
<path fill-rule="evenodd" d="M9.224 1.553a.5.5 0 0 1 .223.67L6.56 8l2.888 5.776a.5.5 0 1 1-.894.448l-3-6a.5.5 0 0 1 0-.448l3-6a.5.5 0 0 1 .67-.223z" />
71+
</svg>
72+
</a>
73+
74+
<a class="carousel-control-next" href="#loginCarousel" role="button" data-slide="next">
75+
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="black" class="bi bi-chevron-compact-right" viewBox="0 0 16 16">
76+
<path fill-rule="evenodd" d="M6.776 1.553a.5.5 0 0 1 .671.223l3 6a.5.5 0 0 1 0 .448l-3 6a.5.5 0 1 1-.894-.448L9.44 8 6.553 2.224a.5.5 0 0 1 .223-.671z" />
77+
</svg>
78+
</a>
6779
</div>
6880

69-
<a class="carousel-control-prev" href="#loginCarousel" role="button" data-slide="prev">
70-
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="black" class="bi bi-chevron-compact-left" viewBox="0 0 16 16">
71-
<path fill-rule="evenodd" d="M9.224 1.553a.5.5 0 0 1 .223.67L6.56 8l2.888 5.776a.5.5 0 1 1-.894.448l-3-6a.5.5 0 0 1 0-.448l3-6a.5.5 0 0 1 .67-.223z" />
72-
</svg>
73-
</a>
74-
75-
<a class="carousel-control-next" href="#loginCarousel" role="button" data-slide="next">
76-
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="black" class="bi bi-chevron-compact-right" viewBox="0 0 16 16">
77-
<path fill-rule="evenodd" d="M6.776 1.553a.5.5 0 0 1 .671.223l3 6a.5.5 0 0 1 0 .448l-3 6a.5.5 0 1 1-.894-.448L9.44 8 6.553 2.224a.5.5 0 0 1 .223-.671z" />
78-
</svg>
79-
</a>
80-
</div>
81+
<footer>
82+
<hr />
83+
<p>&copy; @DateTime.Now.Year - @ViewBag.Profile.Name</p>
84+
</footer>
8185

82-
<footer>
83-
<hr />
84-
<p>&copy; @DateTime.Now.Year - @ViewBag.Profile.Name</p>
85-
</footer>
86+
</div>
8687
</div>
8788

8889
<script type="text/javascript" src="~/js/home/index.min.js"></script>

CoreHome.Admin/wwwroot/css/home/index.css

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
#imgbg {
2-
position: absolute;
3-
top: 0;
4-
left: 0;
5-
width: 100%;
2+
width: 100vw;
63
height: 100vh;
74
background-size: cover;
5+
display: flex;
6+
justify-content: center;
7+
align-items: center;
88
}
99

1010
#content {
1111
text-align: center;
12-
position: absolute;
13-
left: 50%;
14-
top: 50%;
1512
width: 400px;
16-
margin-left: -200px;
17-
margin-top: -200px;
13+
margin-bottom: 50px;
1814
background-color: rgba(255, 255, 255, 0.3);
1915
backdrop-filter: saturate(180%) blur(10px);
2016
box-shadow: 0 0 20px 10px rgba(0,0,0,.15);
@@ -33,8 +29,8 @@ form {
3329
width: 80%;
3430
}
3531

36-
footer{
37-
margin-top:20px;
32+
footer {
33+
margin-top: 20px;
3834
}
3935

4036
.btn {

0 commit comments

Comments
 (0)