Merge pull request #1332 from kcoderhtml/syntax-highlighting

feat: syntax highlighting with react-syntax-highlighter
This commit is contained in:
Max Wofford 2024-08-22 07:17:37 +00:00 committed by GitHub
commit a1075ecfe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -98,6 +98,7 @@ const ProjectView = ({
}, [readMeLink])
return (
// export a css property for each of the color and dark color
<div
{...props}
className="gaegu"
@ -108,6 +109,15 @@ const ProjectView = ({
minHeight: '100vh'
}}
>
<style>
{`
* {
--color: ${color};
--dark-color: ${darkColor};
--text-color: ${textColor};
}
`}
</style>
<div
sx={{
py: 4,

View file

@ -364,6 +364,8 @@ SOFTWARE.
.reactMarkDown pre div {
margin: 0 !important;
background-color: var(--color) !important;
filter: brightness(105%);
}
.reactMarkDown code, .reactMarkDown pre tt {