Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link preloading #336

Merged
merged 1 commit into from
Jul 11, 2024
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
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers:public;max_age=300',
],

'api' => [
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"alpinejs": "^3.7.1",
"autoprefixer": "^10.4.14",
"clipboard": "^2.0.10",
"instant.page": "^5.2.0",
"laravel-vite-plugin": "^0.7.6",
"postcss": "^8.4.21",
"postcss-import": "^14.0.0",
Expand Down
24 changes: 24 additions & 0 deletions public/build/assets/app-3647e7c5.js

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions public/build/assets/app-f72b41bb.js

This file was deleted.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"src": "resources/images/vacation.svg"
},
"resources/js/app.js": {
"file": "assets/app-f72b41bb.js",
"file": "assets/app-3647e7c5.js",
"isEntry": true,
"src": "resources/js/app.js"
},
Expand Down
1 change: 1 addition & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Alpine from 'alpinejs';
import Focus from '@alpinejs/focus';
import docsearch from '@docsearch/js';
import 'instant.page'

import.meta.glob([
'../images/**',
Expand Down
6 changes: 3 additions & 3 deletions resources/views/frontend.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class="relative h-[300px] sm:h-[500px] lg:h-screen overflow-hidden flex items-ce
</h1>
<p class="hidden sm:block mt-6 max-w-2xl mx-auto text-center text-gray-700 text-md leading-relaxed md:mt-8 md:text-lg lg:mt-10 pointer-events-auto">Laravel is an intensely productive full-stack web framework. Pair Laravel and its rich ecosystem with Livewire, React, or Vue to build your next big idea and ship faster than you ever thought possible.</p>
<div class="hidden sm:flex mt-6 max-w-sm mx-auto flex-col justify-center items-center gap-4 sm:flex-row md:mt-8 lg:mt-10">
<x-button.primary class="w-full sm:w-auto pointer-events-auto" href="/docs">
<x-button.primary class="w-full sm:w-auto pointer-events-auto" href="/docs/{{ DEFAULT_VERSION }}">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These link changes just mean that the clients don't have to make 2 requests to get to the docs page, i.e, request to /docs which redirects to /docs/{currentVersion}

Get Started
</x-button.primary>
<x-button.secondary class="w-full sm:w-auto pointer-events-auto" href="https://laracasts.com" target="_blank">
Expand Down Expand Up @@ -145,7 +145,7 @@ class="relative h-[300px] sm:h-[500px] lg:h-screen overflow-hidden flex items-ce
<p class="sm:hidden px-4 text-center text-gray-700 text-md leading-relaxed">Laravel is an intensely productive full-stack web framework. Pair Laravel and its rich ecosystem with Livewire, React, or Vue to build your next big idea and ship faster than you ever thought possible.</p>

<div class="sm:hidden px-4 flex mt-6 max-w-sm mx-auto flex-col justify-center items-center gap-4 sm:flex-row md:mt-8 lg:mt-10">
<x-button.primary class="w-full sm:w-auto" href="/docs">
<x-button.primary class="w-full sm:w-auto" href="/docs/{{ DEFAULT_VERSION }}">
Get Started
</x-button.primary>
<x-button.secondary class="w-full sm:w-auto" href="https://laracasts.com" target="_blank">
Expand All @@ -172,7 +172,7 @@ class="relative h-[300px] sm:h-[500px] lg:h-screen overflow-hidden flex items-ce

@include('partials.features')

<p class="mt-12 text-gray-700 leading-relaxed max-w-3xl">We've just scratched the surface. Laravel has you covered for everything you will need to build a web application, including email verification, rate limiting, and custom console commands. Check out the <a href="https://laravel.com/docs" class="text-red-600 underline hover:no-underline">Laravel documentation</a> to keep learning or get started right away with our <a href="https://bootcamp.laravel.com" class="text-red-600 underline hover:no-underline">Laravel bootcamp</a>.</p>
<p class="mt-12 text-gray-700 leading-relaxed max-w-3xl">We've just scratched the surface. Laravel has you covered for everything you will need to build a web application, including email verification, rate limiting, and custom console commands. Check out the <a href="https://laravel.com/docs/{{ DEFAULT_VERSION }}" class="text-red-600 underline hover:no-underline">Laravel documentation</a> to keep learning or get started right away with our <a href="https://bootcamp.laravel.com" class="text-red-600 underline hover:no-underline">Laravel bootcamp</a>.</p>
</div>
</section>

Expand Down
6 changes: 3 additions & 3 deletions resources/views/marketing.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class="mt-6 max-w-xl mx-auto text-center text-gray-700 text-md leading-relaxed m
foundation — freeing you to create without sweating the small things.</p>
<div
class="mt-6 max-w-sm mx-auto flex flex-col justify-center items-center gap-4 sm:flex-row md:mt-8 lg:mt-10">
<x-button.primary class="w-full sm:w-auto" href="/docs">
<x-button.primary class="w-full sm:w-auto" href="/docs/{{ DEFAULT_VERSION }}">
Get Started
</x-button.primary>
<x-button.secondary class="w-full sm:w-auto" href="https://laracasts.com" target="_blank">
Expand Down Expand Up @@ -109,7 +109,7 @@ class="mt-6 max-w-sm mx-auto flex flex-col justify-center items-center gap-4 sm:
<p class="mt-6 text-gray-700 leading-relaxed">Laravel values beauty. We love clean code just as much
as you do. Simple, elegant syntax puts amazing functionality at your fingertips. Every feature
has been thoughtfully considered to provide a wonderful developer experience.</p>
<x-button.secondary class="mt-6" href="/docs">
<x-button.secondary class="mt-6" href="/docs/{{ DEFAULT_VERSION }}">
Start Learning
</x-button.secondary>
</div>
Expand Down Expand Up @@ -230,7 +230,7 @@ class="underline" href="https://inertiajs.com">Inertia</a>.</p>

<p class="mt-12 text-gray-700 leading-relaxed max-w-3xl">We've just scratched the surface. Laravel has you
covered for everything you will need to build a web application, including email verification, rate
limiting, and custom console commands. Check out the <a href="https://laravel.com/docs"
limiting, and custom console commands. Check out the <a href="https://laravel.com/docs/{{ DEFAULT_VERSION }}"
class="text-red-600 underline hover:no-underline">Laravel documentation</a> to keep learning.</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/partials/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class="mt-4 w-224 p-8 bg-white shadow-lg transform transition-transform origin-t
</ul>
<div class="flex-1 flex items-center justify-end">
<button id="docsearch"></button>
<x-button.secondary href="/docs" class="hidden lg:ml-4 lg:inline-flex">Documentation</x-button.secondary>
<x-button.secondary href="/docs/{{ DEFAULT_VERSION }}" class="hidden lg:ml-4 lg:inline-flex">Documentation</x-button.secondary>
<button
class="ml-2 relative w-10 h-10 inline-flex items-center justify-center p-2 text-gray-700 lg:hidden"
aria-label="Toggle Menu"
Expand Down Expand Up @@ -99,7 +99,7 @@ class="fixed inset-0 w-full pt-[4.2rem] z-10 pointer-events-none"
<li><a class="block w-full py-3" href="https://partners.laravel.com">Partners</a></li>
<li><a class="block w-full py-3" href="{{ route('careers') }}">Careers</a></li>
{{-- <li><a class="block w-full py-3" href="https://laravel.bigcartel.com/products">Shop</a></li> --}}
<li class="flex sm:justify-center"><x-button.secondary class="mt-3 w-full max-w-md" href="/docs">Documentation</x-button.secondary></li>
<li class="flex sm:justify-center"><x-button.secondary class="mt-3 w-full max-w-md" href="/docs/{{ DEFAULT_VERSION }}">Documentation</x-button.secondary></li>
</ul>
</div>
</nav>
Expand Down