diff --git a/.gitignore b/.gitignore index b27afa03..02d868a6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ templates/* !templates/Froxlor/ templates/Froxlor/assets/css/ templates/Froxlor/assets/js/ +templates/Froxlor/assets/webfonts/ !templates/misc/ diff --git a/lib/Froxlor/Cron/Http/Php/Fpm.php b/lib/Froxlor/Cron/Http/Php/Fpm.php index cac90aa8..5e826677 100644 --- a/lib/Froxlor/Cron/Http/Php/Fpm.php +++ b/lib/Froxlor/Cron/Http/Php/Fpm.php @@ -17,10 +17,10 @@ use Froxlor\Settings; * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Cron - * + * * @link http://www.nutime.de/ * @since 0.9.16 - * + * */ class Fpm { @@ -244,13 +244,16 @@ class Fpm $fpm_config .= "\n\n"; foreach ($phpini_array as $inisection) { $is = explode("=", $inisection); + if (count($is) !== 2 || empty($is[0])) { + continue; + } foreach ($this->ini as $sec => $possibles) { if (in_array(trim($is[0]), $possibles)) { // check explicitly for open_basedir if (trim($is[0]) == 'open_basedir' && $openbasedir == '') { continue; } - $fpm_config .= $sec . '[' . trim($is[0]) . '] = ' . trim($is[1]) . "\n"; + $fpm_config .= $sec . '[' . trim($is[0]) . '] = ' . trim($is[1] ?? '') . "\n"; } } } @@ -293,7 +296,7 @@ class Fpm * * @param boolean $createifnotexists * create the directory if it does not exist - * + * * @return string the full path to the file */ public function getConfigFile($createifnotexists = true) @@ -313,7 +316,7 @@ class Fpm * * @param boolean $createifnotexists * create the directory if it does not exist - * + * * @return string the full path to the socket */ public function getSocketFile($createifnotexists = true) @@ -335,7 +338,7 @@ class Fpm * * @param boolean $createifnotexists * create the directory if it does not exist - * + * * @return string the directory */ public function getTempDir($createifnotexists = true) @@ -356,7 +359,7 @@ class Fpm * * @param boolean $createifnotexists * create the directory if it does not exist - * + * * @return string the directory */ public function getAliasConfigDir($createifnotexists = true) @@ -402,7 +405,7 @@ pm.max_children = 1 * * @param int $adminid * id of the admin-user - * + * * @return array */ private function getAdminData($adminid) diff --git a/mix-manifest.json b/mix-manifest.json deleted file mode 100644 index eb25075e..00000000 --- a/mix-manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "/templates/Froxlor/assets/js/main.js": "/templates/Froxlor/assets/js/main.js", - "/templates/Froxlor/assets/css/dark.css": "/templates/Froxlor/assets/css/dark.css", - "/templates/Froxlor/assets/css/main.css": "/templates/Froxlor/assets/css/main.css" -} diff --git a/templates/Froxlor/assets/mix-manifest.json b/templates/Froxlor/assets/mix-manifest.json new file mode 100644 index 00000000..39723b55 --- /dev/null +++ b/templates/Froxlor/assets/mix-manifest.json @@ -0,0 +1,13 @@ +{ + "/js/main.js": "/js/main.js", + "/css/dark.css": "/css/dark.css", + "/css/main.css": "/css/main.css", + "/webfonts/fa-brands-400.ttf": "/webfonts/fa-brands-400.ttf", + "/webfonts/fa-brands-400.woff2": "/webfonts/fa-brands-400.woff2", + "/webfonts/fa-regular-400.ttf": "/webfonts/fa-regular-400.ttf", + "/webfonts/fa-regular-400.woff2": "/webfonts/fa-regular-400.woff2", + "/webfonts/fa-solid-900.ttf": "/webfonts/fa-solid-900.ttf", + "/webfonts/fa-solid-900.woff2": "/webfonts/fa-solid-900.woff2", + "/webfonts/fa-v4compatibility.ttf": "/webfonts/fa-v4compatibility.ttf", + "/webfonts/fa-v4compatibility.woff2": "/webfonts/fa-v4compatibility.woff2" +} diff --git a/templates/Froxlor/src/js/main.js b/templates/Froxlor/src/js/main.js index 5d96e6ca..f5d4cf9c 100644 --- a/templates/Froxlor/src/js/main.js +++ b/templates/Froxlor/src/js/main.js @@ -1,5 +1,6 @@ // load bootstrap import 'bootstrap'; +import '@fortawesome/fontawesome-free'; import 'chart.js/dist/chart'; // load jquery diff --git a/templates/Froxlor/src/scss/main.scss b/templates/Froxlor/src/scss/main.scss index b8b1c648..d5808a08 100644 --- a/templates/Froxlor/src/scss/main.scss +++ b/templates/Froxlor/src/scss/main.scss @@ -3,6 +3,7 @@ // Bootstrap @import "variables/main"; @import "~bootstrap/scss/bootstrap"; +@import "~@fortawesome/fontawesome-free/scss/fontawesome"; // Theme @import "global"; diff --git a/webpack.mix.js b/webpack.mix.js index a4cfc116..e865e93e 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -3,12 +3,11 @@ let mix = require('laravel-mix'); mix - .setPublicPath('') + .setPublicPath('templates/Froxlor/assets') .options({ - fileLoaderDirs: { - fonts: 'templates/Froxlor/assets/fonts' - } + processCssUrls: false }) - .js('templates/Froxlor/src/js/main.js', 'templates/Froxlor/assets/js') - .sass('templates/Froxlor/src/scss/main.scss', 'templates/Froxlor/assets/css') - .sass('templates/Froxlor/src/scss/dark.scss', 'templates/Froxlor/assets/css'); + .copyDirectory('node_modules/@fortawesome/fontawesome-free/webfonts', 'templates/Froxlor/assets/webfonts') + .js('templates/Froxlor/src/js/main.js', 'js') + .sass('templates/Froxlor/src/scss/main.scss', 'css') + .sass('templates/Froxlor/src/scss/dark.scss', 'css');