diff --git a/apps/qubit/modules/settings/actions/headerAction.class.php b/apps/qubit/modules/settings/actions/headerAction.class.php index c013733f20..ae0ccbdb7c 100644 --- a/apps/qubit/modules/settings/actions/headerAction.class.php +++ b/apps/qubit/modules/settings/actions/headerAction.class.php @@ -60,8 +60,8 @@ protected function addField($name) break; case 'favicon': - $this->form->setWidget($name, new sfWidgetFormInputFile([], ['accept' => '.ico'])); - $this->form->setValidator($name, new sfValidatorFile(['mime_types' => ['image/x-icon', 'image/vnd.microsoft.icon']])); + $this->form->setWidget($name, new sfWidgetFormInputFile([], ['accept' => '.ico,.svg'])); + $this->form->setValidator($name, new sfValidatorFile(['mime_types' => ['image/x-icon', 'image/vnd.microsoft.icon', 'image/svg+xml']])); break; @@ -102,10 +102,14 @@ protected function processField($field) case 'favicon': $faviconFile = $this->form->getValue('favicon'); - $faviconImgPath = $this->staticDir.DIRECTORY_SEPARATOR.'favicon.ico'; - if (null !== $faviconFile) { + $extension = strtolower($faviconFile->getOriginalExtension()); + $faviconImgPath = $this->staticDir.DIRECTORY_SEPARATOR.'favicon'.('.svg' === $extension ? '.svg' : '.ico'); $faviconFile->save($faviconImgPath); + + if ('.ico' === $extension) { + @unlink($this->staticDir.DIRECTORY_SEPARATOR.'favicon.svg'); + } } break; @@ -147,12 +151,18 @@ protected function restoreDefaultLogo() protected function restoreDefaultFavicon() { $faviconImgPath = $this->staticDir.DIRECTORY_SEPARATOR.'favicon.ico'; + $faviconSvgPath = $this->staticDir.DIRECTORY_SEPARATOR.'favicon.svg'; $defaultAtoMFaviconPath = sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'default_atom_favicon.ico'; + $defaultAtoMFaviconSvgPath = sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'default_atom_favicon.svg'; if (file_exists($defaultAtoMFaviconPath)) { copy($defaultAtoMFaviconPath, $faviconImgPath); } else { $this->updateMessage = $this->i18n->__('Default favicon not found.'); } + + if (file_exists($defaultAtoMFaviconSvgPath)) { + copy($defaultAtoMFaviconSvgPath, $faviconSvgPath); + } } } diff --git a/apps/qubit/modules/settings/templates/headerSuccess.php b/apps/qubit/modules/settings/templates/headerSuccess.php index 500455e729..12926503da 100644 --- a/apps/qubit/modules/settings/templates/headerSuccess.php +++ b/apps/qubit/modules/settings/templates/headerSuccess.php @@ -54,7 +54,7 @@
-

+

diff --git a/config/error/error.html.php b/config/error/error.html.php index dd6dc91e48..b96c1f04f2 100644 --- a/config/error/error.html.php +++ b/config/error/error.html.php @@ -3,6 +3,7 @@ Error + diff --git a/config/error/errorB5_webpack.html.php b/config/error/errorB5_webpack.html.php index 84b5e02aab..04395f5e3e 100644 --- a/config/error/errorB5_webpack.html.php +++ b/config/error/errorB5_webpack.html.php @@ -4,6 +4,7 @@ Error + <% for (var css in htmlWebpackPlugin.files.css) { %> <% } %> diff --git a/config/package.xml b/config/package.xml index 80ec028569..c4ac9e389a 100644 --- a/config/package.xml +++ b/config/package.xml @@ -67,6 +67,7 @@ The goal is to provide an easy-to-use, flexible toolkit that complies with open + diff --git a/config/unavailable.php b/config/unavailable.php index 6c0f72779e..c3e3caf66f 100644 --- a/config/unavailable.php +++ b/config/unavailable.php @@ -3,6 +3,7 @@ AtoM + diff --git a/config/unavailableB5_webpack.php b/config/unavailableB5_webpack.php index 0d49617bfd..9ad4257d74 100644 --- a/config/unavailableB5_webpack.php +++ b/config/unavailableB5_webpack.php @@ -4,6 +4,7 @@ AtoM + <% for (var css in htmlWebpackPlugin.files.css) { %> <% } %> diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000000..0b522ed64a --- /dev/null +++ b/favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/default_atom_favicon.svg b/images/default_atom_favicon.svg new file mode 100644 index 0000000000..0b522ed64a --- /dev/null +++ b/images/default_atom_favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/plugins/arDominionB5Plugin/templates/_favicon.php b/plugins/arDominionB5Plugin/templates/_favicon.php new file mode 100644 index 0000000000..417f876aae --- /dev/null +++ b/plugins/arDominionB5Plugin/templates/_favicon.php @@ -0,0 +1,19 @@ + + diff --git a/plugins/arDominionB5Plugin/templates/_layout_start_webpack.php b/plugins/arDominionB5Plugin/templates/_layout_start_webpack.php index a8d7b88108..34d9f469c0 100644 --- a/plugins/arDominionB5Plugin/templates/_layout_start_webpack.php +++ b/plugins/arDominionB5Plugin/templates/_layout_start_webpack.php @@ -8,12 +8,7 @@ 'script']); ?> - - - - - - + <%= htmlWebpackPlugin.tags.headTags %>