From 0a271ff03e53680a3a8a03950ddfb19c14ed257f Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Mon, 9 Sep 2024 16:20:54 -0400 Subject: [PATCH] add link to sections --- app/View/Components/ModListSection.php | 3 +++ resources/views/components/mod-list-section-partial.blade.php | 4 ++-- resources/views/components/mod-list-section.blade.php | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/View/Components/ModListSection.php b/app/View/Components/ModListSection.php index d08350e..f9c257c 100644 --- a/app/View/Components/ModListSection.php +++ b/app/View/Components/ModListSection.php @@ -88,16 +88,19 @@ class ModListSection extends Component 'title' => __('Featured Mods'), 'mods' => $this->modsFeatured, 'versionScope' => 'latestVersion', + 'link' => '/mods?featured=only', ], [ 'title' => __('Newest Mods'), 'mods' => $this->modsLatest, 'versionScope' => 'latestVersion', + 'link' => '/mods', ], [ 'title' => __('Recently Updated Mods'), 'mods' => $this->modsUpdated, 'versionScope' => 'lastUpdatedVersion', + 'link' => '/mods?order=updated', ], ]; } diff --git a/resources/views/components/mod-list-section-partial.blade.php b/resources/views/components/mod-list-section-partial.blade.php index efbbc7a..79c68c9 100644 --- a/resources/views/components/mod-list-section-partial.blade.php +++ b/resources/views/components/mod-list-section-partial.blade.php @@ -1,10 +1,10 @@ -@props(['mods', 'versionScope', 'title']) +@props(['mods', 'versionScope', 'title', 'link'])
{{-- TODO: The button-link should be dynamic based on the versionScope. Eg. Featured `View All` button should take the user to the mods page with the `featured` query parameter set. --}} - +
diff --git a/resources/views/components/mod-list-section.blade.php b/resources/views/components/mod-list-section.blade.php index a7528cd..15a0daa 100644 --- a/resources/views/components/mod-list-section.blade.php +++ b/resources/views/components/mod-list-section.blade.php @@ -3,5 +3,6 @@ 'title' => $section['title'], 'mods' => $section['mods'], 'versionScope' => $section['versionScope'], + 'link' => $section['link'] ]) @endforeach