11---
2- /** Design system: 証明の作業台 — サブパス配下でも証拠への導線を切らない固定ナビゲーション。 */
2+ /** Design system: 証明の作業台 — a fixed navigation rail preserves context without borrowing verification green for passive state. */
33import { navigation } from " ../data/lessons" ;
44import { withBase } from " ../lib/links" ;
55
@@ -8,5 +8,225 @@ const { currentPath } = Astro.props;
88const lessonCount = navigation .reduce ((total , group ) => total + group .items .length , 0 );
99---
1010
11- <aside id =" sidebar" ><div ><a class =" brand" href ={ withBase ()} ><span class =" brand-mark" aria-hidden =" true" ><i ></i ></span ><span ><small >Executable Documentation</small ><strong >JAVA/<b >TESTS</b ></strong ></span ></a ><nav ><a class:list ={ [" root" ,{active:currentPath === " /" }]} href ={ withBase ()} >Getting Started</a >{ navigation .map (group => <section ><h2 >{ group .label } </h2 >{ group .items .map (lesson => {const logicalHref= ` /java/${lesson .slug } ` ;return <a class :list = { [{active:currentPath === logicalHref }]} href = { withBase (logicalHref )} >{ lesson .title .replace (/ ^ (String| ArrayList| List\. of| record| Optional| Stream): / ," " )} </a >})} </section >)} </nav ></div ><footer ><i ></i >Java 21 / JUnit 5 <span >{ String (lessonCount ).padStart (2 ," 0" )} lessons</span ></footer ></aside >
12- <style>/* Design system: 証明の作業台 — the bracket/check mark makes the source-to-proof contract ownable. */aside{position:sticky;top:0;display:flex;height:100vh;flex-direction:column;justify-content:space-between;border-right:1px solid var(--line);background:#0a0f11}aside>div{overflow:auto;padding:1.45rem 1rem 1rem}.brand{display:flex;align-items:center;gap:.75rem;padding:.2rem .45rem 1.55rem;border-bottom:1px solid var(--line)}.brand-mark{position:relative;display:inline-block;width:2.45rem;height:2.45rem;border:2px solid var(--paper);border-top-color:rgba(239,245,242,.44);border-bottom-color:rgba(239,245,242,.44)}.brand-mark:before,.brand-mark:after{position:absolute;top:.5rem;bottom:.5rem;width:2px;background:var(--paper);content:""}.brand-mark:before{left:.52rem}.brand-mark:after{right:.52rem}.brand-mark i{position:absolute;z-index:1;top:.9rem;left:.8rem;width:.86rem;height:.46rem;border-bottom:3px solid var(--green);border-left:3px solid var(--green);transform:rotate(-45deg)}.brand span+span{display:grid;line-height:1}.brand small{margin-bottom:.32rem;color:var(--dim);font-family:var(--code);font-size:.54rem;letter-spacing:.07em;text-transform:uppercase}.brand strong{font-family:var(--display);font-size:.88rem;letter-spacing:.07em}.brand b{color:var(--green)}nav{padding-top:1.15rem}.root,section a{display:block;border-left:2px solid transparent;color:var(--muted);transition:color 160ms var(--ease),background 160ms var(--ease),border-color 160ms var(--ease)}.root{margin-bottom:1.15rem;padding:.5rem .55rem;font-family:var(--display);font-size:.86rem;font-weight:600}section{margin-top:1.15rem}section h2{margin:0 0 .35rem .58rem;color:var(--dim);font-family:var(--code);font-size:.63rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase}section a{padding:.42rem .55rem;font-size:.8rem}.root:hover,section a:hover,.active{border-left-color:var(--green)!important;background:rgba(182,240,74,.07);color:var(--paper)!important}footer{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.45rem;padding:.85rem 1rem;border-top:1px solid var(--line);color:var(--dim);font-family:var(--code);font-size:.58rem}footer i{width:.42rem;height:.42rem;border-radius:50%;background:var(--green)}@media(max-width:840px){aside{position:fixed;z-index:40;left:0;width:min(18.5rem,86vw);height:100dvh;transform:translateX(-104%);box-shadow:1rem 0 2.5rem #000;transition:transform 220ms var(--ease)}aside.open{transform:translateX(0)}}</style>
11+ <aside id =" sidebar" >
12+ <div >
13+ <a class =" brand" href ={ withBase ()} >
14+ <span class =" brand-mark" aria-hidden =" true" ><i ></i ></span >
15+ <span >
16+ <small >Executable Documentation</small >
17+ <strong ><span >JAVA</span ><em >/</em ><b >TESTS</b ></strong >
18+ </span >
19+ </a >
20+ <nav >
21+ <a class:list ={ [" root" , { active: currentPath === " /" }]} href ={ withBase ()} >Getting Started</a >
22+ {
23+ navigation .map ((group ) => (
24+ <section >
25+ <h2 >{ group .label } </h2 >
26+ {
27+ group .items .map ((lesson ) => {
28+ const logicalHref = ` /java/${lesson .slug } ` ;
29+ return (
30+ <a class :list = { [{ active: currentPath === logicalHref }]} href = { withBase (logicalHref )} >
31+ { lesson .title .replace (/ ^ (String| ArrayList| List\. of| record| Optional| Stream): / , " " )}
32+ </a >
33+ );
34+ })
35+ }
36+ </section >
37+ ))
38+ }
39+ </nav >
40+ </div >
41+ <footer ><i ></i >Java 21 / JUnit 5 <span >{ String (lessonCount ).padStart (2 , " 0" )} lessons</span ></footer >
42+ </aside >
43+
44+ <style >
45+ /* Design system: 証明の作業台 — the bracket/check mark is the ownable brand signal; green stays reserved for verified evidence. */
46+ aside {
47+ position: sticky;
48+ top: 0;
49+ display: flex;
50+ height: 100vh;
51+ flex-direction: column;
52+ justify-content: space-between;
53+ border-right: 1px solid var(--line);
54+ background: #0a0f11;
55+ }
56+
57+ aside > div {
58+ overflow: auto;
59+ padding: 1.45rem 1rem 1rem;
60+ }
61+
62+ .brand {
63+ display: flex;
64+ align-items: center;
65+ gap: 0.75rem;
66+ padding: 0.2rem 0.45rem 1.55rem;
67+ border-bottom: 1px solid var(--line);
68+ }
69+
70+ .brand-mark {
71+ position: relative;
72+ display: inline-block;
73+ width: 2.55rem;
74+ height: 2.55rem;
75+ border: 2px solid var(--paper);
76+ border-top-color: rgba(239, 245, 242, 0.5);
77+ border-bottom-color: rgba(239, 245, 242, 0.5);
78+ box-shadow: inset 0 0 0 1px rgba(14, 21, 24, 0.9);
79+ }
80+
81+ .brand-mark:before,
82+ .brand-mark:after {
83+ position: absolute;
84+ top: 0.5rem;
85+ bottom: 0.5rem;
86+ width: 2px;
87+ background: var(--paper);
88+ content: "";
89+ }
90+
91+ .brand-mark:before {
92+ left: 0.52rem;
93+ }
94+
95+ .brand-mark:after {
96+ right: 0.52rem;
97+ }
98+
99+ .brand-mark i {
100+ position: absolute;
101+ z-index: 1;
102+ top: 0.93rem;
103+ left: 0.84rem;
104+ width: 0.86rem;
105+ height: 0.46rem;
106+ border-bottom: 3px solid var(--green);
107+ border-left: 3px solid var(--green);
108+ transform: rotate(-45deg);
109+ }
110+
111+ .brand span + span {
112+ display: grid;
113+ gap: 0.18rem;
114+ line-height: 1;
115+ }
116+
117+ .brand small {
118+ color: var(--dim);
119+ font-family: var(--code);
120+ font-size: 0.54rem;
121+ letter-spacing: 0.1em;
122+ text-transform: uppercase;
123+ }
124+
125+ .brand strong {
126+ display: flex;
127+ align-items: baseline;
128+ color: var(--paper);
129+ font-family: var(--display);
130+ font-size: 0.92rem;
131+ letter-spacing: 0.115em;
132+ }
133+
134+ .brand strong span {
135+ font-weight: 400;
136+ }
137+
138+ .brand strong em {
139+ margin: 0 0.04em;
140+ color: var(--dim);
141+ font-style: normal;
142+ font-weight: 400;
143+ }
144+
145+ .brand b {
146+ color: var(--green);
147+ font-weight: 700;
148+ }
149+
150+ nav {
151+ padding-top: 1.15rem;
152+ }
153+
154+ .root,
155+ section a {
156+ display: block;
157+ border-left: 2px solid transparent;
158+ color: var(--muted);
159+ transition: color 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
160+ }
161+
162+ .root {
163+ margin-bottom: 1.15rem;
164+ padding: 0.5rem 0.55rem;
165+ font-family: var(--display);
166+ font-size: 0.86rem;
167+ font-weight: 600;
168+ }
169+
170+ section {
171+ margin-top: 1.15rem;
172+ }
173+
174+ section h2 {
175+ margin: 0 0 0.35rem 0.58rem;
176+ color: var(--dim);
177+ font-family: var(--code);
178+ font-size: 0.63rem;
179+ font-weight: 500;
180+ letter-spacing: 0.1em;
181+ text-transform: uppercase;
182+ }
183+
184+ section a {
185+ padding: 0.42rem 0.55rem;
186+ font-size: 0.8rem;
187+ }
188+
189+ .root:hover,
190+ section a:hover,
191+ .active {
192+ border-left-color: var(--bright) !important;
193+ background: rgba(145, 177, 186, 0.08);
194+ color: var(--paper) !important;
195+ }
196+
197+ footer {
198+ display: grid;
199+ grid-template-columns: auto 1fr auto;
200+ align-items: center;
201+ gap: 0.45rem;
202+ padding: 0.85rem 1rem;
203+ border-top: 1px solid var(--line);
204+ color: var(--dim);
205+ font-family: var(--code);
206+ font-size: 0.58rem;
207+ }
208+
209+ footer i {
210+ width: 0.42rem;
211+ height: 0.42rem;
212+ border-radius: 50%;
213+ background: var(--bright);
214+ }
215+
216+ @media (max-width: 840px) {
217+ aside {
218+ position: fixed;
219+ z-index: 40;
220+ left: 0;
221+ width: min(18.5rem, 86vw);
222+ height: 100dvh;
223+ transform: translateX(-104%);
224+ box-shadow: 1rem 0 2.5rem #000;
225+ transition: transform 220ms var(--ease);
226+ }
227+
228+ aside.open {
229+ transform: translateX(0);
230+ }
231+ }
232+ </style >
0 commit comments