Skip to content

Commit a8e372e

Browse files
✨ Refactor article and blog components to use new sidebar and article card structure
1 parent 98d5b27 commit a8e372e

File tree

4 files changed

+35
-64
lines changed

4 files changed

+35
-64
lines changed

resources/views/article.blade.php

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -121,38 +121,7 @@ class="prose max-w-none grow text-gray-600 dark:text-gray-400 dark:prose-heading
121121
</article>
122122

123123
{{-- Sidebar --}}
124-
<div
125-
x-init="
126-
() => {
127-
motion.inView($el, () => {
128-
gsap.fromTo(
129-
$el,
130-
{ autoAlpha: 0, x: 5 },
131-
{ autoAlpha: 1, x: 0, duration: 0.7, ease: 'power1.out' },
132-
)
133-
})
134-
}
135-
"
136-
class="sticky top-20 right-0 hidden max-w-52 shrink-0 min-[850px]:block"
137-
>
138-
{{-- Sponsors --}}
139-
<h3 class="flex items-center gap-1.5 opacity-60">
140-
{{-- Icon --}}
141-
<x-icons.star-circle class="size-6" />
142-
{{-- Label --}}
143-
<div>Sponsors</div>
144-
</h3>
145-
146-
{{-- List --}}
147-
<div class="space-y-3 pt-2.5">
148-
<x-sponsors.lists.docs.featured-sponsors />
149-
</div>
150-
151-
{{-- List --}}
152-
<div class="space-y-3 pt-2.5">
153-
<x-sponsors.lists.docs.corporate-sponsors />
154-
</div>
155-
</div>
124+
<x-blog.sidebar />
156125
</div>
157126
</section>
158127
</x-layout>

resources/views/blog.blade.php

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -121,46 +121,18 @@ class="sr-only"
121121
class="flex grow flex-col gap-5"
122122
>
123123
@foreach ($articles as $article)
124-
<x-article-card
124+
<x-blog.article-card
125125
:title="$article->title"
126126
:url="route('article', $article)"
127127
:date="$article->published_at"
128128
>
129129
{{ $article->excerpt }}
130-
</x-article-card>
130+
</x-blog.article-card>
131131
@endforeach
132132
</div>
133+
133134
{{-- Sidebar --}}
134-
<div
135-
x-init="
136-
() => {
137-
motion.inView($el, () => {
138-
gsap.fromTo(
139-
$el,
140-
{ autoAlpha: 0, x: 5 },
141-
{ autoAlpha: 1, x: 0, duration: 0.7, ease: 'power1.out' },
142-
)
143-
})
144-
}
145-
"
146-
class="sticky top-20 right-0 hidden max-w-52 shrink-0 min-[850px]:block"
147-
>
148-
{{-- Sponsors --}}
149-
<h3 class="flex items-center gap-1.5 opacity-60">
150-
{{-- Icon --}}
151-
<x-icons.star-circle class="size-6" />
152-
{{-- Label --}}
153-
<div>Sponsors</div>
154-
</h3>
155-
{{-- List --}}
156-
<div class="space-y-3 pt-2.5">
157-
<x-sponsors.lists.docs.featured-sponsors />
158-
</div>
159-
{{-- List --}}
160-
<div class="space-y-3 pt-2.5">
161-
<x-sponsors.lists.docs.corporate-sponsors />
162-
</div>
163-
</div>
135+
<x-blog.sidebar />
164136
</div>
165137
{{-- Pagination --}}
166138
<nav
File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<aside
2+
x-init="
3+
() => {
4+
motion.inView($el, () => {
5+
gsap.fromTo(
6+
$el,
7+
{ autoAlpha: 0, x: 5 },
8+
{ autoAlpha: 1, x: 0, duration: 0.7, ease: 'power1.out' },
9+
)
10+
})
11+
}
12+
"
13+
class="sticky top-20 right-0 hidden max-w-52 shrink-0 min-[850px]:block"
14+
>
15+
{{-- Sponsors --}}
16+
<h3 class="flex items-center gap-1.5 opacity-60">
17+
{{-- Icon --}}
18+
<x-icons.star-circle class="size-6" />
19+
{{-- Label --}}
20+
<div>Sponsors</div>
21+
</h3>
22+
{{-- List --}}
23+
<div class="space-y-3 pt-2.5">
24+
<x-sponsors.lists.docs.featured-sponsors />
25+
</div>
26+
{{-- List --}}
27+
<div class="space-y-3 pt-2.5">
28+
<x-sponsors.lists.docs.corporate-sponsors />
29+
</div>
30+
</aside>

0 commit comments

Comments
 (0)