Skip to content

Commit

Permalink
fix dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Dec 17, 2023
1 parent 9f00817 commit 8c9c963
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion site/blog/2023-12-17-the-cost-of-implicits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ In total it's about this much:

## Initial comparison of compile times

Each benchmark is run three times, and in the graphs you can choose to se minimum or average compile times.
Each benchmark is run three times, and in the graphs you can choose to see minimum or average compile times.

<ScalaCompileTimesChart id="groupedBarChart1">{`
library,scala version, average compile time, minimum compile time
Expand Down
30 changes: 16 additions & 14 deletions site/src/components/KeyTakeaway.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
// all from chatgpt, don't judge this :D

import React from 'react';
import {useColorMode} from '@docusaurus/theme-common';

const KeyTakeaway = ({ children:text }) => {
const { isDarkTheme } = useColorMode();

const containerStyle = {
backgroundColor: isDarkTheme ? '#333' : '#f0f0f0', // Dark or light background color
color: isDarkTheme ? '#fff' : '#000', // Text color based on mode
padding: '20px',
borderRadius: '8px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
};

return (
<div
style={{
backgroundColor: '#f0f0f0', // Subtle background color
padding: '20px',
borderRadius: '8px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<div style={containerStyle}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke={isDarkTheme ? '#fff' : 'currentColor'}
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
Expand All @@ -35,4 +37,4 @@ const KeyTakeaway = ({ children:text }) => {
);
};

export default KeyTakeaway;
export default KeyTakeaway;

0 comments on commit 8c9c963

Please sign in to comment.