Skip to content

Commit a720bc6

Browse files
authored
feat: add pivot component and selector with directive support (#5)
* feat: add pivot component and selector with directive support - Implemented Pivot component to serve as a container for pivot blocks. - Created PivotSelector component to manage pivot options and their display. - Added styling for the pivot components to enhance UI/UX. - Developed pivot-directive to transform pivot directives in markdown into corresponding HTML elements. - Integrated local storage and URL query parameters for persistent state management of selected pivot options. * refactor: remove unused Vite configuration for optimizeDeps * feat: add MaxAge option to HSTS configuration for enhanced security * fix: update pivot title and button colors for better visibility * feat: add chevron icons for navigation and update theme image handling * fix: improve pivot selector styles and update error handling * feat: add disabled state to pivot options and improve button styles for better accessibility * fix: update wording for clarity in first-app documentation * fix: enhance pivot selector logic to ensure valid option selection and improve error handling * fix: improve clarity and detail in first-app documentation * fix: update documentation to use Aside component for notes and improve heading levels for clarity * fix: enhance pivot selector layout for better responsiveness on smaller screens
1 parent 729c746 commit a720bc6

20 files changed

+526
-50
lines changed

src/frontend/astro.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
33
import { sidebarTopics } from './sidebar.topics';
4+
import { pivotDirective } from './src/directives/pivot-directive.mjs'
45
import catppuccin from "@catppuccin/starlight";
56
import lunaria from '@lunariajs/starlight';
67
import mermaid from 'astro-mermaid';
@@ -14,6 +15,9 @@ import starlightLlmsTxt from 'starlight-llms-txt';
1415
import starlightScrollToTop from 'starlight-scroll-to-top';
1516
import starlightSidebarTopics from 'starlight-sidebar-topics';
1617

18+
import mdx from "@astrojs/mdx";
19+
import remarkDirective from "remark-directive";
20+
1721
// Localization: https://lunaria.dev/
1822
export const locales = {
1923
root: { label: 'English', lang: 'en' },
@@ -232,5 +236,9 @@ export default defineConfig({
232236
})
233237
],
234238
}),
239+
mdx({
240+
extendMarkdownConfig: true,
241+
remarkPlugins: [remarkDirective, pivotDirective],
242+
})
235243
]
236244
});

src/frontend/package-lock.json

Lines changed: 78 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"astro-mermaid": "^1.1.0",
4949
"astro-tooltips": "^0.6.2",
5050
"mermaid": "^11.12.1",
51+
"remark-directive": "^4.0.0",
5152
"sharp": "^0.34.4",
5253
"starlight-contributor-list": "^0.3.0",
5354
"starlight-giscus": "^0.8.1",
-46.6 KB
Binary file not shown.
164 KB
Loading
159 KB
Loading
222 KB
Loading
220 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)