1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-08 04:12:26 +04:00
Files
tabler/docs/components/DocsNavbar.astro
T
codecalm f27c70ad38 Fix Prettier formatting regression and Astro type-check errors
`Render Modal as real markup` (#2742) reformatted ~140 files back to
tabs/semicolons, breaking the Prettier config added by the Astro
quality gates (#2749). Re-run prettier --write to restore it, and fix
the type errors it had been masking: HTMLElement casts and `this`
typing in ChangePasswordModalContent/ConfirmDeleteModalContent
scripts, plain-JS syntax in the inline-injected progress.astro script,
narrowed prop unions in Button/Check/Spinner, nullable icon svg casts
in Icons/Rating, and a duplicate firstLetters/invalid `placeholder`
attribute in Select.astro. Also fix shared/vitest.config.mts's stale
`astro/lib/**/*.test.ts` include glob left over from the shared source
restructure, which made `pnpm test` report zero test files.
2026-08-03 01:26:19 +02:00

63 lines
2.0 KiB
Plaintext

---
import Icon from '@ui/Icon.astro'
import DocsLogo from './DocsLogo.astro'
import { site } from '@shared/lib/site'
// Eventually belongs in src/lib/site.ts (out of scope for this task).
const previewUrl = 'https://preview.tabler.io'
const changelogUrl = 'https://tabler.io/changelog'
---
<!-- BEGIN DOCS NAVBAR -->
<div class="navbar navbar-expand sticky-top">
<div class="container">
<div class="row flex-fill align-items-md-center">
<div class="col">
<div class="d-flex align-items-center gap-4">
{/* href="." — relative link for docs root */}
<a href="." class="navbar-brand navbar-brand-autodark gap-4">
<DocsLogo />
</a>
<div>
<span class="badge">v{site.version}</span>
</div>
</div>
</div>
<div class="d-none d-md-block col">
<div id="docsearch"></div>
</div>
<div class="col d-flex">
<ul class="navbar-nav ms-auto gap-2 align-items-center">
<div class="nav-item d-none d-md-block">
<a href={previewUrl} class="nav-link">Preview</a>
</div>
<div class="nav-item d-none d-md-block">
<a href={changelogUrl} class="nav-link">Changelog</a>
</div>
<li class="nav-item hide-theme-dark">
<a href="?theme=dark" class="btn btn-icon">
<Icon name="moon" />
</a>
</li>
<li class="nav-item hide-theme-light">
<a href="?theme=light" class="btn btn-icon">
<Icon name="sun" />
</a>
</li>
<li class="nav-item">
<a href={site.githubUrl} class="btn btn-icon" target="_blank">
<Icon name="brand-github" />
</a>
</li>
<li class="nav-item">
<a href={previewUrl} class="btn btn-primary" target="_blank">
<Icon name="eye" /> Preview
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- END DOCS NAVBAR -->