From dffb3fdcd31fa03c475e4690dff5d47a6228da79 Mon Sep 17 00:00:00 2001 From: val Date: Thu, 13 Jun 2024 12:11:30 +0200 Subject: [PATCH] refactor: better auth page --- resources/views/components/box.blade.php | 2 ++ .../{ => components}/layout/auth.blade.php | 6 ++-- .../layout/{ => element}/icon.blade.php | 0 .../layout/{ => element}/profil.blade.php | 0 .../layout/{ => element}/topbar.blade.php | 0 .../layout/main.blade.php} | 35 ++++++++++++------- resources/views/pages/login.blade.php | 34 ++++++++---------- 7 files changed, 43 insertions(+), 34 deletions(-) rename resources/views/{ => components}/layout/auth.blade.php (79%) rename resources/views/components/layout/{ => element}/icon.blade.php (100%) rename resources/views/components/layout/{ => element}/profil.blade.php (100%) rename resources/views/components/layout/{ => element}/topbar.blade.php (100%) rename resources/views/{layout/admin.blade.php => components/layout/main.blade.php} (62%) diff --git a/resources/views/components/box.blade.php b/resources/views/components/box.blade.php index e2e5e37..d515f52 100644 --- a/resources/views/components/box.blade.php +++ b/resources/views/components/box.blade.php @@ -1,3 +1,5 @@ +@props(['title' => null]) +
@isset($title)
diff --git a/resources/views/layout/auth.blade.php b/resources/views/components/layout/auth.blade.php similarity index 79% rename from resources/views/layout/auth.blade.php rename to resources/views/components/layout/auth.blade.php index 0bb9973..2ad3116 100644 --- a/resources/views/layout/auth.blade.php +++ b/resources/views/components/layout/auth.blade.php @@ -1,16 +1,18 @@ +@props(['title' => 'Log in on Helium']) + - Login on Helium + {{ $title }} @vite('resources/css/vendor/helium/app.css') - @yield('content') + {{ $slot }} @vite('resources/js/vendor/helium/app.js') diff --git a/resources/views/components/layout/icon.blade.php b/resources/views/components/layout/element/icon.blade.php similarity index 100% rename from resources/views/components/layout/icon.blade.php rename to resources/views/components/layout/element/icon.blade.php diff --git a/resources/views/components/layout/profil.blade.php b/resources/views/components/layout/element/profil.blade.php similarity index 100% rename from resources/views/components/layout/profil.blade.php rename to resources/views/components/layout/element/profil.blade.php diff --git a/resources/views/components/layout/topbar.blade.php b/resources/views/components/layout/element/topbar.blade.php similarity index 100% rename from resources/views/components/layout/topbar.blade.php rename to resources/views/components/layout/element/topbar.blade.php diff --git a/resources/views/layout/admin.blade.php b/resources/views/components/layout/main.blade.php similarity index 62% rename from resources/views/layout/admin.blade.php rename to resources/views/components/layout/main.blade.php index a5ae5ef..0dd3008 100644 --- a/resources/views/layout/admin.blade.php +++ b/resources/views/components/layout/main.blade.php @@ -1,3 +1,12 @@ +@props([ + 'title' => 'Helium', + 'css', + 'cssStack', + 'topbar', + 'js', + 'jsStack', +]) + @@ -7,35 +16,35 @@ content="width=device-width, initial-scale=1.0"> - @yield('css') - @stack('css-stack') - {{-- todo @val: this path won't work in a real environment --}} - @vite('packages/helium-core/resources/css/app.css') - Helium + @vite('resources/css/vendor/helium/app.css') + {{ $css }} + {{ $cssStack }} + + {{ $title }}
- +
- +
- @yield('topbar') + {{ $topbar }}
- @yield('content') + {{ $slot }}
- {{-- todo @val: this path won't work in a real environment --}} - @vite('packages/helium-core/resources/js/app.js') - @yield('js') - @stack('js-stack') + + @vite('resources/js/vendor/helium/app.js') + {{ $js }} + {{ $jsStack }} diff --git a/resources/views/pages/login.blade.php b/resources/views/pages/login.blade.php index 3208275..aa662ba 100644 --- a/resources/views/pages/login.blade.php +++ b/resources/views/pages/login.blade.php @@ -1,23 +1,19 @@ -@extends('hui::layout.auth') - -@section('content') +
@csrf -
- - -
-
- - -
- + + + + + +
-@endsection +