diff --git a/docusaurus.config.js b/docusaurus.config.js index cd4f24de..fbe42ae4 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -169,6 +169,12 @@ const config = { trackOutboundLinks: true, }, ], + [ + "docusaurus-markdown-source-plugin", + { + docsPath: '/', // Show dropdown on all pages + } + ], [ "docusaurus-plugin-sass", { diff --git a/package.json b/package.json index 2c87ad0e..5204e474 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@mdx-js/react": "^3.0.0", "@svgr/webpack": "^7.0.0", "clsx": "^1.2.1", + "docusaurus-markdown-source-plugin": "^2.2.5", "docusaurus-plugin-sass": "^0.2.5", "docusaurus-preset-openapi": "^0.7.1", "prism-react-renderer": "^2.1.0", diff --git a/src/css/custom.scss b/src/css/custom.scss index c39a6a8a..dfb1bafe 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -556,3 +556,96 @@ body .DocSearch { var(--ifm-color-emphasis-100) 100% ); } + +/* Markdown Actions Dropdown Styles */ + +/* Style the article header as flexbox */ +article .markdown header { + display: flex; + align-items: center; + gap: 1rem; + overflow: visible; +} + +/* Allow h1 to grow and take available space */ +article .markdown header h1 { + flex: 1 1 auto; + margin: 0; +} + +/* Container for the markdown actions dropdown */ +.markdown-actions-container { + flex-shrink: 0; + margin-left: auto; + position: relative; + vertical-align: top; + margin-top: 0.75rem; + align-self: start; +} + +/* Ensure dropdown wrapper has proper positioning */ +.markdown-actions-container .dropdown { + position: relative; +} + +/* Base dropdown menu styles */ +.markdown-actions-container .dropdown__menu { + z-index: 1000; + min-width: 220px; + right: auto; + left: 0; +} + +/* Add hover effect for dropdown items */ +.dropdown__link:hover { + background-color: var(--ifm-dropdown-hover-background); + color: var(--ifm-link-color); +} + +.markdown-actions-container .button { + font-size: small; +} + +.markdown-actions-container .button:hover { + background-color: var(--ifm-dropdown-hover-background); + color: var(--ifm-link-color); +} + +/* Responsive adjustments for mobile */ +@media (max-width: 768px) { + .markdown-actions-container { + margin-right: clamp(0px, 0.5rem, 1rem); + margin-bottom: 1rem; + } + + .markdown-actions-container .button { + padding: 0.375rem 0.75rem; + } + + /* Right-align menu on mobile to prevent cutoff */ + .markdown-actions-container .dropdown__menu { + right: 0; + left: auto; + min-width: min(220px, calc(100vw - 2rem)); + max-width: calc(100vw - 2rem); + padding-bottom: 0.75rem; + } +} + +/* RTL language support */ +[dir="rtl"] .markdown-actions-container { + margin-left: 0; + margin-right: auto; +} + +[dir="rtl"] .markdown-actions-container .dropdown__menu { + right: auto; + left: 0; +} + +@media (max-width: 768px) { + [dir="rtl"] .markdown-actions-container .dropdown__menu { + left: 0; + right: auto; + } +} diff --git a/static/_headers b/static/_headers new file mode 100644 index 00000000..28f60a77 --- /dev/null +++ b/static/_headers @@ -0,0 +1,9 @@ +/*.md + Content-Type: text/plain; charset=utf-8 + X-Content-Type-Options: nosniff + X-Robots-Tag: noindex, nofollow + Cache-Control: public, max-age=3600, must-revalidate + +/docs/*/img/* + X-Robots-Tag: googlebot: noindex, nofollow, bingbot: noindex, nofollow + Cache-Control: public, max-age=86400, immutable