mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
兼容之前的背景随机
This commit is contained in:
parent
140bec8837
commit
83c235d25a
@ -2,9 +2,11 @@
|
||||
*兼容`体力模板2`可自定义css以及背景icon等
|
||||
* 模板内容需要具体参考**/dailyNote/Template/temp**
|
||||
* 推荐英文命名文件夹
|
||||
* 花里胡哨背景
|
||||
* 其中css文件放在**/dailyNote/Template/你的模板/css/xiaoyao_Note.css**这块懒得做命名处理了统一这个命名
|
||||
* 进度条图片文件放在**/dailyNote/Template/你的模板/speed/** 文件命名0-100数字 无需%
|
||||
* icon文件目录**/dailyNote/Template/你的模板/icon/**中需要包含背景、矩形、圆角矩形三个图片,命名也需要这个命名
|
||||
* icon文件目录**/dailyNote/Template/你的模板/icon/**中需要包含矩形、圆角矩形三个图片,命名也需要这个命名
|
||||
* 清新版本的背景请放置到**/dailyNote/Template/temp/icon/bg/**下面
|
||||
*优化正则匹配不至于一直输出
|
||||
*修复模板一无派遣的bug
|
||||
*优化部分别名
|
||||
|
25
apps/Note.js
25
apps/Note.js
@ -220,16 +220,7 @@ export async function Note(e, {
|
||||
if (mb < 0) {
|
||||
mb = lodash.random(0, path_url.length - 1);
|
||||
}
|
||||
if (mb == 1) {
|
||||
for (var i = 0; i < 5 - data.expeditions.length; i++) {
|
||||
data.expeditions.push({
|
||||
remained_time: 0,
|
||||
remained_mb2: 0,
|
||||
percentage: 0,
|
||||
mb2_icon: ""
|
||||
})
|
||||
}
|
||||
}
|
||||
let img_path=`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`;
|
||||
var urlFile = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/`);
|
||||
var urlType = [];
|
||||
for (let val of urlFile) {
|
||||
@ -240,8 +231,18 @@ export async function Note(e, {
|
||||
if (urlType.length > 0) {
|
||||
urlType = urlType[lodash.random(0, urlType.length - 1)]
|
||||
}
|
||||
// console.log(urlType)
|
||||
var image = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`);
|
||||
if (mb == 1) {
|
||||
for (var i = 0; i < 5 - data.expeditions.length; i++) {
|
||||
data.expeditions.push({
|
||||
remained_time: 0,
|
||||
remained_mb2: 0,
|
||||
percentage: 0,
|
||||
mb2_icon: ""
|
||||
})
|
||||
}
|
||||
img_path=`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/${urlType}${path_img[mb]}`;
|
||||
}
|
||||
var image = fs.readdirSync(img_path);
|
||||
var list_img = [];
|
||||
for (let val of image) {
|
||||
list_img.push(val)
|
||||
|
Before Width: | Height: | Size: 626 KiB After Width: | Height: | Size: 626 KiB |
BIN
resources/dailyNote/Template/temp/icon/bg/bg_.png
Normal file
BIN
resources/dailyNote/Template/temp/icon/bg/bg_.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 590 KiB |
Before Width: | Height: | Size: 628 KiB After Width: | Height: | Size: 628 KiB |
@ -4,12 +4,9 @@
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}dailyNote/Template/{{urlType}}/css/xiaoyao_Note.css?v=1.0" />
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container" style=" background-image: url({{_res_path}}/dailyNote/Template/{{urlType}}/icon/背景.png);">
|
||||
<div class="container" id="container" style=" background-image: url({{_res_path}}/dailyNote/Template/{{urlType}}/icon/bg/{{imgs}});">
|
||||
<div class="left_model">
|
||||
<div class="list">
|
||||
<div class="div">
|
||||
|
Loading…
Reference in New Issue
Block a user