Skip to content

Commit cbaa55b

Browse files
simonhampclaude
andcommitted
Move ToC above article to avoid prose link styles, remove border
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8c83064 commit cbaa55b

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

resources/views/components/plugin-toc.blade.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
}"
1616
x-show="headings.length > 0"
1717
x-cloak
18-
class="mb-4 rounded-2xl p-6"
18+
class="mb-6"
1919
>
20-
<h2 class="flex items-center gap-1.5 text-sm opacity-60">
20+
<h3 class="flex items-center gap-1.5 text-sm opacity-60">
2121
<x-icons.stacked-lines class="size-[18px]" />
2222
<div>On this page</div>
23-
</h2>
23+
</h3>
2424

25-
<nav class="mt-4 flex flex-col space-y-2 overflow-y-auto overflow-x-hidden border-l text-xs dark:border-l-white/15">
25+
<div class="mt-4 flex flex-col space-y-2 overflow-y-auto overflow-x-hidden border-l text-xs dark:border-l-white/15">
2626
<template x-for="heading in headings" :key="heading.id">
2727
<a
2828
:href="'#' + heading.id"
2929
:class="heading.level === 2 ? 'pb-1 pl-3' : 'py-1 pl-6'"
30-
class="text-gray-600 transition duration-300 ease-in-out will-change-transform hover:translate-x-0.5 hover:text-indigo-500 hover:opacity-100 dark:text-white/80 dark:hover:text-indigo-400"
30+
class="transition duration-300 ease-in-out will-change-transform hover:translate-x-0.5 hover:text-violet-400 hover:opacity-100 dark:text-white/80"
3131
x-text="heading.text"
3232
></a>
3333
</template>
34-
</nav>
34+
</div>
3535
</div>

resources/views/plugin-show.blade.php

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,31 +96,37 @@ class="font-mono text-2xl font-bold sm:text-3xl"
9696

9797
<div class="mt-2 flex flex-col-reverse gap-8 lg:flex-row lg:items-start">
9898
{{-- Main content - README --}}
99-
<article
100-
x-init="
101-
() => {
102-
motion.inView($el, () => {
103-
gsap.fromTo(
104-
$el,
105-
{ autoAlpha: 0, y: 5 },
106-
{ autoAlpha: 1, y: 0, duration: 0.7, ease: 'power1.out' },
107-
)
108-
})
109-
}
110-
"
111-
class="prose min-w-0 max-w-none grow text-gray-600 dark:text-gray-400 dark:prose-headings:text-white"
112-
aria-labelledby="plugin-title"
113-
>
99+
<div class="min-w-0 grow">
114100
@if ($plugin->readme_html)
115-
{!! $plugin->readme_html !!}
101+
<x-plugin-toc />
102+
@endif
103+
104+
<article
105+
x-init="
106+
() => {
107+
motion.inView($el, () => {
108+
gsap.fromTo(
109+
$el,
110+
{ autoAlpha: 0, y: 5 },
111+
{ autoAlpha: 1, y: 0, duration: 0.7, ease: 'power1.out' },
112+
)
113+
})
114+
}
115+
"
116+
class="prose min-w-0 max-w-none grow text-gray-600 dark:text-gray-400 dark:prose-headings:text-white"
117+
aria-labelledby="plugin-title"
118+
>
119+
@if ($plugin->readme_html)
120+
{!! $plugin->readme_html !!}
116121
@else
117122
<div class="rounded-xl border border-gray-200 bg-gray-50 p-8 text-center dark:border-gray-700 dark:bg-slate-800/50">
118123
<p class="text-gray-500 dark:text-gray-400">
119124
README not available yet.
120125
</p>
121126
</div>
122-
@endif
123-
</article>
127+
@endif
128+
</article>
129+
</div>
124130

125131
{{-- Sidebar - Plugin details --}}
126132
<aside
@@ -137,11 +143,6 @@ class="prose min-w-0 max-w-none grow text-gray-600 dark:text-gray-400 dark:prose
137143
"
138144
class="w-full shrink-0 lg:sticky lg:top-24 lg:w-80"
139145
>
140-
{{-- Table of Contents --}}
141-
@if ($plugin->readme_html)
142-
<x-plugin-toc />
143-
@endif
144-
145146
{{-- Purchase Box for Paid Plugins --}}
146147
@if ($plugin->isPaid() && $bestPrice && $plugin->is_active)
147148
<div class="mb-4 rounded-2xl border-2 border-indigo-500 bg-gradient-to-br from-indigo-50 to-purple-50 p-6 dark:border-indigo-400 dark:from-indigo-950/50 dark:to-purple-950/50">
@@ -342,6 +343,7 @@ class="size-10 shrink-0 rounded-lg object-cover"
342343
</ul>
343344
</div>
344345
@endif
346+
345347
</aside>
346348
</div>
347349
</section>

0 commit comments

Comments
 (0)