This commit is contained in:
f4ilji
2025-03-13 12:17:27 +05:00
parent 2fa59350cf
commit 7a7ecf7b0d
32 changed files with 571 additions and 311 deletions
+23 -41
View File
@@ -5,56 +5,17 @@ namespace App\Filament\Components\Forms;
use App\Enums\CustomFormStatus; use App\Enums\CustomFormStatus;
use App\Enums\PostStatus; use App\Enums\PostStatus;
use App\Filament\Components\Forms\ItemForm\Pages\ContentBuilderItem; use App\Filament\Components\Forms\ItemForm\Pages\ContentBuilderItem;
use App\Helpers\ByteConverter;
use App\Models\Category;
use App\Models\CustomForm;
use App\Models\Page;
use App\Models\Post;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Section; use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle; use Filament\Forms\Components\Toggle;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Resources\Components\Tab;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile; use TomatoPHP\FilamentIcons\Components\IconPicker;
use Mohamedsabil83\FilamentFormsTinyeditor\Components\TinyEditor;
use Symfony\Component\Finder\Finder;
class PageForm class PageForm
{ {
public static function getPageTemplates() {
$finder = new Finder();
$finder->files()->in('../resources/js/Pages/Client/BasePageTemplate');
$fileInfos = [];
foreach ($finder as $fileInfo) {
$fileInfos[] = [
'filename' => $fileInfo->getBasename('.' . $fileInfo->getExtension()),
'path' => preg_replace('/.*\/(Client\/.*)/', '$1', $fileInfo->getPath() . '/' . $fileInfo->getBasename('.' . $fileInfo->getExtension())),
'extension' => $fileInfo->getExtension(),
'size' => $fileInfo->getSize(),
'mtime' => $fileInfo->getMTime(),
'atime' => $fileInfo->getATime(),
'isReadable' => $fileInfo->isReadable(),
'isWritable' => $fileInfo->isWritable(),
];
}
$fileInfos = collect($fileInfos);
return $fileInfos->pluck('filename', 'path');
}
public static function getForm(Form $form): Form public static function getForm(Form $form): Form
{ {
return $form return $form
@@ -92,13 +53,34 @@ class PageForm
'500' => 'Ведутся технические работы', '500' => 'Ведутся технические работы',
])->label('Статус')->required()->default('200'), ])->label('Статус')->required()->default('200'),
Toggle::make('searchable')->default(true)->label('Индексируется поиском')->inline(false), Toggle::make('searchable')->default(true)->label('Индексируется поиском')->inline(false),
IconPicker::make('icon')
->default('heroicon-o-academic-cap')
->label('Icon'),
TextInput::make('search_data')->hidden(), TextInput::make('search_data')->hidden(),
]), ]),
Forms\Components\Tabs\Tab::make('Контент')->schema([ Forms\Components\Tabs\Tab::make('Контент')->schema([
ContentBuilderItem::getItem('content') ContentBuilderItem::getItem('content')
]), ]),
Forms\Components\Tabs\Tab::make('Настройки')->schema([ Forms\Components\Tabs\Tab::make('Настройки')->schema([
Select::make('template')->label('Шаблон')->options(self::getPageTemplates())->required(), Section::make()->schema([
Toggle::make('settings.hide_page_sub_section_links')
->label('Скрыть сайдбар смежных страниц')
->columnSpan(1),
Toggle::make('settings.hide_page_navigate_links')
->label('Скрыть навигацию по страницу')
->columnSpan(1),
Toggle::make('settings.hide_breadcrumbs')
->label('Скрыть хлебные крошки')
->columnSpan(1),
//
// Toggle::make('settings.full_width_page')
// ->label('Страница на всю ширину')
// ->columnSpan(1)->default(true),
]),
]), ]),
]), ]),
@@ -13,8 +13,6 @@ class EditPage extends EditRecord
protected array $seoData; protected array $seoData;
protected function mutateFormDataBeforeSave(array $data): array protected function mutateFormDataBeforeSave(array $data): array
{ {
$this->seoData = $this->generateSeo($data); $this->seoData = $this->generateSeo($data);
+1 -71
View File
@@ -60,7 +60,7 @@ class PageController extends Controller
abort($error); abort($error);
} }
return Inertia::render($page->template, compact('page', 'subSectionPages', 'breadcrumbs', 'seo')); return Inertia::render('Page', compact('page', 'subSectionPages', 'breadcrumbs', 'seo'));
} }
public function getRegisteredPages() public function getRegisteredPages()
{ {
@@ -78,74 +78,4 @@ class PageController extends Controller
]; ];
return Inertia::render('AdminPanel/Pages/Registered', compact('pages', 'filters')); return Inertia::render('AdminPanel/Pages/Registered', compact('pages', 'filters'));
} }
public function index()
{
$pages = PageResource::collection(Page::query()
->when(request()->input('search'), function ($query, $search) {
$query->where('title', 'like', "%{$search}%");
})
->where('is_registered', false)
->orderBy('id', 'desc')
->paginate(request()->input('perPage', 9))
->withQueryString());
$filters = [
'search' => request()->input('search'),
];
return Inertia::render('AdminPanel/Pages/Index', compact('pages', 'filters'));
}
public function edit($slug)
{
$page = new PageResource(Page::where('slug', '=', $slug)->first());
return Inertia::render('AdminPanel/Pages/Edit', compact('page'));
}
public function update(Page $page, UpdateRequest $request)
{
$data = $request->validated();
$data['content'] = json_encode($data['content']);
$page->update($data);
return redirect()->route('admin.page.index');
}
public function editRegisteredPage($id)
{
$page = new RegisteredPageResource(Page::find($id));
return Inertia::render('AdminPanel/Pages/EditRegisteredPage', compact('page'));
}
public function updateRegisteredPage($id, Request $request)
{
$data = $request->validate([
'title' => 'required',
'path' => 'required',
'is_visible' => 'required',
'code' => 'required'
]);
$page = Page::find($id);
$page->update($data);
return redirect()->route('admin.registered.page.index');
}
public function destroy(Page $page)
{
$page->delete();
return redirect()->route('admin.page.index');
}
public function create()
{
return Inertia::render('AdminPanel/Pages/Create');
}
public function store(StoreRequest $request)
{
$data = $request->validated();
$data['content'] = json_encode($data['content']);
Page::create($data);
return redirect()->route('admin.page.index');
}
} }
@@ -20,6 +20,7 @@ class ClientPageNavigateResource extends JsonResource
'slug' => $this->slug, 'slug' => $this->slug,
'path' => $this->path, 'path' => $this->path,
'is_url' => $this->is_url, 'is_url' => $this->is_url,
'icon' => $this->icon
]; ];
} }
} }
+2
View File
@@ -22,6 +22,8 @@ class PageResource extends JsonResource
'code' => $this->code, 'code' => $this->code,
'path' => $this->path, 'path' => $this->path,
'is_url' => $this->is_url, 'is_url' => $this->is_url,
'settings' => $this->settings,
'icon' => $this->icon,
'section' => $this->section ? $this->section->title : null, 'section' => $this->section ? $this->section->title : null,
'created_at' => $this->created_at->diffforhumans() 'created_at' => $this->created_at->diffforhumans()
]; ];
-13
View File
@@ -1,13 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ApplicantQuestion extends Model
{
use HasFactory;
protected $guarded = false;
}
-14
View File
@@ -1,14 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AuthorPost extends Model
{
use HasFactory;
protected $guarded = false;
protected $table = 'authors_posts';
}
-11
View File
@@ -1,11 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ExternalVacancy extends Model
{
use HasFactory;
}
-22
View File
@@ -1,22 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class LibraryNews extends Model
{
use HasFactory;
protected $guarded = false;
public function seo()
{
return $this->morphOne(Seo::class, 'seoable');
}
protected $casts = [
'content' => 'array',
];
}
+1
View File
@@ -25,6 +25,7 @@ class Page extends Model
protected $casts = [ protected $casts = [
'content' => 'array', 'content' => 'array',
'settings' => 'array',
]; ];
} }
@@ -5,7 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class Author extends Model class Slide extends Model
{ {
use HasFactory; use HasFactory;
} }
@@ -5,18 +5,19 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class VirtualExhibition extends Model class Slider extends Model
{ {
use HasFactory; use HasFactory;
protected $guarded = false; protected $guarded = false;
protected $casts = [ protected $casts = [
'content' => 'array' 'settings' => 'array',
'image' => 'array',
]; ];
public function seo() public function slidable()
{ {
return $this->morphOne(Seo::class, 'seoable'); return $this->morphTo();
} }
} }
-13
View File
@@ -1,13 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Student extends Model
{
use HasFactory;
protected $guarded = false;
}
-13
View File
@@ -1,13 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class VacantPosition extends Model
{
use HasFactory;
}
+1
View File
@@ -30,6 +30,7 @@
"spatie/laravel-sitemap": "^7.2", "spatie/laravel-sitemap": "^7.2",
"symfony/filesystem": "^6.3", "symfony/filesystem": "^6.3",
"tightenco/ziggy": "^1.0", "tightenco/ziggy": "^1.0",
"tomatophp/filament-icons": "^1.1",
"vkcom/vk-php-sdk": "^5.131", "vkcom/vk-php-sdk": "^5.131",
"xvladqt/faker-lorem-flickr": "^1.0", "xvladqt/faker-lorem-flickr": "^1.0",
"yepsua/filament-range-field": "^0.3.4" "yepsua/filament-range-field": "^0.3.4"
Generated
+124 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0e0616783641aeb05f872887cfa59e66", "content-hash": "80caf6cd28399609a51515170b117048",
"packages": [ "packages": [
{ {
"name": "anourvalar/eloquent-serialize", "name": "anourvalar/eloquent-serialize",
@@ -10541,6 +10541,129 @@
}, },
"time": "2023-12-08T13:03:43+00:00" "time": "2023-12-08T13:03:43+00:00"
}, },
{
"name": "tomatophp/console-helpers",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/tomatophp/console-helpers.git",
"reference": "69dd818a2bfa7d038467fb526be6c9b573d36a34"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tomatophp/console-helpers/zipball/69dd818a2bfa7d038467fb526be6c9b573d36a34",
"reference": "69dd818a2bfa7d038467fb526be6c9b573d36a34",
"shasum": ""
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"TomatoPHP\\ConsoleHelpers\\ConsoleHelpersServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"TomatoPHP\\ConsoleHelpers\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fady Mondy",
"email": "EngFadyMondy@gmail.com"
}
],
"description": "tons of helper you need for you artisan command line application",
"keywords": [
"application",
"artisan",
"command",
"console",
"helpers",
"line"
],
"support": {
"issues": "https://github.com/tomatophp/console-helpers/issues",
"source": "https://github.com/tomatophp/console-helpers/tree/v1.1.0"
},
"funding": [
{
"url": "https://github.com/3x1io",
"type": "github"
}
],
"time": "2023-02-12T12:00:38+00:00"
},
{
"name": "tomatophp/filament-icons",
"version": "v1.1.4",
"source": {
"type": "git",
"url": "https://github.com/tomatophp/filament-icons.git",
"reference": "fd9cd3d0741bb286a833f390e723f4d8f4004f27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tomatophp/filament-icons/zipball/fd9cd3d0741bb286a833f390e723f4d8f4004f27",
"reference": "fd9cd3d0741bb286a833f390e723f4d8f4004f27",
"shasum": ""
},
"require": {
"calebporzio/sushi": "*",
"filament/filament": "^3.0.0",
"php": "^8.1|^8.2",
"tomatophp/console-helpers": "^1.1"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"TomatoPHP\\FilamentIcons\\FilamentIconsServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"TomatoPHP\\FilamentIcons\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fady Mondy",
"email": "info@3x1.io"
}
],
"description": "Picker & Table Column & Icons Provider for FilamentPHP",
"keywords": [
"Heroicons",
"component",
"filament",
"filamentphp",
"icons picker",
"laravel",
"php"
],
"support": {
"issues": "https://github.com/tomatophp/filament-icons/issues",
"source": "https://github.com/tomatophp/filament-icons/tree/v1.1.4"
},
"funding": [
{
"url": "https://github.com/3x1io",
"type": "github"
}
],
"time": "2025-02-08T14:08:00+00:00"
},
{ {
"name": "ueberdosis/tiptap-php", "name": "ueberdosis/tiptap-php",
"version": "1.4.0", "version": "1.4.0",
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('applicant_questions');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('applicant_questions', function (Blueprint $table) {
$table->id();
$table->string('first_name');
$table->string('last_name');
$table->string('email');
$table->string('phone');
$table->text('text');
$table->timestamps();
});
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('vacant_positions');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('vacant_positions', function (Blueprint $table) {
$table->id();
$table->string('department');
$table->string('position');
$table->double('fraction');
$table->integer('salary');
$table->string('notice');
$table->timestamps();
});
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('students');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('students', function (Blueprint $table) {
$table->id();
$table->string('department');
$table->string('position');
$table->double('fraction');
$table->integer('salary');
$table->string('notice');
$table->timestamps();
});
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('library_news');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('library_news', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('preview_text');
$table->string('category')->nullable();
$table->text('content');
$table->boolean('is_active');
$table->timestamps();
});
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('external_vacancies');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('external_vacancies', function (Blueprint $table) {
$table->id();
$table->string('city');
$table->string('position');
$table->integer('salary')->nullable();
$table->string('conditions')->nullable();
$table->string('contacts');
$table->timestamps();
});
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('pages', function (Blueprint $table) {
$table->string('icon')->nullable()->after('searchable');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('pages', function (Blueprint $table) {
$table->dropColumn('icon');
});
}
};
+9
View File
@@ -9,6 +9,7 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@heroicons/vue": "^2.2.0",
"@inertiajs/inertia": "^0.11.1", "@inertiajs/inertia": "^0.11.1",
"@inertiajs/inertia-vue3": "^0.6.0", "@inertiajs/inertia-vue3": "^0.6.0",
"@preline/carousel": "^2.6.0", "@preline/carousel": "^2.6.0",
@@ -468,6 +469,14 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/@heroicons/vue": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@heroicons/vue/-/vue-2.2.0.tgz",
"integrity": "sha512-G3dbSxoeEKqbi/DFalhRxJU4mTXJn7GwZ7ae8NuEQzd1bqdd0jAbdaBZlHPcvPD2xI1iGzNVB4k20Un2AguYPw==",
"peerDependencies": {
"vue": ">= 3"
}
},
"node_modules/@inertiajs/core": { "node_modules/@inertiajs/core": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-1.2.0.tgz",
+1
View File
@@ -28,6 +28,7 @@
" \"@editorjs/image\": \"^2.8.1\",\n \"@editorjs/quote\": \"^2.5.0\"," " \"@editorjs/image\": \"^2.8.1\",\n \"@editorjs/quote\": \"^2.5.0\","
], ],
"dependencies": { "dependencies": {
"@heroicons/vue": "^2.2.0",
"@inertiajs/inertia": "^0.11.1", "@inertiajs/inertia": "^0.11.1",
"@inertiajs/inertia-vue3": "^0.6.0", "@inertiajs/inertia-vue3": "^0.6.0",
"@preline/carousel": "^2.6.0", "@preline/carousel": "^2.6.0",
@@ -8,7 +8,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else> <div v-else-if="!loading & contacts">
<section class="bg-[#F5F5F5] w-full py-10"> <section class="bg-[#F5F5F5] w-full py-10">
<div class="max-w-screen-xl md:flex justify-around w-full mx-auto px-4 md:py-[50px] flex-wrap space-y-7 md:space-y-0"> <div class="max-w-screen-xl md:flex justify-around w-full mx-auto px-4 md:py-[50px] flex-wrap space-y-7 md:space-y-0">
<ContactGroup v-for="contact in contacts.data.content" <ContactGroup v-for="contact in contacts.data.content"
@@ -18,6 +18,7 @@
</div> </div>
</section> </section>
</div> </div>
</template> </template>
<script> <script>
@@ -1,30 +1,12 @@
<template> <template>
<svg xmlns="http://www.w3.org/2000/svg" <svg v-bind="svgAttributes" v-html="icon.path"></svg>
:fill="icon.fill || 'none'"
:viewBox="icon.viewBox || this.viewBox || '0 0 24 24'"
:stroke-width="icon.stroke_width || this.stroke_width || 1.5"
:stroke="icon.stroke || 'currentColor'"
:class="$attrs.class || 'w-6 h-6'"
v-html="icon.path"
>
</svg>
</template> </template>
<script> <script>
import slugify from "slugify";
import icons from "@/Components/other/icons.js"; import icons from "@/Components/other/icons.js";
export default { export default {
name: "BaseIcon", name: "BaseIcon",
data() {
return {
icon: icons[this.name] || icons['file']
}
},
methods: {
},
props: { props: {
name: { name: {
type: String, type: String,
@@ -39,9 +21,26 @@ export default {
type: String type: String
} }
}, },
computed: {
icon() {
return icons[this.transformIconName(this.name)] || icons['file'];
},
svgAttributes() {
return {
xmlns: "http://www.w3.org/2000/svg",
fill: this.icon.fill || 'none',
viewBox: this.icon.viewBox || this.viewBox || '0 0 24 24',
'stroke-width': this.icon.stroke_width || this.stroke_width || 1.5,
stroke: this.icon.stroke || 'currentColor',
class: this.$attrs.class || 'w-6 h-6'
};
}
},
methods: {
transformIconName(iconName) {
return iconName.replace(/^heroicon-(o|c|s|m)-/, '')
.replace(/-(\w)/g, (_, letter) => letter.toUpperCase());
}
}
} }
</script> </script>
<style scoped>
</style>
@@ -4,13 +4,14 @@
<nav v-if="subSectionPages" <nav v-if="subSectionPages"
class="flex h-[calc(100vh-200px)] flex-col overflow-hidden pr-2 pb-4"> class="flex h-[calc(100vh-200px)] flex-col overflow-hidden pr-2 pb-4">
<div class="text-gray-1000 mb-2 text-md font-medium">{{ currentSection }}</div> <div class="text-gray-1000 mb-2 text-md font-medium">{{ currentSection }}</div>
<div class="flex gap-x-1"> <div>
<ul class="px-0.5 last-of-type:mb-0 mb-8"> <ul class="px-0.5 last-of-type:mb-0 mb-8">
<li v-for="page in subSectionPages.data" :key="page.id" class="my-1.5 flex"> <li v-for="page in subSectionPages.data" :key="page.id" class="my-1.5 flex">
<a :class="{'text-white font-semibold bg-primaryBlue': isSameRoute(page.path), 'text-gray-600 hover:text-[#2C6288]': !isSameRoute(page.path) }" <a :class="{'text-white font-normal bg-primaryBlue border': isSameRoute(page.path), 'text-gray-600 hover:text-[#2C6288]': !isSameRoute(page.path) }"
:href="(page.is_url) ? page.path : route('page.view', page.path) + '/'" :href="(page.is_url) ? page.path : route('page.view', page.path) + '/'"
class="relative duration-300 flex gap-x-1 w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"> class="duration-300 flex gap-x-2 w-full rounded-md cursor-pointer items-center px-2 py-1.5 text-left text-sm">
{{ <BaseIcon class="w-4" :name="page.icon" />
{{
page.title page.title
}} }}
</a> </a>
@@ -22,14 +23,15 @@
</div> </div>
</template> </template>
<script> <script>
import {Link} from "@inertiajs/vue3"; import {Link} from "@inertiajs/vue3";
import BaseIcon from "@/Components/BaseComponents/BaseIcon.vue";
export default { export default {
name: "PageSubSectionLinks", name: "PageSubSectionLinks",
components: {Link}, components: {Link, BaseIcon},
data() { data() {
return { return {
currentNavSection: null, currentNavSection: null,
@@ -50,12 +52,14 @@ export default {
return true return true
} }
}, },
},
mounted() {
// console.log(IconsMap)
}, },
props: { props: {
subSectionPages: { subSectionPages: {
type: Object, type: Object,
+19 -24
View File
@@ -1,6 +1,6 @@
<template> <template>
<div ref="sliderRef" class="relative z-0 min-h-[calc(100vh)] items-center"> <div ref="sliderRef" class="relative z-0 min-h-[calc(100vh)] items-center">
<a :href="(!slider.settings.link_text) ? slider.link : '#'" v-for="(slider, index) in slidersCarousel.data" :class="`brightness-[${slider.image.shading}]`" <a :href="(!slider.settings.link_text) ? slider.link : '#'" v-for="(slider, index) in slidersCarousel.data" :style="{ filter: `brightness(${slider.image.shading})` }"
class="absolute -z-10 h-full w-full before:absolute before:z-10 before:h-full before:w-full "> class="absolute -z-10 h-full w-full before:absolute before:z-10 before:h-full before:w-full ">
<img <img
alt="Thumbnail" alt="Thumbnail"
@@ -35,13 +35,11 @@
> >
{{ item.settings.link_text }} {{ item.settings.link_text }}
</a> </a>
</div> </div>
</div> </div>
<div v-if="slidersCarousel.data.length >= 2" class="mx-auto max-w-screen-md px-5"> <div v-if="slidersCarousel.data.length >= 2" class="mx-auto max-w-screen-md px-5">
<div class="mt-8 text-gray-500 absolute bottom-[100px]"> <div class="mt-8 text-gray-500 absolute bottom-[50px] left-1/2 transform -translate-x-1/2 lg:bottom-[100px]">
<div class=""> <div class="">
<div class="flex space-x-3 items-center justify-between"> <div class="flex space-x-3 items-center justify-between">
<button @click="prev" class="bg-gray-200 w-8 h-8 hover:bg-gray-300 text-gray-800 font-bold rounded-full"> <button @click="prev" class="bg-gray-200 w-8 h-8 hover:bg-gray-300 text-gray-800 font-bold rounded-full">
@@ -50,10 +48,10 @@
</svg> </svg>
</button> </button>
<div class="flex space-x-3 w-[100px] items-center font-semibold text-xl text-white"> <div class="flex space-x-3 w-[200px] items-center font-semibold text-xl text-white">
<span>{{ currentIndex + 1 }}</span> <span>{{ currentIndex + 1 }}</span>
<div class="flex w-full h-1 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"> <div class="flex w-full h-1 bg-gray-200 rounded-full overflow-hidden" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">
<div class="flex flex-col justify-center rounded-full overflow-hidden bg-blue-600 text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500 my-slider-progress-bar" :style="{ 'width': `${percentage}%` }"></div> <div class="flex flex-col justify-center rounded-full overflow-hidden bg-blue-600 text-xs text-white text-center whitespace-nowrap transition-all duration-500 ease-in-out" :style="{ 'width': `${progressBarStep}%` }"></div>
</div> </div>
<span>{{ slidersCarousel.data.length }}</span> <span>{{ slidersCarousel.data.length }}</span>
</div> </div>
@@ -76,21 +74,26 @@ export default {
props: { props: {
slidersCarousel: { slidersCarousel: {
type: Object, type: Object,
required: true, // Убедитесь, что пропс передан required: true,
}, },
}, },
data() { data() {
return { return {
currentIndex: 0, currentIndex: 0,
percentage: 0,
intervalId: null, intervalId: null,
slideDuration: 5000 // Продолжительность слайда в миллисекундах slideDuration: 5000,
} }
}, },
computed: { computed: {
totalSlides() { totalSlides() {
return this.slidersCarousel && this.slidersCarousel.data ? this.slidersCarousel.data.length : 0; return this.slidersCarousel && this.slidersCarousel.data ? this.slidersCarousel.data.length : 0;
}, },
progressBarStep() {
const slides = this.totalSlides
const step = 100 / slides
return (this.currentIndex + 1) * step
}
}, },
methods: { methods: {
next() { next() {
@@ -105,18 +108,9 @@ export default {
this.resetTimer(); this.resetTimer();
} }
}, },
progressStatus() {
if (this.percentage >= 100) {
this.resetTimer();
this.next();
} else {
this.percentage += (100 / (this.slideDuration / 60)); // Увеличиваем процент равномерно
}
},
startTimer() { startTimer() {
this.stopTimer(); // Останавливаем предыдущий таймер, если он есть this.stopTimer(); // Останавливаем предыдущий таймер, если он есть
this.percentage = 0; // Сбрасываем процент this.intervalId = setInterval(this.next, this.slideDuration); // Запускаем новый таймер
this.intervalId = setInterval(this.progressStatus, 60); // Запускаем новый таймер
}, },
stopTimer() { stopTimer() {
clearInterval(this.intervalId); clearInterval(this.intervalId);
@@ -130,6 +124,9 @@ export default {
this.$emit('slider-mounted', this.$refs.sliderRef); this.$emit('slider-mounted', this.$refs.sliderRef);
this.startTimer(); this.startTimer();
}, },
beforeUnmount() {
this.stopTimer();
},
} }
</script> </script>
@@ -148,6 +145,4 @@ export default {
opacity: 0; opacity: 0;
transform: translateY(30px); transform: translateY(30px);
} }
</style> </style>
Найти еще
+119 -7
View File
@@ -76,8 +76,6 @@ export default {
stroke_width: 1.5, stroke_width: 1.5,
stroke: 'currentColor', stroke: 'currentColor',
}, },
settings: { settings: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"/>', path: '<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"/>',
viewBox: '0 0 24 24', viewBox: '0 0 24 24',
@@ -85,9 +83,123 @@ export default {
stroke_width: 1.5, stroke_width: 1.5,
stroke: 'currentColor', stroke: 'currentColor',
}, },
academicCap: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
adjustmentsHorizontal: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
adjustmentsVertical: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
archiveBoxArrowDown: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
archiveBoxXMark: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
archiveBox: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownCircle: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m9 12.75 3 3m0 0 3-3m-3 3v-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownLeft: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 4.5-15 15m0 0h11.25m-11.25 0V8.25" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownOnSquareStack: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m-6 3.75 3 3m0 0 3-3m-3 3V1.5m6 9h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownOnSquare: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownRight: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 4.5 15 15m0 0V8.25m0 11.25H8.25" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDownTray: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowDown: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowLeftCircle: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="m11.25 9-3 3m0 0 3 3m-3-3h7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowLeftEndOnRectangle: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowLeftStartOnRectangle: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
arrowLeft: {
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" />',
viewBox: '0 0 24 24',
fill: 'none',
stroke_width: 1.5,
stroke: 'currentColor',
},
} }
+13 -12
View File
@@ -1,9 +1,9 @@
<template> <template>
<div id="open-mobile-nav" class="hs-overlay [--body-scroll:false] hs-overlay-open hs-overlay-open:translate-x-0 hidden [--overlay-backdrop:false] -translate-x-full fixed top-0 start-0 transition-all duration-300 transform h-full w-full z-[1000000] bg-white border-e" role="dialog" tabindex="-1" aria-labelledby="open-mobile-nav-label"> <div id="open-mobile-nav" class="hs-overlay [--body-scroll:false] hs-overlay-open hs-overlay-open:translate-x-0 hidden [--overlay-backdrop:false] -translate-x-full fixed top-0 start-0 transition-all duration-300 transform h-full w-full z-[1000000] bg-[#FAFAFA] border-e" role="dialog" tabindex="-1" aria-labelledby="open-mobile-nav-label">
<div class="flex justify-between items-center py-3 px-4 border-b"> <div class="flex justify-between items-center py-3 px-4 border-b">
<img class="max-w-[75px] p-2" <img class="max-w-[75px] p-2"
src="/logos/only_logo.svg" alt=""> src="/logos/only_logo.svg" alt="">
<button type="button" class="size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600" aria-label="Close" data-hs-overlay="#open-mobile-nav"> <button type="button" class="size-8 inline-flex justify-center items-center gap-x-3 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600" aria-label="Close" data-hs-overlay="#open-mobile-nav">
<span class="sr-only">Close</span> <span class="sr-only">Close</span>
<svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 6 6 18"></path> <path d="M18 6 6 18"></path>
@@ -17,8 +17,8 @@
<li> <li>
<Link <Link
:href="route('index')" :href="route('index')"
:class="(isSameRoute(route('index')) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')" :class="(isSameRoute(route('index')) ? 'text-blue-600 bg-white border border-[#E4E4E7]' : 'text-gray-700')"
class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-100" href="#"> class="flex items-center gap-x-3 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-[#EFEFEF]" href="#">
<svg class="size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg> <svg class="size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
Главная Главная
</Link> </Link>
@@ -30,7 +30,7 @@
:id="'nav-section-accordion-btn-' + section.slug" :id="'nav-section-accordion-btn-' + section.slug"
:class="(hasActivePage(section) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')" :class="(hasActivePage(section) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')"
type="button" type="button"
class="hs-accordion-toggle hs-accordion-active:text-blue-600 w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg focus:outline-none" aria-expanded="true" aria-controls="users-accordion"> class="hs-accordion-toggle hs-accordion-active:text-blue-600 w-full text-start flex items-center gap-x-3 py-2 px-2.5 text-sm rounded-lg focus:outline-none" aria-expanded="true" aria-controls="users-accordion">
<BaseIcon class="w-4" name="line" /> <BaseIcon class="w-4" name="line" />
{{ section.title }} {{ section.title }}
<svg class="flex-shrink-0 hs-accordion-active:block ms-auto hidden size-4 text-gray-600 group-hover:text-gray-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg> <svg class="flex-shrink-0 hs-accordion-active:block ms-auto hidden size-4 text-gray-600 group-hover:text-gray-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>
@@ -43,7 +43,7 @@
:id="'nav-sub-section-accordion-btn-' + subSection.slug" :id="'nav-sub-section-accordion-btn-' + subSection.slug"
:class="(hasActivePage(subSection) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')" :class="(hasActivePage(subSection) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')"
type="button" type="button"
class="hs-accordion-toggle hs-accordion-active:text-blue-600 w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg focus:outline-none " aria-expanded="true" :aria-controls="'nav-accordion-' + subSection.slug"> class="hs-accordion-toggle hs-accordion-active:text-blue-600 w-full text-start flex items-center gap-x-3 py-2 px-2.5 text-sm rounded-lg focus:outline-none " aria-expanded="true" :aria-controls="'nav-accordion-' + subSection.slug">
{{ subSection.title }} {{ subSection.title }}
<svg class="flex-shrink-0 hs-accordion-active:block ms-auto hidden size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg> <svg class="flex-shrink-0 hs-accordion-active:block ms-auto hidden size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>
@@ -56,9 +56,10 @@
<li v-for="page in subSection.pages"> <li v-for="page in subSection.pages">
<a <a
:href="(page.is_url) ? page.path : route('page.view', page.path) + '/'" :href="(page.is_url) ? page.path : route('page.view', page.path) + '/'"
class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100" class="flex items-center gap-x-3 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-[#EFEFEF] focus:outline-none focus:bg-gray-100"
:class="(isSameRoute(page.path) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')" :class="(isSameRoute(page.path) ? 'text-blue-600 bg-white border border-[#E4E4E7]' : 'text-gray-700')"
> >
<BaseIcon class="w-4" :name="page.icon" />
{{ page.title }} {{ page.title }}
</a> </a>
</li> </li>
@@ -72,21 +73,21 @@
<li class=""> <li class="">
<Link :href="route('client.schedule')" <Link :href="route('client.schedule')"
:class="(isSameRoute(route('client.schedule')) ? 'text-blue-600 bg-gray-100' : 'text-gray-700')" :class="(isSameRoute(route('client.schedule')) ? 'text-blue-600 bg-white border border-[#E4E4E7]' : 'text-gray-700')"
class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#"> class="flex items-center gap-x-3 py-2 px-2.5 text-sm rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#">
<BaseIcon class="w-4" name="schedule" /> <BaseIcon class="w-4" name="schedule" />
Расписание Расписание
</Link> </Link>
</li> </li>
<li> <li>
<a class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#"> <a class="flex items-center gap-x-3 py-2 px-2.5 text-sm text-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#">
<BaseIcon class="w-4" name="eye" /> <BaseIcon class="w-4" name="eye" />
Режим для слабовидящих Режим для слабовидящих
</a> </a>
</li> </li>
<li> <li>
<a aria-haspopup="dialog" aria-expanded="false" aria-controls="hs-full-screen-modal-below-md" data-hs-overlay="#open-search-modal" <a aria-haspopup="dialog" aria-expanded="false" aria-controls="hs-full-screen-modal-below-md" data-hs-overlay="#open-search-modal"
class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#"> class="flex items-center gap-x-3 py-2 px-2.5 text-sm text-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300" href="#">
<BaseIcon class="w-4" name="search" /> <BaseIcon class="w-4" name="search" />
Поиск Поиск
</a> </a>
+1 -2
View File
@@ -3,6 +3,7 @@
<MainPageNavBar :sections="$page.props.navigation" :slider-ref="sliderRef" /> <MainPageNavBar :sections="$page.props.navigation" :slider-ref="sliderRef" />
<ClientMainSlider @slider-mounted="setSliderRef" :slidersCarousel="sliders" /> <ClientMainSlider @slider-mounted="setSliderRef" :slidersCarousel="sliders" />
<section class="max-w-screen-xl w-full mx-auto px-4 py-3 pb-10"> <section class="max-w-screen-xl w-full mx-auto px-4 py-3 pb-10">
<h2 class="text-brand-primary my-6 md:mb-[50px] md:mt-[80px] text-2xl font-semibold tracking-tight text-black lg:text-[32px] lg:leading-tight bvi-show">Последние новости</h2> <h2 class="text-brand-primary my-6 md:mb-[50px] md:mt-[80px] text-2xl font-semibold tracking-tight text-black lg:text-[32px] lg:leading-tight bvi-show">Последние новости</h2>
<div class="grid gap-10 pb-10 md:grid-cols-2 lg:gap-10 xl:grid-cols-3 bvi-no-styles"> <div class="grid gap-10 pb-10 md:grid-cols-2 lg:gap-10 xl:grid-cols-3 bvi-no-styles">
@@ -82,8 +83,6 @@
</Link> </Link>
</div> </div>
<!-- End Card Blog --> <!-- End Card Blog -->
<h2 class="text-brand-primary my-10 md:mb-[50px] md:mt-[80px] text-2xl font-semibold tracking-tight text-black lg:text-[32px] lg:leading-tight">Образование</h2> <h2 class="text-brand-primary my-10 md:mb-[50px] md:mt-[80px] text-2xl font-semibold tracking-tight text-black lg:text-[32px] lg:leading-tight">Образование</h2>
+25 -27
View File
@@ -1,34 +1,28 @@
<template> <template>
<Head> <AppHead :seo="seo" />
<title>{{ page.data.title }}</title>
<meta name="description" content="Your page description">
</Head>
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<div class="w-full h-[67px] fixed pointer-events-none bvi-no-styles" id="visor"></div> <div class="flex flex-col h-screen justify-between">
<div class="flex flex-col h-screen"> <MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
<main class="flex-grow">
<div class="relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10">
<PageSubSectionLinks :sub-section-pages="subSectionPages" :current-section="page.data.section"/> <div class="relative mx-auto mb-auto mt-[67px] max-w-screen-xl w-full px-4 py-10 md:flex md:flex-row md:py-10">
<PageNavigateLinks :header-navs="this.headerNavs"/> <PageSubSectionLinks v-if="!settings.hide_page_sub_section_links" :sub-section-pages="subSectionPages" :current-section="page.data.section"/>
<div class="w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6" style=""> <PageNavigateLinks v-if="!settings.hide_page_navigate_links" :header-navs="headerNavs"/>
<div class="space-y-5 md:space-y-5"> <div class="w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6" style="">
<PageBreadcrumbs :breadcrumbs="breadcrumbs" :page-title="page.data.title"/> <div class="space-y-5 md:space-y-5">
<PageTitle :header="page.data.title"/> <PageBreadcrumbs v-if="!settings.hide_breadcrumbs" :breadcrumbs="breadcrumbs" :page-title="page.data.title"/>
<div id="page-area" class="space-y-4"> <PageTitle :header="page.data.title"/>
<PageBuilder :blocks="this.page.data.content"/> <div id="page-area">
</div> <PageBuilder :blocks="page.data.content"/>
</div> </div>
</div> </div>
</div> </div>
</main> </div>
<ClientFooterDown/> <ClientFooterDown/>
</div> </div>
</template> </template>
<script> <script>
@@ -36,17 +30,15 @@
import {Link} from "@inertiajs/vue3"; import {Link} from "@inertiajs/vue3";
import FsLightbox from "fslightbox-vue/v3"; import FsLightbox from "fslightbox-vue/v3";
import MainNavbar from "@/Navbars/MainNavbar.vue";
import ClientFooterDown from "@/Components/ClientFooterDown.vue"; import ClientFooterDown from "@/Components/ClientFooterDown.vue";
import {Head} from '@inertiajs/vue3' import {Head} from '@inertiajs/vue3'
import slugify from "slugify";
import axios from "axios";
import PageBuilder from "@/Components/BuilderUi/Pages/PageBuilder.vue"; import PageBuilder from "@/Components/BuilderUi/Pages/PageBuilder.vue";
import PageBreadcrumbs from "@/Components/BuilderUi/Pages/PageBreadcrumbs.vue"; import PageBreadcrumbs from "@/Components/BuilderUi/Pages/PageBreadcrumbs.vue";
import PageTitle from "@/Components/BuilderUi/Pages/PageTitle.vue"; import PageTitle from "@/Components/BuilderUi/Pages/PageTitle.vue";
import PageNavigateLinks from "@/Components/BuilderUi/Pages/PageNavigateLinks.vue"; import PageNavigateLinks from "@/Components/BuilderUi/Pages/PageNavigateLinks.vue";
import PageSubSectionLinks from "@/Components/BuilderUi/Pages/PageSubSectionLinks.vue"; import PageSubSectionLinks from "@/Components/BuilderUi/Pages/PageSubSectionLinks.vue";
import MainPageNavBar from "@/Navbars/MainPageNavbar.vue"; import MainPageNavBar from "@/Navbars/MainPageNavbar.vue";
import AppHead from "@/Components/AppHead.vue";
export default { export default {
@@ -56,9 +48,12 @@ export default {
headerNavs: this.page.data.content.filter(block => block.type === 'heading').map(block => ({ headerNavs: this.page.data.content.filter(block => block.type === 'heading').map(block => ({
id: block.data.id, id: block.data.id,
text: block.data.content text: block.data.content
})) })),
settings: this.page.data.settings
} }
}, },
props: { props: {
navigation: { navigation: {
type: Object, type: Object,
@@ -72,8 +67,12 @@ export default {
breadcrumbs: { breadcrumbs: {
type: Object, type: Object,
}, },
seo: {
type: Object,
}
}, },
components: { components: {
AppHead,
MainPageNavBar, MainPageNavBar,
PageSubSectionLinks, PageSubSectionLinks,
PageNavigateLinks, PageNavigateLinks,
@@ -81,7 +80,6 @@ export default {
PageBreadcrumbs, PageBreadcrumbs,
PageBuilder, PageBuilder,
ClientFooterDown, ClientFooterDown,
MainNavbar,
Link, Link,
FsLightbox, FsLightbox,
Head Head