Skip to content

Commit

Permalink
Merge pull request tangly1024#1835 from tangly1024/fix/heo-404
Browse files Browse the repository at this point in the history
heo 404
  • Loading branch information
tangly1024 committed Jan 30, 2024
2 parents 71ddd70 + bc38c51 commit b6cdc91
Showing 1 changed file with 5 additions and 21 deletions.
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

0 comments on commit b6cdc91

Please sign in to comment.