{{ strtoupper($title) }}
+ @endif + @if($content) +{{ $content }}
+ @endif +diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/CompanyHistoryItemResource.php b/app/Filament/Admin/Resources/CompanyHistoryItems/CompanyHistoryItemResource.php new file mode 100644 index 0000000..8e621ab --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/CompanyHistoryItemResource.php @@ -0,0 +1,77 @@ + ListCompanyHistoryItems::route('/'), + 'create' => CreateCompanyHistoryItem::route('/create'), + 'edit' => EditCompanyHistoryItem::route('/{record}/edit'), + ]; + } + + public static function getRecordRouteBindingEloquentQuery(): Builder + { + return parent::getRecordRouteBindingEloquentQuery() + ->withoutGlobalScopes([ + SoftDeletingScope::class, + ]); + } +} diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/CreateCompanyHistoryItem.php b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/CreateCompanyHistoryItem.php new file mode 100644 index 0000000..f9b312f --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/CreateCompanyHistoryItem.php @@ -0,0 +1,43 @@ +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()); + } +} diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/EditCompanyHistoryItem.php b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/EditCompanyHistoryItem.php new file mode 100644 index 0000000..e5db02a --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/EditCompanyHistoryItem.php @@ -0,0 +1,65 @@ +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()); + } +} diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/ListCompanyHistoryItems.php b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/ListCompanyHistoryItems.php new file mode 100644 index 0000000..4c7165f --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/Pages/ListCompanyHistoryItems.php @@ -0,0 +1,25 @@ +label(__('company_history.create')), + ]; + } +} diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/Schemas/CompanyHistoryItemForm.php b/app/Filament/Admin/Resources/CompanyHistoryItems/Schemas/CompanyHistoryItemForm.php new file mode 100644 index 0000000..8af9770 --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/Schemas/CompanyHistoryItemForm.php @@ -0,0 +1,124 @@ + __('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), + ]); + } +} diff --git a/app/Filament/Admin/Resources/CompanyHistoryItems/Tables/CompanyHistoryItemsTable.php b/app/Filament/Admin/Resources/CompanyHistoryItems/Tables/CompanyHistoryItemsTable.php new file mode 100644 index 0000000..364c2c1 --- /dev/null +++ b/app/Filament/Admin/Resources/CompanyHistoryItems/Tables/CompanyHistoryItemsTable.php @@ -0,0 +1,94 @@ +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'); + } +} diff --git a/app/Models/CompanyHistoryItem.php b/app/Models/CompanyHistoryItem.php new file mode 100644 index 0000000..40e9324 --- /dev/null +++ b/app/Models/CompanyHistoryItem.php @@ -0,0 +1,57 @@ + + */ + 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'; + } +} diff --git a/database/migrations/2026_05_21_162945_create_company_history_items_table.php b/database/migrations/2026_05_21_162945_create_company_history_items_table.php new file mode 100644 index 0000000..15bd6f9 --- /dev/null +++ b/database/migrations/2026_05_21_162945_create_company_history_items_table.php @@ -0,0 +1,39 @@ +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'); + } +}; diff --git a/database/seeders/CompanyHistoryItemSeeder.php b/database/seeders/CompanyHistoryItemSeeder.php new file mode 100644 index 0000000..9abffb9 --- /dev/null +++ b/database/seeders/CompanyHistoryItemSeeder.php @@ -0,0 +1,118 @@ + 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'); + } + } + } + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 5fbae17..453c857 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -18,6 +18,7 @@ class DatabaseSeeder extends Seeder LanguageSeeder::class, SettingSeeder::class, PageSeeder::class, + CompanyHistoryItemSeeder::class, ]); // User::factory(10)->create(); diff --git a/database/seeders/PageSeeder.php b/database/seeders/PageSeeder.php index ab980bd..cd8b9dc 100644 --- a/database/seeders/PageSeeder.php +++ b/database/seeders/PageSeeder.php @@ -67,8 +67,8 @@ class PageSeeder extends Seeder 'parent_id' => $corporate->id, 'title' => 'Hakkımızda', 'excerpt' => 'Biz kimiz?', - 'content' => '
Hakkımızda içeriği...
', - 'template' => 'generic', + 'content' => '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.
', + 'template' => 'hakkimizda', 'status' => 'published', 'is_homepage' => false, 'show_in_menu' => true, diff --git a/lang/en/company_history.php b/lang/en/company_history.php new file mode 100644 index 0000000..2c4751a --- /dev/null +++ b/lang/en/company_history.php @@ -0,0 +1,62 @@ + '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', +]; diff --git a/lang/tr/company_history.php b/lang/tr/company_history.php new file mode 100644 index 0000000..f9b35f8 --- /dev/null +++ b/lang/tr/company_history.php @@ -0,0 +1,62 @@ + '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', +]; diff --git a/resources/views/components/company-history/icon.blade.php b/resources/views/components/company-history/icon.blade.php new file mode 100644 index 0000000..6db3460 --- /dev/null +++ b/resources/views/components/company-history/icon.blade.php @@ -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 + + diff --git a/resources/views/components/company-history/timeline.blade.php b/resources/views/components/company-history/timeline.blade.php new file mode 100644 index 0000000..aa40fc4 --- /dev/null +++ b/resources/views/components/company-history/timeline.blade.php @@ -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()) ++ {{ __('company_history.timeline_section_subtitle') }} +
+{{ $content }}
+ @endif ++ {{ $pageExcerpt }} +
+ @endif +