mirror of https://github.com/MarceauKa/shaark.git
✨ Ability to add Custom CSS #67
This commit is contained in:
parent
270c2fc6c0
commit
9da926e627
|
@ -15,6 +15,7 @@ use Spatie\Valuestore\Valuestore;
|
|||
* @method bool getUseDefaultSearch()
|
||||
* @method string getPostsOrder()
|
||||
* @method string getAdditionalJs()
|
||||
* @method string getAdditionalCss()
|
||||
* @method bool getIsDark()
|
||||
* @method string getCustomBackground()
|
||||
* @method string getCustomIcon()
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Unreleased
|
||||
|
||||
## Added
|
||||
|
||||
- Ability to add Custom CSS ([#67](https://github.com/MarceauKa/shaark/issues/67))
|
||||
|
||||
## Changed
|
||||
|
||||
- Laravel 6.17
|
||||
|
|
|
@ -38,6 +38,10 @@ return [
|
|||
'default' => null,
|
||||
'rules' => ['nullable'],
|
||||
],
|
||||
'additional_css' => [
|
||||
'default' => null,
|
||||
'rules' => ['nullable'],
|
||||
],
|
||||
'is_dark' => [
|
||||
'default' => false,
|
||||
'rules' => ['nullable', 'in:on,off']
|
||||
|
|
|
@ -15,6 +15,7 @@ return [
|
|||
'created' => 'Erstellungsdatum',
|
||||
'updated' => 'Datum des letzten Updates',
|
||||
'additional_js' => 'Zusätzliche JS',
|
||||
'additional_css' => 'Zusätzliche CSS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -15,6 +15,7 @@ return [
|
|||
'created' => 'Creation date',
|
||||
'updated' => 'Last update date',
|
||||
'additional_js' => 'Additional JS',
|
||||
'additional_css' => 'Additional CSS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -15,6 +15,7 @@ return [
|
|||
'created' => 'Date de création',
|
||||
'updated' => 'Date de dernière modification',
|
||||
'additional_js' => 'Javascript personnalisé',
|
||||
'additional_css' => 'CSS personnalisé',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -15,6 +15,7 @@ return [
|
|||
'created' => '作成日',
|
||||
'updated' => '最終更新日',
|
||||
'additional_js' => 'カスタムJS',
|
||||
'additional_css' => 'カスタムCSS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -28,3 +28,4 @@
|
|||
}
|
||||
</style>
|
||||
@endif
|
||||
@if(app('shaark')->getAdditionalCss()){!! app('shaark')->getAdditionalCss() !!}@endif
|
||||
|
|
|
@ -80,13 +80,23 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label for="additional_js">{{ __('shaark.settings.general.additional_js') }}</label>
|
||||
<textarea name="additional_js" id="additional_js"
|
||||
<textarea name="additional_js" id="additional_js" rows="4"
|
||||
class="form-control" placeholder="<script>...</script>, <script src='...'></script>"
|
||||
>{{ old('additional_js', $settings['additional_js']) }}</textarea>
|
||||
@error('additional_js')
|
||||
<span class="text-danger" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="additional_css">{{ __('shaark.settings.general.additional_css') }}</label>
|
||||
<textarea name="additional_css" id="additional_css" rows="4"
|
||||
class="form-control" placeholder="<link href='' rel='stylesheet' />, <style></style>"
|
||||
>{{ old('additional_css', $settings['additional_css']) }}</textarea>
|
||||
@error('additional_css')
|
||||
<span class="text-danger" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue