diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-08-21 14:00:29 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-08-21 14:00:29 +0800 |
| commit | b158a8a6ca0af8ceb77c2ef068589573e5a5c2ae (patch) | |
| tree | e34de60e6340fd929ba186578af83bffcae3c8ef /libs/Matcha.php | |
| parent | 72e336e8e48d7ebc3372cf5a5fb6f2ab397c12c6 (diff) | |
:open_file_folder: Perf: 优化文件结构
其实就是 assets 目录太乱了看不下去了
Diffstat (limited to 'libs/Matcha.php')
| -rw-r--r-- | libs/Matcha.php | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/libs/Matcha.php b/libs/Matcha.php index 183313f..03459f2 100644 --- a/libs/Matcha.php +++ b/libs/Matcha.php @@ -23,7 +23,13 @@ class Matcha */ public static function linkCSS() { //要引入的 css 文件名 - $includes=array("normalize", "prism", "grid", "toaster", "style", "bigfoot"); + $includes=array( + "normalize", + "prism/prism", + "grid", + "toaster/toaster", + "matcha", + "bigfoot/bigfoot"); foreach($includes as $value){ echo '<link rel="stylesheet" href="'; Utils::indexTheme('assets/'.$value.'.css'); @@ -37,11 +43,11 @@ class Matcha */ public static function iconfont() { echo "<style>@font-face {font-family: 'iconfont';src: url('"; - Utils::indexTheme('assets/iconfont.woff2'); + Utils::indexTheme('assets/iconfont/iconfont.woff2'); echo "') format('woff2'),url('"; - Utils::indexTheme('assets/iconfont.woff'); + Utils::indexTheme('assets/iconfont/iconfont.woff'); echo "') format('woff'),url('"; - Utils::indexTheme('assets/iconfont.ttf'); + Utils::indexTheme('assets/iconfont/iconfont.ttf'); echo "') format('truetype');}</style>"; } @@ -61,7 +67,17 @@ class Matcha */ public static function script() { //要引入的 js 文件名 - $includes=array("jquery.min","jquery.pjax.min","masonry.pkgd.min","smoothscroll","nprogress.min","prism","toaster","bigfoot","script"); + $includes=array( + "jquery/jquery.min", + "jquery/jquery.pjax.min", + "masonry/masonry.pkgd.min", + "smoothscroll/smoothscroll", + "nprogress/nprogress.min", + "prism/prism", + "toaster/toaster", + "bigfoot/bigfoot", + "matcha" + ); foreach($includes as $value){ echo '<script src="'; Utils::indexTheme('assets/'.$value.'.js'); |
