mirror of
https://github.com/typemill/typemill.git
synced 2025-08-06 06:07:31 +02:00
fix error if theme settings are missing
This commit is contained in:
@@ -86,21 +86,24 @@ class Extension
|
||||
{
|
||||
$themeSettings = $this->storage->getYaml('themesFolder', $themeName, $themeName . '.yaml');
|
||||
|
||||
# add standard-textarea for custom css
|
||||
$themeSettings['forms']['fields']['fieldsetcss'] = [
|
||||
'type' => 'fieldset',
|
||||
'legend' => Translations::translate('Custom CSS'),
|
||||
'fields' => [
|
||||
'customcss' => [
|
||||
'type' => 'codearea',
|
||||
'label' => Translations::translate('Add your individual CSS'),
|
||||
'class' => 'codearea',
|
||||
'description' => Translations::translate('You can overwrite the theme-css with your own css here.')
|
||||
if($themeSettings)
|
||||
{
|
||||
# add standard-textarea for custom css
|
||||
$themeSettings['forms']['fields']['fieldsetcss'] = [
|
||||
'type' => 'fieldset',
|
||||
'legend' => Translations::translate('Custom CSS'),
|
||||
'fields' => [
|
||||
'customcss' => [
|
||||
'type' => 'codearea',
|
||||
'label' => Translations::translate('Add your individual CSS'),
|
||||
'class' => 'codearea',
|
||||
'description' => Translations::translate('You can overwrite the theme-css with your own css here.')
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
];
|
||||
|
||||
$themeSettings['preview'] = '/themes/' . $themeName . '/' . $themeName . '.png';
|
||||
$themeSettings['preview'] = '/themes/' . $themeName . '/' . $themeName . '.png';
|
||||
}
|
||||
|
||||
return $themeSettings;
|
||||
}
|
||||
|
Reference in New Issue
Block a user