@@ -9,9 +9,10 @@ import remarkMath from 'remark-math';
9
9
import remarkBreaks from 'remark-breaks' ;
10
10
import remarkEmoji from 'remark-emoji' ;
11
11
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter" ;
12
- import { MdFileDownload , MdOutlineContentCopy } from "react-icons/md" ;
12
+ // import {MdFileDownload, MdOutlineContentCopy} from "react-icons/md";
13
13
import rehypeRaw from "rehype-raw" ;
14
14
import rehypeKatex from "rehype-katex" ;
15
+ import { CiFolderOn } from "react-icons/ci" ;
15
16
interface FileData {
16
17
repo : Repository ,
17
18
tree : {
@@ -157,7 +158,7 @@ export const RepoFiles = () => {
157
158
>
158
159
< div className = "flex items-center" >
159
160
{ file . rtype === 'tree' ? (
160
- < GitBranch size = { 18 } className = "mr-2 text-blue-500" />
161
+ < CiFolderOn size = { 18 } className = "mr-2 text-blue-500" />
161
162
) : (
162
163
< FileText size = { 18 } className = "mr-2" />
163
164
) }
@@ -195,25 +196,25 @@ export const RepoFiles = () => {
195
196
components = { {
196
197
code ( { children, className} ) {
197
198
const match : any = / l a n g u a g e - ( \w + ) / . exec ( className || "" ) ;
198
- let [ isShowCode , setIsShowCode ] = useState ( true ) ;
199
+ let [ isShowCode , _setIsShowCode ] = useState ( true ) ;
199
200
return (
200
201
< >
201
- < div className = "code-header" >
202
- < div
203
- style = { { cursor : "pointer" , marginRight : "10px" , transformOrigin : "8px" } }
204
- className = { isShowCode ? "code-rotate-down" : "code-rotate-right" }
205
- onClick = { ( ) => setIsShowCode ( ! isShowCode ) }
206
- >
207
- < MdFileDownload />
208
- </ div >
209
- < div > { match && match [ 1 ] } </ div >
210
- < div
211
- className = "preview-code-copy"
212
- >
213
- { / *{isShowCopy && <span className="opacity-0-1-0 copy-success">Success</span>}*/}
214
- < MdOutlineContentCopy />
215
- </ div >
216
- </ div >
202
+ { /* <div className="code-header">*/ }
203
+ { /* <div*/ }
204
+ { /* style={{cursor: "pointer", marginRight: "10px", transformOrigin: "8px"}}*/ }
205
+ { /* className={isShowCode ? "code-rotate-down" : "code-rotate-right"}*/ }
206
+ { /* onClick={() => setIsShowCode(!isShowCode)}*/ }
207
+ { /* >*/ }
208
+ { /* <MdFileDownload/>*/ }
209
+ { /* </div>*/ }
210
+ { /* <div>{match && match[1]}</div>*/ }
211
+ { /* <div*/ }
212
+ { /* className="preview-code-copy"*/ }
213
+ { /* >*/ }
214
+ { /* /! *{isShowCopy && <span className="opacity-0-1-0 copy-success">Success</span>}*!/ */}
215
+ { /* <MdOutlineContentCopy/>*/ }
216
+ { /* </div>*/ }
217
+ { /* </div>*/ }
217
218
{ isShowCode && (
218
219
< SyntaxHighlighter
219
220
showLineNumbers = { true }
@@ -227,42 +228,54 @@ export const RepoFiles = () => {
227
228
} ,
228
229
h1 ( { children} ) {
229
230
return (
230
- < h1 id = { "heading-" + ++ index } className = "heading" >
231
+ < h1 id = { "heading-" + ++ index } style = { {
232
+ fontSize : "32px"
233
+ } } className = "heading" >
231
234
{ children }
232
235
</ h1 >
233
236
) ;
234
237
} ,
235
238
h2 ( { children} ) {
236
239
return (
237
- < h2 id = { "heading-" + ++ index } className = "heading" >
240
+ < h2 id = { "heading-" + ++ index } style = { {
241
+ fontSize : "24px"
242
+ } } className = "heading" >
238
243
{ children }
239
244
</ h2 >
240
245
) ;
241
246
} ,
242
247
h3 ( { children} ) {
243
248
return (
244
- < h3 id = { "heading-" + ++ index } className = "heading" >
249
+ < h3 style = { {
250
+ fontSize : "18.72px"
251
+ } } id = { "heading-" + ++ index } className = "heading" >
245
252
{ children }
246
253
</ h3 >
247
254
) ;
248
255
} ,
249
256
h4 ( { children} ) {
250
257
return (
251
- < h4 id = { "heading-" + ++ index } className = "heading" >
258
+ < h4 style = { {
259
+ fontSize : "16px"
260
+ } } id = { "heading-" + ++ index } className = "heading" >
252
261
{ children }
253
262
</ h4 >
254
263
) ;
255
264
} ,
256
265
h5 ( { children} ) {
257
266
return (
258
- < h5 id = { "heading-" + ++ index } className = "heading" >
267
+ < h5 style = { {
268
+ fontSize : "13.28px"
269
+ } } id = { "heading-" + ++ index } className = "heading" >
259
270
{ children }
260
271
</ h5 >
261
272
) ;
262
273
} ,
263
274
h6 ( { children} ) {
264
275
return (
265
- < h6 id = { "heading-" + ++ index } className = "heading" >
276
+ < h6 style = { {
277
+ fontSize : "12px"
278
+ } } id = { "heading-" + ++ index } className = "heading" >
266
279
{ children }
267
280
</ h6 >
268
281
) ;
0 commit comments