Skip to content

Commit adf841a

Browse files
feat: custom renderers
1 parent 3cf4a2a commit adf841a

File tree

6 files changed

+44
-17
lines changed

6 files changed

+44
-17
lines changed

apps/web/app/globals.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
2+
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
3+
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
4+
15
@tailwind base;
26
@tailwind components;
37
@tailwind utilities;

apps/web/components/Blog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ export const Blog = ({
4040
</div>
4141
);
4242
};
43+

apps/web/components/CodeBlock.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
font-size: 15px;
55
word-wrap: break-word;
66
white-space: pre-wrap;
7-
background: #0f172a;
7+
background: #020617;
88
overflow: auto;
99
line-height: 1.6;
1010
border: 1px solid #10b981;

apps/web/components/NotionRenderer.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,36 @@ export const NotionRenderer = ({ recordMap }: { recordMap: any }) => {
99
const { resolvedTheme } = useTheme();
1010

1111
return (
12-
<div className="w-full">
12+
<div className=".notion_ w-full .notion-bg-black">
1313
<style>
14-
{`
15-
.notion-header {
16-
display: none !important;
17-
}
14+
{`
15+
.notion-app {
16+
background: #111827;
17+
}
18+
.notion-title{
19+
font-family: open-montserrat;
20+
font-size: xxx-large;
21+
}
22+
.notion-list li{
23+
font-size: larger;
24+
font-family: open-poppins
25+
}
26+
.notion-text{
27+
font-size: larger;
28+
font-family: open-poppins
29+
}
30+
.notion-header {
31+
display: none !important;
32+
}
33+
.notion-page: {
34+
padding: 0px !important;
35+
}
1836
19-
.notion-page: {
20-
padding: 0px !important;
21-
}
2237
`}
2338
</style>
2439
<div className="rounded-full">
2540
<NotionRendererLib
41+
className="text-red-500 "
2642
components={{
2743
Code: CodeBlock,
2844
}}

apps/web/components/mcq/MCQPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ const MCQPanel = ({ problem }: { problem: Problem & { notionRecordMap: any } })
3333
};
3434

3535
export default MCQPanel;
36+

apps/web/tailwind.config.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22
module.exports = {
33
darkMode: ["class"],
44
content: [
5-
'../../packages/ui/**/*.{ts,tsx}',
6-
'./app/**/*.{ts,tsx}',
7-
'./pages/**/*.{ts,tsx}',
8-
'./components/**/*.{ts,tsx}',
9-
'./app/**/*.{ts,tsx}',
10-
'./src/**/*.{ts,tsx}',
11-
'./screens/**/*{.ts,tsx}',
5+
"../../packages/ui/**/*.{ts,tsx}",
6+
"./app/**/*.{ts,tsx}",
7+
"./pages/**/*.{ts,tsx}",
8+
"./components/**/*.{ts,tsx}",
9+
"./app/**/*.{ts,tsx}",
10+
"./src/**/*.{ts,tsx}",
11+
"./screens/**/*{.ts,tsx}",
1212
],
1313
prefix: "",
1414
theme: {
15+
fontFamily: {
16+
"open-talk": ["Open Sans", " sans - serif"],
17+
"open-poppins": ["Poppins", "sans-serif"],
18+
"open-montserrat": ["Montserrat Alternates", "sans-serif"]
19+
},
1520
container: {
1621
center: true,
1722
padding: "2rem",
@@ -77,4 +82,4 @@ module.exports = {
7782
},
7883
},
7984
plugins: [require("tailwindcss-animate")],
80-
}
85+
};

0 commit comments

Comments
 (0)