diff --git a/_doc/.gitignore b/_doc/.gitignore new file mode 100644 index 0000000..b844b14 --- /dev/null +++ b/_doc/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/_doc/_layouts/default.html b/_doc/_layouts/default.html index ec3bc0e..c4fbb78 100644 --- a/_doc/_layouts/default.html +++ b/_doc/_layouts/default.html @@ -40,6 +40,15 @@ --table-head: #f6f8fa; --blockquote: #57606a; --blockquote-border: #d0d7de; + /* ── Sidebar ── */ + --sidebar-bg: #f6f8fa; + --sidebar-link: #1f2328; + --sidebar-link-hover-bg: #eaeef2; + --sidebar-active-bg: #dbeafe; + --sidebar-active: #0550ae; + /* ── TOC ── */ + --toc-link: #57606a; + --toc-active: #0969da; } /* ── Auto dark mode: follows OS preference (no explicit user choice) ── */ @@ -66,6 +75,13 @@ --table-head: #161b22; --blockquote: #8b949e; --blockquote-border: #3d444d; + --sidebar-bg: #161b22; + --sidebar-link: #c9d1d9; + --sidebar-link-hover-bg: #21262d; + --sidebar-active-bg: #1c2d3f; + --sidebar-active: #58a6ff; + --toc-link: #8b949e; + --toc-active: #58a6ff; } } @@ -92,6 +108,13 @@ --table-head: #161b22; --blockquote: #8b949e; --blockquote-border: #3d444d; + --sidebar-bg: #161b22; + --sidebar-link: #c9d1d9; + --sidebar-link-hover-bg: #21262d; + --sidebar-active-bg: #1c2d3f; + --sidebar-active: #58a6ff; + --toc-link: #8b949e; + --toc-active: #58a6ff; } /* ── Explicit light override ── */ @@ -112,7 +135,7 @@ transition: background 0.2s, color 0.2s; } - /* ── Header / nav ── */ + /* ── Header ── */ header { background: var(--header-bg); padding: 0 1.5rem; @@ -122,10 +145,16 @@ height: 3.25rem; position: sticky; top: 0; - z-index: 100; + z-index: 200; border-bottom: 1px solid rgba(255,255,255,.08); } + .header-left { + display: flex; + align-items: center; + gap: 0.75rem; + } + .site-title { color: var(--header-text); text-decoration: none; @@ -135,18 +164,19 @@ } .site-title:hover { color: #fff; } - nav { - display: flex; - align-items: center; - gap: 1.25rem; - } - - nav a { + /* ── Hamburger button (shown on mobile) ── */ + #sidebar-toggle { + background: none; + border: none; color: var(--nav-link); - text-decoration: none; - font-size: 0.875rem; + cursor: pointer; + padding: 0.25rem; + display: none; + line-height: 1; + border-radius: 4px; } - nav a:hover { color: var(--nav-hover); } + #sidebar-toggle:hover { color: var(--nav-hover); } + #sidebar-toggle svg { display: block; } /* ── Theme toggle button ── */ #theme-toggle { @@ -170,11 +200,131 @@ .icon-light { display: none; } .icon-dark { display: none; } - /* ── Main content ── */ - main { - max-width: 900px; - margin: 0 auto; - padding: 2rem 1.5rem 4rem; + /* ── Page body: three-column grid ── */ + .page-body { + display: grid; + grid-template-columns: 260px 1fr 220px; + align-items: start; + } + + /* ── Left sidebar ── */ + .sidebar { + background: var(--sidebar-bg); + border-right: 1px solid var(--border); + position: sticky; + top: 3.25rem; + height: calc(100vh - 3.25rem); + overflow-y: auto; + padding: 1.25rem 0 2rem; + transition: transform 0.25s ease; + } + + .sidebar-section-title { + font-size: 0.6875rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.07em; + color: var(--text-muted); + padding: 0 1rem 0.5rem; + } + + .sidebar-nav ul { + list-style: none; + margin: 0; + padding: 0; + } + + .sidebar-nav li a { + display: block; + padding: 0.375rem 0.75rem 0.375rem 1rem; + color: var(--sidebar-link); + text-decoration: none; + font-size: 0.875rem; + border-radius: 4px; + margin: 0.0625rem 0.5rem; + transition: background 0.12s, color 0.12s; + } + + .sidebar-nav li a:hover { + background: var(--sidebar-link-hover-bg); + color: var(--text); + text-decoration: none; + } + + .sidebar-nav li a.active { + background: var(--sidebar-active-bg); + color: var(--sidebar-active); + font-weight: 600; + } + + /* ── Sidebar overlay (mobile backdrop) ── */ + .sidebar-overlay { + display: none; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.45); + z-index: 150; + } + .sidebar-overlay.open { display: block; } + + /* ── Main content area ── */ + .content-area { + min-width: 0; + padding: 2rem 2rem 4rem; + } + + /* ── TOC sidebar (right) ── */ + .toc-sidebar { + position: sticky; + top: calc(3.25rem + 1.5rem); + max-height: calc(100vh - 3.25rem - 3rem); + overflow-y: auto; + padding: 0 0.75rem 1rem; + border-left: 1px solid var(--border); + } + + .toc-sidebar-title { + font-size: 0.6875rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.07em; + color: var(--text-muted); + margin: 1.25rem 0 0.5rem; + } + + #toc-list { + list-style: none; + margin: 0; + padding: 0; + } + + #toc-list li { margin: 0; } + + #toc-list a { + display: block; + padding: 0.2rem 0 0.2rem 0.625rem; + border-left: 2px solid transparent; + color: var(--toc-link); + text-decoration: none; + font-size: 0.8125rem; + line-height: 1.45; + transition: color 0.12s, border-color 0.12s; + } + + #toc-list a:hover { + color: var(--link); + text-decoration: none; + } + + #toc-list a.active { + color: var(--toc-active); + border-left-color: var(--toc-active); + font-weight: 500; + } + + #toc-list .toc-h3 { + padding-left: 1.25rem; + font-size: 0.775rem; } /* ── Typography ── */ @@ -273,22 +423,49 @@ footer a { color: var(--text-muted); } footer a:hover { color: var(--link); } - /* ── Responsive ── */ - @media (max-width: 600px) { + /* ── Responsive: hide TOC on medium screens ── */ + @media (max-width: 1100px) { + .page-body { grid-template-columns: 260px 1fr; } + .toc-sidebar { display: none; } + } + + /* ── Responsive: collapse sidebar on small screens ── */ + @media (max-width: 768px) { + .page-body { grid-template-columns: 1fr; } + + .sidebar { + position: fixed; + top: 3.25rem; + left: 0; + width: 260px; + height: calc(100vh - 3.25rem); + z-index: 160; + transform: translateX(-100%); + } + .sidebar.open { transform: translateX(0); } + + #sidebar-toggle { display: flex; } + header { padding: 0 1rem; } - main { padding: 1.25rem 1rem 3rem; } - nav a { display: none; } + .content-area { padding: 1.25rem 1rem 3rem; } }
- - {{ site.github.repository_name | default: site.repository | default: 'apps' }} - +
+ + + {{ site.github.repository_name | default: site.repository | default: 'apps' }} + +
-
- {{ content }} -
+ + +
+ + + +
+
+ {{ content }} +
+
+ + + +