@@ -11,6 +11,7 @@ import { siteConfig } from '@/lib/config'
11
11
import { useGlobal } from '@/lib/global'
12
12
import { isBrowser } from '@/lib/utils'
13
13
import { getShortId } from '@/lib/utils/pageId'
14
+ import { SignIn , SignUp } from '@clerk/nextjs'
14
15
import dynamic from 'next/dynamic'
15
16
import Link from 'next/link'
16
17
import { useRouter } from 'next/router'
@@ -164,7 +165,7 @@ const LayoutBase = props => {
164
165
{ /* 中间内容区域 */ }
165
166
< div
166
167
id = 'center-wrapper'
167
- className = 'dark:bg-hexo-black-gray flex flex-col justify-between w-full relative z-10 pt-14 min-h-screen' >
168
+ className = 'flex flex-col justify-between w-full relative z-10 pt-14 min-h-screen' >
168
169
< div
169
170
id = 'container-inner'
170
171
className = { `w-full ${ fullWidth ? 'px-5' : 'max-w-3xl px-3 lg:px-0' } justify-center mx-auto` } >
@@ -473,6 +474,58 @@ const LayoutTagIndex = props => {
473
474
)
474
475
}
475
476
477
+ /**
478
+ * 登录页面
479
+ * @param {* } props
480
+ * @returns
481
+ */
482
+ const LayoutSignIn = props => {
483
+ const { post } = props
484
+ const enableClerk = process . env . NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
485
+
486
+ return (
487
+ < >
488
+ < div className = 'grow mt-20' >
489
+ { /* clerk预置表单 */ }
490
+ { enableClerk && (
491
+ < div className = 'flex justify-center py-6' >
492
+ < SignIn />
493
+ </ div >
494
+ ) }
495
+ < div id = 'article-wrapper' >
496
+ < NotionPage post = { post } />
497
+ </ div >
498
+ </ div >
499
+ </ >
500
+ )
501
+ }
502
+
503
+ /**
504
+ * 注册页面
505
+ * @param {* } props
506
+ * @returns
507
+ */
508
+ const LayoutSignUp = props => {
509
+ const { post } = props
510
+ const enableClerk = process . env . NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
511
+
512
+ return (
513
+ < >
514
+ < div className = 'grow mt-20' >
515
+ { /* clerk预置表单 */ }
516
+ { enableClerk && (
517
+ < div className = 'flex justify-center py-6' >
518
+ < SignUp />
519
+ </ div >
520
+ ) }
521
+ < div id = 'article-wrapper' >
522
+ < NotionPage post = { post } />
523
+ </ div >
524
+ </ div >
525
+ </ >
526
+ )
527
+ }
528
+
476
529
export {
477
530
Layout404 ,
478
531
LayoutArchive ,
@@ -481,6 +534,8 @@ export {
481
534
LayoutIndex ,
482
535
LayoutPostList ,
483
536
LayoutSearch ,
537
+ LayoutSignIn ,
538
+ LayoutSignUp ,
484
539
LayoutSlug ,
485
540
LayoutTagIndex ,
486
541
CONFIG as THEME_CONFIG
0 commit comments