Skip to content
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

heo 404 #1835

Merged
merged 1 commit into from
Jan 30, 2024
Merged

heo 404 #1835

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 5 additions & 21 deletions themes/heo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const LayoutBase = props => {
// 全屏模式下的最大宽度
const { fullWidth } = useGlobal()
const router = useRouter()
console.log(router)

const headerSlot = (
<header>
Expand All @@ -81,7 +80,7 @@ const LayoutBase = props => {
)

// 右侧栏 用户信息+标签列表
const slotRight = fullWidth ? null : <SideRight {...props} />
const slotRight = (router.route === '/404' || fullWidth) ? null : <SideRight {...props} />

const maxWidth = fullWidth ? 'max-w-[96rem] mx-auto' : 'max-w-[86rem]' // 普通最大宽度是86rem和顶部菜单栏对齐,留空则与窗口对齐

Expand Down Expand Up @@ -349,26 +348,11 @@ const LayoutSlug = props => {
* @returns
*/
const Layout404 = props => {
const { meta, siteInfo } = props
// const { meta, siteInfo } = props
const { onLoading, fullWidth } = useGlobal()
return (
<div
id="theme-heo"
className="bg-[#f7f9fe] dark:bg-[#18171d] h-full min-h-screen flex flex-col"
>
{/* 网页SEO */}
<CommonHead meta={meta} siteInfo={siteInfo} />
<Style />

{/* 顶部嵌入 导航栏,首页放hero,文章页放文章详情 */}
<header>
{/* 顶部导航 */}
<div id="nav-bar-wrapper" className="h-16">
<NavBar {...props} />
</div>
</header>

{/* 主区块 */}
<>
{/* 主区块 */}
<main
id="wrapper-outer"
className={`flex-grow ${fullWidth ? '' : 'max-w-4xl'} w-screen mx-auto px-5`}
Expand Down Expand Up @@ -414,7 +398,7 @@ const Layout404 = props => {
</Transition>
</div>
</main>
</div>
</>
)
}

Expand Down