Browse Source

修复一些问题

re
dash 3 months ago
parent
commit
f073056ae3
  1. BIN
      database/development.sqlite3-shm
  2. 7
      public/lib/simplebar-shim.css
  3. 4
      src/views/layouts/empty.pug
  4. 2
      src/views/page/index/index.pug
  5. 124
      src/views/page/login/index.pug

BIN
database/development.sqlite3-shm

Binary file not shown.

7
public/lib/simplebar-shim.css

@ -1,13 +1,16 @@
.simplebar-content {
min-height: 100%;
flex: 1;
display: flex;
flex-direction: column;
> :nth-child(1) {
flex: 1;
}
}
.simplebar-content-wrapper {
display: flex;
flex-direction: column;
}
.simplebar-scrollbar::before {
background-color: #bdbdbd;
border-radius: 0;

4
src/views/layouts/empty.pug

@ -7,7 +7,7 @@ block $$head
block $$content
nav.navbar(class="relative")
.placeholder(class="h-[45px] w-full opacity-0")
.placeholder.mb-5(class="h-[45px] w-full opacity-0")
.fixed-container(class="shadow fixed bg-white h-[45px] top-0 left-0 right-0 z-10")
.container.clearfix(class="h-full")
.navbar-brand
@ -54,7 +54,7 @@ block $$content
.page.container
block pageContent
footer.footer.shadow.mt-10
footer.footer.shadow.mt-5
.footer-panel(class="bg-white border-t border-gray-200")
.footer-content.container(class="pt-12 pb-6")
.footer-main(class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8")

2
src/views/page/index/index.pug

@ -39,7 +39,7 @@ mixin empty()
block
block pageContent
div(class="mt-[20px]")
div
h2(class="text-[20px] font-bold mb-[10px]") 接口列表
if apiList && apiList.length > 0
.api.list

124
src/views/page/login/index.pug

@ -4,113 +4,17 @@ block pageScripts
script(src="js/login.js")
block pageContent
.login-container
.login-card
span.back-home-text
a(href="/", title="返回首页") 返回首页
h2 登录
form#login-form(action="/login" method="post")
.form-group
label(for="username") 用户名
input#username(type="text" name="username" placeholder="请输入用户名" required)
.form-group
label(for="password") 密码
input#password(type="password" name="password" placeholder="请输入密码" required)
button.login-btn(type="submit") 登录
if error
.login-error= error
// 页面内联样式优化
style.
.login-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 80vh;
}
.login-card {
background: #fff;
border-radius: 24px;
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
padding: 2.5rem 2.5rem 2rem 2.5rem;
min-width: 380px;
max-width: 96vw;
width: 420px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.back-home-text {
position: absolute;
left: 24px;
top: 18px;
font-size: 0.98rem;
color: #bbb;
font-weight: 500;
letter-spacing: 1px;
}
.back-home-text a {
color: #bbb;
text-decoration: none;
transition: color 0.2s;
}
.back-home-text a:hover {
color: #7ec6f7;
text-decoration: underline;
}
.login-card h2 {
margin-bottom: 1.5rem;
font-weight: 600;
color: #333;
letter-spacing: 2px;
}
.form-group {
width: 100%;
margin-bottom: 1.4rem;
display: flex;
flex-direction: column;
align-items: flex-start;
}
.form-group label {
margin-bottom: 0.5rem;
color: #444;
font-size: 1.13rem;
font-weight: 600;
letter-spacing: 1px;
}
.form-group input {
width: 100%;
padding: 0.7rem 1.1rem;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-size: 1.08rem;
outline: none;
transition: border 0.2s;
}
.form-group input:focus {
border-color: #7ec6f7;
}
.login-btn {
width: 100%;
padding: 0.8rem 0;
border: none;
border-radius: 20px;
background: linear-gradient(135deg, #7ec6f7 0%, #ff8ca8 100%);
color: #fff;
font-size: 1.13rem;
font-weight: 600;
cursor: pointer;
box-shadow: 0 2px 8px rgba(126,198,247,0.12);
transition: background 0.2s, box-shadow 0.2s;
margin-top: 0.7rem;
}
.login-btn:hover {
background: linear-gradient(135deg, #5bb0e6 0%, #ff6f91 100%);
box-shadow: 0 4px 16px rgba(255,140,168,0.12);
}
.login-error {
color: #ff4d4f;
margin-top: 1rem;
font-size: 0.98rem;
text-align: center;
}
div.h-full.bg-red-400 sada
//- .flex.items-center.justify-center.bg-base-200.flex-1
//- .w-full.max-w-md.bg-base-100.shadow-xl.rounded-xl.p-8
//- h2.text-2xl.font-bold.text-center.mb-6.text-base-content 登录
//- form#login-form(action="/login" method="post" class="space-y-5")
//- .form-group
//- label(for="username" class="block mb-1 text-base-content") 用户名
//- input#username(type="text" name="username" placeholder="请输入用户名" required class="input input-bordered w-full")
//- .form-group
//- label(for="password" class="block mb-1 text-base-content") 密码
//- input#password(type="password" name="password" placeholder="请输入密码" required class="input input-bordered w-full")
//- button.login-btn(type="submit" class="btn btn-primary w-full") 登录
//- if error
//- .login-error.mt-4.text-error.text-center= error

Loading…
Cancel
Save