Skip to content

Commit b7a7d39

Browse files
authored
Merge pull request #63 from laravelcm/display-more-threads
Display more threads
2 parents 808fc32 + 77f1e0e commit b7a7d39

File tree

13 files changed

+35
-34
lines changed

13 files changed

+35
-34
lines changed

app/Http/Controllers/HomeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function index()
2727

2828
$latestThreads = Cache::remember('latestThreads', now()->addHour(), function () {
2929
return Thread::whereNull('solution_reply_id')
30-
->whereBetween('threads.created_at', [now()->subMonth(), now()])
30+
->whereBetween('threads.created_at', [now()->subMonths(3), now()])
3131
->inRandomOrder()
3232
->limit(4)
3333
->get();

app/View/Composers/ChannelsComposer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function compose(View $view)
1414
'channels',
1515
Cache::remember(
1616
'channels',
17-
now()->addDay(),
17+
now()->addWeek(),
1818
fn () => Channel::with('items')->whereNull('parent_id')->get()
1919
)
2020
);

public/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"/js/app.js": "/js/app.js?id=3bd7a17ae8879cea08888521628605ff",
3-
"/css/app.css": "/css/app.css?id=7b8652dcf9744257f1400ac52d15a911"
3+
"/css/app.css": "/css/app.css?id=ba2fad2529b5b940ef8cbaf0258160a4"
44
}

resources/views/articles/show.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<article class="relative lg:grid lg:grid-cols-9 lg:gap-10" xmlns:livewire="http://www.w3.org/1999/html">
1414
<div class="hidden relative lg:block lg:col-span-2">
15-
<div class="divide-y divide-skin-base sticky space-y-6 top-4">
15+
<x-sticky-content class="divide-y divide-skin-base space-y-6">
1616
<div>
1717
<h4 class="text-xs text-skin-base font-medium leading-4 tracking-wide uppercase font-heading">A propos de l’auteur</h4>
1818
<div class="mt-6 space-y-4">
@@ -88,7 +88,7 @@
8888
<div class="pt-6">
8989
<livewire:reactions :model="$article" />
9090
</div>
91-
</div>
91+
</x-sticky-content>
9292
</div>
9393
<div class="lg:col-span-5">
9494
<header class="space-y-4">
@@ -264,7 +264,7 @@ class="inline-flex items-center py-2 px-4 border border-skin-base rounded-md sha
264264
@endif
265265
</div>
266266
<div class="hidden relative lg:block lg:col-span-2">
267-
<div class="sticky top-4 space-y-10">
267+
<x-sticky-content class="space-y-10">
268268
@if($article->showToc())
269269
<div class="bg-skin-card px-4 py-6 rounded-lg shadow-lg">
270270
<h4 class="text-sm text-skin-inverted font-semibold leading-tight tracking-widest uppercase">Table des matières</h4>
@@ -275,7 +275,7 @@ class="inline-flex items-center py-2 px-4 border border-skin-base rounded-md sha
275275
<x-ads />
276276

277277
<x-discord />
278-
</div>
278+
</x-sticky-content>
279279
</div>
280280
</article>
281281

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<aside {{ $attributes->merge(['class' => 'sticky top-16']) }}>
2+
{{ $slot }}
3+
</aside>

resources/views/discussions/_contributions.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<aside class="sticky space-y-16 top-4">
1+
<x-sticky-content class="space-y-12">
22
<div>
33
<h4 class="text-lg font-semibold text-skin-inverted font-sans leading-6">Top Contributeurs</h4>
44
<p class="mt-3 font-normal text-skin-base text-sm">Les personnes qui ont lancé le plus de discussions sur le site.</p>
@@ -56,4 +56,4 @@
5656
</div>
5757

5858
</div>
59-
</aside>
59+
</x-sticky-content>

resources/views/forum/index.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
</div>
3636

3737
<div class="hidden relative mt-10 lg:block lg:col-span-2 xl:col-span-3">
38-
<aside class="sticky block top-4 space-y-10">
38+
<x-sticky-content class="space-y-10">
3939
<x-sponsors />
4040

4141
<x-ads />
4242

4343
@include('forum._moderators')
44-
</aside>
44+
</x-sticky-content>
4545
</div>
4646
</div>
4747

resources/views/forum/thread.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<div class="relative lg:grid lg:grid-cols-9 lg:gap-10">
99
<div class="hidden relative lg:block lg:col-span-2">
10-
<div class="sticky top-4 space-y-6">
10+
<x-sticky-content class="space-y-6">
1111
<x-button :link="route('forum.new')" class="w-full flex justify-center">
1212
Nouveau Sujet
1313
<x-heroicon-o-plus-circle class="h-4 w-4 ml-2.5" />
@@ -24,7 +24,7 @@
2424
@endauth
2525

2626
<x-forum.thread-author :author="$thread->author" />
27-
</div>
27+
</x-sticky-content>
2828
</div>
2929
<div class="lg:col-span-7 lg:pl-8 lg:border-l lg:border-skin-base">
3030
<h1 class="text-xl text-skin-inverted font-medium tracking-tight sm:text-3xl font-heading">{{ $thread->subject() }}</h1>

resources/views/layouts/footer.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<x-footer-link title="Jobs" url="#" soon />
2626

27-
<x-footer-link title="Sponsors" url="#" />
27+
<x-footer-link title="Sponsors" url="#" soon />
2828

2929
<x-footer-link title="Branding" url="https://github.com/caneco/laravel-country-logomarks/blob/main/src/cm/README.md" />
3030

0 commit comments

Comments
 (0)