Skip to content

Commit 6e0862e

Browse files
✨ Improve docs layout and re-arrange the sponsor list (#102)
* ✨ Add @alpinejs/resize dependency and update layout for responsive behavior * ✨ Add footer links underline effect * ✨ Update footer link underline color to use current text color * ✨ Update layout components to remove unnecessary max-height constraints * ✨ Refactor navigation components to improve layout and transition effects * ✨ Add overflow control for body based on documentation navigation visibility * ✨ Update navigation structure to use specific class for documentation navigation * ✨ Adjust sidebar navigation styles for improved layout and overflow handling * ✨ Add max-height constraint to sidebars for improved overflow handling * ✨ Add max-height and overflow control to table of contents for improved layout * ✨ Refactor table of contents and sponsors layout; remove unused briefcase icon * ✨ Add sponsor link and decorative circle to navigation bar * ✨ Replace love balloons icon with heart icon in navigation bar; enhance sponsor link visuals * ✨ Enhance sponsor link animation in navigation bar; add heart animations on hover * ✨ Improve accessibility for sponsor link in navigation bar; add aria-labels and hidden text * ✨ Update corporate sponsors layout; reduce height of sponsor links and logos for improved design consistency * ✨ Optimize animation durations and adjust x-coordinate for sponsor heart in navigation bar * ✨ Update navigation bar styles; adjust background colors and blur effects for improved visual consistency * ✨ Update sponsor link in navigation bar; change href to point to documentation page * ✨ Refactor navigation and sidebar components; improve layout and accessibility for sponsors section * ✨ Update navigation bar sponsor link styles; enhance gradient colors for improved visual appeal * ✨ Adjust minimum height of table of contents container; improve layout consistency * ✨ Refactor beta alert component; improve layout responsiveness and visual hierarchy
1 parent 1fa6731 commit 6e0862e

18 files changed

+353
-213
lines changed

package-lock.json

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"devDependencies": {
99
"@alpinejs/collapse": "^3.14.9",
1010
"@alpinejs/persist": "^3.14.9",
11+
"@alpinejs/resize": "^3.14.9",
1112
"@docsearch/js": "^3.9.0",
1213
"@fontsource/poppins": "^5.2.5",
1314
"@tailwindcss/typography": "^0.5.16",

resources/css/app.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
}
5151

5252
/* Whole menu */
53-
nav ul {
53+
nav.docs-navigation ul {
5454
@apply list-none text-sm;
5555
}
5656

5757
/* Categories */
58-
nav > ul > li {
58+
nav.docs-navigation > ul > li {
5959
@apply mb-3;
6060

6161
& > a {
@@ -65,24 +65,24 @@ nav > ul > li {
6565
}
6666
}
6767

68-
nav > ul > li.active > a {
68+
nav.docs-navigation > ul > li.active > a {
6969
@apply text-black dark:text-white;
7070

7171
& > svg {
7272
@apply text-violet-400;
7373
}
7474
}
7575

76-
nav > ul > li > a {
76+
nav.docs-navigation > ul > li > a {
7777
@apply transition duration-200 will-change-transform;
7878
}
7979

80-
nav > ul > li:hover > a {
80+
nav.docs-navigation > ul > li:hover > a {
8181
@apply translate-x-0.5 bg-gray-50 dark:bg-gray-900/50;
8282
}
8383

8484
/* Sub menus */
85-
nav > ul > li > ul {
85+
nav.docs-navigation > ul > li > ul {
8686
& > li {
8787
@apply font-normal;
8888

resources/js/app.js

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import './fonts'
22
import './bootstrap'
33
import Alpine from 'alpinejs'
44
import collapse from '@alpinejs/collapse'
5+
import resize from '@alpinejs/resize'
56
import persist from '@alpinejs/persist'
67
import codeBlock from './alpine/codeBlock.js'
78
import docsearch from '@docsearch/js'
@@ -58,6 +59,7 @@ Alpine.magic('refAll', (el) => {
5859

5960
Alpine.plugin(collapse)
6061
Alpine.plugin(persist)
62+
Alpine.plugin(resize)
6163
Alpine.start()
6264

6365
// Docsearch

resources/views/components/alert-beta.blade.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<div
2-
class="relative z-0 mt-5 flex items-center gap-6 overflow-hidden rounded-2xl bg-yellow-50/50 px-6 py-5 ring-1 ring-black/5 dark:bg-mirage"
2+
class="relative z-0 mt-5 flex flex-col items-start gap-x-6 gap-y-4 overflow-hidden rounded-2xl bg-yellow-50/50 px-6 py-5 ring-1 ring-black/5 min-[450px]:flex-row min-[450px]:items-center dark:bg-mirage"
33
role="alert"
44
aria-labelledby="beta-alert-title"
55
aria-describedby="beta-alert-description"
66
>
77
<div
8-
class="absolute left-0 top-1/2 -z-10 size-16 -translate-y-1/2 rounded-full bg-yellow-400/60 blur-2xl dark:block"
8+
class="absolute left-0 top-0 -z-10 size-16 rounded-full bg-yellow-400/60 blur-2xl min-[450px]:top-1/2 min-[450px]:-translate-y-1/2 dark:block"
99
aria-hidden="true"
1010
></div>
1111

1212
{{-- Icon --}}
1313
<x-icons.alert-diamond
14-
class="size-10 shrink-0"
14+
class="size-10 shrink-0 mix-blend-hard-light"
1515
aria-hidden="true"
1616
/>
1717

resources/views/components/footer.blade.php

+18-7
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,15 @@ class="flex flex-col flex-wrap items-center gap-2 opacity-0 md:flex-row"
190190
<div class="flex gap-1">
191191
<div>Website designed by</div>
192192
<a
193-
href="https://x.com/HassanZahirnia"
193+
href="https://zahirnia.com"
194194
target="_blank"
195-
class="font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
196-
aria-label="Hassan's Twitter profile"
197-
rel="noopener noreferrer"
195+
class="group relative font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
196+
aria-label="Hassan's website"
198197
>
199198
Hassan Zahirnia
199+
<div
200+
class="absolute -bottom-0.5 left-0 h-px w-full origin-right scale-x-0 bg-current transition duration-300 ease-out will-change-transform group-hover:origin-left group-hover:scale-x-100"
201+
></div>
200202
</a>
201203
</div>
202204
<div
@@ -207,11 +209,14 @@ class="hidden h-3 w-0.5 bg-gray-300 md:block dark:bg-[#242734]"
207209
<a
208210
href="https://x.com/caneco"
209211
target="_blank"
210-
class="font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
212+
class="group relative font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
211213
aria-label="Caneco's Twitter profile"
212214
rel="noopener noreferrer"
213215
>
214216
Caneco
217+
<div
218+
class="absolute -bottom-0.5 left-0 h-px w-full origin-right scale-x-0 bg-current transition duration-300 ease-out will-change-transform group-hover:origin-left group-hover:scale-x-100"
219+
></div>
215220
</a>
216221
</div>
217222
</div>
@@ -239,21 +244,27 @@ class="opacity-0"
239244
<a
240245
href="https://x.com/marcelpociot"
241246
target="_blank"
242-
class="font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
247+
class="group relative font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
243248
aria-label="Marcel Pociot's Twitter profile"
244249
rel="noopener noreferrer"
245250
>
246251
Marcel Pociot
252+
<div
253+
class="absolute -bottom-0.5 left-0 h-px w-full origin-right scale-x-0 bg-current transition duration-300 ease-out will-change-transform group-hover:origin-left group-hover:scale-x-100"
254+
></div>
247255
</a>
248256
<span>and</span>
249257
<a
250258
href="https://x.com/simonhamp"
251259
target="_blank"
252-
class="font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
260+
class="group relative font-medium text-black/80 transition duration-200 hover:text-black dark:text-white/80 dark:hover:text-white"
253261
aria-label="Simon Hamp's Twitter profile"
254262
rel="noopener noreferrer"
255263
>
256264
Simon Hamp
265+
<div
266+
class="absolute -bottom-0.5 left-0 h-px w-full origin-right scale-x-0 bg-current transition duration-300 ease-out will-change-transform group-hover:origin-left group-hover:scale-x-100"
267+
></div>
257268
</a>
258269
</div>
259270
</section>

resources/views/components/icons/briefcase.blade.php

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<svg
2+
{{ $attributes }}
3+
xmlns="http://www.w3.org/2000/svg"
4+
fill="none"
5+
viewBox="0 0 14 14"
6+
>
7+
<path
8+
fill="currentColor"
9+
fill-rule="evenodd"
10+
d="M13.9999 4.90123c-0.0243 -1.61475 -0.957 -3.19764 -2.3809 -3.84786 -0.7225 -0.329946 -1.5595 -0.412005 -2.43315 -0.140193C8.45112 1.14176 7.71291 1.61309 7 2.35813 6.28709 1.61309 5.54887 1.14177 4.81414 0.913202 3.94046 0.641407 3.10347 0.723494 2.38096 1.05346 0.957106 1.70373 0.0244119 3.28666 0.0000568628 4.90141L0 4.90141v0.00754c0 2.35206 1.42699 4.43436 2.9363 5.89465 0.76215 0.7374 1.5664 1.3374 2.26745 1.756 0.35035 0.2092 0.68156 0.3771 0.97447 0.4942 0.28057 0.1123 0.56991 0.1961 0.82177 0.1961s0.5412 -0.0839 0.82177 -0.1961c0.29292 -0.1171 0.62413 -0.285 0.97448 -0.4942 0.70105 -0.4187 1.50526 -1.0186 2.26746 -1.7561C12.573 9.34318 14 7.26083 14 4.90877h0.0001l-0.0002 -0.00754Z"
11+
clip-rule="evenodd"
12+
stroke-width="1"
13+
></path>
14+
</svg>

resources/views/components/icons/love-baloons.blade.php

-45
This file was deleted.

resources/views/components/layout-three-columns.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<x-layout :hasMenu="! empty($sidebarLeft)">
22
{{-- Main container --}}
33
<main
4-
class="mx-auto flex w-full max-w-5xl grow px-4 pt-1 xl:max-w-7xl 2xl:max-w-[90rem]"
4+
class="mx-auto flex w-full max-w-5xl grow items-start px-4 pt-1 xl:max-w-7xl 2xl:max-w-[90rem]"
55
>
66
{{-- Left sidebar --}}
77
@if (! empty($sidebarLeft))
@@ -10,7 +10,7 @@ class="mx-auto flex w-full max-w-5xl grow px-4 pt-1 xl:max-w-7xl 2xl:max-w-[90re
1010
</x-sidebar-left-navigation>
1111
@endif
1212

13-
<div class="flex w-full min-w-0 grow px-2 pt-2">
13+
<div class="flex w-full min-w-0 grow items-start px-2 pt-2">
1414
{{-- Content --}}
1515
<article class="flex w-full min-w-0 grow flex-col lg:pl-5 xl:pr-5">
1616
{{ $slot }}

resources/views/components/layout.blade.php

+19-1
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,30 @@
5858
</head>
5959
<body
6060
x-cloak
61-
x-data="{ showDocsNavigation: false, scrolled: false }"
61+
x-data="{
62+
showDocsNavigation: false,
63+
scrolled: window.scrollY > 50,
64+
width: window.innerWidth,
65+
get showPlatformSwitcherHeader() {
66+
return ! this.scrolled && this.width >= 1024
67+
},
68+
}"
69+
x-resize="
70+
width = $width
71+
if (width >= 1024) showDocsNavigation = false
72+
"
6273
x-init="
6374
window.addEventListener('scroll', () => {
6475
scrolled = window.scrollY > 50
6576
})
6677
"
78+
x-effect="
79+
if (showDocsNavigation) {
80+
document.body.style.overflow = 'hidden'
81+
} else {
82+
document.body.style.overflow = ''
83+
}
84+
"
6785
class="min-h-screen overflow-x-clip font-poppins antialiased selection:bg-black selection:text-[#b4a9ff] dark:bg-[#050714] dark:text-white"
6886
>
6987
<x-navigation-bar :hasMenu="$hasMenu ?? false" />

0 commit comments

Comments
 (0)