From a7884ec64b660f932a76c233b2145ace3a9c6b2c Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 23 Dec 2025 00:02:59 +0300 Subject: [PATCH 1/2] Add carousel and hover/focus tooltips with description to theme picker --- _TODO.md | 47 ----- src/components/Header/index.astro | 2 +- src/components/Navigation/index.astro | 4 +- .../client/__tests__/index.spec.ts | 35 +++- src/components/ThemePicker/client/index.ts | 165 +++++++++++++++ src/components/ThemePicker/index.astro | 198 ++++++++++++------ src/content/themes.json | 9 + src/styles/print.css | 43 ++++ src/styles/themes.css | 84 ++++---- 9 files changed, 422 insertions(+), 165 deletions(-) diff --git a/_TODO.md b/_TODO.md index 91c8ccca7..9e177fc6f 100644 --- a/_TODO.md +++ b/_TODO.md @@ -210,50 +210,3 @@ Google Calendar, Apple Calendar, Yahoo Calender, Microsoft 365, Outlook, and T `https://github.com/add2cal/add-to-calendar-button` `https://add-to-calendar-button.com/` - -## Markdown - -## Code Block and Highlighting - -## Astro includes shiki, tweak config - -### Custom version of the code block integration from Astro Docs. "Beautiful code blocks for your Astro site". Applied to the code blocks created in `.mdx` files - -[`astro-code-blocks`](https://www.npmjs.com/package/@thewebforge/astro-code-blocks) - - -#### Code tabs plugin so Javascript and Typescript examples can both be show. - -There can only be white space between two code blocks. Display name is set by `tabName` and can only contain characters in [A-Za-z0-9_]. Syntax for the first line of the code block is: - -```js [group:tabName] -``` - -`markdown-it-codetabs` - -#### Add copy button to code blocks - -`markdown-it-copy` - -Options for "copy" button added to code blocks - -```javascript -const markdownCodeCopyConfig = { - /** Text shown on copy button */ - btnText: `Copy`, - /** Text shown on copy failure */ - failText: `Copy Failed`, - /** Text shown on copy success */ - successText: `Success!`, // 'copy success' | copy-success text - /** Amount of time to show success message */ - successTextDelay: 2000, - /** An HTML fragment included before - - )) - } - + +
+
+
    + { + themes.map(theme => ( +
  • + +
  • + )) + } +
+
+ + + + +