Form width fixed

This commit is contained in:
Александр Бабкин
2022-06-29 08:07:05 +03:00
parent d0bf766c5c
commit a2b909e3da
6 changed files with 156 additions and 125 deletions

View File

@@ -746,12 +746,12 @@ select {
.mt-3 { .mt-3 {
margin-top: 0.75rem; margin-top: 0.75rem;
} }
.mt-6 {
margin-top: 1.5rem;
}
.mb-4 { .mb-4 {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.mt-6 {
margin-top: 1.5rem;
}
.block { .block {
display: block; display: block;
} }
@@ -806,6 +806,9 @@ select {
.w-auto { .w-auto {
width: auto; width: auto;
} }
.w-96 {
width: 24rem;
}
.w-4 { .w-4 {
width: 1rem; width: 1rem;
} }
@@ -824,6 +827,9 @@ select {
.max-w-6xl { .max-w-6xl {
max-width: 72rem; max-width: 72rem;
} }
.max-w-xl {
max-width: 36rem;
}
.flex-1 { .flex-1 {
flex: 1 1 0%; flex: 1 1 0%;
} }
@@ -924,6 +930,9 @@ select {
.border-l-4 { .border-l-4 {
border-left-width: 4px; border-left-width: 4px;
} }
.border-r {
border-right-width: 1px;
}
.border-gray-300 { .border-gray-300 {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(209 213 219 / var(--tw-border-opacity)); border-color: rgb(209 213 219 / var(--tw-border-opacity));
@@ -943,6 +952,10 @@ select {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(129 140 248 / var(--tw-border-opacity)); border-color: rgb(129 140 248 / var(--tw-border-opacity));
} }
.border-gray-400 {
--tw-border-opacity: 1;
border-color: rgb(156 163 175 / var(--tw-border-opacity));
}
.bg-white { .bg-white {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity)); background-color: rgb(255 255 255 / var(--tw-bg-opacity));
@@ -1078,6 +1091,9 @@ select {
.tracking-widest { .tracking-widest {
letter-spacing: 0.1em; letter-spacing: 0.1em;
} }
.tracking-wider {
letter-spacing: 0.05em;
}
.text-gray-500 { .text-gray-500 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity)); color: rgb(107 114 128 / var(--tw-text-opacity));
@@ -1114,6 +1130,14 @@ select {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(239 68 68 / var(--tw-text-opacity)); color: rgb(239 68 68 / var(--tw-text-opacity));
} }
.text-green-500 {
--tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity));
}
.text-blue-500 {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity));
}
.text-green-600 { .text-green-600 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(22 163 74 / var(--tw-text-opacity)); color: rgb(22 163 74 / var(--tw-text-opacity));
@@ -1134,22 +1158,6 @@ select {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(79 70 229 / var(--tw-text-opacity)); color: rgb(79 70 229 / var(--tw-text-opacity));
} }
.text-green-500 {
--tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity));
}
.text-green-200 {
--tw-text-opacity: 1;
color: rgb(187 247 208 / var(--tw-text-opacity));
}
.text-green-700 {
--tw-text-opacity: 1;
color: rgb(21 128 61 / var(--tw-text-opacity));
}
.text-blue-500 {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity));
}
.underline { .underline {
-webkit-text-decoration-line: underline; -webkit-text-decoration-line: underline;
text-decoration-line: underline; text-decoration-line: underline;
@@ -9062,14 +9070,14 @@ readers do not read off random characters that represent icons */
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(55 65 81 / var(--tw-text-opacity)); color: rgb(55 65 81 / var(--tw-text-opacity));
} }
.hover\:text-gray-800:hover {
--tw-text-opacity: 1;
color: rgb(31 41 55 / var(--tw-text-opacity));
}
.hover\:text-gray-900:hover { .hover\:text-gray-900:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity)); color: rgb(17 24 39 / var(--tw-text-opacity));
} }
.hover\:text-gray-800:hover {
--tw-text-opacity: 1;
color: rgb(31 41 55 / var(--tw-text-opacity));
}
.focus\:z-10:focus { .focus\:z-10:focus {
z-index: 10; z-index: 10;
} }

