mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 08:34:08 +02:00
Reintegrate tabindex
integration in docs layouts
This commit is contained in:
@@ -74,5 +74,13 @@ const mainProps = overrides?.main ?? {}
|
|||||||
<Scripts layout={layout} />
|
<Scripts layout={layout} />
|
||||||
|
|
||||||
{frontmatter?.extra_js && frontmatter.extra_js.map((js) => <script is:inline async={js.async} src={js.src} />)}
|
{frontmatter?.extra_js && frontmatter.extra_js.map((js) => <script is:inline async={js.async} src={js.src} />)}
|
||||||
|
|
||||||
|
{
|
||||||
|
layout === 'docs' && (
|
||||||
|
<div class="position-fixed" aria-hidden="true">
|
||||||
|
<input type="text" tabindex="-1" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -21,7 +21,7 @@ const { frontmatter, headings, id } = Astro.props
|
|||||||
// Extract the directory/section from the ID (format: "directory/filename.mdx")
|
// Extract the directory/section from the ID (format: "directory/filename.mdx")
|
||||||
const parentDirectory = id.includes('/') ? id.split('/')[0] : ''
|
const parentDirectory = id.includes('/') ? id.split('/')[0] : ''
|
||||||
|
|
||||||
const bodyProps: LayoutOverridesHTMLAttributes<'body'> = { tabindex: 0 }
|
const bodyProps: LayoutOverridesHTMLAttributes<'body'> = {}
|
||||||
|
|
||||||
if (frontmatter.toc) {
|
if (frontmatter.toc) {
|
||||||
bodyProps['data-bs-spy'] = 'scroll'
|
bodyProps['data-bs-spy'] = 'scroll'
|
||||||
|
Reference in New Issue
Block a user