Skip to content

Commit

Permalink
first attempt at theme hack
Browse files Browse the repository at this point in the history
  • Loading branch information
bodobraegger committed Sep 1, 2023
1 parent 99b9476 commit 4c12b4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ function Section(props: Props) {
})
let classes=`section-title section-${props.section.sorting}`;
const root = document.documentElement;
if(props.section.color_primary)
if(props.section.color_primary){
root.style.setProperty('--color-primary', props.section.color_primary);
if(props.section.color_primary_light)
root.style.setProperty('--color-accent-emphasis', props.section.color_primary);
}

if(props.section.color_primary_light) {
root.style.setProperty('--color-primary-light', props.section.color_primary_light);
}


return <div className='content'>
Expand Down
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
:root {
--color-primary: #521d3a;
--color-primary-light: #8c3c4f;
--color-accent-emphasis: #8c3c4f;
--lightness: 120%;
--line-height: 1.5;
}
Expand Down

0 comments on commit 4c12b4e

Please sign in to comment.