mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 04:03:28 +00:00
rm
This commit is contained in:
parent
84dae7ce87
commit
95d4f9d401
2 changed files with 0 additions and 96 deletions
|
|
@ -9,23 +9,6 @@ const headings: MarkdownHeading[] = Astro.props.headings ?? [];
|
|||
const isIndex =
|
||||
Astro.url.pathname === "/" || Astro.url.pathname === "/index.html";
|
||||
const h2s = headings.filter((h) => h.depth === 2);
|
||||
const docsSections = [
|
||||
{
|
||||
title: "Start",
|
||||
items: [
|
||||
{ href: "/installation", label: "Installation" },
|
||||
{ href: "/quick-start", label: "Quick start" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Reference",
|
||||
items: [
|
||||
{ href: "/commands", label: "Commands" },
|
||||
{ href: "/architecture", label: "Architecture" },
|
||||
{ href: "/runtime-contract", label: "Runtime contract" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
function formatTocText(text: string): string {
|
||||
if (!text.includes(" ") && /[-.]/.test(text)) {
|
||||
|
|
@ -57,31 +40,6 @@ function formatTocText(text: string): string {
|
|||
)
|
||||
}
|
||||
|
||||
{
|
||||
!isIndex && (
|
||||
<div class="docs-nav">
|
||||
{docsSections.map((section) => (
|
||||
<div class="docs-nav-section">
|
||||
<span class="docs-nav-title">{section.title}</span>
|
||||
<div class="docs-nav-links">
|
||||
{section.items.map((item) => (
|
||||
<a
|
||||
href={item.href}
|
||||
class:list={[
|
||||
"docs-nav-link",
|
||||
{ active: Astro.url.pathname === item.href },
|
||||
]}
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
toc && (
|
||||
<aside class="toc-nav">
|
||||
|
|
|
|||
|
|
@ -252,60 +252,6 @@ hr {
|
|||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
.docs-nav {
|
||||
max-width: 50rem;
|
||||
margin: 0 auto;
|
||||
padding: 1rem clamp(1.25rem, 5vw, 3rem) 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem 1.5rem;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.docs-nav-section {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem 0.75rem;
|
||||
}
|
||||
|
||||
.docs-nav-title {
|
||||
opacity: 0.45;
|
||||
font-size: 0.82rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
}
|
||||
|
||||
.docs-nav-links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-nav-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: 999px;
|
||||
opacity: 0.68;
|
||||
transition:
|
||||
opacity 0.15s,
|
||||
background 0.15s;
|
||||
}
|
||||
|
||||
.docs-nav-link:hover,
|
||||
.docs-nav-link.active {
|
||||
opacity: 1;
|
||||
background: #ebebeb;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.docs-nav-link:hover,
|
||||
.docs-nav-link.active {
|
||||
background: #222222;
|
||||
}
|
||||
}
|
||||
|
||||
.toc-nav {
|
||||
position: fixed;
|
||||
top: 6.5rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue