diff --git a/public/assets/images/branding/og/beyond-the-bookshelf-1.jpg b/public/assets/images/branding/og/beyond-the-bookshelf-1.jpg new file mode 100644 index 0000000..e7aadac Binary files /dev/null and b/public/assets/images/branding/og/beyond-the-bookshelf-1.jpg differ diff --git a/public/assets/images/branding/og/beyond-the-bookshelf-1.webp b/public/assets/images/branding/og/beyond-the-bookshelf-1.webp new file mode 100644 index 0000000..e866e8e Binary files /dev/null and b/public/assets/images/branding/og/beyond-the-bookshelf-1.webp differ diff --git a/public/assets/images/branding/og/beyond-the-bookshelf-2.jpg b/public/assets/images/branding/og/beyond-the-bookshelf-2.jpg new file mode 100644 index 0000000..dd02378 Binary files /dev/null and b/public/assets/images/branding/og/beyond-the-bookshelf-2.jpg differ diff --git a/public/assets/images/branding/og/beyond-the-bookshelf-2.webp b/public/assets/images/branding/og/beyond-the-bookshelf-2.webp new file mode 100644 index 0000000..b3dd3a6 Binary files /dev/null and b/public/assets/images/branding/og/beyond-the-bookshelf-2.webp differ diff --git a/public/assets/images/cover/beyond-the-bookshelf-1.jpg b/public/assets/images/cover/beyond-the-bookshelf-1.jpg new file mode 100644 index 0000000..28f6f19 Binary files /dev/null and b/public/assets/images/cover/beyond-the-bookshelf-1.jpg differ diff --git a/public/assets/images/cover/beyond-the-bookshelf-1.webp b/public/assets/images/cover/beyond-the-bookshelf-1.webp new file mode 100644 index 0000000..4b284b5 Binary files /dev/null and b/public/assets/images/cover/beyond-the-bookshelf-1.webp differ diff --git a/public/assets/images/cover/beyond-the-bookshelf-2.jpg b/public/assets/images/cover/beyond-the-bookshelf-2.jpg new file mode 100644 index 0000000..9fcb020 Binary files /dev/null and b/public/assets/images/cover/beyond-the-bookshelf-2.jpg differ diff --git a/public/assets/images/cover/beyond-the-bookshelf-2.webp b/public/assets/images/cover/beyond-the-bookshelf-2.webp new file mode 100644 index 0000000..1001e9c Binary files /dev/null and b/public/assets/images/cover/beyond-the-bookshelf-2.webp differ diff --git a/src/components/BarChart.tsx b/src/components/BarChart.tsx new file mode 100644 index 0000000..03e0396 --- /dev/null +++ b/src/components/BarChart.tsx @@ -0,0 +1,54 @@ +// Cspell:words deepmerge autocolors chartjs +import deepmerge from 'deepmerge'; + +import { + BarElement, + CategoryScale, + Chart as ChartJS, + Legend, + LinearScale, + Tooltip, +} from 'chart.js'; +import autocolors from 'chartjs-plugin-autocolors'; +import { Bar } from 'react-chartjs-2'; + +ChartJS.register(BarElement, CategoryScale, LinearScale, Tooltip, Legend, autocolors); + +type BarChartProps = { + data: any; + options?: any; +}; + +const defaultOptions = { + plugins: { + autocolors: { + mode: 'data', + } as any, + legend: { + display: false, + }, + }, + scales: { + x: { + grid: { + display: false, + }, + }, + y: { + beginAtZero: true, + grid: { + display: false, + }, + }, + }, +}; + +export const BarChart = ({ data, options }: BarChartProps) => { + const mergedOptions = deepmerge(defaultOptions, options); + + return ( +
+ +
+ ); +}; diff --git a/src/components/Blockquote.astro b/src/components/Blockquote.astro index 815cec3..34183d0 100644 --- a/src/components/Blockquote.astro +++ b/src/components/Blockquote.astro @@ -26,8 +26,9 @@ const { author, class: className, lang = 'en', source, sourceUrl, ...props } = A (author || source) && (