refactor: 优化前端布局结构并移除管理页面链接
This commit is contained in:
1 parent
36b943896b
commit
922811afd8
2 files changed
+13
-2
No files matched your search
+11
-1
@@ -34,7 +34,17 @@ body {
|
||||
font-family: var(--font-sans);
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.8;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.frontend-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.frontend-layout > main {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
{#if $page.url.pathname.startsWith('/admin')}
|
||||
{@render children()}
|
||||
{:else}
|
||||
<div class="frontend-layout">
|
||||
<header class="header {scrolled ? 'scrolled' : ''}">
|
||||
<div class="container wide">
|
||||
<a href="/" class="brand">{$page.data.site?.title || 'BlogFlare'}</a>
|
||||
@@ -41,7 +42,6 @@
|
||||
<a href="/" class={$page.url.pathname === '/' ? 'active' : ''}>首页</a>
|
||||
<a href="/archive" class={$page.url.pathname.startsWith('/posts') || $page.url.pathname.startsWith('/archive') ? 'active' : ''}>{$page.data.aliases?.post || '文章'}</a>
|
||||
<a href="/about" class={$page.url.pathname.startsWith('/about') ? 'active' : ''}>关于</a>
|
||||
<a href="/admin" class={$page.url.pathname.startsWith('/admin') ? 'active' : ''}>后台</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@@ -83,4 +83,5 @@
|
||||
</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
{/if}
|
||||
Reference in new issue
Block a user