Skip to content

Commit

Permalink
use custom colors for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Jan 6, 2024
1 parent 904ff92 commit a29ebfa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions resources/views/themes/zeus/bolt/fill-forms.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@

@include($boltTheme.'.loading')

@if(class_exists(\LaraZeus\Bolt\BoltProServiceProvider::class) && optional($zeusForm->options)['logo'] !== null && optional($zeusForm)->options['cover'] !== null)
@if(class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class) && optional($zeusForm->options)['logo'] !== null && optional($zeusForm)->options['cover'] !== null)
<div style="background-image: url('{{ \Illuminate\Support\Facades\Storage::disk(config('zeus-bolt.uploadDisk'))->url($zeusForm->options['cover']) }}')"
class="flex justify-start items-center px-4 py-6 gap-4 rounded-lg bg-clip-border bg-origin-border bg-cover bg-center">
<div>
<img
class="bg-white rounded-full shadow-md shadow-primary-100 sm:h-24 sm:w-24 object-cover"
class="bg-white rounded-full shadow-md shadow-custom-100 sm:w-24 object-cover"
src="{{ \Illuminate\Support\Facades\Storage::disk(config('zeus-bolt.uploadDisk'))->url($zeusForm->options['logo']) }}"
alt="logo"
/>
</div>
<div class="bg-white/40 p-4 space-y-1 rounded-lg w-full text-left">
<h4 class="text-primary-600 text-2xl font-bold dark:text-white">
<h4 class="text-custom-600 text-2xl font-bold dark:text-white">
{{ $zeusForm->name ?? '' }}
</h4>
@if(filled($zeusForm->description))
<h5 class="text-primary-600 font-normal">
<h5 class="text-custom-600 font-normal">
{{ $zeusForm->description ?? '' }}
</h5>
@endif
@if($zeusForm->start_date !== null)
<div class="text-primary-800 flex items-center justify-start gap-2 text-sm">
<div class="text-custom-800 flex items-center justify-start gap-2 text-sm">
@svg('heroicon-o-calendar','h-5 w-5 inline-flex')
<span class="flex items-center justify-center gap-1">
<span>{{ __('Available from') }}:</span>
Expand All @@ -43,7 +43,7 @@ class="bg-white rounded-full shadow-md shadow-primary-100 sm:h-24 sm:w-24 object
@endif

@if(!$inline)
@if(!class_exists(\LaraZeus\Bolt\BoltProServiceProvider::class) || (optional($zeusForm->options)['logo'] === null && optional($zeusForm->options)['cover'] === null))
@if(!class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class) || (optional($zeusForm->options)['logo'] === null && optional($zeusForm->options)['cover'] === null))
<x-slot name="header">
<h2>{{ $zeusForm->name ?? '' }}</h2>
<p class="text-gray-400 text-mdd my-2">{{ $zeusForm->description ?? '' }}</p>
Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/Schemata.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ public static function getTabsSchema(): array

Tabs\Tab::make('design')
->label(__('Design'))
->visible(fn (
): bool => class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class) && config('zeus-bolt.allow_design'))
->visible(class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class) && config('zeus-bolt.allow_design'))
->schema([
ViewField::make('options.primary_color')
->hiddenLabel()
->view('zeus::filament.components.color-picker'),
FileUpload::make('options.logo')
->disk(config('zeus-bolt.uploadDisk'))
Expand Down
6 changes: 3 additions & 3 deletions src/Models/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public function form(): BelongsTo
return $this->belongsTo(BoltPlugin::getModel('Form'));
}

/** @return BelongsToMany<Section> */
public function section(): BelongsToMany
/** @return BelongsTo<Section, Field> */
public function section(): BelongsTo
{
return $this->belongsToMany(BoltPlugin::getModel('Section'));
return $this->belongsTo(BoltPlugin::getModel('Section'));
}

/** @return HasMany<FieldResponse> */
Expand Down

0 comments on commit a29ebfa

Please sign in to comment.