Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions resources/views/article.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class="prose min-w-0 max-w-none grow text-gray-600 dark:text-gray-400 dark:prose
<div>
<x-sponsors.lists.docs.featured-sponsors />
<a href="/partners" class="mt-3 block text-center text-xs text-gray-500 transition hover:text-gray-800 dark:text-gray-400 dark:hover:text-white">Become a Partner</a>

<div class="mt-5 border-t border-t-black/20 pt-5 dark:border-t-white/15">
<x-sponsors.lists.docs.sponsors />
<a href="/sponsor" class="mt-3 block text-center text-xs text-gray-500 transition hover:text-gray-800 dark:text-gray-400 dark:hover:text-white">Become a sponsor</a>
</div>
</div>
</div>
</section>
Expand Down
18 changes: 12 additions & 6 deletions resources/views/blog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ class="flex items-center justify-between gap-5 pt-2.5"
@if (! $articles->onFirstPage())
<a
href="{{ $articles->previousPageUrl() }}"
class="inline-block p-1.5 opacity-60 transition duration-200 hover:opacity-100"
class="group inline-flex items-center gap-2 rounded-full border border-black/10 bg-black/[0.02] py-2 pr-4 pl-3 text-sm opacity-80 transition duration-200 hover:-translate-x-0.5 hover:border-black/20 hover:bg-black/5 hover:opacity-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20 dark:hover:bg-white/5"
aria-label="Go to previous page"
rel="prev"
>
<span class="sr-only">Navigate to</span>
Previous
<x-icons.right-arrow
class="size-3.5 shrink-0 -scale-x-100 transition-transform duration-200 group-hover:-translate-x-0.5"
aria-hidden="true"
/>
<span>Previous</span>
</a>
@endif
</div>
Expand Down Expand Up @@ -191,12 +194,15 @@ class="inline-block p-1.5 opacity-60 transition duration-200 hover:opacity-100"
@if (! $articles->onLastPage())
<a
href="{{ $articles->nextPageUrl() }}"
class="inline-block p-1.5 opacity-80 transition duration-200 hover:opacity-100"
class="group inline-flex items-center gap-2 rounded-full border border-black/10 bg-black/[0.02] py-2 pr-3 pl-4 text-sm opacity-80 transition duration-200 hover:translate-x-0.5 hover:border-black/20 hover:bg-black/5 hover:opacity-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20 dark:hover:bg-white/5"
aria-label="Go to next page"
rel="next"
>
<span class="sr-only">Navigate to</span>
Next
<span>Next</span>
<x-icons.right-arrow
class="size-3.5 shrink-0 transition-transform duration-200 group-hover:translate-x-0.5"
aria-hidden="true"
/>
</a>
@endif
</div>
Expand Down
11 changes: 11 additions & 0 deletions tests/Feature/BlogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ public function published_articles_are_shown_in_antichronological_order()
]);
}

#[Test]
public function the_blog_listing_renders_a_next_pagination_button_when_there_are_more_pages()
{
Article::factory()->count(7)->published()->create();

$this->get(route('blog'))
->assertOk()
->assertSee('Next')
->assertSee('page=2');
}

#[Test]
public function scheduled_articles_are_not_shown_on_the_blog_listing()
{
Expand Down
14 changes: 14 additions & 0 deletions tests/Feature/SponsorsAndPartnersPlacementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Feature;

use App\Models\Article;
use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
Expand All @@ -18,6 +19,19 @@ public function the_partners_page_renders_the_partners_section()
->assertSee('Meet Our Partners');
}

#[Test]
public function the_blog_article_mobile_view_shows_sponsors_below_partners()
{
$article = Article::factory()->published()->create();

$this->get(route('article', $article))
->assertOk()
->assertSeeInOrder([
'Become a Partner',
'Become a sponsor',
]);
}

#[Test]
public function the_sidebar_partners_list_rotates_through_every_entry_it_is_given()
{
Expand Down
Loading