View File

@@ -9,8 +9,17 @@
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200"> <div class="p-6 bg-white border-b border-gray-200">
<div class="w-96 mx-auto">
<form method="POST" action="{{ route('users.store') }}"> @if ($errors->any())
<div class="alert alert-danger text-red-500 p-2">
<ul class="list-unstyled alert alert-danger">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form method="POST" action="{{ route('users.store') }}">
@csrf @csrf
<!-- User name --> <!-- User name -->
<div> <div>
@@ -53,6 +62,7 @@
</x-button> </x-button>
</div> </div>
</form> </form>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,44 +9,54 @@
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200"> <div class="p-6 bg-white border-b border-gray-200">
<x-auth-validation-errors class="mb-4" :errors="$errors" /> <div class="w-96 mx-auto">
<form method="POST" action="{{ route('users.update', $user->id) }}"> @if ($errors->any())
@csrf <div class="alert alert-danger text-red-500 p-2">
@method('PUT') <ul class="list-unstyled alert alert-danger">
<!-- User name --> @foreach ($errors->all() as $error)
<!-- <input type="hidden" name="id" id="id" value="{{ $user->id}}"> --> <li>{{ $error }}</li>
<div> @endforeach
<x-label for="username" :value="__('User name')" /> </ul>
<x-input id="username" class="block mt-1 w-full" type="text" name="username" value="{{ $user->username }}" required autofocus />
</div> </div>
@endif
<form method="POST" action="{{ route('users.update', $user->id) }}">
@csrf
@method('PUT')
<!-- User name -->
<!-- <input type="hidden" name="id" id="id" value="{{ $user->id}}"> -->
<div>
<x-label for="username" :value="__('User name')" />
<!-- Name --> <x-input id="username" class="block mt-1 w-full" type="text" name="username" value="{{ $user->username }}" required autofocus />
<div> </div>
<x-label for="name" :value="__('Name')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" value="{{ $user->name }}" required /> <!-- Name -->
</div> <div>
<x-label for="name" :value="__('Name')" />
<!-- Email Address --> <x-input id="name" class="block mt-1 w-full" type="text" name="name" value="{{ $user->name }}" required />
<div class="mt-4"> </div>
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" value="{{ $user->email }}" required /> <!-- Email Address -->
</div> <div class="mt-4">
<x-label for="email" :value="__('Email')" />
<div class="flex items-center justify-end mt-4"> <x-input id="email" class="block mt-1 w-full" type="email" name="email" value="{{ $user->email }}" required />
<!-- <button type="submit" class="btn">{{ __('Save') }}</button> --> </div>
<x-button class="ml-4">
{{ __('Save') }} <div class="flex items-center justify-end mt-4">
</x-button> <!-- <button type="submit" class="btn">{{ __('Save') }}</button> -->
<!-- <a href="{{ route('users.index') }}"> <x-button class="ml-4">
{{ __('Save') }}
</x-button>
<!-- <a href="{{ route('users.index') }}">
<x-button class="ml-4"> <x-button class="ml-4">
{{ __('Cancel') }} {{ __('Cancel') }}
</x-button> </x-button>
</a> --> </a> -->
</div> </div>
</form> </form>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,43 +9,44 @@
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200"> <div class="p-6 bg-white border-b border-gray-200">
<div class="w-96 mx-auto">
<!-- <form method="POST" action="{{ route('users.store') }}"> -->
<!-- @csrf -->
<!-- User name -->
<div>
<x-label for="username" :value="__('User name')" />
<!-- <form method="POST" action="{{ route('users.store') }}"> --> <x-input id="username" class="block mt-1 w-full" type="text" name="username" value="{{ $user->username }}" readonly />
<!-- @csrf --> </div>
<!-- User name -->
<div>
<x-label for="username" :value="__('User name')" />
<x-input id="username" class="block mt-1 w-full" type="text" name="username" value="{{ $user->username }}" readonly /> <!-- Name -->
<div>
<x-label for="name" :value="__('Name')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" value="{{ $user->name }}" readonly />
</div>
<!-- Email Address -->
<div class="mt-4">
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" value="{{ $user->email }}" readonly />
</div>
<div class="flex items-center justify-end mt-4">
<a href="{{ route('users.edit',$user->id) }}">
<x-button class="ml-4">
{{ __('Edit user') }}
</x-button>
</a>
<a href="{{ route('users.index') }}">
<x-button class="ml-4">
{{ __('Cancel') }}
</x-button>
</a>
</div>
<!-- </form> -->
</div> </div>
<!-- Name -->
<div>
<x-label for="name" :value="__('Name')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" value="{{ $user->name }}" readonly />
</div>
<!-- Email Address -->
<div class="mt-4">
<x-label for="email" :value="__('Email')" />
<x-input id="email" class="block mt-1 w-full" type="email" name="email" value="{{ $user->email }}" readonly />
</div>
<div class="flex items-center justify-end mt-4">
<a href="{{ route('users.edit',$user->id) }}">
<x-button class="ml-4">
{{ __('Edit user') }}
</x-button>
</a>
<a href="{{ route('users.index') }}">
<x-button class="ml-4">
{{ __('Cancel') }}
</x-button>
</a>
</div>
<!-- </form> -->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,44 +9,46 @@
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200"> <div class="p-6 bg-white border-b border-gray-200">
@if ($errors->any()) <div class="w-96 mx-auto">
<div class="alert alert-danger text-red-500 p-2"> @if ($errors->any())
<ul class="list-unstyled alert alert-danger"> <div class="alert alert-danger text-red-500 p-2">
@foreach ($errors->all() as $error) <ul class="list-unstyled alert alert-danger">
<li>{{ $error }}</li> @foreach ($errors->all() as $error)
@endforeach <li>{{ $error }}</li>
</ul> @endforeach
</ul>
</div>
@endif
<form method="POST" action="{{ route('projects.store') }}">
@csrf
<!-- Project name -->
<div>
<x-label for="name" :value="__('Title')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus />
</div>
<!-- Description -->
<div class="mt-4">
<x-label for="description" :value="__('Description')" />
<x-input id="description" class="block mt-1 w-full" type="text" name="description" :value="old('description')" required />
</div>
<!-- MMC Path -->
<div class="mt-4">
<x-label for="mmc_path" :value="__('MMC Path')" />
<x-input id="mmc_path" class="block mt-1 w-full" type="text" name="mmc_path" :value="old('mmc_path')" required />
</div>
<div class="flex items-center justify-end mt-4">
<x-button class="ml-4">
{{ __('Create project') }}
</x-button>
</div>
</form>
</div> </div>
@endif
<form method="POST" action="{{ route('projects.store') }}">
@csrf
<!-- Project name -->
<div>
<x-label for="name" :value="__('Title')" />
<x-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus />
</div>
<!-- Description -->
<div class="mt-4">
<x-label for="description" :value="__('Description')" />
<x-input id="description" class="block mt-1 w-full" type="text" name="description" :value="old('description')" required />
</div>
<!-- MMC Path -->
<div class="mt-4">
<x-label for="mmc_path" :value="__('MMC Path')" />
<x-input id="mmc_path" class="block mt-1 w-full" type="text" name="mmc_path" :value="old('mmc_path')" required />
</div>
<div class="flex items-center justify-end mt-4">
<x-button class="ml-4">
{{ __('Create project') }}
</x-button>
</div>
</form>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -52,7 +52,7 @@
</tr> </tr>
@empty @empty
<tr> <tr>
<td colspan="3">No Projects!</td> <td colspan="4" class="p-2 border border-gray-200 text-center">No Projects!</td>
</tr> </tr>
@endforelse @endforelse
</table> </table>