Skip to content

Commit

Permalink
feat(callout) Theme matching callouts
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Aug 23, 2024
1 parent 04eddbf commit ab1b468
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Home
enableToc: false
---
> [!important] PLASTIC IS HIRING!
> [!custom] PLASTIC IS HIRING!
> Check out our [[Work at Plastic|open positions here]].
Welcome to our collaborative second brain.
Expand Down
2 changes: 2 additions & 0 deletions quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const config: QuartzConfig = {
dark: "#2b2b2b",
secondary: "#4e4e4e",
tertiary: "#FF5A7E",
customCallout: "#db424210",
highlight: "rgba(128, 128, 128, 0.15)",
},
darkMode: {
Expand All @@ -45,6 +46,7 @@ const config: QuartzConfig = {
secondary: "#7C7C7C",
tertiary: "#09FEF8",
highlight: "rgba(125, 125, 125, 0.15)",
customCallout: "#00b8d410",
},
},
},
Expand Down
33 changes: 33 additions & 0 deletions quartz/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,36 @@ iframe {
margin-left: auto;
margin-right: auto;
}

// Callouts

.callout {
&[data-callout="custom"] {
--color: var(--tertiary);
--border:var(--tertiary);
--bg: var(--customCallout);
--callout-icon: var(--callout-icon-tip);
}
}

/* @media (prefers-color-scheme: dark) { */
/* .callout { */
/* &[data-callout="custom"] { */
/* --color: #09FEF8; */
/* --border:#09FEF8; */
/* --bg: #00b0ff10; */
/* --callout-icon: var(--callout-icon-tip); */
/* } */
/* } */
/* } */
/* @media (prefers-color-scheme: light) { */
/* .callout { */
/* &[data-callout="custom"] { */
/**/
/* --color: #FF5A7E; */
/* --border:#FF5A7E; */
/* --bg: #db424210; */
/* --callout-icon: var(--callout-icon-tip); */
/* } */
/* } */
/* } */
3 changes: 3 additions & 0 deletions quartz/util/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface ColorScheme {
secondary: string
tertiary: string
highlight: string
customCallout: string
}

interface Colors {
Expand Down Expand Up @@ -48,6 +49,7 @@ ${stylesheet.join("\n\n")}
--secondary: ${theme.colors.lightMode.secondary};
--tertiary: ${theme.colors.lightMode.tertiary};
--highlight: ${theme.colors.lightMode.highlight};
--customCallout: ${theme.colors.lightMode.customCallout};
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
Expand All @@ -63,6 +65,7 @@ ${stylesheet.join("\n\n")}
--secondary: ${theme.colors.darkMode.secondary};
--tertiary: ${theme.colors.darkMode.tertiary};
--highlight: ${theme.colors.darkMode.highlight};
--customCallout: ${theme.colors.darkMode.customCallout};
}
`
}

0 comments on commit ab1b468

Please sign in to comment.