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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "MIT",
"require": {
"php": "^8.2",
"feature-ninja/cva": "^0.3.0",
"inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
Expand Down
1 change: 1 addition & 0 deletions marketing/resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@plugin 'tailwindcss-animate';

@source '../views';
@source '../../src';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

@custom-variant dark (&:is(.dark *));
Expand Down
269 changes: 0 additions & 269 deletions marketing/resources/views/welcome.blade.php

This file was deleted.

2 changes: 1 addition & 1 deletion marketing/src/Http/Features/Welcome/WelcomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
{
public function __invoke(): View
{
return view('marketing::welcome');
return view()->file(__DIR__.'/welcome.blade.php');
}
}
53 changes: 53 additions & 0 deletions marketing/src/Http/Features/Welcome/welcome.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Laravel</title>

<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />

<!-- Styles / Scripts -->
{{
App\Assets\Facades\Bundle::serve('marketing', [
'resources/css/app.css',
'resources/js/app.tsx',
])
}}
</head>
<body class="bg-white dark:bg-gray-950 text-gray-700 dark:text-gray-300 flex p-6 lg:p-8 items-center lg:justify-center min-h-screen flex-col">
<header class="w-full lg:max-w-4xl max-w-[335px] text-sm mb-6 not-has-[nav]:hidden">
<nav class="flex items-center justify-end gap-4">
@auth
<x-marketing::button href="{{ url('/cp') }}" variant="outline">
Dashboard
</x-marketing::button>
@else
<x-marketing::button href="{{ url('/cp/login') }}">
Log in
</x-marketing::button>

<x-marketing::button href="{{ url('/cp/register') }}" variant="outline">
Register
</x-marketing::button>
@endauth
</nav>
</header>
<div class="flex items-center justify-center w-full transition-opacity opacity-100 duration-750 lg:grow starting:opacity-0">
<main class="px-6 py-24 sm:py-32 lg:px-8">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-5xl font-semibold tracking-tight text-gray-900 dark:text-white">Welcome</h2>
<p class="mt-8 text-gray-400 dark:text-gray-600 text-pretty text-lg">
Pellentesque malesuada mi consequat, bibendum neque eu, dignissim tellus. In ut sapien id odio bibendum
fermentum. Quisque sollicitudin, massa eu lobortis gravida, justo quam molestie libero, eget tempor
nulla orci ac arcu. Morbi mauris diam, interdum non posuere aliquam, volutpat sit amet felis.
</p>
</div>
</main>
</div>

</body>
</html>
46 changes: 46 additions & 0 deletions marketing/src/View/Components/Button.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

declare(strict_types=1);

namespace Marketing\View\Components;

use FeatureNinja\Cva\ClassVarianceAuthority;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

use function fn\cva;

final class Button extends Component
{
public function __construct(
public string $href,
public ?string $variant = null,
) {}

public function render(): View
{
return view()->file(__DIR__.'/button.blade.php', [
'classNames' => self::cva()([
'variant' => $this->variant,
]),
]);
}

private static function cva(): ClassVarianceAuthority
{
return once(fn () => cva(
'inline-block px-5 py-1.5 dark:text-[#EDEDEC] text-[#1b1b18] rounded-sm text-sm leading-normal',
[
'variants' => [
'variant' => [
'outline' => 'border-[#19140035] hover:border-[#1915014a] border dark:border-[#3E3E3A] dark:hover:border-[#62605b] ',
'solid' => 'border border-transparent hover:border-[#19140035] dark:hover:border-[#3E3E3A]',
],
],
'defaultVariants' => [
'variant' => 'solid',
],
],
));
}
}
3 changes: 3 additions & 0 deletions marketing/src/View/Components/button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a {{ $attributes }} href="{{ $href }}" class="{{ $classNames }}">
{{ $slot }}
</a>