feat: implement Company History module with CRUD functionality, localization support, and timeline display for enhanced user experience
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems;
|
||||
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\CreateCompanyHistoryItem;
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\EditCompanyHistoryItem;
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\ListCompanyHistoryItems;
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\Schemas\CompanyHistoryItemForm;
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\Tables\CompanyHistoryItemsTable;
|
||||
use App\Models\CompanyHistoryItem;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
class CompanyHistoryItemResource extends Resource
|
||||
{
|
||||
protected static ?string $model = CompanyHistoryItem::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-clock';
|
||||
|
||||
protected static ?int $navigationSort = 45;
|
||||
|
||||
public static function getNavigationGroup(): ?string
|
||||
{
|
||||
return __('company_history.navigation_group');
|
||||
}
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('company_history.navigation_label');
|
||||
}
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('company_history.model_label');
|
||||
}
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('company_history.plural_model_label');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return CompanyHistoryItemForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return CompanyHistoryItemsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListCompanyHistoryItems::route('/'),
|
||||
'create' => CreateCompanyHistoryItem::route('/create'),
|
||||
'edit' => EditCompanyHistoryItem::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getRecordRouteBindingEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getRecordRouteBindingEloquentQuery()
|
||||
->withoutGlobalScopes([
|
||||
SoftDeletingScope::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems\Pages;
|
||||
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\CompanyHistoryItemResource;
|
||||
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateCompanyHistoryItem extends CreateRecord
|
||||
{
|
||||
protected static string $resource = CompanyHistoryItemResource::class;
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return __('company_history.create');
|
||||
}
|
||||
|
||||
protected function getRedirectUrl(): string
|
||||
{
|
||||
return $this->getResource()::getUrl('index');
|
||||
}
|
||||
|
||||
protected function getCreatedNotificationTitle(): ?string
|
||||
{
|
||||
return __('company_history.created_successfully');
|
||||
}
|
||||
|
||||
protected function mutateFormDataBeforeCreate(array $data): array
|
||||
{
|
||||
if (empty($data['position'])) {
|
||||
$data['position'] = null;
|
||||
}
|
||||
|
||||
unset($data['color_custom']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterCreate(): void
|
||||
{
|
||||
TranslationTabs::saveTranslations($this->record, $this->form->getState());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems\Pages;
|
||||
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\CompanyHistoryItemResource;
|
||||
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\ForceDeleteAction;
|
||||
use Filament\Actions\RestoreAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditCompanyHistoryItem extends EditRecord
|
||||
{
|
||||
protected static string $resource = CompanyHistoryItemResource::class;
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return __('company_history.edit');
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make()
|
||||
->label(__('company_history.delete')),
|
||||
ForceDeleteAction::make()
|
||||
->label(__('company_history.force_delete')),
|
||||
RestoreAction::make()
|
||||
->label(__('company_history.restore')),
|
||||
];
|
||||
}
|
||||
|
||||
protected function getRedirectUrl(): string
|
||||
{
|
||||
return $this->getResource()::getUrl('index');
|
||||
}
|
||||
|
||||
protected function getSavedNotificationTitle(): ?string
|
||||
{
|
||||
return __('company_history.updated_successfully');
|
||||
}
|
||||
|
||||
protected function mutateFormDataBeforeFill(array $data): array
|
||||
{
|
||||
$data['translations'] = TranslationTabs::loadTranslations($this->record);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function mutateFormDataBeforeSave(array $data): array
|
||||
{
|
||||
if (empty($data['position'])) {
|
||||
$data['position'] = null;
|
||||
}
|
||||
|
||||
unset($data['color_custom']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterSave(): void
|
||||
{
|
||||
TranslationTabs::saveTranslations($this->record, $this->form->getState());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems\Pages;
|
||||
|
||||
use App\Filament\Admin\Resources\CompanyHistoryItems\CompanyHistoryItemResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListCompanyHistoryItems extends ListRecords
|
||||
{
|
||||
protected static string $resource = CompanyHistoryItemResource::class;
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return __('company_history.title');
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()
|
||||
->label(__('company_history.create')),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems\Schemas;
|
||||
|
||||
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class CompanyHistoryItemForm
|
||||
{
|
||||
public static function iconOptions(): array
|
||||
{
|
||||
return [
|
||||
'heroicon-o-building-office-2' => __('company_history.icon_building'),
|
||||
'heroicon-o-academic-cap' => __('company_history.icon_academic'),
|
||||
'heroicon-o-globe-alt' => __('company_history.icon_globe'),
|
||||
'heroicon-o-users' => __('company_history.icon_users'),
|
||||
'heroicon-o-trophy' => __('company_history.icon_trophy'),
|
||||
'heroicon-o-map' => __('company_history.icon_map'),
|
||||
'heroicon-o-light-bulb' => __('company_history.icon_light_bulb'),
|
||||
'heroicon-o-rocket-launch' => __('company_history.icon_rocket'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function colorPresets(): array
|
||||
{
|
||||
return [
|
||||
'#17a2b8' => __('company_history.color_teal'),
|
||||
'#f5a623' => __('company_history.color_orange'),
|
||||
'#e91e63' => __('company_history.color_pink'),
|
||||
'#2c3e50' => __('company_history.color_navy'),
|
||||
'#5dade2' => __('company_history.color_blue'),
|
||||
'#27ae60' => __('company_history.color_green'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->columns(3)
|
||||
->schema([
|
||||
Section::make(__('company_history.content_section'))
|
||||
->schema([
|
||||
TextInput::make('year')
|
||||
->label(__('company_history.year_field'))
|
||||
->required()
|
||||
->numeric()
|
||||
->minValue(1900)
|
||||
->maxValue(2100),
|
||||
|
||||
TextInput::make('title')
|
||||
->label(__('company_history.title_field'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
Textarea::make('content')
|
||||
->label(__('company_history.content_field'))
|
||||
->required()
|
||||
->rows(5)
|
||||
->columnSpanFull(),
|
||||
|
||||
TranslationTabs::make([
|
||||
'title' => [
|
||||
'type' => 'text',
|
||||
'label' => __('company_history.title_field'),
|
||||
'required' => false,
|
||||
'maxLength' => 255,
|
||||
],
|
||||
'content' => [
|
||||
'type' => 'textarea',
|
||||
'label' => __('company_history.content_field'),
|
||||
'required' => false,
|
||||
'rows' => 5,
|
||||
],
|
||||
]),
|
||||
])
|
||||
->columnSpan(2)
|
||||
->collapsible(false),
|
||||
|
||||
Section::make(__('company_history.settings_section'))
|
||||
->schema([
|
||||
Select::make('color')
|
||||
->label(__('company_history.color_field'))
|
||||
->options(self::colorPresets())
|
||||
->default('#17a2b8')
|
||||
->required()
|
||||
->native(false)
|
||||
->searchable(),
|
||||
|
||||
Select::make('icon')
|
||||
->label(__('company_history.icon_field'))
|
||||
->options(self::iconOptions())
|
||||
->default('heroicon-o-building-office-2')
|
||||
->required()
|
||||
->native(false)
|
||||
->searchable(),
|
||||
|
||||
Select::make('position')
|
||||
->label(__('company_history.position_field'))
|
||||
->options([
|
||||
'' => __('company_history.position_auto'),
|
||||
'left' => __('company_history.position_left'),
|
||||
'right' => __('company_history.position_right'),
|
||||
])
|
||||
->default(null),
|
||||
|
||||
TextInput::make('sort_order')
|
||||
->label(__('company_history.sort_order_field'))
|
||||
->numeric()
|
||||
->default(0)
|
||||
->minValue(0),
|
||||
|
||||
Checkbox::make('is_active')
|
||||
->label(__('company_history.is_active_field'))
|
||||
->default(true),
|
||||
])
|
||||
->columnSpan(1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\CompanyHistoryItems\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\ColorColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\ToggleColumn;
|
||||
use Filament\Tables\Filters\TernaryFilter;
|
||||
use Filament\Tables\Filters\TrashedFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class CompanyHistoryItemsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('year')
|
||||
->label(__('company_history.table_year'))
|
||||
->sortable()
|
||||
->alignCenter(),
|
||||
|
||||
ColorColumn::make('color')
|
||||
->label(__('company_history.color_field')),
|
||||
|
||||
TextColumn::make('title')
|
||||
->label(__('company_history.table_title'))
|
||||
->searchable()
|
||||
->sortable()
|
||||
->limit(40),
|
||||
|
||||
TextColumn::make('content')
|
||||
->label(__('company_history.content_field'))
|
||||
->limit(60)
|
||||
->toggleable(),
|
||||
|
||||
TextColumn::make('position')
|
||||
->label(__('company_history.position_field'))
|
||||
->formatStateUsing(fn (?string $state): string => match ($state) {
|
||||
'left' => __('company_history.position_left'),
|
||||
'right' => __('company_history.position_right'),
|
||||
default => __('company_history.position_auto'),
|
||||
})
|
||||
->toggleable(),
|
||||
|
||||
ToggleColumn::make('is_active')
|
||||
->label(__('company_history.table_is_active'))
|
||||
->alignCenter(),
|
||||
|
||||
TextColumn::make('sort_order')
|
||||
->label(__('company_history.sort_order_field'))
|
||||
->sortable()
|
||||
->alignCenter(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->label(__('company_history.table_created_at'))
|
||||
->dateTime('d.m.Y H:i')
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
|
||||
TextColumn::make('updated_at')
|
||||
->label(__('company_history.table_updated_at'))
|
||||
->dateTime('d.m.Y H:i')
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([
|
||||
TernaryFilter::make('is_active')
|
||||
->label(__('company_history.is_active_field')),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
->label(__('company_history.edit')),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make()
|
||||
->label(__('company_history.delete')),
|
||||
RestoreBulkAction::make()
|
||||
->label(__('company_history.restore')),
|
||||
ForceDeleteBulkAction::make()
|
||||
->label(__('company_history.force_delete')),
|
||||
]),
|
||||
])
|
||||
->defaultSort('sort_order', 'asc')
|
||||
->reorderable('sort_order');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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 CompanyHistoryItem extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes, HasTranslations;
|
||||
|
||||
protected $fillable = [
|
||||
'year',
|
||||
'title',
|
||||
'content',
|
||||
'color',
|
||||
'icon',
|
||||
'position',
|
||||
'is_active',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $translatable = [
|
||||
'title',
|
||||
'content',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'year' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('is_active', true);
|
||||
}
|
||||
|
||||
public function scopeOrdered($query)
|
||||
{
|
||||
return $query->orderBy('sort_order', 'asc')->orderBy('year', 'asc');
|
||||
}
|
||||
|
||||
public function getResolvedPositionAttribute(): string
|
||||
{
|
||||
if (in_array($this->position, ['left', 'right'], true)) {
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
return ($this->sort_order % 2 === 1) ? 'right' : 'left';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('company_history_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedSmallInteger('year');
|
||||
$table->string('title');
|
||||
$table->text('content');
|
||||
$table->string('color', 7)->default('#17a2b8');
|
||||
$table->string('icon', 64)->default('heroicon-o-building-office-2');
|
||||
$table->enum('position', ['left', 'right'])->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->unsignedInteger('sort_order')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['is_active', 'sort_order']);
|
||||
$table->index('year');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('company_history_items');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\CompanyHistoryItem;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CompanyHistoryItemSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$items = [
|
||||
[
|
||||
'year' => 2014,
|
||||
'title' => 'Kuruluş',
|
||||
'content' => 'Trunçgil Teknoloji, 2014 yılında Ümit Tunç tarafından Gaziantep\'te kuruldu.',
|
||||
'color' => '#17a2b8',
|
||||
'icon' => 'heroicon-o-building-office-2',
|
||||
'sort_order' => 1,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'Foundation',
|
||||
'content' => 'Trunçgil Technology was founded in Gaziantep in 2014 by Ümit Tunç.',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'year' => 2015,
|
||||
'title' => 'Akademik Altyapı',
|
||||
'content' => 'E-SER akademik yayın evil ile çözüm ortaklığı yaparak akademik camiada indeksli dergilerin alt yapısını geliştirdi.',
|
||||
'color' => '#f5a623',
|
||||
'icon' => 'heroicon-o-academic-cap',
|
||||
'sort_order' => 2,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'Academic Infrastructure',
|
||||
'content' => 'Developed the infrastructure for indexed journals in academia through a solution partnership with E-SER academic publishing.',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'year' => 2016,
|
||||
'title' => 'İlk İhracat',
|
||||
'content' => 'İlk ihracatını gerçekleştirerek e-ticaret alanında Amerika\'nın New Jersey eyaletinde faaliyetler sürdürdü.',
|
||||
'color' => '#e91e63',
|
||||
'icon' => 'heroicon-o-globe-alt',
|
||||
'sort_order' => 3,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'First Export',
|
||||
'content' => 'Carried out its first export and continued operations in e-commerce in New Jersey, United States.',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'year' => 2017,
|
||||
'title' => 'TRDoktor.com',
|
||||
'content' => 'TRDoktor.com ile işbirliği neticesinde Türkiye genelinde aylık bir milyondan daha fazla ziyaretçiye kapı açtı.',
|
||||
'color' => '#2c3e50',
|
||||
'icon' => 'heroicon-o-users',
|
||||
'sort_order' => 4,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'TRDoktor.com',
|
||||
'content' => 'Through collaboration with TRDoktor.com, opened its doors to more than one million monthly visitors across Turkey.',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'year' => 2018,
|
||||
'title' => 'Eğitim Teknolojileri',
|
||||
'content' => 'Amerikan Kültür Koleji\'nin eğitim alt yapısında kullanılan uygulamalar geliştirdi.',
|
||||
'color' => '#5dade2',
|
||||
'icon' => 'heroicon-o-academic-cap',
|
||||
'sort_order' => 5,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'Education Technology',
|
||||
'content' => 'Developed applications used in the educational infrastructure of American Culture College.',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'year' => 2019,
|
||||
'title' => 'Teknopark ve Hackathon',
|
||||
'content' => 'Gaziantep Teknopark şubesini açtı. Aynı yıl Almanya menşeli HERE harita sistemlerinin gerçekleştirildiği ulusal Hackathon birinciliği elde etti.',
|
||||
'color' => '#27ae60',
|
||||
'icon' => 'heroicon-o-trophy',
|
||||
'sort_order' => 6,
|
||||
'translations' => [
|
||||
'en' => [
|
||||
'title' => 'Technopark & Hackathon',
|
||||
'content' => 'Opened its Gaziantep Technopark branch. The same year, won first place in the national hackathon implementing HERE map systems from Germany.',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($items as $itemData) {
|
||||
$translations = $itemData['translations'] ?? [];
|
||||
unset($itemData['translations']);
|
||||
|
||||
$item = CompanyHistoryItem::updateOrCreate(
|
||||
['year' => $itemData['year'], 'sort_order' => $itemData['sort_order']],
|
||||
array_merge($itemData, ['is_active' => true, 'position' => null])
|
||||
);
|
||||
|
||||
foreach ($translations as $langCode => $fields) {
|
||||
foreach ($fields as $fieldName => $value) {
|
||||
$item->setTranslation($fieldName, $langCode, $value, 'published');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ class DatabaseSeeder extends Seeder
|
||||
LanguageSeeder::class,
|
||||
SettingSeeder::class,
|
||||
PageSeeder::class,
|
||||
CompanyHistoryItemSeeder::class,
|
||||
]);
|
||||
|
||||
// User::factory(10)->create();
|
||||
|
||||
@@ -67,8 +67,8 @@ class PageSeeder extends Seeder
|
||||
'parent_id' => $corporate->id,
|
||||
'title' => 'Hakkımızda',
|
||||
'excerpt' => 'Biz kimiz?',
|
||||
'content' => '<p>Hakkımızda içeriği...</p>',
|
||||
'template' => 'generic',
|
||||
'content' => '<p>Trunçgil Teknoloji olarak 2014 yılından bu yana yazılım, e-ticaret, sağlık teknolojileri ve eğitim alanlarında yenilikçi çözümler üretiyoruz.</p>',
|
||||
'template' => 'hakkimizda',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => true,
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'navigation_group' => 'Corporate',
|
||||
'title' => 'Company History',
|
||||
'navigation_label' => 'Company History',
|
||||
'model_label' => 'History Item',
|
||||
'plural_model_label' => 'Company History',
|
||||
|
||||
'create' => 'New History Item',
|
||||
'edit' => 'Edit History Item',
|
||||
'delete' => 'Delete',
|
||||
'restore' => 'Restore',
|
||||
'force_delete' => 'Force Delete',
|
||||
|
||||
'content_section' => 'Content',
|
||||
'settings_section' => 'Appearance & Settings',
|
||||
|
||||
'year_field' => 'Year',
|
||||
'title_field' => 'Title',
|
||||
'content_field' => 'Description',
|
||||
'color_field' => 'Color',
|
||||
'icon_field' => 'Icon',
|
||||
'position_field' => 'Position',
|
||||
'position_auto' => 'Automatic (by order)',
|
||||
'position_left' => 'Left',
|
||||
'position_right' => 'Right',
|
||||
'is_active_field' => 'Active',
|
||||
'sort_order_field' => 'Sort Order',
|
||||
|
||||
'table_year' => 'Year',
|
||||
'table_title' => 'Title',
|
||||
'table_is_active' => 'Active',
|
||||
'table_created_at' => 'Created',
|
||||
'table_updated_at' => 'Updated',
|
||||
|
||||
'created_successfully' => 'History item created successfully.',
|
||||
'updated_successfully' => 'History item updated successfully.',
|
||||
'deleted_successfully' => 'History item deleted successfully.',
|
||||
|
||||
'timeline_start' => 'START',
|
||||
'timeline_finish' => 'TODAY',
|
||||
'timeline_section_badge' => 'Our History',
|
||||
'timeline_section_title' => 'The Trunçgil Technology Journey',
|
||||
'timeline_section_subtitle' => 'Our steps in technology and innovation from 2014 to today',
|
||||
|
||||
'icon_building' => 'Foundation / Building',
|
||||
'icon_academic' => 'Academic / Education',
|
||||
'icon_globe' => 'Global / Export',
|
||||
'icon_users' => 'Users / Healthcare',
|
||||
'icon_trophy' => 'Award / Achievement',
|
||||
'icon_map' => 'Map / Location',
|
||||
'icon_light_bulb' => 'Innovation',
|
||||
'icon_rocket' => 'Growth',
|
||||
|
||||
'color_teal' => 'Teal',
|
||||
'color_orange' => 'Orange',
|
||||
'color_pink' => 'Pink',
|
||||
'color_navy' => 'Navy',
|
||||
'color_blue' => 'Blue',
|
||||
'color_green' => 'Green',
|
||||
];
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'navigation_group' => 'Kurumsal',
|
||||
'title' => 'Şirket Tarihçesi',
|
||||
'navigation_label' => 'Şirket Tarihçesi',
|
||||
'model_label' => 'Tarihçe Öğesi',
|
||||
'plural_model_label' => 'Şirket Tarihçesi',
|
||||
|
||||
'create' => 'Yeni Tarihçe Öğesi',
|
||||
'edit' => 'Tarihçe Öğesini Düzenle',
|
||||
'delete' => 'Sil',
|
||||
'restore' => 'Geri Yükle',
|
||||
'force_delete' => 'Kalıcı Olarak Sil',
|
||||
|
||||
'content_section' => 'İçerik',
|
||||
'settings_section' => 'Görünüm ve Ayarlar',
|
||||
|
||||
'year_field' => 'Yıl',
|
||||
'title_field' => 'Başlık',
|
||||
'content_field' => 'Açıklama',
|
||||
'color_field' => 'Renk',
|
||||
'icon_field' => 'İkon',
|
||||
'position_field' => 'Konum',
|
||||
'position_auto' => 'Otomatik (sıraya göre)',
|
||||
'position_left' => 'Sol',
|
||||
'position_right' => 'Sağ',
|
||||
'is_active_field' => 'Aktif',
|
||||
'sort_order_field' => 'Sıralama',
|
||||
|
||||
'table_year' => 'Yıl',
|
||||
'table_title' => 'Başlık',
|
||||
'table_is_active' => 'Aktif',
|
||||
'table_created_at' => 'Oluşturulma',
|
||||
'table_updated_at' => 'Güncellenme',
|
||||
|
||||
'created_successfully' => 'Tarihçe öğesi başarıyla oluşturuldu.',
|
||||
'updated_successfully' => 'Tarihçe öğesi başarıyla güncellendi.',
|
||||
'deleted_successfully' => 'Tarihçe öğesi başarıyla silindi.',
|
||||
|
||||
'timeline_start' => 'BAŞLANGIÇ',
|
||||
'timeline_finish' => 'BUGÜN',
|
||||
'timeline_section_badge' => 'Tarihçemiz',
|
||||
'timeline_section_title' => 'Trunçgil Teknoloji Yolculuğu',
|
||||
'timeline_section_subtitle' => '2014\'ten bugüne teknoloji ve inovasyon adımlarımız',
|
||||
|
||||
'icon_building' => 'Kuruluş / Bina',
|
||||
'icon_academic' => 'Akademi / Eğitim',
|
||||
'icon_globe' => 'Küresel / İhracat',
|
||||
'icon_users' => 'Kullanıcılar / Sağlık',
|
||||
'icon_trophy' => 'Ödül / Başarı',
|
||||
'icon_map' => 'Harita / Konum',
|
||||
'icon_light_bulb' => 'İnovasyon',
|
||||
'icon_rocket' => 'Büyüme',
|
||||
|
||||
'color_teal' => 'Turkuaz',
|
||||
'color_orange' => 'Turuncu',
|
||||
'color_pink' => 'Pembe',
|
||||
'color_navy' => 'Lacivert',
|
||||
'color_blue' => 'Mavi',
|
||||
'color_green' => 'Yeşil',
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
@props(['icon' => 'heroicon-o-building-office-2', 'color' => '#17a2b8'])
|
||||
|
||||
@php
|
||||
$paths = match ($icon) {
|
||||
'heroicon-o-academic-cap' => '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.443m0 0V5.25A2.25 2.25 0 0 0 9 3H5.25A2.25 2.25 0 0 0 3 5.25v3.175',
|
||||
'heroicon-o-globe-alt' => 'M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5a17.92 17.92 0 0 1-8.716-2.247m0 0A8.959 8.959 0 0 1 3 12c0-.778.099-1.533.284-2.253',
|
||||
'heroicon-o-users' => 'M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z',
|
||||
'heroicon-o-trophy' => 'M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75H4.875c-.621 0-1.125.503-1.125 1.125v.375M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z',
|
||||
'heroicon-o-map' => 'M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z',
|
||||
'heroicon-o-light-bulb' => 'M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18',
|
||||
'heroicon-o-rocket-launch' => 'M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z',
|
||||
default => 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z',
|
||||
};
|
||||
@endphp
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="{{ $color }}" class="company-history-icon-svg" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="{{ $paths }}" />
|
||||
</svg>
|
||||
@@ -0,0 +1,322 @@
|
||||
@props([
|
||||
'items' => collect(),
|
||||
'showHeader' => true,
|
||||
])
|
||||
|
||||
@php
|
||||
$historyItems = $items instanceof \Illuminate\Support\Collection ? $items : collect($items);
|
||||
$gradientStops = $historyItems->values()->map(function ($item, $index) use ($historyItems) {
|
||||
$percent = $historyItems->count() > 1
|
||||
? round(($index / ($historyItems->count() - 1)) * 100, 1)
|
||||
: 0;
|
||||
return ($item->color ?? '#17a2b8') . ' ' . $percent . '%';
|
||||
})->implode(', ');
|
||||
@endphp
|
||||
|
||||
@if($historyItems->isNotEmpty())
|
||||
<section class="company-history-timeline-section wrapper !bg-[#f4f6f8]">
|
||||
<div class="container py-20 xl:py-28 lg:py-28 md:py-28">
|
||||
@if($showHeader)
|
||||
<div class="flex flex-wrap mx-[-15px] !mb-14 !text-center">
|
||||
<div class="w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
<span class="inline-block text-[0.75rem] tracking-[0.12rem] uppercase font-bold !mb-3" style="color: #e31e24;">
|
||||
{{ __('company_history.timeline_section_badge') }}
|
||||
</span>
|
||||
<h2 class="!text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
||||
{{ __('company_history.timeline_section_title') }}
|
||||
</h2>
|
||||
<p class="lead text-[1.05rem] !leading-[1.6] !text-[#60697b] max-w-[42rem] !mx-auto">
|
||||
{{ __('company_history.timeline_section_subtitle') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="company-history-timeline">
|
||||
<div class="company-history-timeline__start">
|
||||
<span>{{ __('company_history.timeline_start') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="company-history-timeline__track" style="--timeline-gradient: linear-gradient(to bottom, {{ $gradientStops }});">
|
||||
@foreach($historyItems as $item)
|
||||
@php
|
||||
$color = $item->color ?? '#17a2b8';
|
||||
$position = $item->resolved_position;
|
||||
$title = method_exists($item, 'translate') ? ($item->translate('title') ?: $item->title) : $item->title;
|
||||
$content = method_exists($item, 'translate') ? ($item->translate('content') ?: $item->content) : $item->content;
|
||||
@endphp
|
||||
<article
|
||||
class="company-history-timeline__item company-history-timeline__item--{{ $position }}"
|
||||
style="--item-color: {{ $color }};"
|
||||
>
|
||||
<div class="company-history-timeline__side company-history-timeline__side--outer">
|
||||
<div class="company-history-timeline__icon-ring">
|
||||
<x-company-history.icon :icon="$item->icon" :color="$color" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="company-history-timeline__axis">
|
||||
<span class="company-history-timeline__dot" aria-hidden="true"></span>
|
||||
</div>
|
||||
|
||||
<div class="company-history-timeline__side company-history-timeline__side--inner">
|
||||
<div class="company-history-timeline__content">
|
||||
<div class="company-history-timeline__year">{{ $item->year }}</div>
|
||||
@if($title)
|
||||
<h3 class="company-history-timeline__title">{{ strtoupper($title) }}</h3>
|
||||
@endif
|
||||
@if($content)
|
||||
<p class="company-history-timeline__text">{{ $content }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="company-history-timeline__finish">
|
||||
<span>{{ __('company_history.timeline_finish') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@once
|
||||
@push('styles')
|
||||
<style>
|
||||
.company-history-timeline {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.company-history-timeline__start,
|
||||
.company-history-timeline__finish {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 1.75rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__finish {
|
||||
margin-top: 1.75rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.company-history-timeline__start span,
|
||||
.company-history-timeline__finish span {
|
||||
display: inline-block;
|
||||
padding: 0.45rem 1.4rem;
|
||||
border: 2px solid #cbd5e0;
|
||||
border-radius: 999px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.14em;
|
||||
color: #4a5568;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.company-history-timeline__track {
|
||||
position: relative;
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
|
||||
.company-history-timeline__track::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 4px;
|
||||
transform: translateX(-50%);
|
||||
background: var(--timeline-gradient);
|
||||
border-radius: 4px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.company-history-timeline__item {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 40px 1fr;
|
||||
align-items: center;
|
||||
gap: 0 1.5rem;
|
||||
min-height: 150px;
|
||||
margin-bottom: 2.75rem;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.company-history-timeline__item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.company-history-timeline__axis {
|
||||
grid-column: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.company-history-timeline__dot {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--item-color);
|
||||
border: 3px solid #fff;
|
||||
box-shadow: 0 0 0 2px var(--item-color);
|
||||
}
|
||||
|
||||
.company-history-timeline__icon-ring {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid var(--item-color);
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.company-history-timeline__icon-ring::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 48px;
|
||||
height: 0;
|
||||
border-top: 2px dotted var(--item-color);
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.company-history-icon-svg {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.company-history-timeline__year {
|
||||
font-size: clamp(2rem, 4vw, 2.85rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.05;
|
||||
color: var(--item-color);
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__title {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
color: var(--item-color);
|
||||
margin: 0 0 0.7rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__text {
|
||||
font-size: 0.93rem;
|
||||
line-height: 1.65;
|
||||
color: #718096;
|
||||
margin: 0;
|
||||
max-width: 340px;
|
||||
}
|
||||
|
||||
/* Sağ taraf: içerik sağda, ikon en sağda */
|
||||
.company-history-timeline__item--right .company-history-timeline__side--inner {
|
||||
grid-column: 3;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--right .company-history-timeline__side--outer {
|
||||
grid-column: 3;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: -5.5rem;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--right .company-history-timeline__icon-ring::before {
|
||||
right: 100%;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--right .company-history-timeline__content {
|
||||
padding-right: 5.5rem;
|
||||
}
|
||||
|
||||
/* Sol taraf: ikon en solda, içerik solda */
|
||||
.company-history-timeline__item--left .company-history-timeline__side--inner {
|
||||
grid-column: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__side--outer {
|
||||
grid-column: 1;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: -5.5rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__icon-ring::before {
|
||||
left: 100%;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__content {
|
||||
padding-left: 5.5rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__text {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.company-history-timeline__track::before {
|
||||
left: 24px;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.company-history-timeline__item {
|
||||
grid-template-columns: 48px 1fr;
|
||||
gap: 0 1rem;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.company-history-timeline__axis {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
align-self: start;
|
||||
padding-top: 1.25rem;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__side--inner,
|
||||
.company-history-timeline__item--right .company-history-timeline__side--inner {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__side--outer,
|
||||
.company-history-timeline__item--right .company-history-timeline__side--outer {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
margin-top: 0.75rem;
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__content,
|
||||
.company-history-timeline__item--right .company-history-timeline__content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.company-history-timeline__icon-ring {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.company-history-timeline__icon-ring::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.company-history-timeline__item--left .company-history-timeline__text {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
@endif
|
||||
@@ -0,0 +1,121 @@
|
||||
{{-- demo31.html: üst bilgi bandı + center-nav transparent navbar-light --}}
|
||||
<header class="relative wrapper !bg-[#ffffff]">
|
||||
<div class="bg-[rgba(63,120,224)] !text-white font-bold text-[.75rem] !mb-2">
|
||||
<div class="container py-2 flex flex-col gap-2 sm:!flex-row sm:flex-wrap sm:items-center sm:gap-4 md:py-1 xl:!flex lg:!flex md:!flex xl:!flex-row lg:!flex-row md:!flex-row">
|
||||
@if(setting('contact_address'))
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="icon !text-white !text-[1.1rem] !mt-[.25rem] !mr-[.5rem]">
|
||||
<i class="uil uil-location-pin-alt before:content-['\ebd8']"></i>
|
||||
</div>
|
||||
<address class="!mb-0 not-italic !leading-[inherit] block">{{ setting('contact_address') }}</address>
|
||||
</div>
|
||||
@endif
|
||||
@if(setting('contact_phone'))
|
||||
<div class="flex flex-row items-center sm:ms-auto {{ setting('contact_address') ? 'md:me-6' : '' }}">
|
||||
<div class="icon !text-white !text-[1.1rem] !mt-[.25rem] !mr-[.5rem]">
|
||||
<i class="uil uil-phone-volume before:content-['\ec50']"></i>
|
||||
</div>
|
||||
<p class="!mb-0">
|
||||
<a href="tel:{{ preg_replace('/\s+/', '', setting('contact_phone')) }}" class="hover !text-white hover:!text-white">{{ setting('contact_phone') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
@if(setting('contact_email'))
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="icon !text-white !text-[1.1rem] !mt-[.25rem] !mr-[.5rem]">
|
||||
<i class="uil uil-message before:content-['\ebfe']"></i>
|
||||
</div>
|
||||
<p class="!mb-0">
|
||||
<a href="mailto:{{ setting('contact_email') }}" class="hover !text-white hover:!text-white">{{ setting('contact_email') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="navbar navbar-expand-lg center-nav transparent navbar-light">
|
||||
<div class="container xl:!flex-row lg:!flex-row !flex-nowrap items-center">
|
||||
<div class="navbar-brand w-full">
|
||||
<a href="{{ url('/') }}">
|
||||
<img src="{{ asset('assets/img/truncgil-yatay.svg') }}" alt="{{ setting('site_name', config('app.name')) }}" fetchpriority="high" decoding="async">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse offcanvas offcanvas-nav offcanvas-start">
|
||||
<div class="offcanvas-header xl:!hidden lg:!hidden flex items-center justify-between flex-row p-6">
|
||||
<a href="{{ url('/') }}">
|
||||
<img class="!h-[2.2rem]" src="{{ asset('assets/img/truncgil-yatay-dark.svg') }}" alt="{{ setting('site_name', config('app.name')) }}" loading="lazy">
|
||||
</a>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ __('Close') }}"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body xl:!ml-auto lg:!ml-auto flex flex-col !h-full">
|
||||
<div class="xl:!hidden lg:!hidden w-full pb-4 mb-2 border-b border-[#e2e8f0]">
|
||||
@include('components.custom.language-selector', ['variant' => 'offcanvas'])
|
||||
</div>
|
||||
@include('components.custom.menu')
|
||||
<div class="offcanvas-footer xl:!hidden lg:!hidden !mt-auto">
|
||||
<div>
|
||||
@if(setting('contact_email'))
|
||||
<a href="mailto:{{ setting('contact_email') }}" class="link-inverse">{{ setting('contact_email') }}</a>
|
||||
<br>
|
||||
@endif
|
||||
@if(setting('contact_phone'))
|
||||
<a href="tel:{{ preg_replace('/\s+/', '', setting('contact_phone')) }}">{{ setting('contact_phone') }}</a>
|
||||
<br>
|
||||
@endif
|
||||
@php $social_media = json_decode(setting('social_links'), true) ?? []; @endphp
|
||||
<nav class="nav social social-white !mt-4">
|
||||
@if(!empty($social_media['Twitter']))
|
||||
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="{{ $social_media['Twitter'] }}" target="_blank" rel="noopener"><i class="uil uil-twitter before:content-['\ed59'] !text-white text-[1rem]"></i></a>
|
||||
@endif
|
||||
@if(!empty($social_media['Facebook']))
|
||||
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="{{ $social_media['Facebook'] }}" target="_blank" rel="noopener"><i class="uil uil-facebook-f before:content-['\eae2'] !text-white text-[1rem]"></i></a>
|
||||
@endif
|
||||
@if(!empty($social_media['Instagram']))
|
||||
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="{{ $social_media['Instagram'] }}" target="_blank" rel="noopener"><i class="uil uil-instagram before:content-['\eb9c'] !text-white text-[1rem]"></i></a>
|
||||
@endif
|
||||
@if(!empty($social_media['Youtube']))
|
||||
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="{{ $social_media['Youtube'] }}" target="_blank" rel="noopener"><i class="uil uil-youtube before:content-['\edb5'] !text-white text-[1rem]"></i></a>
|
||||
@endif
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-other w-full !flex !ml-auto header-language-desktop">
|
||||
<ul class="navbar-nav !flex-row !items-center !ml-auto">
|
||||
<li class="nav-item hidden xl:block lg:block md:block">
|
||||
@include('components.custom.language-selector')
|
||||
</li>
|
||||
<li class="nav-item hidden xl:block lg:block md:block">
|
||||
<a
|
||||
href="{{ route('page.show', ['slug' => 'iletisim']) }}"
|
||||
class="btn btn-sm btn-primary !text-white !bg-[#e31e24] border-[#e31e24] hover:text-white hover:bg-[#e31e24] hover:!border-[#e31e24] active:text-white active:bg-[#e31e24] active:border-[#e31e24] disabled:text-white disabled:bg-[#e31e24] disabled:border-[#e31e24] !rounded-[0.4rem] hover:translate-y-[-0.15rem] hover:shadow-[0_0.25rem_0.75rem_rgba(30,34,40,0.15)]"
|
||||
>{{ t('İletişim') }}</a>
|
||||
</li>
|
||||
<li class="nav-item xl:!hidden lg:!hidden">
|
||||
<button class="hamburger offcanvas-nav-btn" type="button" data-bs-toggle="offcanvas" data-bs-target=".offcanvas-nav"><span></span></button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var offcanvases = document.querySelectorAll('.offcanvas-nav');
|
||||
var hamburgers = document.querySelectorAll('.hamburger.offcanvas-nav-btn');
|
||||
if (offcanvases.length > 0 && hamburgers.length > 0) {
|
||||
offcanvases.forEach(function (oc) {
|
||||
oc.addEventListener('show.bs.offcanvas', function () {
|
||||
hamburgers.forEach(function (h) { h.classList.add('is-active'); });
|
||||
});
|
||||
oc.addEventListener('hide.bs.offcanvas', function () {
|
||||
hamburgers.forEach(function (h) { h.classList.remove('is-active'); });
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,41 @@
|
||||
@extends('layouts.site', [
|
||||
'header' => 'partials.header-demo31',
|
||||
'footer' => 'partials.footer',
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$historyItems = \App\Models\CompanyHistoryItem::active()->ordered()->get();
|
||||
$pageTitle = $page ? ($page->translate('title') ?: $page->title) : __('company_history.timeline_section_title');
|
||||
$pageExcerpt = $page ? ($page->translate('excerpt') ?: $page->excerpt) : null;
|
||||
@endphp
|
||||
|
||||
<section class="wrapper !bg-[#ffffff]">
|
||||
<div class="container pt-12 xl:pt-16 lg:pt-16 md:pt-16 pb-10 xl:pb-14 lg:pb-14 md:pb-14 !text-center">
|
||||
<div class="flex flex-wrap mx-[-15px]">
|
||||
<div class="lg:w-9/12 xl:w-8/12 xxl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
<h1 class="xl:!text-[3.2rem] !text-[calc(1.445rem_+_2.34vw)] font-bold !leading-[1.15] !tracking-[-0.03em] !mb-4 md:!px-8 lg:!px-0">
|
||||
{{ $pageTitle }}
|
||||
</h1>
|
||||
@if($pageExcerpt)
|
||||
<p class="lead !text-[1.2rem] !leading-[1.5] !mb-0 !text-[#60697b]">
|
||||
{{ $pageExcerpt }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($page && ($page->translate('content') ?: $page->content))
|
||||
<div class="flex flex-wrap mx-[-15px] !mt-10">
|
||||
<div class="lg:w-9/12 xl:w-8/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
<div class="prose max-w-none !text-[#60697b] !text-center">
|
||||
{!! $page->translate('content') ?: $page->content !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<x-company-history.timeline :items="$historyItems" />
|
||||
@endsection
|
||||
Reference in New Issue
Block a user