feat: add Music Productions module with CRUD resources and frontend views
This commit is contained in:
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions;
|
||||||
|
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\Pages\CreateMusicProduction;
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\Pages\EditMusicProduction;
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\Pages\ListMusicProductions;
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\Schemas\MusicProductionForm;
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\Tables\MusicProductionsTable;
|
||||||
|
use App\Models\MusicProduction;
|
||||||
|
use BackedEnum;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Support\Icons\Heroicon;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||||
|
|
||||||
|
class MusicProductionResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = MusicProduction::class;
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-musical-note';
|
||||||
|
|
||||||
|
public static function getNavigationLabel(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.title');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getModelLabel(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.model_label');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPluralModelLabel(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.plural_model_label');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return MusicProductionForm::configure($schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return MusicProductionsTable::configure($table);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRelations(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => ListMusicProductions::route('/'),
|
||||||
|
'create' => CreateMusicProduction::route('/create'),
|
||||||
|
'edit' => EditMusicProduction::route('/{record}/edit'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRecordRouteBindingEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getRecordRouteBindingEloquentQuery()
|
||||||
|
->withoutGlobalScopes([
|
||||||
|
SoftDeletingScope::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\MusicProductionResource;
|
||||||
|
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateMusicProduction extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = MusicProductionResource::class;
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getRedirectUrl(): string
|
||||||
|
{
|
||||||
|
return $this->getResource()::getUrl('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getCreatedNotificationTitle(): ?string
|
||||||
|
{
|
||||||
|
return __('music_productions.created_successfully');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function afterCreate(): void
|
||||||
|
{
|
||||||
|
// Save translations
|
||||||
|
TranslationTabs::saveTranslations($this->record, $this->form->getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\MusicProductionResource;
|
||||||
|
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||||
|
use Filament\Actions\Action;
|
||||||
|
use Filament\Actions\DeleteAction;
|
||||||
|
use Filament\Actions\ForceDeleteAction;
|
||||||
|
use Filament\Actions\RestoreAction;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditMusicProduction extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = MusicProductionResource::class;
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Action::make('save')
|
||||||
|
->label(__('music_productions.save'))
|
||||||
|
->action('save')
|
||||||
|
->keyBindings(['mod+s'])
|
||||||
|
->color('primary')
|
||||||
|
->size('sm'),
|
||||||
|
Action::make('cancel')
|
||||||
|
->label(__('music_productions.cancel'))
|
||||||
|
->url($this->getResource()::getUrl('index'))
|
||||||
|
->color('gray')
|
||||||
|
->size('sm'),
|
||||||
|
DeleteAction::make()
|
||||||
|
->label(__('music_productions.delete'))
|
||||||
|
->size('sm'),
|
||||||
|
RestoreAction::make()
|
||||||
|
->label(__('music_productions.restore'))
|
||||||
|
->size('sm'),
|
||||||
|
ForceDeleteAction::make()
|
||||||
|
->label(__('music_productions.force_delete'))
|
||||||
|
->size('sm'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getFormActions(): array
|
||||||
|
{
|
||||||
|
return []; // Hide standard bottom save/cancel buttons
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getRedirectUrl(): string
|
||||||
|
{
|
||||||
|
return $this->getResource()::getUrl('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getSavedNotificationTitle(): ?string
|
||||||
|
{
|
||||||
|
return __('music_productions.updated_successfully');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function mutateFormDataBeforeFill(array $data): array
|
||||||
|
{
|
||||||
|
// Load existing translations
|
||||||
|
$translationData = TranslationTabs::fillFromRecord($this->record);
|
||||||
|
|
||||||
|
\Log::info('Loading translations for music production edit', [
|
||||||
|
'production_id' => $this->record->id,
|
||||||
|
'translations' => $translationData
|
||||||
|
]);
|
||||||
|
|
||||||
|
return array_merge($data, $translationData);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function afterSave(): void
|
||||||
|
{
|
||||||
|
\Log::info('Saving music production translations', [
|
||||||
|
'production_id' => $this->record->id,
|
||||||
|
'form_state' => $this->form->getState()
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Save translations
|
||||||
|
TranslationTabs::saveTranslations($this->record, $this->form->getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Admin\Resources\MusicProductions\MusicProductionResource;
|
||||||
|
use Filament\Actions\CreateAction;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListMusicProductions extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = MusicProductionResource::class;
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return __('music_productions.title');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
CreateAction::make()
|
||||||
|
->label(__('music_productions.create')),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions\Schemas;
|
||||||
|
|
||||||
|
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||||
|
use Filament\Forms\Components\Checkbox;
|
||||||
|
use Filament\Forms\Components\DatePicker;
|
||||||
|
use Filament\Forms\Components\FileUpload;
|
||||||
|
use Filament\Forms\Components\RichEditor;
|
||||||
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Schemas\Components\Section;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
|
||||||
|
class MusicProductionForm
|
||||||
|
{
|
||||||
|
public static function configure(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->columns(3)
|
||||||
|
->schema([
|
||||||
|
// Sol Kolon - Ana İçerik (2 sütun genişliğinde)
|
||||||
|
Section::make(__('music_productions.content_section'))
|
||||||
|
->schema([
|
||||||
|
TextInput::make('title')
|
||||||
|
->label(__('music_productions.title_field'))
|
||||||
|
->required()
|
||||||
|
->maxLength(255)
|
||||||
|
->live(onBlur: true)
|
||||||
|
->afterStateUpdated(function (string $operation, $state, callable $set) {
|
||||||
|
if ($operation !== 'create') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$set('slug', \Str::slug($state));
|
||||||
|
}),
|
||||||
|
|
||||||
|
TextInput::make('slug')
|
||||||
|
->label(__('music_productions.slug_field'))
|
||||||
|
->required()
|
||||||
|
->maxLength(255)
|
||||||
|
->unique(ignoreRecord: true)
|
||||||
|
->rules(['alpha_dash'])
|
||||||
|
->helperText(__('music_productions.slug_helper')),
|
||||||
|
|
||||||
|
TextInput::make('client_name')
|
||||||
|
->label(__('music_productions.client_name_field'))
|
||||||
|
->maxLength(255),
|
||||||
|
|
||||||
|
RichEditor::make('content')
|
||||||
|
->label(__('music_productions.content_field'))
|
||||||
|
->fileAttachmentsDisk('public')
|
||||||
|
->fileAttachmentsDirectory('music-productions')
|
||||||
|
->fileAttachmentsVisibility('public')
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columnSpan(2)
|
||||||
|
->collapsible(false),
|
||||||
|
|
||||||
|
// Sağ Kolon - Ayarlar (1 sütun genişliğinde)
|
||||||
|
Section::make(__('music_productions.settings_section'))
|
||||||
|
->schema([
|
||||||
|
FileUpload::make('cover_image')
|
||||||
|
->label(__('music_productions.cover_image_field'))
|
||||||
|
->image()
|
||||||
|
->disk('public')
|
||||||
|
->directory('music-productions/covers')
|
||||||
|
->visibility('public')
|
||||||
|
->imageEditor()
|
||||||
|
->imageEditorAspectRatios([
|
||||||
|
'16:9',
|
||||||
|
'4:3',
|
||||||
|
'1:1',
|
||||||
|
])
|
||||||
|
->helperText(__('music_productions.cover_image_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
DatePicker::make('production_date')
|
||||||
|
->label(__('music_productions.production_date_field'))
|
||||||
|
->displayFormat('d.m.Y')
|
||||||
|
->helperText(__('music_productions.production_date_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
TextInput::make('sort_order')
|
||||||
|
->label(__('music_productions.sort_order_field'))
|
||||||
|
->numeric()
|
||||||
|
->default(0)
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
Checkbox::make('is_active')
|
||||||
|
->label(__('music_productions.is_active_field'))
|
||||||
|
->default(true)
|
||||||
|
->helperText(__('music_productions.is_active_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columnSpan(1)
|
||||||
|
->collapsible(false),
|
||||||
|
|
||||||
|
// Alt Kısım - Galeri Görselleri
|
||||||
|
Section::make(__('music_productions.gallery_field'))
|
||||||
|
->schema([
|
||||||
|
FileUpload::make('gallery')
|
||||||
|
->label(__('music_productions.gallery_field'))
|
||||||
|
->multiple()
|
||||||
|
->image()
|
||||||
|
->disk('public')
|
||||||
|
->directory('music-productions/gallery')
|
||||||
|
->visibility('public')
|
||||||
|
->helperText(__('music_productions.gallery_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columnSpanFull()
|
||||||
|
->collapsible(true)
|
||||||
|
->collapsed(false),
|
||||||
|
|
||||||
|
// Çeviriler Kısımı (Çoklu Dil)
|
||||||
|
Section::make('🌍 ' . __('music_productions.translations_section'))
|
||||||
|
->schema([
|
||||||
|
TranslationTabs::make([
|
||||||
|
'title' => [
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => __('music_productions.title_field'),
|
||||||
|
'required' => false,
|
||||||
|
'maxLength' => 255,
|
||||||
|
],
|
||||||
|
'client_name' => [
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => __('music_productions.client_name_field'),
|
||||||
|
'required' => false,
|
||||||
|
'maxLength' => 255,
|
||||||
|
],
|
||||||
|
'content' => [
|
||||||
|
'type' => 'richtext',
|
||||||
|
'label' => __('music_productions.content_field'),
|
||||||
|
'required' => false,
|
||||||
|
],
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->columnSpanFull()
|
||||||
|
->collapsible(true)
|
||||||
|
->collapsed(false),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\MusicProductions\Tables;
|
||||||
|
|
||||||
|
use Filament\Actions\BulkActionGroup;
|
||||||
|
use Filament\Actions\DeleteBulkAction;
|
||||||
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Actions\ForceDeleteBulkAction;
|
||||||
|
use Filament\Actions\RestoreBulkAction;
|
||||||
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
|
use Filament\Tables\Columns\TextColumn;
|
||||||
|
use Filament\Tables\Columns\ToggleColumn;
|
||||||
|
use Filament\Tables\Filters\TernaryFilter;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class MusicProductionsTable
|
||||||
|
{
|
||||||
|
public static function configure(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
ImageColumn::make('cover_image')
|
||||||
|
->label(__('music_productions.cover_image_field'))
|
||||||
|
->disk('public')
|
||||||
|
->square()
|
||||||
|
->size(60),
|
||||||
|
|
||||||
|
TextColumn::make('title')
|
||||||
|
->label(__('music_productions.table_title'))
|
||||||
|
->searchable()
|
||||||
|
->sortable()
|
||||||
|
->limit(50),
|
||||||
|
|
||||||
|
TextColumn::make('slug')
|
||||||
|
->label(__('music_productions.table_slug'))
|
||||||
|
->searchable()
|
||||||
|
->sortable()
|
||||||
|
->limit(30),
|
||||||
|
|
||||||
|
TextColumn::make('client_name')
|
||||||
|
->label(__('music_productions.table_client_name'))
|
||||||
|
->searchable()
|
||||||
|
->sortable()
|
||||||
|
->limit(30),
|
||||||
|
|
||||||
|
TextColumn::make('production_date')
|
||||||
|
->label(__('music_productions.table_production_date'))
|
||||||
|
->date('d.m.Y')
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
|
ToggleColumn::make('is_active')
|
||||||
|
->label(__('music_productions.table_is_active'))
|
||||||
|
->alignCenter(),
|
||||||
|
|
||||||
|
TextColumn::make('sort_order')
|
||||||
|
->label(__('music_productions.sort_order_field'))
|
||||||
|
->sortable()
|
||||||
|
->alignCenter(),
|
||||||
|
|
||||||
|
TextColumn::make('created_at')
|
||||||
|
->label(__('music_productions.table_created_at'))
|
||||||
|
->dateTime('d.m.Y H:i')
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
|
||||||
|
TextColumn::make('updated_at')
|
||||||
|
->label(__('music_productions.table_updated_at'))
|
||||||
|
->dateTime('d.m.Y H:i')
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
TernaryFilter::make('is_active')
|
||||||
|
->label(__('music_productions.is_active_field')),
|
||||||
|
])
|
||||||
|
->recordActions([
|
||||||
|
EditAction::make()
|
||||||
|
->label(__('music_productions.edit')),
|
||||||
|
])
|
||||||
|
->toolbarActions([
|
||||||
|
BulkActionGroup::make([
|
||||||
|
DeleteBulkAction::make()
|
||||||
|
->label(__('music_productions.delete')),
|
||||||
|
RestoreBulkAction::make()
|
||||||
|
->label(__('music_productions.restore')),
|
||||||
|
ForceDeleteBulkAction::make()
|
||||||
|
->label(__('music_productions.force_delete')),
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->defaultSort('sort_order', 'asc');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\MusicProduction;
|
||||||
|
use App\Models\Setting;
|
||||||
|
use App\Models\HeaderTemplate;
|
||||||
|
use App\Models\FooterTemplate;
|
||||||
|
use App\Services\TemplateService;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class MusicProductionController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// Get Settings
|
||||||
|
$settings = new \stdClass();
|
||||||
|
$allSettings = Setting::where('is_active', true)->get();
|
||||||
|
foreach ($allSettings as $setting) {
|
||||||
|
$settings->{$setting->key} = $setting->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get active music productions
|
||||||
|
$productions = MusicProduction::active()
|
||||||
|
->ordered()
|
||||||
|
->paginate(9); // Using 9 for nice grid layout (3 per row)
|
||||||
|
|
||||||
|
// --- Header Logic ---
|
||||||
|
$renderedHeader = null;
|
||||||
|
$defaultHeaderId = $settings->default_header ?? null;
|
||||||
|
|
||||||
|
if ($defaultHeaderId) {
|
||||||
|
$headerTemplate = HeaderTemplate::find($defaultHeaderId);
|
||||||
|
if ($headerTemplate) {
|
||||||
|
$templateDefaults = $headerTemplate->default_data ?? [];
|
||||||
|
$mergedHeaderData = array_merge($templateDefaults, []);
|
||||||
|
|
||||||
|
$renderedHeader = TemplateService::replacePlaceholders(
|
||||||
|
$headerTemplate->html_content,
|
||||||
|
$mergedHeaderData,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Footer Logic ---
|
||||||
|
$renderedFooter = null;
|
||||||
|
$defaultFooterId = $settings->default_footer ?? null;
|
||||||
|
|
||||||
|
if ($defaultFooterId) {
|
||||||
|
$footerTemplate = FooterTemplate::find($defaultFooterId);
|
||||||
|
if ($footerTemplate) {
|
||||||
|
$templateDefaults = $footerTemplate->default_data ?? [];
|
||||||
|
$mergedFooterData = array_merge($templateDefaults, []);
|
||||||
|
|
||||||
|
$renderedFooter = TemplateService::replacePlaceholders(
|
||||||
|
$footerTemplate->html_content,
|
||||||
|
$mergedFooterData,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$meta = [
|
||||||
|
'title' => __('music_productions.meta-index-title'),
|
||||||
|
'description' => __('music_productions.meta-index-description'),
|
||||||
|
'image' => null,
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('front.music-productions.index', compact('productions', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show($slug)
|
||||||
|
{
|
||||||
|
$production = MusicProduction::active()
|
||||||
|
->where('slug', $slug)
|
||||||
|
->firstOrFail();
|
||||||
|
|
||||||
|
// Get Settings
|
||||||
|
$settings = new \stdClass();
|
||||||
|
$allSettings = Setting::where('is_active', true)->get();
|
||||||
|
foreach ($allSettings as $setting) {
|
||||||
|
$settings->{$setting->key} = $setting->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fetch adjacent posts (Prev and Next)
|
||||||
|
$prev = MusicProduction::active()
|
||||||
|
->where(function($q) use ($production) {
|
||||||
|
$q->where('sort_order', '<', $production->sort_order)
|
||||||
|
->orWhere(function($sub) use ($production) {
|
||||||
|
$sub->where('sort_order', $production->sort_order)
|
||||||
|
->where('id', '<', $production->id);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
->orderBy('sort_order', 'desc')
|
||||||
|
->orderBy('id', 'desc')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$next = MusicProduction::active()
|
||||||
|
->where(function($q) use ($production) {
|
||||||
|
$q->where('sort_order', '>', $production->sort_order)
|
||||||
|
->orWhere(function($sub) use ($production) {
|
||||||
|
$sub->where('sort_order', $production->sort_order)
|
||||||
|
->where('id', '>', $production->id);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
->orderBy('sort_order', 'asc')
|
||||||
|
->orderBy('id', 'asc')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// --- Header Logic ---
|
||||||
|
$renderedHeader = null;
|
||||||
|
$defaultHeaderId = $settings->default_header ?? null;
|
||||||
|
|
||||||
|
if ($defaultHeaderId) {
|
||||||
|
$headerTemplate = HeaderTemplate::find($defaultHeaderId);
|
||||||
|
if ($headerTemplate) {
|
||||||
|
$templateDefaults = $headerTemplate->default_data ?? [];
|
||||||
|
$mergedHeaderData = array_merge($templateDefaults, []);
|
||||||
|
|
||||||
|
$renderedHeader = TemplateService::replacePlaceholders(
|
||||||
|
$headerTemplate->html_content,
|
||||||
|
$mergedHeaderData,
|
||||||
|
$production
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Footer Logic ---
|
||||||
|
$renderedFooter = null;
|
||||||
|
$defaultFooterId = $settings->default_footer ?? null;
|
||||||
|
|
||||||
|
if ($defaultFooterId) {
|
||||||
|
$footerTemplate = FooterTemplate::find($defaultFooterId);
|
||||||
|
if ($footerTemplate) {
|
||||||
|
$templateDefaults = $footerTemplate->default_data ?? [];
|
||||||
|
$mergedFooterData = array_merge($templateDefaults, []);
|
||||||
|
|
||||||
|
$renderedFooter = TemplateService::replacePlaceholders(
|
||||||
|
$footerTemplate->html_content,
|
||||||
|
$mergedFooterData,
|
||||||
|
$production
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$meta = [
|
||||||
|
'title' => $production->translate('title'),
|
||||||
|
'description' => \Str::limit(strip_tags($production->translate('content')), 160),
|
||||||
|
'image' => $production->cover_image ? asset('storage/' . $production->cover_image) : null,
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('front.music-productions.show', compact('production', 'prev', 'next', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Traits\HasTranslations;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
class MusicProduction extends Model
|
||||||
|
{
|
||||||
|
use HasFactory, SoftDeletes, HasTranslations;
|
||||||
|
|
||||||
|
protected $table = 'music_productions';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'title',
|
||||||
|
'slug',
|
||||||
|
'cover_image',
|
||||||
|
'content',
|
||||||
|
'client_name',
|
||||||
|
'production_date',
|
||||||
|
'gallery',
|
||||||
|
'is_active',
|
||||||
|
'sort_order',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable fields
|
||||||
|
*/
|
||||||
|
protected $translatable = [
|
||||||
|
'title',
|
||||||
|
'content',
|
||||||
|
'client_name',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'production_date' => 'date',
|
||||||
|
'gallery' => 'array',
|
||||||
|
'is_active' => 'boolean',
|
||||||
|
'sort_order' => 'integer',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function getUrlAttribute()
|
||||||
|
{
|
||||||
|
return route('music-productions.show', $this->slug);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCoverImageUrlAttribute()
|
||||||
|
{
|
||||||
|
if ($this->cover_image) {
|
||||||
|
return asset('storage/' . $this->cover_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function scopeActive($query)
|
||||||
|
{
|
||||||
|
return $query->where('is_active', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function scopeOrdered($query)
|
||||||
|
{
|
||||||
|
return $query->orderBy('sort_order', 'asc')->orderBy('production_date', 'desc');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?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::create('music_productions', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('title'); // Main title (usually default language)
|
||||||
|
$table->string('slug')->unique();
|
||||||
|
$table->string('cover_image')->nullable();
|
||||||
|
$table->longText('content')->nullable(); // Main content (usually default language)
|
||||||
|
$table->string('client_name')->nullable(); // Main client name (usually default language)
|
||||||
|
$table->date('production_date')->nullable();
|
||||||
|
$table->json('gallery')->nullable(); // Store gallery images
|
||||||
|
$table->boolean('is_active')->default(true);
|
||||||
|
$table->integer('sort_order')->default(0);
|
||||||
|
$table->softDeletes();
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->index(['is_active', 'sort_order']);
|
||||||
|
$table->index('slug');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('music_productions');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
// Navigation & list
|
||||||
|
'nav-music-productions' => 'Music Productions',
|
||||||
|
'meta-index-title' => 'Music Productions',
|
||||||
|
'meta-index-description' => 'Our music production, soundtrack and corporate music work.',
|
||||||
|
'empty' => 'No music productions registered yet.',
|
||||||
|
'project_details' => 'Project Details',
|
||||||
|
'back_to_list' => 'Back to List',
|
||||||
|
'prev' => 'Prev',
|
||||||
|
'next' => 'Next',
|
||||||
|
|
||||||
|
// Module labels
|
||||||
|
'title' => 'Music Productions',
|
||||||
|
'navigation_label' => 'Music Production',
|
||||||
|
'model_label' => 'Music Production',
|
||||||
|
'plural_model_label' => 'Music Productions',
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
'create' => 'Create New Music Production',
|
||||||
|
'edit' => 'Edit Music Production',
|
||||||
|
'save' => 'Save',
|
||||||
|
'cancel' => 'Cancel',
|
||||||
|
'delete' => 'Delete Music Production',
|
||||||
|
'restore' => 'Restore Music Production',
|
||||||
|
'force_delete' => 'Force Delete',
|
||||||
|
|
||||||
|
// Form fields
|
||||||
|
'title_field' => 'Title',
|
||||||
|
'slug_field' => 'URL Slug',
|
||||||
|
'content_field' => 'Content',
|
||||||
|
'client_name_field' => 'Client Name',
|
||||||
|
'production_date_field' => 'Production Date',
|
||||||
|
'cover_image_field' => 'Cover Image',
|
||||||
|
'gallery_field' => 'Gallery Images',
|
||||||
|
'is_active_field' => 'Is Active?',
|
||||||
|
'sort_order_field' => 'Sort Order',
|
||||||
|
|
||||||
|
// Sections
|
||||||
|
'content_section' => 'Content',
|
||||||
|
'settings_section' => 'Production Settings',
|
||||||
|
'translations_section' => 'Translations',
|
||||||
|
|
||||||
|
// Helper texts
|
||||||
|
'slug_helper' => 'The part that will appear in the URL. Example: music-production-1',
|
||||||
|
'cover_image_helper' => 'Select a cover image for the production',
|
||||||
|
'gallery_helper' => 'Select other images for the production (Multiple upload is supported)',
|
||||||
|
'production_date_helper' => 'The date when the production was completed',
|
||||||
|
'is_active_helper' => 'Display this music production on the site',
|
||||||
|
'sort_order_helper' => 'Enter a sorting number for listing priority',
|
||||||
|
|
||||||
|
// Status options
|
||||||
|
'status_draft' => 'Draft',
|
||||||
|
'status_published' => 'Published',
|
||||||
|
'status_archived' => 'Archived',
|
||||||
|
|
||||||
|
// Messages
|
||||||
|
'created_successfully' => 'Music production created successfully.',
|
||||||
|
'updated_successfully' => 'Music production updated successfully.',
|
||||||
|
'deleted_successfully' => 'Music production deleted successfully.',
|
||||||
|
'restored_successfully' => 'Music production restored successfully.',
|
||||||
|
|
||||||
|
// Table columns
|
||||||
|
'table_title' => 'Title',
|
||||||
|
'table_slug' => 'URL Slug',
|
||||||
|
'table_client_name' => 'Client',
|
||||||
|
'table_production_date' => 'Production Date',
|
||||||
|
'table_status' => 'Status',
|
||||||
|
'table_is_active' => 'Active',
|
||||||
|
'table_created_at' => 'Created At',
|
||||||
|
'table_updated_at' => 'Updated At',
|
||||||
|
|
||||||
|
// Validation messages
|
||||||
|
'title_required' => 'Title field is required.',
|
||||||
|
'slug_required' => 'URL slug field is required.',
|
||||||
|
'slug_unique' => 'This URL slug is already in use.',
|
||||||
|
];
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
// Navigation & list
|
||||||
|
'nav-music-productions' => 'Müzik Prodüksiyonları',
|
||||||
|
'meta-index-title' => 'Müzik Prodüksiyonları',
|
||||||
|
'meta-index-description' => 'Müzik prodüksiyonu, film müzikleri ve kurumsal müzik çalışmalarımız.',
|
||||||
|
'empty' => 'Şu anda kayıtlı müzik prodüksiyonu bulunmuyor.',
|
||||||
|
'project_details' => 'Proje Detayları',
|
||||||
|
'back_to_list' => 'Listeye Geri Dön',
|
||||||
|
'prev' => 'Önceki',
|
||||||
|
'next' => 'Sonraki',
|
||||||
|
|
||||||
|
// Module labels
|
||||||
|
'title' => 'Müzik Prodüksiyonları',
|
||||||
|
'navigation_label' => 'Müzik Prodüksiyonu',
|
||||||
|
'model_label' => 'Müzik Prodüksiyonu',
|
||||||
|
'plural_model_label' => 'Müzik Prodüksiyonları',
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
'create' => 'Yeni Müzik Prodüksiyonu Oluştur',
|
||||||
|
'edit' => 'Müzik Prodüksiyonunu Düzenle',
|
||||||
|
'save' => 'Kaydet',
|
||||||
|
'cancel' => 'İptal',
|
||||||
|
'delete' => 'Müzik Prodüksiyonunu Sil',
|
||||||
|
'restore' => 'Müzik Prodüksiyonunu Geri Yükle',
|
||||||
|
'force_delete' => 'Kalıcı Olarak Sil',
|
||||||
|
|
||||||
|
// Form fields
|
||||||
|
'title_field' => 'Başlık',
|
||||||
|
'slug_field' => 'URL Yolu',
|
||||||
|
'content_field' => 'İçerik',
|
||||||
|
'client_name_field' => 'Müşteri Adı',
|
||||||
|
'production_date_field' => 'Yapım Tarihi',
|
||||||
|
'cover_image_field' => 'Kapak Görseli',
|
||||||
|
'gallery_field' => 'Galeri Görselleri',
|
||||||
|
'is_active_field' => 'Aktif mi?',
|
||||||
|
'sort_order_field' => 'Sıralama',
|
||||||
|
|
||||||
|
// Sections
|
||||||
|
'content_section' => 'İçerik',
|
||||||
|
'settings_section' => 'Prodüksiyon Ayarları',
|
||||||
|
'translations_section' => 'Çeviriler',
|
||||||
|
|
||||||
|
// Helper texts
|
||||||
|
'slug_helper' => 'URL\'de görünecek kısım. Örnek: muzik-produksiyonu-1',
|
||||||
|
'cover_image_helper' => 'Prodüksiyon için kapak görseli seçin',
|
||||||
|
'gallery_helper' => 'Prodüksiyona ait diğer görselleri seçin (Çoklu yükleme desteklenir)',
|
||||||
|
'production_date_helper' => 'Prodüksiyonun tamamlandığı tarih',
|
||||||
|
'is_active_helper' => 'Bu müzik prodüksiyonunu sitede göster',
|
||||||
|
'sort_order_helper' => 'Listeleme önceliği için sıralama numarası girin',
|
||||||
|
|
||||||
|
// Status options
|
||||||
|
'status_draft' => 'Taslak',
|
||||||
|
'status_published' => 'Yayınlandı',
|
||||||
|
'status_archived' => 'Arşivlendi',
|
||||||
|
|
||||||
|
// Messages
|
||||||
|
'created_successfully' => 'Müzik prodüksiyonu başarıyla oluşturuldu.',
|
||||||
|
'updated_successfully' => 'Müzik prodüksiyonu başarıyla güncellendi.',
|
||||||
|
'deleted_successfully' => 'Müzik prodüksiyonu başarıyla silindi.',
|
||||||
|
'restored_successfully' => 'Müzik prodüksiyonu başarıyla geri yüklendi.',
|
||||||
|
|
||||||
|
// Table columns
|
||||||
|
'table_title' => 'Başlık',
|
||||||
|
'table_slug' => 'URL Yolu',
|
||||||
|
'table_client_name' => 'Müşteri',
|
||||||
|
'table_production_date' => 'Yapım Tarihi',
|
||||||
|
'table_status' => 'Durum',
|
||||||
|
'table_is_active' => 'Aktif',
|
||||||
|
'table_created_at' => 'Oluşturulma Tarihi',
|
||||||
|
'table_updated_at' => 'Güncellenme Tarihi',
|
||||||
|
|
||||||
|
// Validation messages
|
||||||
|
'title_required' => 'Başlık alanı zorunludur.',
|
||||||
|
'slug_required' => 'URL yolu alanı zorunludur.',
|
||||||
|
'slug_unique' => 'Bu URL yolu zaten kullanılıyor.',
|
||||||
|
];
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
@extends('layouts.site')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<section class="wrapper !bg-[#edf2fc]">
|
||||||
|
<div class="container !pt-10 !pb-36 xl:!pt-[4.5rem] lg:!pt-[4.5rem] md:!pt-[4.5rem] xl:!pb-40 lg:!pb-40 md:!pb-40 !text-center">
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="md:w-7/12 lg:w-6/12 xl:w-5/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<h1 class="!text-[calc(1.365rem_+_1.38vw)] font-bold !leading-[1.2] xl:!text-[2.4rem] !mb-3">{{ __('music_productions.meta-index-title') }}</h1>
|
||||||
|
<p class="lead lg:!px-[1.25rem] xl:!px-[1.25rem] xxl:!px-[2rem] !leading-[1.65] text-[0.9rem] font-medium">{{ __('music_productions.meta-index-description') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="wrapper !bg-[#ffffff]">
|
||||||
|
<div class="container !pb-[4.5rem] xl:!pb-24 lg:!pb-24 md:!pb-24">
|
||||||
|
@if($productions->count() > 0)
|
||||||
|
<div class="projects-masonry !mt-[-10rem] xl:!mt-[-12rem] lg:!mt-[-12rem] md:!mt-[-10rem] !mb-10">
|
||||||
|
<div class="flex flex-wrap mx-[-20px] xl:mx-[-25px] lg:mx-[-25px] !mt-[-2rem] xl:!mt-[-2.5rem] lg:!mt-[-2.5rem]">
|
||||||
|
@php
|
||||||
|
$accentColors = [
|
||||||
|
['border' => '#54a8c7', 'text' => '#54a8c7', 'tooltip' => 'itooltip-aqua'],
|
||||||
|
['border' => '#747ed1', 'text' => '#747ed1', 'tooltip' => 'itooltip-purple'],
|
||||||
|
['border' => '#fab758', 'text' => '#fab758', 'tooltip' => 'itooltip-yellow'],
|
||||||
|
['border' => '#e2626b', 'text' => '#e2626b', 'tooltip' => 'itooltip-red'],
|
||||||
|
['border' => '#f78b77', 'text' => '#f78b77', 'tooltip' => 'itooltip-orange'],
|
||||||
|
['border' => '#7cb798', 'text' => '#7cb798', 'tooltip' => 'itooltip-leaf'],
|
||||||
|
['border' => '#d16b86', 'text' => '#d16b86', 'tooltip' => 'itooltip-pink'],
|
||||||
|
['border' => '#45c4a0', 'text' => '#45c4a0', 'tooltip' => 'itooltip-green'],
|
||||||
|
['border' => '#a07cc5', 'text' => '#a07cc5', 'tooltip' => 'itooltip-violet'],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
@foreach($productions as $index => $production)
|
||||||
|
@php
|
||||||
|
$color = $accentColors[$index % count($accentColors)];
|
||||||
|
@endphp
|
||||||
|
<div class="project item xl:w-4/12 lg:w-6/12 md:w-6/12 w-full flex-[0_0_auto] max-w-full px-[20px] xl:!px-[25px] lg:!px-[25px] !mt-[2rem] xl:!mt-[2.5rem] lg:!mt-[2.5rem]">
|
||||||
|
<div class="card !shadow-[0_0.25rem_1.75rem_rgba(30,34,40,0.07)] transition-all duration-300 hover:!shadow-[0_0.5rem_2.5rem_rgba(30,34,40,0.12)] hover:translate-y-[-0.15rem]">
|
||||||
|
<figure class="card-img-top overflow-hidden rounded-t group {{ $color['tooltip'] }}" title='<h5 class="!mb-0">{!! t("Detayları Görüntüle") !!}</h5>'>
|
||||||
|
<a href="{{ route('music-productions.show', $production->slug) }}">
|
||||||
|
@if($production->cover_image)
|
||||||
|
<img class="transition-all duration-[0.35s] ease-in-out group-hover:scale-105" src="{{ asset('storage/' . $production->cover_image) }}" alt="{{ $production->translate('title') }}">
|
||||||
|
@else
|
||||||
|
<div class="bg-gradient-to-br from-gray-200 to-gray-300 flex items-center justify-center" style="height: 250px;">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-16 h-16 text-gray-400">
|
||||||
|
<path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</figure>
|
||||||
|
<div class="card-body p-7">
|
||||||
|
<div class="post-header">
|
||||||
|
@if($production->client_name)
|
||||||
|
<div class="inline-flex uppercase !tracking-[0.02rem] text-[0.7rem] font-semibold text-line relative align-top !pl-[1.4rem] before:content-[''] before:absolute before:inline-block before:translate-y-[-60%] before:w-3 before:h-[0.05rem] before:left-0 before:top-2/4 !mb-2" style="color: {{ $color['text'] }}; --tw-before-bg: {{ $color['border'] }}; before:bg-[{{ $color['border'] }}];">
|
||||||
|
<span style="color: {{ $color['text'] }}">{{ $production->translate('client_name') }}</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if($production->production_date)
|
||||||
|
<div class="text-[0.65rem] text-[#aab0bc] !mb-1">
|
||||||
|
{{ $production->production_date->format('d.m.Y') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<h3 class="!mb-0">
|
||||||
|
<a href="{{ route('music-productions.show', $production->slug) }}" class="hover:text-[{{ $color['text'] }}] transition-colors duration-200">
|
||||||
|
{{ $production->translate('title') }}
|
||||||
|
</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Pagination --}}
|
||||||
|
@if($productions->hasPages())
|
||||||
|
<div class="flex justify-center !mt-8">
|
||||||
|
<nav class="pagination-wrapper">
|
||||||
|
{{ $productions->links() }}
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@else
|
||||||
|
<div class="!mt-[-8rem] !mb-10 text-center">
|
||||||
|
<div class="card !shadow-[0_0.25rem_1.75rem_rgba(30,34,40,0.07)] !p-12">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-16 h-16 text-gray-300 mx-auto !mb-4">
|
||||||
|
<path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"/>
|
||||||
|
</svg>
|
||||||
|
<p class="text-[#aab0bc] text-lg">{{ __('music_productions.empty') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>
|
||||||
|
/* Accent line color for category labels */
|
||||||
|
.text-line::before {
|
||||||
|
background-color: currentColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Custom pagination styling */
|
||||||
|
.pagination-wrapper .pagination {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.35rem;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.pagination-wrapper .pagination li {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
.pagination-wrapper .pagination li a,
|
||||||
|
.pagination-wrapper .pagination li span {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
border-radius: 50rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #60697b;
|
||||||
|
background: #f6f7f9;
|
||||||
|
border: 1px solid #e9ecef;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.pagination-wrapper .pagination li a:hover {
|
||||||
|
background: #e31e24;
|
||||||
|
border-color: #e31e24;
|
||||||
|
color: #fff;
|
||||||
|
transform: translateY(-0.1rem);
|
||||||
|
box-shadow: 0 0.25rem 0.75rem rgba(227,30,36,0.25);
|
||||||
|
}
|
||||||
|
.pagination-wrapper .pagination li.active span,
|
||||||
|
.pagination-wrapper .pagination li span[aria-current="page"] {
|
||||||
|
background: #e31e24;
|
||||||
|
border-color: #e31e24;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.pagination-wrapper .pagination li.disabled span {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Masonry item entrance animation */
|
||||||
|
.project.item {
|
||||||
|
animation: fadeInUp 0.6s ease forwards;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(30px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@for($i = 0; $i < 9; $i++)
|
||||||
|
.project.item:nth-child({{ $i + 1 }}) {
|
||||||
|
animation-delay: {{ $i * 0.1 }}s;
|
||||||
|
}
|
||||||
|
@endfor
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
@extends('layouts.site')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<section class="wrapper !bg-[#edf2fc]">
|
||||||
|
<div class="container pt-10 pb-36 xl:pt-[4.5rem] lg:pt-[4.5rem] md:pt-[4.5rem] xl:pb-60 lg:pb-60 md:pb-60 !text-center">
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="md:w-10/12 lg:w-8/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div class="post-header">
|
||||||
|
@if($production->client_name)
|
||||||
|
<div class="inline-flex !mb-[.4rem] uppercase !tracking-[0.02rem] text-[0.7rem] font-bold !text-[#aab0bc] relative align-top !pl-[1.4rem] before:content-[''] before:absolute before:inline-block before:translate-y-[-60%] before:w-3 before:h-[0.05rem] before:left-0 before:top-2/4 before:bg-[#e31e24]">
|
||||||
|
<span>{{ $production->translate('client_name') }}</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<h1 class="!text-[calc(1.365rem_+_1.38vw)] font-bold !leading-[1.2] xl:!text-[2.4rem] !mb-3">{{ $production->translate('title') }}</h1>
|
||||||
|
@if($production->production_date)
|
||||||
|
<p class="lead !leading-[1.65] text-[.9rem] font-medium text-[#60697b]">
|
||||||
|
<i class="uil uil-calendar-alt before:content-['\e9ba'] !mr-1"></i>
|
||||||
|
{{ $production->production_date->format('d.m.Y') }}
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="wrapper !bg-[#ffffff] border-b-[rgba(164,174,198,0.2)] border-b border-solid">
|
||||||
|
<div class="container !pb-[4.5rem] xl:!pb-24 lg:!pb-24 md:!pb-24">
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="w-full flex-[0_0_auto] !px-[15px] max-w-full">
|
||||||
|
<article class="!mt-[-12.5rem]">
|
||||||
|
{{-- Cover Image --}}
|
||||||
|
@if($production->cover_image)
|
||||||
|
<figure class="!rounded-[.4rem] !mb-8 xl:!mb-[3.5rem] lg:!mb-[3.5rem] md:!mb-[3.5rem] overflow-hidden shadow-lg">
|
||||||
|
<img class="!rounded-[.4rem] w-full" src="{{ asset('storage/' . $production->cover_image) }}" alt="{{ $production->translate('title') }}">
|
||||||
|
</figure>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Content & Meta --}}
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="xl:w-10/12 xl:!ml-[8.33333333%] lg:w-10/12 lg:!ml-[8.33333333%] w-full flex-[0_0_auto] !px-[15px] max-w-full">
|
||||||
|
<h2 class="!text-[calc(1.265rem_+_0.18vw)] font-bold xl:!text-[1.4rem] !leading-[1.35] !mb-4">{{ __('music_productions.project_details') }}</h2>
|
||||||
|
<div class="flex flex-wrap mx-0">
|
||||||
|
{{-- Content column --}}
|
||||||
|
<div class="xl:w-9/12 lg:w-9/12 md:w-9/12 w-full flex-[0_0_auto] max-w-full">
|
||||||
|
<div class="music-production-content prose max-w-none">
|
||||||
|
{!! $production->translate('content') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Sidebar - Date & Client --}}
|
||||||
|
<div class="xl:w-2/12 lg:w-2/12 md:w-2/12 w-full flex-[0_0_auto] max-w-full !ml-auto">
|
||||||
|
<ul class="pl-0 list-none">
|
||||||
|
@if($production->production_date)
|
||||||
|
<li>
|
||||||
|
<h5 class="!mb-1">{!! t('Tarih') !!}</h5>
|
||||||
|
<p>{{ $production->production_date->format('d M Y') }}</p>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@if($production->client_name)
|
||||||
|
<li>
|
||||||
|
<h5 class="!mb-1">{!! t('Müşteri') !!}</h5>
|
||||||
|
<p>{{ $production->translate('client_name') }}</p>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
<a href="{{ route('music-productions.index') }}" class="more hover">
|
||||||
|
<i class="uil uil-arrow-left before:content-['\e949'] !mr-1"></i>
|
||||||
|
{{ __('music_productions.back_to_list') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Gallery --}}
|
||||||
|
@php
|
||||||
|
$gallery = $production->gallery;
|
||||||
|
@endphp
|
||||||
|
@if(!empty($gallery) && is_array($gallery) && count($gallery) > 0)
|
||||||
|
<div class="flex flex-wrap mx-[-15px] md:mx-[-15px] !mt-[25px]">
|
||||||
|
@foreach($gallery as $galleryImage)
|
||||||
|
<div class="item xl:w-6/12 lg:w-6/12 md:w-6/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mt-[30px]">
|
||||||
|
<figure class="overflow-hidden translate-y-0 group rounded cursor-dark">
|
||||||
|
<a href="{{ asset('storage/' . $galleryImage) }}" data-glightbox data-gallery="music-production-gallery">
|
||||||
|
<img class="transition-all duration-[0.35s] ease-in-out group-hover:scale-105 !rounded-[.4rem] w-full" src="{{ asset('storage/' . $galleryImage) }}" alt="{{ $production->translate('title') }}">
|
||||||
|
</a>
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Post Navigation (Prev / Next) --}}
|
||||||
|
<div class="wrapper !bg-[#ffffff]">
|
||||||
|
<div class="container py-10">
|
||||||
|
<div class="flex flex-wrap mx-[-15px] md:mx-[-15px] !mt-[-15px] xl:!mt-0 lg:!mt-0 md:!mt-0">
|
||||||
|
<div class="xl:w-8/12 lg:w-8/12 md:w-8/12 w-full flex-[0_0_auto] !px-[15px] max-w-full self-center text-center xl:text-left lg:text-left md:text-left navigation">
|
||||||
|
@if($prev)
|
||||||
|
<a href="{{ route('music-productions.show', $prev->slug) }}" class="btn btn-soft-ash !rounded-[50rem] btn-icon btn-icon-start !mb-0 !mr-[.25rem] hover:translate-y-[-0.15rem]">
|
||||||
|
<i class="uil uil-arrow-left before:content-['\e949']"></i> {{ __('music_productions.prev') }}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if($next)
|
||||||
|
<a href="{{ route('music-productions.show', $next->slug) }}" class="btn btn-soft-ash !rounded-[50rem] btn-icon btn-icon-end hover:translate-y-[-0.15rem] !mb-0">
|
||||||
|
{{ __('music_productions.next') }} <i class="uil uil-arrow-right before:content-['\e94c']"></i>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<aside class="xl:w-4/12 lg:w-4/12 md:w-4/12 w-full flex-[0_0_auto] !px-[15px] max-w-full max-md:!mt-[15px] sidebar text-center xl:text-right lg:text-right md:text-right">
|
||||||
|
<a href="{{ route('music-productions.index') }}" class="btn btn-soft-primary !rounded-[50rem] btn-icon btn-icon-start hover:translate-y-[-0.15rem] !mb-0">
|
||||||
|
<i class="uil uil-apps before:content-['\e93e']"></i> {{ __('music_productions.back_to_list') }}
|
||||||
|
</a>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>
|
||||||
|
/* Content styling */
|
||||||
|
.music-production-content p {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
line-height: 1.75;
|
||||||
|
}
|
||||||
|
.music-production-content img {
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.music-production-content h2,
|
||||||
|
.music-production-content h3,
|
||||||
|
.music-production-content h4 {
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Gallery hover effect */
|
||||||
|
.cursor-dark figure {
|
||||||
|
transition: box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
.cursor-dark:hover figure {
|
||||||
|
box-shadow: 0 0.5rem 2rem rgba(30,34,40,0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Entrance animation */
|
||||||
|
article {
|
||||||
|
animation: fadeIn 0.8s ease forwards;
|
||||||
|
}
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; transform: translateY(20px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
@endsection
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svg-inject icon-svg !w-[2.2rem] !h-[2.2rem] solid-mono text-[#f78b77] text-orange !mb-3"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svg-inject icon-svg !w-[2.2rem] !h-[2.2rem] solid-mono text-[#f78b77] text-orange !mb-3"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"></path></svg>
|
||||||
<h4>{!! t('Müzik Prodüksiyon') !!}</h4>
|
<h4>{!! t('Müzik Prodüksiyon') !!}</h4>
|
||||||
<p class="!mb-2 flex-1 min-h-[4.5rem]">{!! t('Müzik prodüksiyonu, film müzikleri, kurumsal müzik çalışmaları ve benzeri alanlarda hizmet veriyoruz.') !!}</p>
|
<p class="!mb-2 flex-1 min-h-[4.5rem]">{!! t('Müzik prodüksiyonu, film müzikleri, kurumsal müzik çalışmaları ve benzeri alanlarda hizmet veriyoruz.') !!}</p>
|
||||||
<a href="#" class="more hover !text-[#f78b77] focus:!text-[#f78b77] hover:!text-[#f78b77]">{!! t('Daha fazla bilgi edin') !!}</a>
|
<a href="{{ route('music-productions.index') }}" class="more hover !text-[#f78b77] focus:!text-[#f78b77] hover:!text-[#f78b77]">{!! t('Daha fazla bilgi edin') !!}</a>
|
||||||
</div>
|
</div>
|
||||||
<!--/.card-body -->
|
<!--/.card-body -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -106,6 +106,10 @@ Route::prefix('admin/api')->middleware(['auth', \App\Http\Middleware\SuperAdminM
|
|||||||
Route::redirect('/urun-hizmet/Yazılım Danışmanlık', '/urun-hizmet/yazilim-danismanlik', 301);
|
Route::redirect('/urun-hizmet/Yazılım Danışmanlık', '/urun-hizmet/yazilim-danismanlik', 301);
|
||||||
Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show');
|
Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show');
|
||||||
|
|
||||||
|
// Music Productions
|
||||||
|
Route::get('/muzik-produksiyonlari', [\App\Http\Controllers\MusicProductionController::class, 'index'])->name('music-productions.index');
|
||||||
|
Route::get('/muzik-produksiyonlari/{slug}', [\App\Http\Controllers\MusicProductionController::class, 'show'])->name('music-productions.show');
|
||||||
|
|
||||||
// Career
|
// Career
|
||||||
Route::get('/kariyer', [\App\Http\Controllers\CareerController::class, 'index'])->name('career.index');
|
Route::get('/kariyer', [\App\Http\Controllers\CareerController::class, 'index'])->name('career.index');
|
||||||
Route::get('/staj-basvurusu', [\App\Http\Controllers\CareerController::class, 'internship'])->name('career.internship');
|
Route::get('/staj-basvurusu', [\App\Http\Controllers\CareerController::class, 'internship'])->name('career.internship');
|
||||||
|
|||||||
Reference in New Issue
Block a user