Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@
"maximumError": "16kb"
}
],
"outputHashing": "all"
"outputHashing": "all",
"optimization": {
"scripts": true,
"fonts": true,
"styles": {
"minify": true,
"inlineCritical": false
}
}
},
"development": {
"optimization": false,
Expand Down
9 changes: 9 additions & 0 deletions packages/docs/src/app/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

.sidebar {
view-transition-name: sidebar;
// Only doc pages show the sidebar beside the content; everywhere else it is
// the drawer below 900px.
.page:not(.page-docs) > & {
display: none;
}
position: sticky;
top: calc(var(--header-height) + var(--space-8));
max-height: calc(100vh - var(--header-height) - var(--space-8));
Expand Down Expand Up @@ -160,6 +165,10 @@

/* Docs menu below 900px: an off-canvas drawer with a dimmed backdrop. */
@media (max-width: 899px) {
.page:not(.page-docs) > .sidebar {
display: block;
}

.sidebar {
position: fixed;
z-index: 30;
Expand Down
6 changes: 2 additions & 4 deletions packages/docs/src/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
/>
</svg>
</button>
@if (isDocs()) {
<button
class="menu-toggle"
type="button"
Expand All @@ -104,7 +103,6 @@
<span class="menu-toggle-bar"></span>
<span class="menu-toggle-bar"></span>
</button>
}
</div>
<div
class="nav-progress"
Expand All @@ -114,7 +112,8 @@
</header>

<div class="container page" [class.page-docs]="isDocs()">
@if (isDocs()) {
<!-- The docs menu is part of every page: a sidebar beside doc pages and a
drawer behind the menu button on narrow screens. -->
<div
class="drawer-backdrop"
[class.drawer-backdrop-visible]="menuOpen()"
Expand Down Expand Up @@ -214,7 +213,6 @@
>
</div>
</aside>
}
<main id="main" class="main">
<router-outlet />
</main>
Expand Down
Loading