diff --git a/package-lock.json b/package-lock.json index 5c328eae..d1765e41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "bold-condor", + "name": "fluffy-macaw", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/resources/views/components/blog/ad-rotation.blade.php b/resources/views/components/blog/ad-rotation.blade.php index 84ea4e49..023572c9 100644 --- a/resources/views/components/blog/ad-rotation.blade.php +++ b/resources/views/components/blog/ad-rotation.blade.php @@ -1,4 +1,4 @@ -@props(['ads' => ['mobile', 'devkit', 'ultra', 'vibes', 'masterclass']]) +@props(['ads' => ['mobile', 'desktop', 'bifrost', 'devkit', 'ultra', 'vibes', 'masterclass']]) @php $adsJson = json_encode($ads); @@ -76,6 +76,126 @@ class="h-15 w-36 rotate-30 rounded-full bg-violet-300 blur-xl dark:bg-violet-400 @endif + {{-- NativePHP Desktop Ad --}} + @if (in_array('desktop', $ads)) + + {{-- Logo --}} +
+ + NativePHP +
+ + {{-- Tagline --}} +
+ Bring your + Laravel + skills to the + desktop. +
+ + {{-- Macbook --}} +
+ +
+ + {{-- Star 1 --}} + + {{-- Star 2 --}} + + {{-- Star 3 --}} + + {{-- White blur --}} +
+
+
+ {{-- Sky blur --}} +
+
+
+ {{-- Violet blur --}} +
+
+
+
+ @endif + + {{-- Bifrost Ad --}} + @if (in_array('bifrost', $ads)) + + {{-- Badge --}} +
+ + Cloud Platform +
+ + {{-- Logo --}} +
+ + Bifrost +
+ + {{-- Tagline --}} +
+ Build your NativePHP apps + in the cloud. +
+ + {{-- CTA --}} +
+ Ship it! +
+ + {{-- Price hint --}} +
+ Plans from $19/mo +
+ + {{-- Decorative stars --}} + + + +
+ @endif + {{-- Plugin Dev Kit Ad --}} @if (in_array('devkit', $ads)) - Early Bird Pricing - - {{-- Decorative stars --}} 1 }) " - class="font-poppins min-h-screen overflow-x-clip antialiased selection:bg-black selection:text-[#b4a9ff] dark:bg-[#050714] dark:text-white" + class="font-poppins min-h-screen overflow-x-clip bg-white antialiased selection:bg-black selection:text-[#b4a9ff] dark:bg-[#050714] dark:text-white" > diff --git a/resources/views/docs/index.blade.php b/resources/views/docs/index.blade.php index 29d44e8c..ab2b5459 100644 --- a/resources/views/docs/index.blade.php +++ b/resources/views/docs/index.blade.php @@ -27,7 +27,7 @@ {{-- Ad rotation --}} @@ -164,6 +164,6 @@ class="flex items-center justify-end gap-1.5 opacity-60" {{-- Mobile ad rotation --}} diff --git a/tests/Feature/AdRotationTest.php b/tests/Feature/AdRotationTest.php new file mode 100644 index 00000000..abb13bca --- /dev/null +++ b/tests/Feature/AdRotationTest.php @@ -0,0 +1,75 @@ +blade('') + ->assertSee('https://bifrost.nativephp.com/') + ->assertSee("ad === 'bifrost'", false) + ->assertSee('Cloud Platform') + ->assertSee('Ship it!'); + } + + #[Test] + public function the_bifrost_ad_can_be_rendered_on_its_own() + { + $this->blade('') + ->assertSee('https://bifrost.nativephp.com/') + ->assertDontSee('/docs/mobile'); + } + + #[Test] + public function the_bifrost_ad_is_omitted_when_not_in_the_ad_list() + { + $this->blade('') + ->assertDontSee('https://bifrost.nativephp.com/') + ->assertDontSee("ad === 'bifrost'", false); + } + + #[Test] + public function the_desktop_ad_is_included_in_the_default_rotation() + { + $this->blade('') + ->assertSee("ad === 'desktop'", false) + ->assertSee('href="/docs/desktop"', false) + ->assertSee('macbook'); + } + + #[Test] + public function the_masterclass_ad_no_longer_shows_early_bird_pricing() + { + $this->blade('') + ->assertSee('The Masterclass') + ->assertDontSee('Early Bird Pricing'); + } + + #[Test] + public function desktop_docs_rotate_the_mobile_ad_but_never_the_desktop_ad() + { + $this->followingRedirects() + ->get('/docs/desktop') + ->assertOk() + ->assertSee("ad === 'mobile'", false) + ->assertDontSee("ad === 'desktop'", false); + } + + #[Test] + public function mobile_docs_rotate_the_desktop_ad_but_never_the_mobile_ad() + { + $this->followingRedirects() + ->get('/docs/mobile') + ->assertOk() + ->assertSee("ad === 'desktop'", false) + ->assertDontSee("ad === 'mobile'", false); + } +}