This commit is contained in:
Bozhidar Slaveykov 2024-04-02 23:20:37 +03:00
parent 5205631ee8
commit a776855b22
9 changed files with 2425 additions and 4 deletions

View file

@ -17,4 +17,30 @@ class Modules extends Page
protected static ?int $navigationSort = 1; protected static ?int $navigationSort = 1;
protected function getViewData(): array
{
return [
'modules' => [
[
'name' => 'Lets Encrypt',
'description' => 'Automatically secure your website with a free SSL certificate from Lets Encrypt.',
'url' => '',
'icon' => 'heroicon-o-desktop-computer',
],
[
'name' => 'Microweber CMS',
'description' => 'A drag and drop website builder and a powerful next-generation CMS.',
'url' => '',
'icon' => 'heroicon-o-desktop-computer',
],
[
'name'=>'OpenCart',
'description'=>'A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.',
'url'=>'',
'icon'=>'heroicon-o-shopping-cart',
]
]
];
}
} }

View file

@ -6,6 +6,7 @@ use App\Events\ModelWebsiteCreated;
use App\Events\ModelWebsiteDeleting; use App\Events\ModelWebsiteDeleting;
use App\Listeners\ModelWebsiteCreatedListener; use App\Listeners\ModelWebsiteCreatedListener;
use App\Listeners\ModelWebsiteDeletingListener; use App\Listeners\ModelWebsiteDeletingListener;
use Filament\Facades\Filament;
use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -24,6 +25,12 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot(): void public function boot(): void
{ {
Filament::serving(function () {
// Using Vite
Filament::registerViteTheme('resources/css/app.css');
});
Event::listen(ModelWebsiteCreated::class,ModelWebsiteCreatedListener::class); Event::listen(ModelWebsiteCreated::class,ModelWebsiteCreatedListener::class);
Event::listen(ModelWebsiteDeleting::class,ModelWebsiteDeletingListener::class); Event::listen(ModelWebsiteDeleting::class,ModelWebsiteDeletingListener::class);
} }

2318
web/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,8 +6,15 @@
"build": "vite build" "build": "vite build"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.12",
"autoprefixer": "^10.4.19",
"axios": "^1.6.1", "axios": "^1.6.1",
"laravel-vite-plugin": "^0.8.0", "laravel-vite-plugin": "^0.8.0",
"postcss": "^8.4.38",
"postcss-nesting": "^12.1.1",
"tailwindcss": "^3.4.3",
"tippy.js": "^6.3.7",
"vite": "^4.0.0" "vite": "^4.0.0"
} }
} }

7
web/postcss.config.js Normal file
View file

@ -0,0 +1,7 @@
export default {
plugins: {
'tailwindcss/nesting': 'postcss-nesting',
tailwindcss: {},
autoprefixer: {},
},
}

View file

@ -0,0 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View file

@ -1,3 +1,40 @@
<x-filament-panels::page> <x-filament-panels::page>
<div style="display: flex;column-gap:1rem;">
@foreach($modules as $module)
<x-filament::section>
<div class="">
<div class="flex items-center gap-x-3">
<a
href="https://filamentphp.com"
rel="noopener noreferrer"
target="_blank"
>
<svg class="w-12 text-white" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M896 32h-256a96 96 0 0 0-96 96v256a96 96 0 0 0 96 96h256a96 96 0 0 0 96-96V128a96 96 0 0 0-96-96z m32 352a32 32 0 0 1-32 32h-256a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32zM64 224a32 32 0 0 0 12.16-2.56 37.12 37.12 0 0 0 10.56-6.72 32 32 0 0 0 6.72-34.88 32 32 0 0 0-6.72-10.56A32 32 0 0 0 57.6 160a20.8 20.8 0 0 0-5.76 1.92 23.68 23.68 0 0 0-5.76 2.88l-4.8 3.84a32 32 0 0 0-6.72 10.56A32 32 0 0 0 32 192a32 32 0 0 0 32 32zM149.76 128a32 32 0 0 0 17.6-5.44 160 160 0 0 1 115.2-24.32 32 32 0 1 0 10.56-64 225.92 225.92 0 0 0-160 34.24A32 32 0 0 0 149.76 128zM377.92 104a32 32 0 0 0-2.56 45.12A160 160 0 0 1 416 256v128a32 32 0 0 1-32 32H256a160 160 0 0 1-150.72-106.56 32 32 0 0 0-60.16 21.44A224 224 0 0 0 256 480h128a96 96 0 0 0 96-96V256a224 224 0 0 0-56.96-149.44 32 32 0 0 0-45.12-2.56zM896 544h-256a96 96 0 0 0-96 96v256a96 96 0 0 0 96 96h256a96 96 0 0 0 96-96v-256a96 96 0 0 0-96-96z m32 352a32 32 0 0 1-32 32h-256a32 32 0 0 1-32-32v-256a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32zM384 544H128a96 96 0 0 0-96 96v256a96 96 0 0 0 96 96h256a96 96 0 0 0 96-96v-256a96 96 0 0 0-96-96z m32 352a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32v-256a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32z" fill="#231815" /></svg>
</a>
</div>
<div class="flex flex-col items-end gap-y-1">
<x-filament::link
color="gray"
href="https://filamentphp.com/docs"
rel="noopener noreferrer"
target="_blank"
>
{{$module['name']}}
</x-filament::link>
<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">
v.0.0.1
</p>
</div>
</div>
</x-filament::section>
@endforeach
</div>
</x-filament-panels::page> </x-filament-panels::page>

10
web/tailwind.config.js Normal file
View file

@ -0,0 +1,10 @@
import preset from './vendor/filament/support/tailwind.config.preset'
export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
};

View file

@ -1,11 +1,15 @@
import { defineConfig } from 'vite'; import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'; import laravel, { refreshPaths } from 'laravel-vite-plugin'
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
laravel({ laravel({
input: ['resources/css/app.css', 'resources/js/app.js'], input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true, refresh: [
...refreshPaths,
'app/Livewire/**',
'resources/views/**/*.blade.php',
],
}), }),
], ],
}); })