Upload 439 files
Browse files
src/components/admin/AdminApp.svelte
CHANGED
|
@@ -795,7 +795,7 @@
|
|
| 795 |
<p>请在 Hugging Face Space 中配置环境变量 <code>ADMIN</code> 和 <code>PASSWORD</code> 后再访问管理页。</p>
|
| 796 |
</div>
|
| 797 |
{:else if !authenticated}
|
| 798 |
-
<form class="card-base admin-login" method="post" action={`${entryPath}/login`} on:submit|preventDefault={handleLogin}>
|
| 799 |
<div class="admin-login-badge">Firefly Admin</div>
|
| 800 |
<h2>登录后台</h2>
|
| 801 |
<p>使用 Space 环境变量中的管理员账号和密码进入管理页面。</p>
|
|
@@ -1006,12 +1006,20 @@
|
|
| 1006 |
padding: 1.2rem;
|
| 1007 |
}
|
| 1008 |
.admin-login {
|
| 1009 |
-
max-width:
|
| 1010 |
margin: 0 auto;
|
| 1011 |
display: flex;
|
| 1012 |
flex-direction: column;
|
| 1013 |
gap: 0.9rem;
|
| 1014 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1015 |
.admin-login-badge, .build-pill {
|
| 1016 |
display: inline-flex;
|
| 1017 |
align-items: center;
|
|
@@ -1094,8 +1102,12 @@
|
|
| 1094 |
.admin-workbench, .two-col, .metrics-grid, .asset-grid, .editor-layout, .posts-layout { grid-template-columns: 1fr; }
|
| 1095 |
}
|
| 1096 |
@media (max-width: 800px) {
|
|
|
|
|
|
|
|
|
|
| 1097 |
.field-grid { grid-template-columns: 1fr; }
|
| 1098 |
.field-span-2 { grid-column: auto; }
|
| 1099 |
}
|
| 1100 |
</style>
|
| 1101 |
|
|
|
|
|
|
| 795 |
<p>请在 Hugging Face Space 中配置环境变量 <code>ADMIN</code> 和 <code>PASSWORD</code> 后再访问管理页。</p>
|
| 796 |
</div>
|
| 797 |
{:else if !authenticated}
|
| 798 |
+
<form class="card-base admin-login admin-login-stage" method="post" action={`${entryPath}/login`} on:submit|preventDefault={handleLogin}>
|
| 799 |
<div class="admin-login-badge">Firefly Admin</div>
|
| 800 |
<h2>登录后台</h2>
|
| 801 |
<p>使用 Space 环境变量中的管理员账号和密码进入管理页面。</p>
|
|
|
|
| 1006 |
padding: 1.2rem;
|
| 1007 |
}
|
| 1008 |
.admin-login {
|
| 1009 |
+
max-width: 30rem;
|
| 1010 |
margin: 0 auto;
|
| 1011 |
display: flex;
|
| 1012 |
flex-direction: column;
|
| 1013 |
gap: 0.9rem;
|
| 1014 |
}
|
| 1015 |
+
.admin-login-stage {
|
| 1016 |
+
position: relative;
|
| 1017 |
+
z-index: 6;
|
| 1018 |
+
border: 1px solid color-mix(in oklch, var(--line-divider) 68%, white 32%);
|
| 1019 |
+
background: color-mix(in oklch, var(--card-bg) 86%, white 14%);
|
| 1020 |
+
backdrop-filter: blur(18px);
|
| 1021 |
+
box-shadow: 0 28px 80px rgb(8 20 28 / 0.18);
|
| 1022 |
+
}
|
| 1023 |
.admin-login-badge, .build-pill {
|
| 1024 |
display: inline-flex;
|
| 1025 |
align-items: center;
|
|
|
|
| 1102 |
.admin-workbench, .two-col, .metrics-grid, .asset-grid, .editor-layout, .posts-layout { grid-template-columns: 1fr; }
|
| 1103 |
}
|
| 1104 |
@media (max-width: 800px) {
|
| 1105 |
+
.admin-login {
|
| 1106 |
+
max-width: 100%;
|
| 1107 |
+
}
|
| 1108 |
.field-grid { grid-template-columns: 1fr; }
|
| 1109 |
.field-span-2 { grid-column: auto; }
|
| 1110 |
}
|
| 1111 |
</style>
|
| 1112 |
|
| 1113 |
+
|
src/layouts/AdminLayout.astro
CHANGED
|
@@ -62,14 +62,15 @@ const isWallpaperSwitchable = backgroundWallpaper.switchable ?? true;
|
|
| 62 |
<section class="relative z-20 w-full px-2 pt-6 md:px-4 md:pt-8">
|
| 63 |
<div class="mx-auto max-w-(--page-width)">
|
| 64 |
<div class="card-base admin-hero overflow-hidden">
|
| 65 |
-
<div class="
|
| 66 |
{bannerImage ? (
|
| 67 |
<ImageWrapper
|
| 68 |
src={bannerImage}
|
| 69 |
alt="Admin banner image"
|
| 70 |
-
class="absolute inset-0 h-full w-full
|
| 71 |
loading="eager"
|
| 72 |
fetchpriority="high"
|
|
|
|
| 73 |
widths={[1280, 1920]}
|
| 74 |
sizes="100vw"
|
| 75 |
/>
|
|
@@ -77,7 +78,7 @@ const isWallpaperSwitchable = backgroundWallpaper.switchable ?? true;
|
|
| 77 |
<div class="admin-hero-fallback absolute inset-0" />
|
| 78 |
)}
|
| 79 |
<div class="absolute inset-0 admin-hero-overlay" />
|
| 80 |
-
<div class="relative admin-hero-grid
|
| 81 |
<div class="admin-hero-copy flex flex-col justify-end gap-4">
|
| 82 |
<div class="inline-flex w-fit items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-medium backdrop-blur-md">
|
| 83 |
<span class="h-2.5 w-2.5 rounded-full bg-[oklch(0.75_0.14_var(--hue))]" />
|
|
@@ -112,7 +113,7 @@ const isWallpaperSwitchable = backgroundWallpaper.switchable ?? true;
|
|
| 112 |
</div>
|
| 113 |
</section>
|
| 114 |
|
| 115 |
-
<main class="relative z-30 -mt-
|
| 116 |
<div class="mx-auto max-w-(--page-width)">
|
| 117 |
<slot />
|
| 118 |
</div>
|
|
@@ -130,6 +131,26 @@ const isWallpaperSwitchable = backgroundWallpaper.switchable ?? true;
|
|
| 130 |
linear-gradient(180deg, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.42));
|
| 131 |
}
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
.admin-hero-fallback {
|
| 134 |
background:
|
| 135 |
radial-gradient(circle at top right, rgb(255 255 255 / 0.18), transparent 36%),
|
|
@@ -175,6 +196,11 @@ const isWallpaperSwitchable = backgroundWallpaper.switchable ?? true;
|
|
| 175 |
}
|
| 176 |
|
| 177 |
@media (max-width: 959px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
.admin-hero-side {
|
| 179 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 180 |
}
|
|
|
|
| 62 |
<section class="relative z-20 w-full px-2 pt-6 md:px-4 md:pt-8">
|
| 63 |
<div class="mx-auto max-w-(--page-width)">
|
| 64 |
<div class="card-base admin-hero overflow-hidden">
|
| 65 |
+
<div class="admin-hero-frame">
|
| 66 |
{bannerImage ? (
|
| 67 |
<ImageWrapper
|
| 68 |
src={bannerImage}
|
| 69 |
alt="Admin banner image"
|
| 70 |
+
class="admin-hero-media absolute inset-0 h-full w-full"
|
| 71 |
loading="eager"
|
| 72 |
fetchpriority="high"
|
| 73 |
+
layout="none"
|
| 74 |
widths={[1280, 1920]}
|
| 75 |
sizes="100vw"
|
| 76 |
/>
|
|
|
|
| 78 |
<div class="admin-hero-fallback absolute inset-0" />
|
| 79 |
)}
|
| 80 |
<div class="absolute inset-0 admin-hero-overlay" />
|
| 81 |
+
<div class="relative admin-hero-grid h-full gap-5 p-6 text-white md:p-8">
|
| 82 |
<div class="admin-hero-copy flex flex-col justify-end gap-4">
|
| 83 |
<div class="inline-flex w-fit items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-sm font-medium backdrop-blur-md">
|
| 84 |
<span class="h-2.5 w-2.5 rounded-full bg-[oklch(0.75_0.14_var(--hue))]" />
|
|
|
|
| 113 |
</div>
|
| 114 |
</section>
|
| 115 |
|
| 116 |
+
<main class="relative z-30 -mt-14 w-full px-2 pb-10 pt-0 md:-mt-18 md:px-4">
|
| 117 |
<div class="mx-auto max-w-(--page-width)">
|
| 118 |
<slot />
|
| 119 |
</div>
|
|
|
|
| 131 |
linear-gradient(180deg, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.42));
|
| 132 |
}
|
| 133 |
|
| 134 |
+
.admin-hero-frame {
|
| 135 |
+
position: relative;
|
| 136 |
+
height: clamp(18rem, 34vw, 25rem);
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.admin-hero-media {
|
| 140 |
+
position: absolute;
|
| 141 |
+
inset: 0;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.admin-hero :global(picture),
|
| 145 |
+
.admin-hero :global(img[data-astro-image]),
|
| 146 |
+
.admin-hero :global(img) {
|
| 147 |
+
display: block;
|
| 148 |
+
width: 100%;
|
| 149 |
+
height: 100% !important;
|
| 150 |
+
max-width: none;
|
| 151 |
+
object-fit: cover;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
.admin-hero-fallback {
|
| 155 |
background:
|
| 156 |
radial-gradient(circle at top right, rgb(255 255 255 / 0.18), transparent 36%),
|
|
|
|
| 196 |
}
|
| 197 |
|
| 198 |
@media (max-width: 959px) {
|
| 199 |
+
.admin-hero-frame {
|
| 200 |
+
height: auto;
|
| 201 |
+
min-height: 17rem;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
.admin-hero-side {
|
| 205 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 206 |
}
|