@@ -62,13 +62,13 @@ if (currentPath.startsWith("/")) {
6262---
6363
6464<aside class =" starlight-right-sidebar" >
65- <h2 class =" starlight__on-this-page" >Driver Information</h2 >
6665 {
6766 Object .entries (driverInfo ).length > 0 ? (
68- <ul >
69- <li >
70- <strong >Manufacturer:</strong > { driverManufacturerDisplay }
71- </li >
67+ <div class = " driver-info-container" >
68+ <div class = " info-row" >
69+ <div class = " info-label" >Manufacturer</div >
70+ <div class = " info-value" >{ driverManufacturerDisplay } </div >
71+ </div >
7272 { Object .entries (driverInfo )
7373 .filter (
7474 ([key ]) =>
@@ -78,13 +78,19 @@ if (currentPath.startsWith("/")) {
7878 key .toLowerCase () !== " driver_name" ,
7979 )
8080 .map (([key , value ]) => (
81- <li >
82- <strong >{ key } :</strong > { String (value )}
83- </li >
81+ <div class = " info-row" >
82+ <div class = " info-label" >
83+ { key
84+ .split (" _" )
85+ .map ((word ) => word .charAt (0 ).toUpperCase () + word .slice (1 ))
86+ .join (" " )}
87+ </div >
88+ <div class = " info-value" >{ String (value )} </div >
89+ </div >
8490 ))}
85- </ul >
91+ </div >
8692 ) : (
87- <p >No driver information available.</p >
93+ <p class = " no-info " >No driver information available.</p >
8894 )
8995 }
9096
@@ -95,19 +101,77 @@ if (currentPath.startsWith("/")) {
95101
96102<style >
97103 .starlight-right-sidebar {
104+ display: flex;
105+ flex-direction: column;
98106 padding: 1rem;
99107 border-left: 1px solid var(--sl-color-gray-5);
100108 margin-left: 1.5rem;
109+ width: max-content;
101110 }
102- .starlight-right-sidebar-title {
103- font-size: 1.2em;
104- margin-bottom: 1rem;
111+
112+ .driver-info-container {
113+ display: flex;
114+ flex-direction: column;
115+ border: 2px solid #383c4a;
116+ border-radius: 0.5rem;
117+ overflow: hidden;
118+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
119+ background-color: #23262d;
120+ max-width: 20rem;
121+ }
122+
123+ .info-row {
124+ display: flex;
125+ border-bottom: 1px solid #383c4a;
126+ }
127+
128+ .info-row:last-child {
129+ border-bottom: none;
130+ }
131+
132+ .info-row:nth-child(even) {
133+ background-color: rgba(255, 255, 255, 0.03);
134+ }
135+
136+ .info-row:hover {
137+ background-color: rgba(136, 58, 234, 0.15);
138+ transition: background-color 0.2s ease;
139+ }
140+
141+ .info-label {
142+ flex-shrink: 0;
143+ width: 120px;
144+ padding: 0.875rem 1rem;
145+ font-weight: 700;
146+ color: #e1e4e8;
147+ font-size: 0.875rem;
148+ border-right: 2px solid #383c4a;
149+ background-color: rgba(255, 255, 255, 0.02);
150+ }
151+
152+ .info-value {
153+ flex: 1;
154+ padding: 0.875rem 1rem;
155+ color: #c9d1d9;
156+ font-size: 0.875rem;
157+ word-wrap: break-word;
158+ overflow-wrap: break-word;
159+ word-break: break-word;
160+ hyphens: auto;
161+ font-weight: 400;
162+ min-width: 0;
105163 }
106- .starlight-right-sidebar ul {
107- list-style: none;
108- padding: 0;
164+
165+ .no-info {
166+ color: var(--sl-color-gray-3);
167+ font-style: italic;
168+ padding: 1rem;
169+ text-align: center;
109170 }
110- .starlight-right-sidebar li {
111- margin-bottom: 0.5rem;
171+
172+ .starlight-sidebar-separator {
173+ border: none;
174+ border-top: 1px solid var(--sl-color-gray-5);
175+ margin: 1.5rem 0;
112176 }
113177</style >
0 commit comments