Skip to content

Commit

Permalink
Локализация, сортировка tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
delaynore committed May 16, 2024
1 parent c022f83 commit 1c4fb13
Show file tree
Hide file tree
Showing 53 changed files with 324 additions and 243 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
1. [x] Атрибуты
2. [x] Теги
3. [x] Главная
4. [x] Error pages
4. [x] Error pages
5. [x] Auth

4 changes: 2 additions & 2 deletions database/migrations/2024_04_02_153622_create_all_tables.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Enums\AttacmentType;
use App\Enums\AttachmentType;
use App\Enums\DataType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
Expand Down Expand Up @@ -47,7 +47,7 @@ public function up(): void
Schema::create('attachments', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name',255);
$table->enum('type', array_column(AttacmentType::cases(), 'value'));
$table->enum('type', array_column(AttachmentType::cases(), 'value'));
$table->string('path', 255);
$table->foreignUuid('fk_user_id')->references('id')->on('users')->nullOnDelete();
$table->foreignUuid('fk_concept_id')->references('id')->on('concepts')->cascadeOnDelete();
Expand Down
81 changes: 81 additions & 0 deletions lang/ru/auth.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use function Laravel\Prompts\form;

return [

/*
Expand All @@ -16,5 +18,84 @@
'failed' => 'Неверные учетные данные.',
'password' => 'Предоставленный пароль неверный.',
'throttle' => 'Слишком много попыток входа. Пожалуйста, попробуйте еще раз через :seconds секунд.',
'confirm' => 'Подтвердить',
'confirm-password' => [
'title' => 'Это действие требует подтверждения. Введите ваш пароль.',
'password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
]
],
'forgot-password' => [
'title' => 'Забыли пароль?',
'description' => 'Не волнуйтесь! Просто введите свой адрес электронной почты, и мы пришлем вам код для сброса пароля!',
'email' => [
'label' => 'Ваш email',
'placeholder' => 'example@mail.ru',
],
'button' => 'Сбросить пароль',
],
'login' => [
'title' => 'Вход',
'no-account' => 'Нет аккаунта?',
'to-register' => 'Зарегистрироваться',
'button-login' => 'Войти',
'remember' => 'Запомнить меня',
'forgot-password' => 'Забыли пароль?',
'password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
],
'email' => [
'label' => 'Ваш email',
'placeholder' => 'example@mail.ru',
],
],
'register' => [
'title' => 'Регистрация',
'have-account' => 'Уже есть аккаунт?',
'to-login' => 'Войти',
'button-register' => 'Зарегистрироваться',
'accept-terms' => 'Я принимаю',
'accept-terms-link' => 'Пользовательское соглашение',

'name' => [
'label' => 'Имя',
'placeholder' => 'Ваше прекрасное имя',
],
'password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
],
'confirm-password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
],
'email' => [
'label' => 'Ваш email',
'placeholder' => 'example@mail.ru',
],
],
'reset-password' => [
'title' => 'Сброс пароля',
'password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
],
'confirm-password' => [
'label' => 'Пароль',
'placeholder' => '••••••••',
],
'email' => [
'label' => 'Ваш email',
'placeholder' => 'example@mail.ru',
],
'button' => 'Сбросить пароль',
],
'verify' => [
'main-message'=> 'Спасибо за регистрацию! Прежде чем начать, могли бы вы подтвердить свой адрес электронной почты, нажав на ссылку, которую мы только что отправили вам? Если вы не получили письмо, мы с радостью отправим вам еще одно.',
'confirm-send' => 'На адрес электронной почты, который вы указали при регистрации, выслана новая ссылка для подтверждения.',
'again' => 'Отправить письмо с подтверждением повторно',
'logout' => 'Выйти',
]
];
8 changes: 4 additions & 4 deletions resources/views/attachment/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<x-slot name="navigation"></x-slot>
<x-slot:title>{{ __('attachment-page.create.title') }}</x-slot:title>

<div class="flex overflow-y-auto overflow-x-hidden justify-center items-center w-full md:inset-0 h-modal md:h-full">
<div class="relative p-4 w-full max-w-2xl h-full md:h-auto">
<div class="flex items-center justify-center w-full overflow-x-hidden overflow-y-auto md:inset-0 h-modal md:h-full">
<div class="relative w-full h-full max-w-2xl p-4 md:h-auto">
<div class="relative p-4 bg-white rounded-lg shadow dark:bg-gray-800 sm:p-5">
<div class="flex justify-between items-center pb-4 mb-4 rounded-t border-b sm:mb-5 dark:border-gray-600">
<div class="flex items-center justify-between pb-4 mb-4 border-b rounded-t sm:mb-5 dark:border-gray-600">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">
{{ __('attachment-page.create.form-title', ['concept' => $concept->name]) }}
</h3>
Expand Down Expand Up @@ -36,7 +36,7 @@
</div>
</div>
<button type="submit" class="text-white inline-flex items-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">
<svg class="mr-1 -ml-1 w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<svg class="w-6 h-6 mr-1 -ml-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd"></path>
</svg>
{{ __('shared.submit.create') }}
Expand Down
8 changes: 4 additions & 4 deletions resources/views/attribute/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<x-slot name="navigation"></x-slot>
<x-slot:title>{{ __('attribute-page.create.title') }}</x-slot:title>

<div class="flex overflow-y-auto overflow-x-hidden justify-center items-center w-full md:inset-0 h-modal md:h-full">
<div class="relative p-4 w-full max-w-2xl h-full md:h-auto">
<div class="flex items-center justify-center w-full overflow-x-hidden overflow-y-auto md:inset-0 h-modal md:h-full">
<div class="relative w-full h-full max-w-2xl p-4 md:h-auto">
<div class="relative p-4 bg-white rounded-lg shadow dark:bg-gray-800 sm:p-5">
<div class="flex justify-between items-center pb-4 mb-4 rounded-t border-b sm:mb-5 dark:border-gray-600">
<div class="flex items-center justify-between pb-4 mb-4 border-b rounded-t sm:mb-5 dark:border-gray-600">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">
{{ __('attribute-page.create.form-title') }}
</h3>
Expand Down Expand Up @@ -39,7 +39,7 @@
</div>
</div>
<button type="submit" class="text-white inline-flex items-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">
<svg class="mr-1 -ml-1 w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<svg class="w-6 h-6 mr-1 -ml-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd"></path>
</svg>
{{ __('shared.submit.create') }}
Expand Down
8 changes: 4 additions & 4 deletions resources/views/attribute/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<x-slot name="navigation"></x-slot>
<x-slot:title>{{ __('attribute-page.edit.title') }}</x-slot:title>

<div class="flex overflow-y-auto overflow-x-hidden justify-center items-center w-full md:inset-0 h-modal md:h-full">
<div class="relative p-4 w-full max-w-2xl h-full md:h-auto">
<div class="flex items-center justify-center w-full overflow-x-hidden overflow-y-auto md:inset-0 h-modal md:h-full">
<div class="relative w-full h-full max-w-2xl p-4 md:h-auto">
<div class="relative p-4 bg-white rounded-lg shadow dark:bg-gray-800 sm:p-5">
<div class="flex justify-between items-center pb-4 mb-4 rounded-t border-b sm:mb-5 dark:border-gray-600">
<div class="flex items-center justify-between pb-4 mb-4 border-b rounded-t sm:mb-5 dark:border-gray-600">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">
{{ __('attribute-page.edit.form-title') }}
</h3>
Expand Down Expand Up @@ -42,7 +42,7 @@
</div>
</div>
<button type="submit" class="text-white text-sm px-5 py-2.5 text-center inline-flex items-center bg-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800">
<svg class="mr-1 -ml-1 w-4 h-4" fill="currentColor" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg class="w-4 h-4 mr-1 -ml-1" fill="currentColor" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M14,0 L2,0 C0.9,0 0,0.9 0,2 L0,16 C0,17.1 0.9,18 2,18 L16,18 C17.1,18 18,17.1 18,16 L18,4 L14,0 L14,0 Z M9,16 C7.3,16 6,14.7 6,13 C6,11.3 7.3,10 9,10 C10.7,10 12,11.3 12,13 C12,14.7 10.7,16 9,16 L9,16 Z M12,6 L2,6 L2,2 L12,2 L12,6 L12,6 Z" id="Shape" />
</svg>
{{ __('shared.submit.update') }}
Expand Down
8 changes: 4 additions & 4 deletions resources/views/attribute/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
<x-slot name="navigation"></x-slot>
<x-slot:title>{{ __('attribute-page.title') }}</x-slot:title>
<section class="flex items-start w-full">
<div class="max-w-screen-xl px-4 mx-auto lg:px-12 w-full mt-3">
<div class="w-full max-w-screen-xl px-4 mx-auto mt-3 lg:px-12">
<div class="relative bg-white shadow-md dark:bg-gray-800 sm:rounded-lg">
<div class="flex flex-col items-center justify-between p-4 space-y-3 md:flex-row md:space-y-0 md:space-x-4">
<div class="w-full md:w-1/2">
<form class="flex items-center" method="GET" action="">
<label for="search" class="sr-only">{{ __('shared.search') }}</label>
<div class="relative w-full flex justify-start items-center">
<div class="relative flex items-center justify-start w-full">
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
<svg aria-hidden="true" class="w-5 h-5 text-gray-500 dark:text-gray-400" fill="currentColor" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" />
</svg>
</div>
<input type="search" name="search" class="block w-full p-2 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="{{ __('shared.search') }}" value="{{ request('search') }}">
<button type="submit" class="block py-2 ms-2 px-3 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500">{{ __('shared.search') }}</button>
<button type="submit" class="block px-3 py-2 text-sm text-gray-900 border border-gray-300 rounded-lg ms-2 bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500">{{ __('shared.search') }}</button>
</div>
</form>
</div>
Expand All @@ -35,7 +35,7 @@

<div class="overflow-x-auto">
@if ($attributes->isEmpty())
<div class="my-2 h-40 flex items-center justify-center text-xl antialiased dark:text-gray-100">
<div class="flex items-center justify-center h-40 my-2 text-xl antialiased dark:text-gray-100">
{{ __('shared.empty-records') }}
</div>
@else
Expand Down
8 changes: 4 additions & 4 deletions resources/views/auth/confirm-password.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<x-shared.logo-title />
<div class="w-full p-6 bg-white rounded-lg shadow dark:border md:mt-0 sm:max-w-md dark:bg-gray-800 dark:border-gray-700 sm:p-8">
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
{{ __('auth.confirm-password.title') }}
</div>
<form class="mt-4 space-y-4 lg:mt-5 md:space-y-5" action="{{ route('password.confirm')}}" method="post">
@csrf
<div>
<label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" value="{{old('password')}}">{{ __('Пароль') }}</label>
<input type="password" name="password" id="password" placeholder="••••••••" class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required autocomplete="current-password">
<label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">{{ __('auth.confirm-password.password.label') }}</label>
<input type="password" name="password" id="password" value="{{old('password')}}" placeholder="{{ __('auth.confirm-password.password.placeholder') }}" class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required autocomplete="current-password">
<x-input-error :messages="$errors->get('password')" class="mt-2" />
</div>

<button type="submit" class="w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">{{ __('Подтвердить') }}</button>
<button type="submit" class="w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">{{ __('auth.confirm') }}</button>
</form>
</div>
</div>
Expand Down
Loading

0 comments on commit 1c4fb13

Please sign in to comment.