diff options
| author | outtime <i@timewk.cn> | 2019-12-19 13:48:42 +0800 |
|---|---|---|
| committer | outtime <i@timewk.cn> | 2019-12-19 13:48:42 +0800 |
| commit | 467366b3788943eefbbd0c18fabbe23ac5692376 (patch) | |
| tree | e6690c99c293961fd25305891754a89de12e7813 /functions.php | |
| parent | 71ff6eadc03c481acf0088b61eb14b79160e7d37 (diff) | |
🍭Add:添加蹦跶的颜文字与建站时间项,同时优化了部分代码
Diffstat (limited to 'functions.php')
| -rw-r--r-- | functions.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/functions.php b/functions.php index 9490c0d..85b0afc 100644 --- a/functions.php +++ b/functions.php @@ -75,3 +75,17 @@ array_push($views, $cid); } echo $row['views']; } +/** + * 自动生成引用 + */ +function generate_require($files,$type,$cdn = NULL) { + if ($cdn) + $path = $cdn.themeVersion()."/"; + else $path = Helper::options()->themeUrl("","Miracles"); + foreach ($files as $file) { + if ($type == "js") + echo "<script src=".$path."assets/".$type."/".$file.".".$type."></script>"; + elseif ($type == "css") + echo "<link rel=\"stylesheet\" href=".$path."assets/".$type."/".$file.".".$type." />"; + } +}
\ No newline at end of file |
