feat: implement real-time SEO character counters and improve default avatar handling and translation logic.
This commit is contained in:
@@ -15,12 +15,20 @@ class SeoSection
|
||||
TextInput::make('meta_title')
|
||||
->label(__('pages.meta_title_field'))
|
||||
->maxLength(60)
|
||||
->extraInputAttributes(['maxlength' => 60])
|
||||
->live(debounce: 200)
|
||||
->hint(fn ($state) => mb_strlen((string) $state) . ' / 60')
|
||||
->hintColor(fn ($state) => mb_strlen((string) $state) > 60 ? 'danger' : 'gray')
|
||||
->helperText(__('pages.meta_title_helper_text')),
|
||||
|
||||
Textarea::make('meta_description')
|
||||
->label(__('pages.meta_description_field'))
|
||||
->rows(3)
|
||||
->maxLength(160)
|
||||
->extraInputAttributes(['maxlength' => 160])
|
||||
->live(debounce: 200)
|
||||
->hint(fn ($state) => mb_strlen((string) $state) . ' / 160')
|
||||
->hintColor(fn ($state) => mb_strlen((string) $state) > 160 ? 'danger' : 'gray')
|
||||
->helperText(__('pages.meta_description_helper_text'))
|
||||
->columnSpanFull(),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user