Skip to content

Commit af19a87

Browse files
committed
Add mobile navigation styles and improve responsiveness for API documentation
1 parent 7521d41 commit af19a87

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

docs/api.html

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,33 @@
160160
margin: 1.5rem 0;
161161
}
162162

163+
/* Mobile Navigation Styles */
164+
.mobile-nav-toggle {
165+
display: none;
166+
background: none;
167+
border: none;
168+
color: white;
169+
font-size: 1.5rem;
170+
cursor: pointer;
171+
z-index: 1000;
172+
}
173+
174+
.overlay {
175+
display: none;
176+
position: fixed;
177+
top: 0;
178+
left: 0;
179+
width: 100%;
180+
height: 100%;
181+
background-color: rgba(0, 0, 0, 0.5);
182+
z-index: 998;
183+
}
184+
185+
.overlay.active {
186+
display: block;
187+
}
188+
189+
/* Responsive Styles */
163190
@media (max-width: 900px) {
164191
.api-layout {
165192
grid-template-columns: 1fr;
@@ -169,6 +196,93 @@
169196
position: static;
170197
margin-bottom: 2rem;
171198
}
199+
200+
/* Fix for table overflow */
201+
.parameter-table {
202+
display: block;
203+
width: 100%;
204+
overflow-x: auto;
205+
-webkit-overflow-scrolling: touch;
206+
}
207+
208+
pre {
209+
overflow-x: auto;
210+
}
211+
}
212+
213+
@media (max-width: 768px) {
214+
/* Mobile navigation */
215+
.mobile-nav-toggle {
216+
display: block;
217+
}
218+
219+
.nav-links {
220+
position: fixed;
221+
top: 0;
222+
right: -100%;
223+
width: 80%;
224+
max-width: 300px;
225+
height: 100vh;
226+
background-color: var(--primary-color);
227+
flex-direction: column;
228+
justify-content: center;
229+
align-items: center;
230+
transition: right 0.3s ease;
231+
box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
232+
z-index: 999;
233+
}
234+
235+
.nav-links.active {
236+
right: 0;
237+
}
238+
239+
.nav-link {
240+
margin: 1rem 0;
241+
}
242+
243+
/* Improve table readability */
244+
.parameter-table th,
245+
.parameter-table td {
246+
padding: 0.75rem;
247+
font-size: 0.9rem;
248+
}
249+
250+
.parameter-name {
251+
font-size: 1.1rem;
252+
}
253+
254+
.code-example pre {
255+
font-size: 0.9rem;
256+
}
257+
258+
.method-signature {
259+
padding: 1rem;
260+
font-size: 0.9rem;
261+
}
262+
}
263+
264+
@media (max-width: 480px) {
265+
.api-content {
266+
padding: 1rem;
267+
}
268+
269+
.parameter-table th,
270+
.parameter-table td {
271+
padding: 0.5rem;
272+
font-size: 0.8rem;
273+
}
274+
275+
.parameter-name {
276+
font-size: 1rem;
277+
}
278+
279+
.section-title {
280+
font-size: 1.5rem;
281+
}
282+
283+
.section-subtitle {
284+
font-size: 1rem;
285+
}
172286
}
173287
</style>
174288
</head>

0 commit comments

Comments
 (0)