Skip to content

Commit b927910

Browse files
committed
Merge branch 'giscus' into dev
2 parents 24b6870 + 2039894 commit b927910

File tree

7 files changed

+7039
-22
lines changed

7 files changed

+7039
-22
lines changed

components/Docs/PageInfo.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useMemo } from 'react';
44
import { Extension } from '../../constants/extension';
55
import { PageFrontMatter } from '../../models/PageFrontMatter';
66
import { GitHub } from '../Images/GitHub';
7+
import Giscus from "@giscus/react";
78

89
export interface IPageInfoProps {
910
items: PageFrontMatter[];
@@ -63,15 +64,31 @@ export const PageInfo: React.FunctionComponent<IPageInfoProps> = ({page, items}:
6364
}
6465

6566
<div className={`mt-16`}>
66-
<h2 className={`tracking-tight font-extrabold sm:leading-none text-3xl xl:text-4xl`}>Feedback</h2>
67+
<h2 className={`tracking-tight font-extrabold sm:leading-none text-3xl xl:text-4xl`}>Feedback/comments</h2>
6768

68-
<div className={`my-4 bg-vulcan-100 p-4`}>
69+
{/* <div className={`my-4 bg-vulcan-100 p-4`}>
6970
<p>Do you want to provide feedback about this page/content?</p>
7071
7172
<a href={feedbackUrl} className={`py-4 px-2 mt-4 inline-flex items-center h-5 bg-vulcan-300 hover:bg-vulcan-400`}>
7273
<GitHub className={`w-5 h-5 mr-2 inline`} />
7374
<span>Provide feedback</span>
7475
</a>
76+
</div> */}
77+
78+
<div className={`my-4`}>
79+
<Giscus
80+
repo="FrontMatter/feedback"
81+
repoId="R_kgDOIo5HTQ"
82+
category="Comments"
83+
categoryId="DIC_kwDOIo5HTc4CTI9X"
84+
mapping="pathname"
85+
strict="0"
86+
reactionsEnabled="0"
87+
emitMetadata="0"
88+
inputPosition="top"
89+
theme={process.env.NEXT_PUBLIC_GISCUS_THEME}
90+
lang="en"
91+
loading="lazy" />
7592
</div>
7693

7794
{

components/Page/DocsLayout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ export const DocsLayout: React.FunctionComponent<React.PropsWithChildren<IDocsLa
2020
<div className={`lg:ml-72 xl:ml-80`}>
2121

2222
<aside className={`fixed inset-y-0 left-0 z-40 contents w-72 overflow-y-auto px-6 pt-4 pb-8 lg:block xl:w-80 lg:pr-8 lg:border-r lg:border-vulcan-300`}>
23-
<div className={`fixed inset-x-0 top-0 z-50 flex h-16 items-center transition sm:px-6 lg:z-30 lg:px-8 backdrop-blur-md dark:backdrop-blur lg:left-72 xl:left-80 border-b border-vulcan-300/10 bg-vulcan-500/80`}>
24-
<div className='ml-auto'>
25-
<Header navItems={navItems} />
26-
</div>
23+
<div className='ml-auto'>
24+
<Header navItems={navItems} />
2725
</div>
2826

2927
<Home className={`hidden lg:flex h-16`} />

components/Page/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Header: React.FunctionComponent<IHeaderProps> = forwardRef(({navItems}: Re
2424
<>
2525
<header
2626
ref={ref}
27-
className={`w-full fixed inset-x-0 top-0 z-50 flex h-16 lg:h-20 items-center justify-between px-4 transition sm:px-6 lg:z-30 lg:px-8 bg-vulcan-500/80 backdrop-blur-md`}>
27+
className={`fixed inset-x-0 top-0 z-50 flex h-16 lg:h-20 items-center justify-between px-4 transition sm:px-6 lg:z-30 lg:px-8 bg-vulcan-500/80 backdrop-blur-lg ${isDocs ? "right-0 lg:left-72 xl:left-80" : ""}`}>
2828

2929
<div className="flex items-center justify-between lg:hidden w-full">
3030
<Home className='h-12' />

next.config.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,15 @@ module.exports = {
99
permanent: true
1010
},
1111
]
12-
}
13-
}
12+
},
13+
async headers() {
14+
return [
15+
{
16+
source: "/:path*",
17+
headers: [
18+
{ key: "Access-Control-Allow-Origin", value: "*" },
19+
],
20+
},
21+
]
22+
},
23+
}

0 commit comments

Comments
 (0)