Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Aug 23, 2024
1 parent f38bb99 commit 64fcbc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 110 deletions.
102 changes: 0 additions & 102 deletions apps/www/src/components/starlight/PageFrame.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,105 +52,3 @@ const { hasSidebar, labels } = Astro.props;
width: var(--sl-sidebar-width);
}
</style>

<!-- <div class="page sl-flex">
<header class="header">
<slot name="header" />
</header>
{
hasSidebar ? (
<>
<nav class="sidebar" aria-label={labels["sidebarNav.accessibleLabel"]}>
<MobileMenuToggle {...Astro.props} />
<div id="starlight__sidebar" class="sidebar-pane">
<div class="sidebar-content sl-flex">
<slot name="sidebar" />
</div>
</div>
</nav>
<div class="main-frame">
<slot />
</div>
</>
) : (
<main class="flex-1">
<div class="container relative">
<slot />
</div>
</main>
)
}
</div>
<style>
.page {
flex-direction: column;
min-height: 100vh;
}
.header {
z-index: var(--sl-z-index-navbar);
position: fixed;
inset-inline-start: 0;
inset-block-start: 0;
width: 100%;
height: var(--sl-nav-height);
border-bottom: 1px solid var(--sl-color-hairline-shade);
padding: var(--sl-nav-pad-y) var(--sl-nav-pad-x);
padding-inline-end: var(--sl-nav-pad-x);
background-color: var(--sl-color-bg-nav);
}
:global([data-has-sidebar]) .header {
padding-inline-end: calc(
var(--sl-nav-gap) + var(--sl-nav-pad-x) + var(--sl-menu-button-size)
);
}
.sidebar-pane {
visibility: var(--sl-sidebar-visibility, hidden);
position: fixed;
z-index: var(--sl-z-index-menu);
inset-block: var(--sl-nav-height) 0;
inset-inline-start: 0;
width: 100%;
background-color: var(--sl-color-black);
overflow-y: auto;
}
:global([aria-expanded="true"]) ~ .sidebar-pane {
--sl-sidebar-visibility: visible;
}
.sidebar-content {
height: 100%;
min-height: max-content;
padding: 1rem var(--sl-sidebar-pad-x) 0;
flex-direction: column;
gap: 1rem;
}
@media (min-width: 50rem) {
.sidebar-content::after {
content: "";
padding-bottom: 1px;
}
}
.main-frame {
padding-top: calc(var(--sl-nav-height) + var(--sl-mobile-toc-height));
padding-inline-start: var(--sl-content-inline-start);
}
@media (min-width: 50rem) {
:global([data-has-sidebar]) .header {
padding-inline-end: var(--sl-nav-pad-x);
}
.sidebar-pane {
--sl-sidebar-visibility: visible;
width: var(--sl-sidebar-width);
background-color: var(--sl-color-bg-sidebar);
border-inline-end: 1px solid var(--sl-color-hairline-shade);
}
}
</style> -->
19 changes: 11 additions & 8 deletions apps/www/src/components/starlight/PageSidebar.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import type { Props } from "@astrojs/starlight/props";
import type { Props } from '@astrojs/starlight/props'
import MobileTableOfContents from "@astrojs/starlight/components/MobileTableOfContents.astro";
import TableOfContents from "@astrojs/starlight/components/TableOfContents.astro";
import MobileTableOfContents from '@astrojs/starlight/components/MobileTableOfContents.astro'
import TableOfContents from '@astrojs/starlight/components/TableOfContents.astro'
---

{
Expand All @@ -24,15 +24,18 @@ import TableOfContents from "@astrojs/starlight/components/TableOfContents.astro
}

.right-sidebar-panel :global(ul) {
@apply m-0 list-none;
@apply m-0 list-none pt-2;
}
.right-sidebar-panel :global(ul > li) {
@apply mt-0 pt-2;

.right-sidebar-panel :global(ul > li > ul) {
@apply pt-0;
}

.right-sidebar-panel :global(ul > li > a) {
@apply inline-block no-underline transition-colors hover:text-foreground text-muted-foreground p-0;
@apply inline-block no-underline transition-colors hover:text-foreground text-muted-foreground;
}
.right-sidebar-panel :global(ul > li > a[aria-current="true"]) {

.right-sidebar-panel :global(ul > li > a[aria-current='true']) {
@apply text-primary;
}
</style>

0 comments on commit 64fcbc1

Please sign in to comment.