Make sidebar responsive
Browse files
docs/src/components/Sidebar.astro
CHANGED
|
@@ -21,7 +21,7 @@ const { activePath } = Astro.props;
|
|
| 21 |
const starCount = getFormattedStars("kamranahmedse/driver.js");
|
| 22 |
---
|
| 23 |
<div class="hidden md:block w-[200px] lg:w-[350px] border-r border-gray-200 text-right min-h-screen flex-shrink-0">
|
| 24 |
-
<div class="sticky top-0">
|
| 25 |
<div class="justify-end flex pt-10 pb-5 px-5">
|
| 26 |
<a href="/" class="block items-center justify-end mb-2">
|
| 27 |
<img src="/driver-head.svg" alt="Astro" class="w-16 h-16" />
|
|
|
|
| 21 |
const starCount = getFormattedStars("kamranahmedse/driver.js");
|
| 22 |
---
|
| 23 |
<div class="hidden md:block w-[200px] lg:w-[350px] border-r border-gray-200 text-right min-h-screen flex-shrink-0">
|
| 24 |
+
<div class="relative sh:sticky top-0">
|
| 25 |
<div class="justify-end flex pt-10 pb-5 px-5">
|
| 26 |
<a href="/" class="block items-center justify-end mb-2">
|
| 27 |
<img src="/driver-head.svg" alt="Astro" class="w-16 h-16" />
|
docs/tailwind.config.cjs
CHANGED
|
@@ -2,6 +2,12 @@
|
|
| 2 |
module.exports = {
|
| 3 |
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
| 4 |
theme: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
container: {
|
| 6 |
},
|
| 7 |
extend: {},
|
|
|
|
| 2 |
module.exports = {
|
| 3 |
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
| 4 |
theme: {
|
| 5 |
+
screens: {
|
| 6 |
+
'sh': {
|
| 7 |
+
'raw': '(min-height: 750px)',
|
| 8 |
+
},
|
| 9 |
+
...require('tailwindcss/defaultConfig').theme.screens,
|
| 10 |
+
},
|
| 11 |
container: {
|
| 12 |
},
|
| 13 |
extend: {},
|