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

fix: fix auth layout #10

Merged
merged 1 commit into from
May 3, 2023
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
41 changes: 18 additions & 23 deletions resources/views/components/forms/input.blade.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<div>
<label for="{{ $name }}" class="block mb-2 text-sm font-medium dark:text-white">{{ $label }}</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
@if ($icon == 'email')
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-5 h-5 text-gray-500">
<path stroke-linecap="round" stroke-linejoin="round"
d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" />
</svg>
@elseif($icon == 'password')
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-5 h-5 text-gray-500">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" />
</svg>
@endif
</div>
<input type="{{ $type }}" id="{{ $name }}" name="{{ $name }}"
class="w-full py-3 pl-10 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500"
placeholder="{{ $placeholder }}" value="{{ old($name) }}" />
<label for="{{ $name }}"
class="block mb-2 text-sm font-medium dark:text-white">{{ $label }}</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
@if ($icon == 'email')
<i class="bx bx-envelope text-xl text-gray-500"></i>
@elseif($icon == 'password')
<i class="bx bx-lock-alt text-xl text-gray-500"></i>
@elseif($icon == 'user')
<i class="bx bx-user text-xl text-gray-500"></i>
@endif
</div>
<input type="{{ $type }}" id="{{ $name }}" name="{{ $name }}"
class="w-full py-3 pl-10 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500"
placeholder="{{ $placeholder }}" value="{{ old($name) }}" />
</div>

@error($name)
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
@error($name)
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
@enderror
</div>
20 changes: 11 additions & 9 deletions resources/views/layout/auth.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
@extends('layout.master')

@section('master')
<main class="flex h-full">
<div class="relative w-3/5 md:flex flex-col justify-center hidden">
<img src="{{ asset('img/auth-bg.png') }}" alt="auth-bg" class="max-h-screen w-full">
<main class="flex h-full">
<div class="relative w-3/5 lg:flex flex-col justify-center hidden">
<img src="{{ asset('img/auth-bg.png') }}" alt="auth-bg" class="h-screen w-full">
</div>
<div class="basis-full flex flex-col justify-center max-h-screen lg:basis-5/6">
<div class="overflow-y-auto">
<div class="flex flex-col justify-center items-center gap-12 p-10 lg:px-0">
@yield('authForm')
</div>
<div class="basis-full max-h-screen overflow-y-auto md:basis-5/6">
<div class="flex flex-col justify-center items-center gap-12 py-10 px-5 md:px-0">
@yield('authForm')
</div>
</div>
</main>
</div>
</div>
</main>
@endsection
3 changes: 3 additions & 0 deletions resources/views/layout/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet">

{{-- Link Icon --}}
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
{{-- Link Css --}}
@vite('resources/css/app.css')
</head>
Expand Down