diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b096f3f..3587a44e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,20 @@ -# 1.5.6 +# 1.6.0 +* `#喵喵设置` 支持设置 面板查询 的功能开关 +* `#喵喵版本` 使用图片展示更新信息 * `#喵喵日历` 升级 * 增加 `#喵喵日历列表`命令,以列表形式展示活动信息 * 增加从活动详情信息中解析活动日期的逻辑,使一些活动日期更加准确 -* `#深渊出场率`、`#角色持有率` 等功能样式及字体微调 * 增加鹿野院平藏的角色信息,可通过`#平藏天赋`、`#平藏命座`查看信息 -* `#角色面板` 伤害计算增加双手剑计算逻辑,增加物伤计算逻辑 +* 其他升级调整 + * `#深渊出场率`、`#角色持有率` 等页面功能及样式微调 + * `#角色面板` 伤害计算增加双手剑计算逻辑,增加物伤计算逻辑 + * 页面版权信息展示Yunzai及喵喵版本号 * `#角色面板` 伤害计算增加部分角色,目前支持 * 长柄武器:雷神、胡桃、魈、钟离、香菱 * 法器:神子、心海、可莉ⁿᵉʷ、凝光ⁿᵉʷ、芭芭拉ⁿᵉʷ - * 弓:甘雨、宵宫、公子,九条ⁿᵉʷ - * 单手剑:绫人、绫华、刻晴、阿贝多、行秋、班尼特、七七ⁿᵉʷ + * 弓:甘雨、宵宫、公子,九条ⁿᵉʷ,迪奥娜ⁿᵉʷ、安柏ⁿᵉʷ + * 单手剑:绫人、绫华、刻晴、阿贝多、行秋、班尼特、七七ⁿᵉʷ、凯亚ⁿᵉʷ * 双手剑:一斗ⁿᵉʷ、优菈ⁿᵉʷ、迪卢克ⁿᵉʷ、诺艾尔ⁿᵉʷ、重云ⁿᵉʷ # 1.5.0 diff --git a/apps/admin.js b/apps/admin.js index 7df6523c..31b2c9c7 100644 --- a/apps/admin.js +++ b/apps/admin.js @@ -4,16 +4,17 @@ import lodash from "lodash"; import { createRequire } from "module"; import { exec } from "child_process"; import { Cfg } from "../components/index.js"; +import Common from "../components/Common.js"; const require = createRequire(import.meta.url); let cfgMap = { "角色": "char.char", + "面板": "char.profile", "老婆": "char.wife", "查他人": "char.queryOther", - "天赋": "wiki.talent", - "命座": "wiki.cons", + "图鉴": "wiki.wiki", "图片": "wiki.pic", "深渊": "wiki.abyss", "渲染": "sys.scale", @@ -81,10 +82,10 @@ export async function sysCfg(e, { render }) { let cfg = { chars: getStatus("char.char"), + profile: getStatus("char.profile"), wife: getStatus("char.wife"), other: getStatus("char.queryOther"), - talent: getStatus("wiki.talent"), - cons: getStatus("wiki.cons"), + wiki: getStatus("wiki.wiki"), pic: getStatus("wiki.pic"), abyss: getStatus("wiki.abyss"), imgPlus: fs.existsSync(plusPath), @@ -92,14 +93,10 @@ export async function sysCfg(e, { render }) { scale: Cfg.get("sys.scale", 100) } - let base64 = await render("admin", "index", { + //渲染图像 + return await Common.render("admin/index", { ...cfg, - cfgScale: Cfg.scale(1.4) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + }, { e, render, scale: 1.4 }); } const getStatus = function (rote, def = true) { @@ -167,17 +164,17 @@ export async function updateMiaoPlugin(e) { exec(command, { cwd: `${_path}/plugins/miao-plugin/` }, function (error, stdout, stderr) { //console.log(stdout); if (/Already up to date/.test(stdout)) { - e.reply("目前已经是最新版了~"); + e.reply("目前已经是最新版喵喵了~"); return true; } if (error) { - e.reply("更新失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。"); + e.reply("喵喵更新失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。"); return true; } - e.reply("更新成功,尝试重新启动Yunzai以应用更新..."); + e.reply("喵喵更新成功,尝试重新启动Yunzai以应用更新..."); timer && clearTimeout(timer); redis.set("miao:restart-msg", JSON.stringify({ - msg: "重启成功,新版喵喵Plugin已经生效", + msg: "重启成功,新版喵喵已经生效", qq: e.user_id }), { EX: 30 }); timer = setTimeout(function () { diff --git a/apps/character.js b/apps/character.js index 66b59d0d..80759ba7 100644 --- a/apps/character.js +++ b/apps/character.js @@ -7,6 +7,7 @@ import Format from "../components/Format.js" import Reliquaries from "../components/models/Reliquaries.js"; import Calc from "../components/Calc.js"; import fs from "fs"; +import Common from "../components/Common.js"; //角色昵称 @@ -58,9 +59,6 @@ export async function character(e, { render, User }) { if (!msg) { return; } - if (Cfg.isDisable(e, "char.char")) { - return; - } let mode = 'card'; let name = msg.replace(/#|老婆|老公|[1|2|5][0-9]{8}/g, "").trim(); @@ -80,6 +78,12 @@ export async function character(e, { render, User }) { name = name.replace(/详情|详细|面板|面版|更新/g, "").trim(); } + if ( + (mode === "card" && Common.isDisable(e, "char.char")) || + (mode !== "card" && Common.isDisable(e, "char.profile"))) { + return; + } + let char = Character.get(name); if (!char) { @@ -353,23 +357,19 @@ async function renderCard(e, avatar, render, renderType = "card") { e.reply(segment.image(process.cwd() + "/plugins/miao-plugin/resources/" + bg.img)); } else { //渲染图像 - let base64 = await render("character", "card", { + return await Common.render("character/card", { save_id: uid, uid: uid, talent, crownNum, talentMap: { a: "普攻", e: "战技", q: "爆发" }, - //bg: getCharacterImg(avatar.name), bg, ...getCharacterData(avatar), ds: char.getData("name,id,title,desc"), - cfgScale: Cfg.scale(1.6) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } + }, { e, render, scale: 1.6 }); } + return true; } @@ -698,8 +698,8 @@ export async function renderProfile(e, char, render, mode = "profile", params = basic.dmg = Format.comma(basic.dmg); basic.avg = Format.comma(basic.avg); } - - let base64 = await render("character", "detail", { + //渲染图像 + return await Common.render("character/detail", { save_id: uid, uid: uid, data: profile, @@ -723,13 +723,9 @@ export async function renderProfile(e, char, render, mode = "profile", params = usefulTitles, usefulMark, talentMap: { a: "普攻", e: "战技", q: "爆发" }, + bodyClass: `char-${char.name}`, mode, - cfgScale: Cfg.scale(1.8) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + }, { e, render, scale: 1.6 }); } /* #敌人等级 */ @@ -811,17 +807,12 @@ export async function getArtis(e, { render }) { artis = artis.reverse(); artis = artis.slice(0, 20); - - let base64 = await render("character", "artis", { + //渲染图像 + return await Common.render("character/artis", { save_id: uid, uid: uid, artis, - cfgScale: Cfg.scale(1.4) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + }, { e, render, scale: 1.4 }); } export async function getProfileAll(e) { diff --git a/apps/help.js b/apps/help.js index 5d9858d2..7c830da0 100644 --- a/apps/help.js +++ b/apps/help.js @@ -2,7 +2,7 @@ import { Cfg } from "../components/index.js"; import { segment } from "oicq"; import lodash from "lodash"; import { currentVersion, changelogs } from "../components/Changelog.js"; -import common from "../../../lib/common.js"; +import Common from "../components/Common.js"; const _path = process.cwd(); const helpFilePath = `${_path}/plugins/miao-plugin/resources/help/help-list.js`; @@ -39,18 +39,15 @@ export async function help(e, { render }) { helpGroup.push(group); }); - let base64 = await render("help", "index", { + return await Common.render("help/index", { helpCfg: helpGroup, - cfgScale: Cfg.scale(1.2) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + element: 'default' + }, { e, render, scale: 1.2 }) } -export async function versionInfo(e) { - let msgs = [`当前喵喵版本: ${currentVersion}`, ...changelogs]; - e.reply(msgs.join("\n")); - return true; +export async function versionInfo(e, { render }) { + return await Common.render("help/version-info", { + currentVersion, + changelogs, + }, { e, render, scale: 1.2 }) } \ No newline at end of file diff --git a/apps/stat.js b/apps/stat.js index 23dd6df0..fef8c92f 100644 --- a/apps/stat.js +++ b/apps/stat.js @@ -7,6 +7,7 @@ import { Cfg } from "../components/index.js"; import lodash from "lodash"; import { segment } from "oicq"; import fs from "fs"; +import Common from "../components/Common.js"; export async function consStat(e, { render }) { if (Cfg.isDisable(e, "wiki.abyss")) { @@ -68,8 +69,8 @@ export async function consStat(e, { render }) { } else { ret = lodash.sortBy(ret, ['hold']); } - - let base64 = await render("stat", "character", { + //渲染图像 + return await Common.render("stat/character", { chars: ret, abbr: Character.getAbbr(), mode: mode, @@ -78,12 +79,7 @@ export async function consStat(e, { render }) { pct: function (num) { return (num * 100).toFixed(2); }, - cfgScale: Cfg.scale(1.5) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + }, { e, render, scale: 1.5 }); } export async function abyssPct(e, { render }) { @@ -144,8 +140,7 @@ export async function abyssPct(e, { render }) { }); }) - - let base64 = await render("stat", "abyss-pct", { + return await Common.render("stat/abyss-pct", { abyss: ret, floorName, chooseFloor, @@ -153,12 +148,7 @@ export async function abyssPct(e, { render }) { pct: function (num) { return (num * 100).toFixed(2); }, - cfgScale: Cfg.scale(1.5) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; + }, { e, render, scale: 1.5 }); } @@ -381,15 +371,8 @@ export async function abyssTeam(e, { render }) { } }) - - let base64 = await render("stat", "abyss-team", { + return await Common.render("stat/abyss-team", { teams: ret, avatars: avatarMap, - cfgScale: Cfg.scale(1.5) - }); - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - - return true; + }, { e, render, scale: 1.5 }); } \ No newline at end of file diff --git a/apps/wiki.js b/apps/wiki.js index 62142932..11b316e0 100644 --- a/apps/wiki.js +++ b/apps/wiki.js @@ -1,12 +1,9 @@ import { segment } from "oicq"; -import fs from "fs"; import { Character } from "../components/models.js"; import lodash from "lodash"; -import { Cfg } from "../components/index.js"; -import Cal from "../components/Calcendar.js"; -import Calcendar from "../components/Calcendar.js"; +import Calendar from "../components/Calendar.js"; +import Common from "../components/Common.js"; -//import {wikiCharacter} from "../modules/wiki.js"; let action = { wiki: { @@ -35,11 +32,11 @@ export async function wiki(e, { render }) { mode = "pic"; } - if (Cfg.isDisable(e, `wiki.${mode}`)) { + if ((mode === "pic" && Common.isDisable(e, "wiki.pic")) + || (mode !== "pic" && Common.isDisable("wiki.wiki"))) { return; } - let char = Character.get(ret[1]); if (!char) { return false; @@ -55,19 +52,13 @@ export async function wiki(e, { render }) { return true; } - let base64 = await render("wiki", "character", { + return await Common.render("wiki/character", { save_id: "天赋" + char.name, ...char, mode, line: getLineData(char), _char: `/meta/character/${char.name}/`, - cfgScale: Cfg.scale(1) - }); - - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; //事件结束不再往下 + }, { e, render, scale: 1 }); } const getLineData = function (data) { @@ -82,37 +73,15 @@ const getLineData = function (data) { return ret; } -// 更新图像缓存 -async function wikiCache(e) { - const meta = JSON.parse(fs.readFileSync("./data/meta/characters.json", "utf8")); - let count = 0; - let data; - console.log("开始生成角色资料缓存...") - for (let idx in meta) { - let base64 = await genWikiImg(meta[idx].Name); - if (base64) { - count++; - console.log(`角色资料缓存: ${meta[idx].Name},count:${count}`) - } - } - e.reply(`生成Wiki缓存${count}个`) -} - export async function calendar(e, { render }) { - let calData = await Calcendar.get(); + let calData = await Calendar.get(); let mode = "calendar"; if (/(日历列表|活动)$/.test(e.msg)) { mode = "list"; } - let base64 = await render("wiki", "calendar", { + return await Common.render("wiki/calendar", { ...calData, displayMode: mode, - cfgScale: Cfg.scale(1.1) - }); - - if (base64) { - e.reply(segment.image(`base64://${base64}`)); - } - return true; //事件结束不再往下 + }, { e, render, scale: 1.1 }); } \ No newline at end of file diff --git a/components/Calcendar.js b/components/Calendar.js similarity index 100% rename from components/Calcendar.js rename to components/Calendar.js diff --git a/components/Changelog.js b/components/Changelog.js index 18ee14b9..72eaadd7 100644 --- a/components/Changelog.js +++ b/components/Changelog.js @@ -7,33 +7,58 @@ const _logPath = `${_path}/plugins/miao-plugin/CHANGELOG.md`; let logs = {}; let changelogs = []; let currentVersion; -let versionCount = 2; +let versionCount = 4; + +let packageJson = JSON.parse(fs.readFileSync("package.json", "utf8")); + +const getLine = function (line) { + line = line.replace(/(^\s*\*|\r)/g, ''); + line = line.replace(/\s*`([^`]+`)/g, '$1'); + line = line.replace(/`\s*/g, ''); + line = line.replace(/ⁿᵉʷ/g, ''); + return line; +} + try { if (fs.existsSync(_logPath)) { logs = fs.readFileSync(_logPath, "utf8") || ""; logs = logs.split("\n"); + + let temp = {}, lastLine = {}; lodash.forEach(logs, (line) => { - if (versionCount === -1) { + if (versionCount <= -1) { return false; } - let versionRet = /^#\s*([0-9\\.]+)\s*$/.exec(line); + let versionRet = /^#\s*([0-9\\.~\s]+?)\s*$/.exec(line); if (versionRet && versionRet[1]) { - let v = versionRet[1]; - - + let v = versionRet[1].trim(); if (!currentVersion) { currentVersion = v; + } else { + changelogs.push(temp); + if (/0\s*$/.test(v) && versionCount > 0) { + versionCount = 0; + } else { + versionCount--; + } } - versionCount--; - versionCount === 0 && changelogs.push(" "); - versionCount > -1 && changelogs.push(`【 版本: ${v} 】`) - return; - } - if (versionCount > -1) { - line = line.replace(/`/g, ""); - if (line.trim()) { - changelogs.push(line); + temp = { + version: v, + logs: [] + } + } else { + if (!line.trim()) { + return; + } + if (/^\*/.test(line)) { + lastLine = { + title: getLine(line), + logs: [] + } + temp.logs.push(lastLine); + } else if (/^\s{3,}\*/.test(line)) { + lastLine.logs.push(getLine(line)); } } }); @@ -42,4 +67,6 @@ try { // do nth } -export { currentVersion, changelogs }; \ No newline at end of file +const yunzaiVersion = packageJson.version; + +export { currentVersion, yunzaiVersion, changelogs }; \ No newline at end of file diff --git a/components/Common.js b/components/Common.js new file mode 100644 index 00000000..b2baf039 --- /dev/null +++ b/components/Common.js @@ -0,0 +1,32 @@ +import { Cfg } from "./index.js"; +import { segment } from "oicq"; +import { currentVersion, yunzaiVersion } from "./Changelog.js"; + +export const render = async function (path, params, cfg) { + let paths = path.split("/"); + let { render, e } = cfg; + let _layout_path = process.cwd() + "/plugins/miao-plugin/resources/common/layout/"; + let base64 = await render(paths[0], paths[1], { + ...params, + _layout_path, + defaultLayout: _layout_path + "default.html", + elemLayout: _layout_path + "elem.html", + sys: { + scale: Cfg.scale(cfg.scale || 1), + copyright: `Created By Yunzai-Bot${yunzaiVersion} & Miao-Plugin${currentVersion}` + } + }); + + if (base64) { + e.reply(segment.image(`base64://${base64}`)); + } + + return true; +} + + +export default { + render, + cfg: Cfg.get, + isDisable: Cfg.isDisable +}; \ No newline at end of file diff --git a/index.js b/index.js index 8acb80dc..3d393f96 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ import { help, versionInfo } from "./apps/help.js"; import lodash from "lodash"; import common from "../../lib/common.js"; import { rule as adminRule, updateRes, sysCfg, updateMiaoPlugin } from "./apps/admin.js"; -import { currentVersion, changelogs } from "./components/Changelog.js"; +import { currentVersion } from "./components/Changelog.js"; export { character, @@ -114,7 +114,7 @@ setTimeout(async function () { let msg = JSON.parse(msgStr); await common.relpyPrivate(msg.qq, msg.msg); await redis.del("miao:restart-msg"); - let msgs = [`当前喵喵版本: ${currentVersion}`, ...changelogs]; + let msgs = [`当前喵喵版本: ${currentVersion}`, `您可使用 #喵喵版本 命令查看更新信息`]; await common.relpyPrivate(msg.qq, msgs.join("\n")); } }, 1000); \ No newline at end of file diff --git a/resources/admin/bg.png b/resources/admin/imgs/bg.png similarity index 100% rename from resources/admin/bg.png rename to resources/admin/imgs/bg.png diff --git a/resources/admin/cfg-right.jpg b/resources/admin/imgs/cfg-right.jpg similarity index 100% rename from resources/admin/cfg-right.jpg rename to resources/admin/imgs/cfg-right.jpg diff --git a/resources/admin/cfg-right.png b/resources/admin/imgs/cfg-right.png similarity index 100% rename from resources/admin/cfg-right.png rename to resources/admin/imgs/cfg-right.png diff --git a/resources/admin/index.css b/resources/admin/index.css index ac991580..fe545e3e 100644 --- a/resources/admin/index.css +++ b/resources/admin/index.css @@ -2,17 +2,14 @@ body { transform: scale(1); width: 520px; } - .container { - background: url("bg.png") #000144 left top no-repeat; + background: url("./imgs/bg.png") #000144 left top no-repeat; background-size: 520px auto; - width:520px; + width: 520px; } - .head-box { margin: 0 0 80px 0; } - .cfg-box { border-radius: 15px; margin-top: 20px; @@ -20,23 +17,16 @@ body { padding: 5px 15px; overflow: hidden; background: #f5f5f5; - box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%); + box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15); position: relative; - background: rgba(35, 38, 57, .8); + background: rgba(35, 38, 57, 0.8); } - - .cfg-group { color: #ceb78b; font-size: 18px; font-weight: bold; padding: 10px 20px; } - -.cfg-ul { - -} - .cfg-li { border-radius: 18px; min-height: 36px; @@ -45,7 +35,6 @@ body { margin-bottom: 10px; background: rgba(203, 196, 190, 0); } - .cfg-line { color: #4e5769; line-height: 36px; @@ -53,17 +42,15 @@ body { font-weight: bold; border-radius: 16px; box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); - background: url("./cfg-right.jpg") right top #cbc4be no-repeat; + background: url("./imgs/cfg-right.jpg") right top #cbc4be no-repeat; background-size: auto 36px; } - .cfg-hint { font-size: 12px; font-weight: normal; margin-top: 3px; margin-bottom: -3px; } - .cfg-status { position: absolute; top: 0; @@ -78,13 +65,12 @@ body { border-radius: 0 16px 16px 0; font-family: Number, "微软雅黑", sans-serif; } - .cfg-status.status-off { color: #a95151; } - .cfg-desc { font-size: 12px; color: #cbc4be; margin: 5px 0 5px 20px; -} \ No newline at end of file +} +/*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/resources/admin/index.html b/resources/admin/index.html index 6d35e6dd..16d1189f 100644 --- a/resources/admin/index.html +++ b/resources/admin/index.html @@ -1,123 +1,119 @@ - - - - - - - - - -
-
-
-
#喵喵设置
-
喵喵管理面板
-
-
-
-
玩家&老婆卡片展示
- -
-
-
角色资料与信息查询
- -
-
-
系统设置
- +{{extend defaultLayout}} +{{block 'css'}} + +{{/block}} +{{block 'main'}} +
+
+
#喵喵设置
+
喵喵管理面板
+
+
+
+
玩家&老婆卡片展示
+
    +
  • +
    + 角色查询 + #喵喵设置角色 + 开启/关闭 + {{@chars}}
    - -
- - \ No newline at end of file + +
  • +
    + 面板查询 + #喵喵设置面板 + 开启/关闭 + {{@profile}} +
    +
  • +
  • +
    + 老婆查询 + #喵喵设置老婆 + 开启/关闭 + {{@wife}} +
    +
  • +
  • +
    + 允许查他人 + #喵喵设置查他人 + 开启/关闭 + {{@other}} +
    +
    面板查询暂不支持查他人
    +
  • + + +
    +
    +
    角色资料与信息查询
    + +
    +
    +
    系统设置
    + + +
    +{{/block}} \ No newline at end of file diff --git a/resources/admin/index.less b/resources/admin/index.less new file mode 100644 index 00000000..2df4b93b --- /dev/null +++ b/resources/admin/index.less @@ -0,0 +1,90 @@ +body { + transform: scale(1); + width: 520px; +} + +.container { + background: url("./imgs/bg.png") #000144 left top no-repeat; + background-size: 520px auto; + width:520px; +} + +.head-box { + margin: 0 0 80px 0; +} + +.cfg-box { + border-radius: 15px; + margin-top: 20px; + margin-bottom: 20px; + padding: 5px 15px; + overflow: hidden; + background: #f5f5f5; + box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%); + position: relative; + background: rgba(35, 38, 57, .8); +} + + +.cfg-group { + color: #ceb78b; + font-size: 18px; + font-weight: bold; + padding: 10px 20px; +} + +.cfg-ul { + +} + +.cfg-li { + border-radius: 18px; + min-height: 36px; + position: relative; + overflow: hidden; + margin-bottom: 10px; + background: rgba(203, 196, 190, 0); +} + +.cfg-line { + color: #4e5769; + line-height: 36px; + padding-left: 20px; + font-weight: bold; + border-radius: 16px; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); + background: url("./imgs/cfg-right.jpg") right top #cbc4be no-repeat; + background-size: auto 36px; +} + +.cfg-hint { + font-size: 12px; + font-weight: normal; + margin-top: 3px; + margin-bottom: -3px; +} + +.cfg-status { + position: absolute; + top: 0; + right: 0; + height: 36px; + width: 160px; + text-align: center; + line-height: 36px; + font-size: 16px; + color: #495366; + font-weight: bold; + border-radius: 0 16px 16px 0; + font-family: Number, "微软雅黑", sans-serif; +} + +.cfg-status.status-off { + color: #a95151; +} + +.cfg-desc { + font-size: 12px; + color: #cbc4be; + margin: 5px 0 5px 20px; +} \ No newline at end of file diff --git a/resources/character/artis.css b/resources/character/artis.css index 01f7778f..440123d6 100644 --- a/resources/character/artis.css +++ b/resources/character/artis.css @@ -1,16 +1,13 @@ .container { width: 790px; } - .artis { width: 790px; } - .artis .item { height: 205px; overflow: hidden; } - .artis .item .avatar { position: absolute; left: 32px; @@ -21,13 +18,12 @@ overflow: hidden; z-index: 3; } - .artis .item .arti-icon img { width: 52px; height: 52px; } - .artis .item .avatar img { max-width: 100%; max-height: 100%; -} \ No newline at end of file +} +/*# sourceMappingURL=artis.css.map */ \ No newline at end of file diff --git a/resources/character/artis.html b/resources/character/artis.html index 93f40027..740ff3d4 100644 --- a/resources/character/artis.html +++ b/resources/character/artis.html @@ -1,43 +1,36 @@ - - - - - - - - - - -
    -
    - {{each artis ds}} -
    - {{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}} -
    - -
    -
    - -
    -
    - {{ds.name}} - {{ds.mark}}分 - {{ds.markType}} -
    -
      -
    • {{ds.main[0]}}+{{ds.main[1]}}
    • - {{each ds.attrs attr}} - {{if attr[0]}} -
    • {{attr[0]}}+{{attr[1]}}
    • - {{/if}} - {{/each}} -
    - {{/if}} -
    - {{/each}} -
    - +{{extend elemLayout}} + +{{block 'css'}} + + +{{/block}} + +{{block 'main'}} +
    + {{each artis ds}} +
    + {{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}} +
    +
    - - - +
    + +
    +
    + {{ds.name}} + {{ds.mark}}分 - {{ds.markType}} +
    +
      +
    • {{ds.main[0]}}+{{ds.main[1]}}
    • + {{each ds.attrs attr}} + {{if attr[0]}} +
    • {{attr[0]}}+{{attr[1]}}
    • + {{/if}} + {{/each}} +
    + {{/if}} +
    + {{/each}} +
    +{{/block}} \ No newline at end of file diff --git a/resources/character/artis.less b/resources/character/artis.less new file mode 100644 index 00000000..01f7778f --- /dev/null +++ b/resources/character/artis.less @@ -0,0 +1,33 @@ +.container { + width: 790px; +} + +.artis { + width: 790px; +} + +.artis .item { + height: 205px; + overflow: hidden; +} + +.artis .item .avatar { + position: absolute; + left: 32px; + top: 26px; + width: 38px; + height: 38px; + border-radius: 50%; + overflow: hidden; + z-index: 3; +} + +.artis .item .arti-icon img { + width: 52px; + height: 52px; +} + +.artis .item .avatar img { + max-width: 100%; + max-height: 100%; +} \ No newline at end of file diff --git a/resources/character/card.html b/resources/character/card.html index 5436d9a5..7cf7365b 100644 --- a/resources/character/card.html +++ b/resources/character/card.html @@ -6,7 +6,7 @@ - +
    ID:{{uid}}
    @@ -27,7 +27,6 @@

    {{weapon.affix_level}}

    - Lv.{{weapon.level}} 精{{weapon.affix_level}} 精{{weapon.affix_level}} {{weapon.name}} @@ -50,7 +49,7 @@

    {{text2 || "-"}}
    - +
    diff --git a/resources/character/detail.css b/resources/character/detail.css index 47e38384..7cc027e2 100644 --- a/resources/character/detail.css +++ b/resources/character/detail.css @@ -1,21 +1,16 @@ - body { width: 600px; } - .container { width: 600px; padding: 0; background-size: cover; overflow: hidden; } - - .basic { position: relative; margin-bottom: 10px; } - .basic:after { content: ""; display: block; @@ -28,7 +23,6 @@ body { border-radius: 5px; z-index: 1; } - .main-pic { width: 800px; height: 500px; @@ -39,7 +33,6 @@ body { position: relative; z-index: 2; } - .detail { position: absolute; right: 20px; @@ -47,26 +40,22 @@ body { color: #fff; z-index: 3; } - .char-name { font-size: 50px; font-family: NZBZ; - text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, .7); + text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, 0.7); text-align: right; } - .char-lv { font-family: Number; margin-bottom: 20px; - text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, .7); + text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, 0.7); text-align: right; } - .attr { border-radius: 4px; overflow: hidden; } - .detail li { width: 300px; font-size: 17px; @@ -76,63 +65,50 @@ body { font-family: YS; height: 32px; line-height: 32px; - text-shadow: 0 0 1px rgba(0, 0, 0, .5); + text-shadow: 0 0 1px rgba(0, 0, 0, 0.5); } - .attr li i { display: inline-block; height: 20px; width: 20px; - background-image: url("./icon.png"); + background-image: url("./imgs/icon.png"); background-size: auto 20px; position: absolute; left: 10px; top: 8px; - opacity: .9; - transform: scale(.9); - + opacity: 0.9; + transform: scale(0.9); } - .i-hp { background-position: -20px 0; } - .i-atk { background-position: -40px 0; } - .i-def { background-position: -60px 0; } - .i-mastery { background-position: -80px 0; } - .i-cr { background-position: -100px 0; } - .i-cd { background-position: -140px 0; } - .i-re { background-position: -120px 0; } - .i-dmg { background-position: -160px 0; } - .detail li:nth-child(even) { - background: rgba(0, 0, 0, .4) + background: rgba(0, 0, 0, 0.4); } - .detail li:nth-child(odd) { - background: rgba(50, 50, 50, .4) + background: rgba(50, 50, 50, 0.4); } - .detail li strong { display: inline-block; position: absolute; @@ -141,7 +117,6 @@ body { font-family: Number, sans-serif; font-weight: normal; } - .detail li span { position: absolute; right: 0; @@ -152,7 +127,6 @@ body { color: #90e800; font-size: 15px; } - .talent-icon { width: 100px; height: 100px; @@ -165,7 +139,6 @@ body { background-position: center center; z-index: 90; } - .talent-icon img, .talent-icon .talent-icon-img { width: 46%; @@ -178,7 +151,6 @@ body { background-repeat: no-repeat; background-position: center; } - .talent-icon span { background: #fff; width: 34px; @@ -195,14 +167,12 @@ body { box-shadow: 0 0 5px 0 #000; font-family: Number; } - .talent-icon.talent-plus span { background: #2e353e; color: #ffdfa0; font-weight: bold; box-shadow: 0 0 1px 0 #d3bc8e, 1px 1px 2px 0 rgba(0, 0, 0, 0.5); } - .talent-icon.talent-crown:after { content: ""; display: block; @@ -215,14 +185,11 @@ body { top: 0; margin-left: -14px; } - - .char-talents { display: flex; width: 300px; margin-bottom: 10px; } - .char-cons { display: flex; width: 250px; @@ -230,78 +197,55 @@ body { bottom: 5px; left: 20px; } - .char-cons .talent-item, .char-talents .talent-item { flex: 1; } - .char-cons .talent-icon { width: 50px; height: 50px; - margin: 0 -5px + margin: 0 -5px; } - .char-cons .talent-icon.off { filter: grayscale(100%); - opacity: .4; + opacity: 0.4; } - - .elem_anemo .talent-icon { - background-image: url(../common/bg/talent-anemo.png) + background-image: url(../common/bg/talent-anemo.png); } - .elem_anemo .container { background-image: url(../common/bg/bg-anemo.jpg); } - - .elem_cryo .talent-icon { - background-image: url(../common/bg/talent-cryo.png) + background-image: url(../common/bg/talent-cryo.png); } - .elem_cryo .container { background-image: url(../common/bg/bg-cryo.jpg); } - - .elem_electro .talent-icon { - background-image: url(../common/bg/talent-electro.png) + background-image: url(../common/bg/talent-electro.png); } - .elem_electro .container { background-image: url(../common/bg/bg-electro.jpg); } - - .elem_geo .talent-icon { - background-image: url(../common/bg/talent-geo.png) + background-image: url(../common/bg/talent-geo.png); } - .elem_geo .container { background-image: url(../common/bg/bg-geo.jpg); } - - .elem_hydro .talent-icon { - background-image: url(../common/bg/talent-hydro.png) + background-image: url(../common/bg/talent-hydro.png); } - .elem_hydro .container { background-image: url(../common/bg/bg-hydro.jpg); } - - .elem_pyro .talent-icon { - background-image: url(../common/bg/talent-pyro.png) + background-image: url(../common/bg/talent-pyro.png); } - .elem_pyro .container { background-image: url(../common/bg/bg-pyro.jpg); } - - /*** dmg ***/ .cont { border-radius: 10px; @@ -309,31 +253,27 @@ body { background-size: auto 100%; margin: 5px 15px 5px 10px; position: relative; - box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8); + box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, 0.8); overflow: hidden; color: #fff; font-size: 16px; } - .dmg-cont { display: table; width: calc(100% - 25px); margin-top: 10px; margin-bottom: 10px; } - .dmg-mode .dmg-list .cont-footer { display: none; } - .cont-title { - background: rgba(0, 0, 0, .4); + background: rgba(0, 0, 0, 0.4); color: #d3bc8e; font-family: YS; padding: 10px 20px; text-align: left; } - .cont-title span { font-size: 12px; color: #aaa; @@ -341,7 +281,6 @@ body { font-family: Number, YS; font-weight: normal; } - .cont-footer { padding: 10px 15px; font-size: 12px; @@ -349,69 +288,55 @@ body { font-family: YS; font-weight: normal; } - .cont-table { display: table; width: 100%; } - .dmg-cont .tr { display: table-row; } - .dmg-cont .tr:nth-child(even) { - background: rgba(0, 0, 0, .4); + background: rgba(0, 0, 0, 0.4); } - .dmg-cont .tr:nth-child(odd) { - background: rgba(50, 50, 50, .4); + background: rgba(50, 50, 50, 0.4); } - .dmg-cont .tr > div { display: table-cell; box-shadow: 0 0 1px 0 #fff; } - .dmg-cont .tr > div.value-full { display: table; width: 200%; } - .dmg-cont .tr > div.value-none { box-shadow: none; } - .dmg-cont .thead { text-align: center; } - .dmg-cont .thead > div { font-family: YS; color: #d3bc8e; - background: rgba(0, 0, 0, .4); + background: rgba(0, 0, 0, 0.4); line-height: 40px; height: 40px; } - - .dmg-cont .title, .dmg-cont .th { font-family: YS; color: #d3bc8e; padding-right: 15px; text-align: right; - background: rgba(0, 0, 0, .4); + background: rgba(0, 0, 0, 0.4); min-width: 100px; } - .profile-mode .dmg-idx { display: none !important; } - .profile-mode .dmg-title { width: 33.3333%; } - .dmg-mode .dmg-idx { display: table-cell; width: 5%; @@ -419,7 +344,6 @@ body { padding-right: 0; text-align: center; } - .dmg-mode .dmg-title { width: 31%; min-width: initial; @@ -427,8 +351,6 @@ body { padding-left: 10px; padding-right: 0; } - - .dmg .value { text-align: center; color: #fff; @@ -437,17 +359,14 @@ body { font-size: 18px; font-family: Number; line-height: 40px; - width: 32% + width: 32%; } - .dmg-notice { font-size: 12px; text-align: right; color: #f5f5f5; margin-right: 15px; } - - /*** artis***/ .artis { display: flex; @@ -456,7 +375,6 @@ body { margin-bottom: 5px; padding: 5px; } - .artis .item { width: 185px; border-radius: 10px; @@ -465,10 +383,8 @@ body { margin: 5px; height: 210px; position: relative; - box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8); + box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, 0.8); } - - .artis .item .arti-icon { width: 60px; height: 60px; @@ -476,13 +392,12 @@ body { left: 2px; top: 3px; } - .artis .item .arti-icon span { position: absolute; right: 2px; bottom: 0; margin-left: 5px; - background: rgba(0, 0, 0, .5); + background: rgba(0, 0, 0, 0.5); border-radius: 5px; height: 18px; line-height: 18px; @@ -491,17 +406,14 @@ body { font-size: 12px; display: block; } - .artis .item .arti-icon img { width: 60px; height: 60px; } - .artis .head { color: #fff; padding: 12px 0 8px 68px; } - .artis .head strong { font-size: 15px; display: block; @@ -509,46 +421,37 @@ body { overflow: hidden; font-font: YS; } - .artis .head span { font-size: 14px; } - .artis .head .mark { font-family: Number, YS; } - .mark-ACE, .mark-ACE² { color: #e85656; font-weight: bold; } - .mark-SSS, .mark-SS { color: #ffe699; font-weight: bold; } - .mark-S, .mark-A { color: #d699ff; font-weight: bold; } - .arti-main { color: #fff; padding: 6px 15px; } - - .artis ul.detail { width: 100%; padding: 0; position: initial; font-family: YS; } - .artis ul.detail li { padding: 0 3px; font-size: 14px; @@ -558,36 +461,29 @@ body { line-height: 26px; height: 26px; } - - .artis ul.detail li.nouse span { color: #888; } - .artis ul.detail li.arti-main { font-size: 16px; padding: 3px 3px; font-weight: bold; } - .artis ul.detail li span { position: initial; display: table-cell; color: #fff; font-family: YS; } - .artis ul.detail li span.title { text-align: left; padding-left: 10px; } - .artis ul.detail li span.val { text-align: right; padding-right: 10px; font-family: Number; } - .artis .weapon .star { height: 20px; width: 100px; @@ -597,29 +493,22 @@ body { transform-origin: 100px 10px; display: inline-block; } - .artis .weapon .star.star-2 { background-position: 0 -20px; } - .artis .weapon .star.star-3 { background-position: 0 -40px; } - .artis .weapon .star.star-4 { background-position: 0 -60px; } - .artis .weapon .star.star-5 { background-position: 0 -80px; } - - .artis .weapon { overflow: hidden; height: 100px; } - .artis .weapon img { width: 100px; height: 100px; @@ -628,7 +517,6 @@ body { position: absolute; z-index: 2; } - .artis .weapon .head { position: absolute; bottom: 0; @@ -639,23 +527,18 @@ body { z-index: 3; background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); } - .artis .weapon .head strong { font-size: 18px; margin-bottom: 3px; font-weight: normal; font-family: YS; } - .artis .weapon .head > span { display: block; - } - .artis .weapon span { font-size: 16px; } - .artis .weapon .affix { color: #000; padding: 0 7px; @@ -663,50 +546,40 @@ body { margin-left: 5px; font-size: 16px; } - - .artis .weapon .affix-1 { box-shadow: 0 0 4px 0 #a3a3a3 inset; background: #ebebebaa; } - .artis .weapon .affix-2 { box-shadow: 0 0 4px 0 #51b72fbd inset; background: #ddffdeaa; } - .artis .weapon .affix-3 { box-shadow: 0 0 4px 0 #396cdecf inset; background: #ddebffaa; } - .artis .weapon .affix-4 { box-shadow: 0 0 4px 0 #c539debf inset; background: #ffddf0aa; } - .artis .weapon .affix-5 { box-shadow: 0 0 4px 0 #deaf39 inset; background: #fff6dd; } - .artis .stat { height: 100px; margin-top: 10px; } - .artis .stat { display: table-row; padding: 18px 10px; display: table; } - .artis .stat > div { display: table-cell; text-align: center; color: #fff; } - .artis .stat strong { display: block; height: 40px; @@ -714,135 +587,100 @@ body { font-family: Number; line-height: 40px; } - .dmg-msg { font-family: Number, YS; font-size: 13px; font-weight: normal; } - .dmg-msg .thead > div { text-align: left; padding-left: 10px; } - .dmg-msg .th { text-align: left; padding-left: 10px; } - .dmg-msg .tr .td { padding: 8px 10px; } - .dmg-msg .info { font-size: 12px; text-align: left; padding-left: 10px; font-weight: normal; } - - -.dmg-calc { - -} - -.dmg-calc .thead { - -} - .dmg-calc .thead > div { line-height: initial; } - .dmg-calc .cont-table div { vertical-align: middle; text-align: center; white-space: nowrap; } - .dmg-calc .title { text-align: center; padding-right: 0; min-width: 70px; - } - .dmg-calc .td { padding: 5px 0; } - .dmg-calc strong { font-weight: normal; display: block; font-family: Number, YS; } - .dmg-calc span { font-size: 12px; color: #aaa; font-family: Number, YS; } - .dmg-calc .na, .dmg-calc .eq { - background: rgba(50, 50, 50, .5); + background: rgba(50, 50, 50, 0.5); } - .dmg-calc .na { color: #888; } - .dmg-calc .lt { background: rgba(23, 112, 41, 0.5); } - .dmg-calc .gt { background: rgba(112, 23, 23, 0.5); } - .dmg-desc { color: #aaa; } - .dmg-desc ul { padding-left: 10px; } - .dmg-desc ul li { color: #aaa; } - .dmg-desc strong { color: #d3bc8e; display: inline; padding: 0 3px; font-weight: normal; } - - .artis .stat span { font-size: 13px; line-height: 20px; color: #bbb; } - .char-优菈 .main-pic { margin-left: -175px; } - .char-烟绯 .main-pic { margin-left: -135px; } - .char-香菱 .main-pic { margin-left: -195px; } - .char-迪奥娜 .main-pic { margin-left: -180px; } - .char-可莉 .main-pic { margin-left: -210px; -} \ No newline at end of file +} +/*# sourceMappingURL=detail.css.map */ \ No newline at end of file diff --git a/resources/character/detail.html b/resources/character/detail.html index 0088e862..7307f130 100644 --- a/resources/character/detail.html +++ b/resources/character/detail.html @@ -1,194 +1,186 @@ - - - - - - - - - -
    -
    -
    -
    -
    {{name}}
    -
    UID {{uid}} - Lv.{{data.lv}}
    -
    - {{each talentMap tName key}} -
    - - - - +
      +
    • 生命值{{attr.hp}}(+{{attr.hpPlus}})
    • +
    • 攻击力{{attr.atk}}(+{{attr.atkPlus}})
    • +
    • 防御力{{attr.def}}(+{{attr.defPlus}})
    • +
    • 元素精通{{attr.mastery}}
    • +
    • 暴击率{{attr.cRate}}
    • +
    • 暴击伤害{{attr.cDmg}}
    • +
    • 元素充能{{attr.recharge}}
    • +
    • 伤害加成{{attr.dmgBonus}}
    • +
    +
    +
    + {{each cons con idx}} +
    +
    + +
    +
    + {{/each}} +
    +
    +{{if dmgData.length > 0}} +
    +
    + 伤害计算目标为{{enemyLv}}级{{enemyName}},如需调整等级可使用 #敌人等级{{enemyLv}} 来进行设置 +
    +
    +
    +
    #
    +
    伤害类型
    +
    暴击伤害
    +
    平均伤害(计算暴击率)
    +
    + {{each dmgData dmg idx}} +
    +
    {{idx+1}}
    +
    {{dmg.title}}
    + {{if dmg.dmg === "NaN"}} +
    {{dmg.avg}}
    +
    + {{else}} +
    {{dmg.dmg}}
    +
    {{dmg.avg}}
    + {{/if}} +
    + {{/each}} +
    + +
    +{{/if}} + +{{if mode === "profile"}} +
    +
    +
    + +
    + {{weapon.name}} +
    + Lv.{{weapon.level}} 精{{weapon.affix_level}} +
    +
    +
    +
    {{markScore}}圣遗物评级
    +
    {{totalMark}}圣遗物总分
    +
    +
    + {{each reliquaries ds}} +
    + {{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}} +
    + + +{{ds.level}} +
    +
    + {{ds.name}} + {{ds.mark}}分 - {{ds.markType}} +
    +
      +
    • {{ds.main[0]}}+{{ds.main[1]}}
    • + {{each ds.attrs attr}} + {{if attr[0]}} +
    • {{attr[0]}}+{{attr[1]}}
    • + {{/if}} + {{/each}} +
    + {{/if}} +
    + {{/each}} +
    +{{/if}} + +{{if mode === "dmg"}} + +{{if dmgCfg && dmgCfg.attr && dmgCfg.attr.length>0}} +
    +
    + 词条伤害计算#{{name}}伤害{{dmgCfg.userIdx+1}}: 当前计算为[{{dmgCfg.title}}] +
    +
    +
    +
    词条变化
    + {{each dmgCfg.attr attr}} +
    + {{attr.title}} + +{{attr.text}} +
    + {{/each}} +
    + {{each dmgRet row rowIdx}} +
    +
    + {{dmgCfg.attr[rowIdx].title}} + -{{dmgCfg.attr[rowIdx].text}} +
    + {{each row cell colIdx}} + {{if cell.type === "na"}} +
    + - + {{dmgCfg.basicRet.avg}}{{dmgCfg.basicRet.dmg!="NaN"?`/${dmgCfg.basicRet.dmg}`:''}} +
    + {{else}} +
    + {{cell.val}} + + {{cell.avg}}{{cell.dmg!="NaN"?`/${cell.dmg}`:''}} +
    + {{/if}} + {{/each}} +
    + {{/each}} +
    + +
    +{{/if}} + +
    +
    Buff列表部分Buff的触发条件以及层数可能影响实际伤害结果
    +
    + {{each dmgMsg msg}} +
    +
    {{msg[0]}}
    +
    {{msg[1]}}
    +
    + {{/each}} +
    +
    +{{/if}} +{{/block}} \ No newline at end of file diff --git a/resources/character/detail.less b/resources/character/detail.less new file mode 100644 index 00000000..0a261568 --- /dev/null +++ b/resources/character/detail.less @@ -0,0 +1,848 @@ + +body { + width: 600px; +} + +.container { + width: 600px; + padding: 0; + background-size: cover; + overflow: hidden; +} + + +.basic { + position: relative; + margin-bottom: 10px; +} + +.basic:after { + content: ""; + display: block; + position: absolute; + left: 8px; + top: 115px; + bottom: 0; + right: 8px; + box-shadow: 0 0 2px 0 #fff; + border-radius: 5px; + z-index: 1; +} + +.main-pic { + width: 800px; + height: 500px; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + margin-left: -260px; + position: relative; + z-index: 2; +} + +.detail { + position: absolute; + right: 20px; + top: 20px; + color: #fff; + z-index: 3; +} + +.char-name { + font-size: 50px; + font-family: NZBZ; + text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, .7); + text-align: right; +} + +.char-lv { + font-family: Number; + margin-bottom: 20px; + text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, .7); + text-align: right; +} + +.attr { + border-radius: 4px; + overflow: hidden; +} + +.detail li { + width: 300px; + font-size: 17px; + list-style: none; + padding: 0 100px 0 35px; + position: relative; + font-family: YS; + height: 32px; + line-height: 32px; + text-shadow: 0 0 1px rgba(0, 0, 0, .5); +} + +.attr li i { + display: inline-block; + height: 20px; + width: 20px; + background-image: url("./imgs/icon.png"); + background-size: auto 20px; + position: absolute; + left: 10px; + top: 8px; + opacity: .9; + transform: scale(.9); + +} + +.i-hp { + background-position: -20px 0; +} + +.i-atk { + background-position: -40px 0; +} + +.i-def { + background-position: -60px 0; +} + +.i-mastery { + background-position: -80px 0; +} + +.i-cr { + background-position: -100px 0; +} + +.i-cd { + background-position: -140px 0; +} + +.i-re { + background-position: -120px 0; +} + +.i-dmg { + background-position: -160px 0; +} + +.detail li:nth-child(even) { + background: rgba(0, 0, 0, .4) +} + +.detail li:nth-child(odd) { + background: rgba(50, 50, 50, .4) +} + +.detail li strong { + display: inline-block; + position: absolute; + right: 85px; + text-align: right; + font-family: Number, sans-serif; + font-weight: normal; +} + +.detail li span { + position: absolute; + right: 0; + text-align: left; + width: 75px; + display: inline-block; + font-family: Number, sans-serif; + color: #90e800; + font-size: 15px; +} + +.talent-icon { + width: 100px; + height: 100px; + padding: 5px; + display: table; + border-radius: 50%; + position: relative; + background-size: contain; + background-repeat: no-repeat; + background-position: center center; + z-index: 90; +} + +.talent-icon img, +.talent-icon .talent-icon-img { + width: 46%; + height: 46%; + position: absolute; + top: 50%; + left: 50%; + margin: -22% 0 0 -23%; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + +.talent-icon span { + background: #fff; + width: 34px; + height: 26px; + line-height: 26px; + font-size: 17px; + text-align: center; + border-radius: 5px; + position: absolute; + bottom: 2px; + left: 50%; + margin-left: -15px; + color: #000; + box-shadow: 0 0 5px 0 #000; + font-family: Number; +} + +.talent-icon.talent-plus span { + background: #2e353e; + color: #ffdfa0; + font-weight: bold; + box-shadow: 0 0 1px 0 #d3bc8e, 1px 1px 2px 0 rgba(0, 0, 0, 0.5); +} + +.talent-icon.talent-crown:after { + content: ""; + display: block; + width: 28px; + height: 28px; + background: url("../character/imgs/crown.png") no-repeat; + background-size: contain; + position: absolute; + left: 50%; + top: 0; + margin-left: -14px; +} + + +.char-talents { + display: flex; + width: 300px; + margin-bottom: 10px; +} + +.char-cons { + display: flex; + width: 250px; + position: absolute; + bottom: 5px; + left: 20px; +} + +.char-cons .talent-item, +.char-talents .talent-item { + flex: 1; +} + +.char-cons .talent-icon { + width: 50px; + height: 50px; + margin: 0 -5px +} + +.char-cons .talent-icon.off { + filter: grayscale(100%); + opacity: .4; +} + + +.elem_anemo .talent-icon { + background-image: url(../common/bg/talent-anemo.png) +} + +.elem_anemo .container { + background-image: url(../common/bg/bg-anemo.jpg); +} + + +.elem_cryo .talent-icon { + background-image: url(../common/bg/talent-cryo.png) +} + +.elem_cryo .container { + background-image: url(../common/bg/bg-cryo.jpg); +} + + +.elem_electro .talent-icon { + background-image: url(../common/bg/talent-electro.png) +} + +.elem_electro .container { + background-image: url(../common/bg/bg-electro.jpg); +} + + +.elem_geo .talent-icon { + background-image: url(../common/bg/talent-geo.png) +} + +.elem_geo .container { + background-image: url(../common/bg/bg-geo.jpg); +} + + +.elem_hydro .talent-icon { + background-image: url(../common/bg/talent-hydro.png) +} + +.elem_hydro .container { + background-image: url(../common/bg/bg-hydro.jpg); +} + + +.elem_pyro .talent-icon { + background-image: url(../common/bg/talent-pyro.png) +} + +.elem_pyro .container { + background-image: url(../common/bg/bg-pyro.jpg); +} + + +/*** dmg ***/ +.cont { + border-radius: 10px; + background: url("../common/cont/card-bg.png") top left repeat-x; + background-size: auto 100%; + margin: 5px 15px 5px 10px; + position: relative; + box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8); + overflow: hidden; + color: #fff; + font-size: 16px; +} + +.dmg-cont { + display: table; + width: calc(100% - 25px); + margin-top: 10px; + margin-bottom: 10px; +} + +.dmg-mode .dmg-list .cont-footer { + display: none; +} + +.cont-title { + background: rgba(0, 0, 0, .4); + color: #d3bc8e; + font-family: YS; + padding: 10px 20px; + text-align: left; +} + +.cont-title span { + font-size: 12px; + color: #aaa; + margin-left: 10px; + font-family: Number, YS; + font-weight: normal; +} + +.cont-footer { + padding: 10px 15px; + font-size: 12px; + background: rgba(0, 0, 0, 0.5); + font-family: YS; + font-weight: normal; +} + +.cont-table { + display: table; + width: 100%; +} + +.dmg-cont .tr { + display: table-row; +} + +.dmg-cont .tr:nth-child(even) { + background: rgba(0, 0, 0, .4); +} + +.dmg-cont .tr:nth-child(odd) { + background: rgba(50, 50, 50, .4); +} + +.dmg-cont .tr > div { + display: table-cell; + box-shadow: 0 0 1px 0 #fff; +} + +.dmg-cont .tr > div.value-full { + display: table; + width: 200%; +} + +.dmg-cont .tr > div.value-none { + box-shadow: none; +} + +.dmg-cont .thead { + text-align: center; +} + +.dmg-cont .thead > div { + font-family: YS; + color: #d3bc8e; + background: rgba(0, 0, 0, .4); + line-height: 40px; + height: 40px; +} + + +.dmg-cont .title, +.dmg-cont .th { + font-family: YS; + color: #d3bc8e; + padding-right: 15px; + text-align: right; + background: rgba(0, 0, 0, .4); + min-width: 100px; +} + +.profile-mode .dmg-idx { + display: none !important; +} + +.profile-mode .dmg-title { + width: 33.3333%; +} + +.dmg-mode .dmg-idx { + display: table-cell; + width: 5%; + min-width: initial; + padding-right: 0; + text-align: center; +} + +.dmg-mode .dmg-title { + width: 31%; + min-width: initial; + text-align: left; + padding-left: 10px; + padding-right: 0; +} + + +.dmg .value { + text-align: center; + color: #fff; + display: block; + height: 40px; + font-size: 18px; + font-family: Number; + line-height: 40px; + width: 32% +} + +.dmg-notice { + font-size: 12px; + text-align: right; + color: #f5f5f5; + margin-right: 15px; +} + + +/*** artis***/ +.artis { + display: flex; + width: 600px; + flex-wrap: wrap; + margin-bottom: 5px; + padding: 5px; +} + +.artis .item { + width: 185px; + border-radius: 10px; + background: url("../common/cont/card-bg.png") top left repeat-x; + background-size: auto 100%; + margin: 5px; + height: 210px; + position: relative; + box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8); +} + + +.artis .item .arti-icon { + width: 60px; + height: 60px; + position: absolute; + left: 2px; + top: 3px; +} + +.artis .item .arti-icon span { + position: absolute; + right: 2px; + bottom: 0; + margin-left: 5px; + background: rgba(0, 0, 0, .5); + border-radius: 5px; + height: 18px; + line-height: 18px; + padding: 0 3px; + color: #fff; + font-size: 12px; + display: block; +} + +.artis .item .arti-icon img { + width: 60px; + height: 60px; +} + +.artis .head { + color: #fff; + padding: 12px 0 8px 68px; +} + +.artis .head strong { + font-size: 15px; + display: block; + white-space: nowrap; + overflow: hidden; + font-font: YS; +} + +.artis .head span { + font-size: 14px; +} + +.artis .head .mark { + font-family: Number, YS; +} + +.mark-ACE, +.mark-ACE² { + color: #e85656; + font-weight: bold; +} + +.mark-SSS, +.mark-SS { + color: #ffe699; + font-weight: bold; +} + +.mark-S, +.mark-A { + color: #d699ff; + font-weight: bold; +} + +.arti-main { + color: #fff; + padding: 6px 15px; +} + + +.artis ul.detail { + width: 100%; + padding: 0; + position: initial; + font-family: YS; +} + +.artis ul.detail li { + padding: 0 3px; + font-size: 14px; + position: initial; + width: 100%; + display: table; + line-height: 26px; + height: 26px; +} + + +.artis ul.detail li.nouse span { + color: #888; +} + +.artis ul.detail li.arti-main { + font-size: 16px; + padding: 3px 3px; + font-weight: bold; +} + +.artis ul.detail li span { + position: initial; + display: table-cell; + color: #fff; + font-family: YS; +} + +.artis ul.detail li span.title { + text-align: left; + padding-left: 10px; +} + +.artis ul.detail li span.val { + text-align: right; + padding-right: 10px; + font-family: Number; +} + +.artis .weapon .star { + height: 20px; + width: 100px; + background: url("../common/item/star.png") no-repeat; + background-size: 100px 100px; + transform: scale(0.8); + transform-origin: 100px 10px; + display: inline-block; +} + +.artis .weapon .star.star-2 { + background-position: 0 -20px; +} + +.artis .weapon .star.star-3 { + background-position: 0 -40px; +} + +.artis .weapon .star.star-4 { + background-position: 0 -60px; +} + +.artis .weapon .star.star-5 { + background-position: 0 -80px; +} + + +.artis .weapon { + overflow: hidden; + height: 100px; +} + +.artis .weapon img { + width: 100px; + height: 100px; + top: 0; + left: 0; + position: absolute; + z-index: 2; +} + +.artis .weapon .head { + position: absolute; + bottom: 0; + right: 0; + left: 0; + text-align: right; + padding: 13px 12px 13px 0; + z-index: 3; + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); +} + +.artis .weapon .head strong { + font-size: 18px; + margin-bottom: 3px; + font-weight: normal; + font-family: YS; +} + +.artis .weapon .head > span { + display: block; + +} + +.artis .weapon span { + font-size: 16px; +} + +.artis .weapon .affix { + color: #000; + padding: 0 7px; + border-radius: 4px; + margin-left: 5px; + font-size: 16px; +} + + +.artis .weapon .affix-1 { + box-shadow: 0 0 4px 0 #a3a3a3 inset; + background: #ebebebaa; +} + +.artis .weapon .affix-2 { + box-shadow: 0 0 4px 0 #51b72fbd inset; + background: #ddffdeaa; +} + +.artis .weapon .affix-3 { + box-shadow: 0 0 4px 0 #396cdecf inset; + background: #ddebffaa; +} + +.artis .weapon .affix-4 { + box-shadow: 0 0 4px 0 #c539debf inset; + background: #ffddf0aa; +} + +.artis .weapon .affix-5 { + box-shadow: 0 0 4px 0 #deaf39 inset; + background: #fff6dd; +} + +.artis .stat { + height: 100px; + margin-top: 10px; +} + +.artis .stat { + display: table-row; + padding: 18px 10px; + display: table; +} + +.artis .stat > div { + display: table-cell; + text-align: center; + color: #fff; +} + +.artis .stat strong { + display: block; + height: 40px; + font-size: 30px; + font-family: Number; + line-height: 40px; +} + +.dmg-msg { + font-family: Number, YS; + font-size: 13px; + font-weight: normal; +} + +.dmg-msg .thead > div { + text-align: left; + padding-left: 10px; +} + +.dmg-msg .th { + text-align: left; + padding-left: 10px; +} + +.dmg-msg .tr .td { + padding: 8px 10px; +} + +.dmg-msg .info { + font-size: 12px; + text-align: left; + padding-left: 10px; + font-weight: normal; +} + + +.dmg-calc { + +} + +.dmg-calc .thead { + +} + +.dmg-calc .thead > div { + line-height: initial; +} + +.dmg-calc .cont-table div { + vertical-align: middle; + text-align: center; + white-space: nowrap; +} + +.dmg-calc .title { + text-align: center; + padding-right: 0; + min-width: 70px; + +} + +.dmg-calc .td { + padding: 5px 0; +} + +.dmg-calc strong { + font-weight: normal; + display: block; + font-family: Number, YS; +} + +.dmg-calc span { + font-size: 12px; + color: #aaa; + font-family: Number, YS; +} + +.dmg-calc .na, +.dmg-calc .eq { + background: rgba(50, 50, 50, .5); +} + +.dmg-calc .na { + color: #888; +} + +.dmg-calc .lt { + background: rgba(23, 112, 41, 0.5); +} + +.dmg-calc .gt { + background: rgba(112, 23, 23, 0.5); +} + +.dmg-desc { + color: #aaa; +} + +.dmg-desc ul { + padding-left: 10px; +} + +.dmg-desc ul li { + color: #aaa; +} + +.dmg-desc strong { + color: #d3bc8e; + display: inline; + padding: 0 3px; + font-weight: normal; +} + + +.artis .stat span { + font-size: 13px; + line-height: 20px; + color: #bbb; +} + +.char-优菈 .main-pic { + margin-left: -175px; +} + +.char-烟绯 .main-pic { + margin-left: -135px; +} + +.char-香菱 .main-pic { + margin-left: -195px; +} + +.char-迪奥娜 .main-pic { + margin-left: -180px; +} + +.char-可莉 .main-pic { + margin-left: -210px; +} \ No newline at end of file diff --git a/resources/character/icon.png b/resources/character/imgs/icon.png similarity index 100% rename from resources/character/icon.png rename to resources/character/imgs/icon.png diff --git a/resources/common/common.css b/resources/common/common.css index d3345f88..31e7765b 100644 --- a/resources/common/common.css +++ b/resources/common/common.css @@ -37,7 +37,7 @@ body { font-size: 18px; color: #1e1f20; - font-family: PingFangSC-Medium, PingFang SC, sans-serif; + font-family: Number, YS2, PingFangSC-Medium, PingFang SC, sans-serif; transform: scale(1.4); transform-origin: 0 0; width: 600px; @@ -89,7 +89,13 @@ body { position: relative; padding-left: 10px; text-shadow: 1px 1px 1px #000; - margin-bottom: 10px; + margin: 10px 0; +} +.copyright .version { + font-size: 13px; + color: #d3bc8e; + display: inline-block; + padding: 0 3px; } /* */ .cons { @@ -225,7 +231,7 @@ body { background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 1px 0 #fff; color: #d3bc8e; - font-family: YS; + font-family: Number, YS; padding: 10px 20px; text-align: left; border-radius: 10px 10px 0 0; @@ -309,4 +315,10 @@ ul.cont-msg li strong { min-width: 100px; vertical-align: middle; } +.logo { + font-size: 18px; + text-align: center; + color: #fff; + margin: 20px 0 10px 0; +} /*# sourceMappingURL=common.css.map */ \ No newline at end of file diff --git a/resources/common/common.less b/resources/common/common.less index 31aff0c8..1b033db7 100644 --- a/resources/common/common.less +++ b/resources/common/common.less @@ -43,7 +43,7 @@ body { font-size: 18px; color: #1e1f20; - font-family: PingFangSC-Medium, PingFang SC, sans-serif; + font-family: Number, YS2, PingFangSC-Medium, PingFang SC, sans-serif; transform: scale(1.4); transform-origin: 0 0; width: 600px; @@ -107,9 +107,17 @@ body { position: relative; padding-left: 10px; text-shadow: 1px 1px 1px #000; - margin-bottom: 10px; + margin: 10px 0; + + .version { + font-size: 13px; + color: #d3bc8e; + display: inline-block; + padding: 0 3px; + } } + /* */ .cons { @@ -122,10 +130,6 @@ body { } - - - - .cons(@idx, @bg, @color:#fff) { .cons-@{idx} { background: @bg; @@ -194,7 +198,7 @@ each(@elems, { background: rgba(0, 0, 0, .4); box-shadow: 0 0 1px 0 #fff; color: #d3bc8e; - font-family: YS; + font-family: Number, YS; padding: 10px 20px; text-align: left; border-radius: 10px 10px 0 0; @@ -294,4 +298,11 @@ ul.cont-msg li strong { background: rgba(0, 0, 0, .4); min-width: 100px; vertical-align: middle; -} \ No newline at end of file +} + +.logo { + font-size: 18px; + text-align: center; + color: #fff; + margin: 20px 0 10px 0; +} diff --git a/resources/common/layout/default.html b/resources/common/layout/default.html new file mode 100644 index 00000000..9e145680 --- /dev/null +++ b/resources/common/layout/default.html @@ -0,0 +1,16 @@ + + + + + + + {{block 'css'}} + {{/block}} + + +
    + {{block 'main'}}{{/block}} + +
    + + \ No newline at end of file diff --git a/resources/common/layout/elem.html b/resources/common/layout/elem.html new file mode 100644 index 00000000..378ced6b --- /dev/null +++ b/resources/common/layout/elem.html @@ -0,0 +1,16 @@ + + + + + + + {{block 'css'}} + {{/block}} + + +
    + {{block 'main'}}{{/block}} + +
    + + \ No newline at end of file diff --git a/resources/common/tpl/artis-detail.css b/resources/common/tpl/artis-detail.css index 2a56ddcc..06ce5f29 100644 --- a/resources/common/tpl/artis-detail.css +++ b/resources/common/tpl/artis-detail.css @@ -113,4 +113,4 @@ width: 52px; height: 52px; } -/*# sourceMappingURL=artis-detail.css.map */ \ No newline at end of file +/*# sourceMappingURL=artis-detail.less.map */ \ No newline at end of file diff --git a/resources/help/index.html b/resources/help/index.html index 653046ed..3395718c 100644 --- a/resources/help/index.html +++ b/resources/help/index.html @@ -1,41 +1,35 @@ - - - - - - - - - -
    -
    -
    -
    使用帮助
    -
    Yunzai-Bot & Miao-Plugin
    -
    -
    +{{extend defaultLayout}} - {{each helpCfg helpGroup}} -
    -
    {{helpGroup.group}}
    -
    - {{each helpGroup.list help idx}} - {{if idx%3 == 0}} -
    - {{/if}} -
    - - {{help.title}} - {{help.desc}} -
    - {{if idx%3 ==2 || idx == helpGroup.list.length -1}} -
    - {{/if}} - {{/each}} -
    +{{block 'css'}} + +{{/block}} + +{{block 'main'}} +
    +
    +
    使用帮助
    +
    Yunzai-Bot & Miao-Plugin
    +
    +
    + +{{each helpCfg helpGroup}} +
    +
    {{helpGroup.group}}
    +
    + {{each helpGroup.list help idx}} + {{if idx%3 == 0}} +
    + {{/if}} +
    + + {{help.title}} + {{help.desc}}
    - {{/each}} - + {{if idx%3 ==2 || idx == helpGroup.list.length -1}}
    - - \ No newline at end of file + {{/if}} + {{/each}} +
    +
    +{{/each}} +{{/block}} \ No newline at end of file diff --git a/resources/help/version-info.css b/resources/help/version-info.css new file mode 100644 index 00000000..e8cc1f70 --- /dev/null +++ b/resources/help/version-info.css @@ -0,0 +1,66 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + user-select: none; +} +body { + font-size: 18px; + color: #1e1f20; + font-family: Number, YS2; + transform: scale(1.3); + transform-origin: 0 0; + width: 520px; +} +.container { + width: 520px; + padding: 10px 0 10px 0; + background-size: 100% 100%; +} +.log-cont { + margin-bottom: 10px; +} +.log-cont .cont-title { + font-size: 16px; + padding: 10px 20px 6px; +} +.log-cont .cont-title.current-version { + font-size: 20px; +} +.log-cont .cont-body { + font-family: Number, YS2; +} +.log-cont ul { + font-size: 14px; + padding-left: 20px; +} +.log-cont ul li { + margin: 3px 0; +} +.log-cont ul.sub-log-ul li { + margin: 1px 0; +} +.log-cont .cmd { + font-family: Number, YS; + color: #d3bc8e; + display: inline-block; + border-radius: 3px; + background: rgba(0, 0, 0, 0.5); + padding: 0 3px; + margin: 1px 3px; +} +.log-cont .new { + display: inline-block; + width: 18px; + margin: 0 -3px 0 1px; +} +.log-cont .new:before { + content: "NEW"; + font-family: Number; + display: inline-block; + transform: scale(0.6); + transform-origin: 0 0; + color: #d3bc8e; + white-space: nowrap; +} +/*# sourceMappingURL=version-info.css.map */ \ No newline at end of file diff --git a/resources/help/version-info.html b/resources/help/version-info.html new file mode 100644 index 00000000..30fe8070 --- /dev/null +++ b/resources/help/version-info.html @@ -0,0 +1,33 @@ +{{extend elemLayout}} + +{{block 'css'}} + +{{/block}} + +{{block 'main'}} +{{each changelogs ds idx}} +
    + {{if idx === 0 }} +
    当前版本 {{ds.version}}
    + {{else}} +
    喵喵版本 {{ds.version}}
    + {{/if}} +
    +
      + {{each ds.logs log}} +
    • +

      {{@log.title}}

      + {{if log.logs.length > 0}} +
        + {{each log.logs ls}} +
      • {{@ls}}
      • + {{/each}} +
      + {{/if}} +
    • + {{/each}} +
    +
    +
    +{{/each}} +{{/block}} \ No newline at end of file diff --git a/resources/help/version-info.less b/resources/help/version-info.less new file mode 100644 index 00000000..a3daa77e --- /dev/null +++ b/resources/help/version-info.less @@ -0,0 +1,83 @@ +.linear-bg(@color) { + background-image: linear-gradient(to right, @color, @color 80%, fade(@color, 0) 100%); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + user-select: none; +} + +body { + font-size: 18px; + color: #1e1f20; + font-family: Number, YS2; + transform: scale(1.3); + transform-origin: 0 0; + width: 520px; +} + +.container { + width: 520px; + padding: 10px 0 10px 0; + background-size: 100% 100%; +} + +.log-cont { + margin-bottom: 10px; + + .cont-title { + font-size: 16px; + padding: 10px 20px 6px; + + &.current-version { + font-size: 20px; + } + } + + .cont-body { + font-family: Number, YS2; + } + + ul { + font-size: 14px; + padding-left: 20px; + + li { + margin: 3px 0; + } + + &.sub-log-ul { + li { + margin: 1px 0; + } + } + } + + .cmd { + font-family: Number, YS; + color: #d3bc8e; + display: inline-block; + border-radius: 3px; + background: rgba(0, 0, 0, 0.5); + padding: 0 3px; + margin: 1px 3px; + } + + .new { + display: inline-block; + width: 18px; + margin: 0 -3px 0 1px; + } + + .new:before { + content: "NEW"; + font-family: Number; + display: inline-block; + transform: scale(0.6); + transform-origin: 0 0; + color: #d3bc8e; + white-space: nowrap; + } +} \ No newline at end of file diff --git a/resources/meta/character/凯亚/calc.js b/resources/meta/character/凯亚/calc.js new file mode 100644 index 00000000..b5f6b4f5 --- /dev/null +++ b/resources/meta/character/凯亚/calc.js @@ -0,0 +1,11 @@ +export const details = [{ + title: "霜袭E伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e') +}, { + title: "Q单段伤害", + dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q') +}]; + +export const mainAttr = "atk,cpct,cdmg"; + +export const buffs = []; \ No newline at end of file diff --git a/resources/meta/character/安柏/calc.js b/resources/meta/character/安柏/calc.js new file mode 100644 index 00000000..1671c2cc --- /dev/null +++ b/resources/meta/character/安柏/calc.js @@ -0,0 +1,39 @@ +export const details = [{ + title: "重击伤害", + dmg: ({ talent }, dmg) => dmg(talent.a['满蓄力瞄准射击'], 'a2') +}, { + title: "兔兔伯爵爆炸", + dmg: ({ talent }, dmg) => dmg(talent.e['爆炸伤害'], 'e') +}, { + title: "兔兔伯爵蒸发", + check: ({ cons }) => cons < 2, + dmg: ({ talent }, dmg) => dmg(talent.e['爆炸伤害'], 'e', 'zf') +}, { + title: "引爆兔兔伯爵蒸发", + cons: 2, + dmg: ({ talent }, dmg) => dmg(talent.e['爆炸伤害'] * 3, 'e', 'zf') +}, { + title: "Q箭雨总伤害", + params: { q: true }, + dmg: ({ talent }, dmg) => dmg(talent.q['箭雨总伤害'], 'q') +}]; + +export const mainAttr = "atk,cpct,cdmg,mastery"; + +export const buffs = [{ + title: "安柏天赋:命中弱点后攻击力提升15%", + data: { + atkPct: 15 + } +}, { + title: "安柏被动:Q暴击率提高10%", + data: { + qCpct: 10 + } +}, { + title: "元素精通:蒸发融化伤害提高[zf]%", + mastery: "zf,rh" +}, { + title: "安柏2命:瞄准引爆兔兔伯爵伤害提高200%", + cons: 2 +}]; \ No newline at end of file diff --git a/resources/meta/character/迪奥娜/calc.js b/resources/meta/character/迪奥娜/calc.js new file mode 100644 index 00000000..710f8e08 --- /dev/null +++ b/resources/meta/character/迪奥娜/calc.js @@ -0,0 +1,36 @@ +export const details = [{ + title: "长按E总伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['猫爪伤害'] * 5, 'e') +}, { + title: "长按E总伤害", + dmg: ({ talent, attr, calc }, { shield }) => + shield(talent.e['护盾基础吸收量2'][0] * calc(attr.hp) / 100 + talent.e['护盾基础吸收量2'][1] * 1) +}, ({ cons }) => { + return { + title: `${cons === 6 ? "半血" : ""}Q每跳治疗`, + dmg: ({ talent, calc, attr }, { heal }) => + heal(talent.q['持续治疗量2'][0] * calc(attr.hp) / 100 + talent.q['持续治疗量2'][1] * 1) + } +}]; + +export const mainAttr = "atk,hp,cpct,cdmg"; + +export const buffs = [{ + title: "迪奥娜天赋:长按E获得75%护盾吸收量加成", + data: { + shield: 75 + } +}, { + title: "迪奥娜2命:猫爪冻冻造成的伤害提高15%,护盾吸收量提高15%", + cons: 2, + data: { + eDmg: 15, + shield: 15 + } +}, { + title: "迪奥娜6命:生命值低于50%时受治疗加成提升30%", + cons: 6, + data: { + heal: 30 + } +}]; \ No newline at end of file diff --git a/resources/stat/abyss-pct.html b/resources/stat/abyss-pct.html index 3a2a1e2b..879dd6b4 100644 --- a/resources/stat/abyss-pct.html +++ b/resources/stat/abyss-pct.html @@ -1,55 +1,47 @@ - - - - - - - - - - - -
    -
    -
    - {{if chooseFloor == -1}} -
    深渊出场率统计
    -
    全角色出场率统计(出场记录/总记录)
    - {{else}} -
    深渊第{{floorName[chooseFloor]}}出场率
    -
    全角色出场率统计(出场记录/总记录)
    - {{/if}} - -
    - <% let pct = function (num) { - return (num * 100).toFixed(2); - } %> - {{each abyss ds}} - {{if chooseFloor == -1 || chooseFloor == ds.floor}} -
    -
    - - 第{{floorName[ds.floor]}} - -
    -
    - {{each ds.avatars char}} -
    - -
    {{pct(char.value)}}%
    -
    - {{/each}} -
    -
    +{{extend defaultLayout}} - {{/if}} - {{/each}} -

    数据来源:DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}}

    - -
    +{{block 'css'}} + + +{{/block}} + +{{block 'main'}} +
    +
    + {{if chooseFloor == -1}} +
    深渊出场率统计
    +
    全角色出场率统计(出场记录/总记录)
    + {{else}} +
    深渊第{{floorName[chooseFloor]}}出场率
    +
    全角色出场率统计(出场记录/总记录)
    + {{/if}} + +
    + <% let pct = function (num) { + return (num * 100).toFixed(2); + } %> + {{each abyss ds}} + {{if chooseFloor == -1 || chooseFloor == ds.floor}} +
    +
    + + 第{{floorName[ds.floor]}} +
    +
    + {{each ds.avatars char}} +
    + +
    {{pct(char.value)}}%
    +
    + {{/each}} +
    +
    - - \ No newline at end of file + {{/if}} + {{/each}} +

    数据来源:DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}}

    +
    +{{/block}} \ No newline at end of file diff --git a/resources/stat/abyss-team.html b/resources/stat/abyss-team.html index a6c778b0..d8385ebd 100644 --- a/resources/stat/abyss-team.html +++ b/resources/stat/abyss-team.html @@ -1,74 +1,65 @@ - - - - - - - - - - - -
    -
    -
    -
    深渊配队建议
    - -
    +{{extend defaultLayout}} -
    -
    深渊配队说明
    -
    -
      -
    • 根据当前账号的角色练度及本期深渊出场数据,推荐较匹配的配队方案
    • -
    • 若当前记录可用配队方案少于4组时,会使用未持有角色的方案进行补充
    • -
    • 深渊出场数据来自胡桃API,为SnapGenshin用户自主上传的深渊挑战记录,感谢SG团队
    • -
    • 月初及月中深渊刚刷新后挑战数据可能不足,请等待几天之后数据会逐步稳定
    • -
    • 配队列表仅供参考,可根据账号实际情况及个人倾向进行灵活调整
    • -
    -
    -
    +{{block 'css'}} + + +{{/block}} - {{each teams floorTeam floor}} -
    +{{block 'main'}} +
    +
    +
    深渊配队建议
    + +
    -
    -
    -
    {{floor}}层
    -
    上半
    -
    下半
    -
    - {{each floorTeam team idx}} -
    -
    配队{{idx+1}}{{team.count}}次记录
    - {{each team teamData key}} - {{if key === "up" || key === "down"}} -
    -
    - {{each teamData.teamArr id}} -
    - - {{avatars[id].cons}} - Lv.{{avatars[id].level}} - 暂无 -
    +
    +
    深渊配队说明
    +
    +
      +
    • 根据当前账号的角色练度及本期深渊出场数据,推荐较匹配的配队方案
    • +
    • 若当前记录可用配队方案少于4组时,会使用未持有角色的方案进行补充
    • +
    • 深渊出场数据来自胡桃API,为SnapGenshin用户自主上传的深渊挑战记录,感谢SG团队
    • +
    • 月初及月中深渊刚刷新后挑战数据可能不足,请等待几天之后数据会逐步稳定
    • +
    • 配队列表仅供参考,可根据账号实际情况及个人倾向进行灵活调整
    • +
    +
    +
    - {{/each}} -
    -
    - {{/if}} - {{/each}} + {{each teams floorTeam floor}} +
    + +
    +
    +
    {{floor}}层
    +
    上半
    +
    下半
    +
    + {{each floorTeam team idx}} +
    +
    配队{{idx+1}}{{team.count}}次记录
    + {{each team teamData key}} + {{if key === "up" || key === "down"}} +
    +
    + {{each teamData.teamArr id}} +
    + + {{avatars[id].cons}} + Lv.{{avatars[id].level}} + 暂无
    {{/each}}
    + {{/if}} {{/each}} -
    + {{/each}}
    - - - \ No newline at end of file +
    + {{/each}} +
    +{{/block}} \ No newline at end of file diff --git a/resources/stat/character.html b/resources/stat/character.html index 7b88d68d..2071cd16 100644 --- a/resources/stat/character.html +++ b/resources/stat/character.html @@ -1,92 +1,86 @@ - - - - - - - - - - <% let pct = function (num) { - return (num * 100).toFixed(2); - } %> - - -
    -
    -
    - {{if mode === "char"}} -
    角色持有率统计
    -
    全角色综合持有率统计
    - {{else}} -
    角色{{conNum == -1 ? "命座" : "零一二三四五满"[conNum]+"命"}}分布统计
    -
    统计所有角色命座,无论角色是否出场
    - {{/if}} +{{extend defaultLayout}} - +{{block 'css'}} + + +{{/block}} + +<% let pct = function (num) { +return (num * 100).toFixed(2); +} %> + +{{block 'main'}} + +
    +
    + {{if mode === "char"}} +
    角色持有率统计
    +
    全角色综合持有率统计
    + {{else}} +
    角色{{conNum == -1 ? "命座" : "零一二三四五满"[conNum]+"命"}}分布统计
    +
    统计所有角色命座,无论角色是否出场
    + {{/if}} + + +
    + +
    +
    +
    +
    #
    +
    + 角色
    +
    持有率
    +
    +
    +
    0命
    +
    1命
    +
    2命
    +
    3命
    +
    4命
    +
    5命
    +
    6命
    + {{if mode === "char"}} +
    + {{/if}} +
    -
    -
    -
    -
    #
    -
    - 角色 -
    -
    持有率
    -
    -
    -
    0命
    -
    1命
    -
    2命
    -
    3命
    -
    4命
    -
    5命
    -
    6命
    - {{if mode === "char"}} -
    - {{/if}} -
    - -
    +
    +
    + {{each chars char idx}} +
    +
    {{idx+1}}
    +
    +
    +
    +
    - {{each chars char idx}} -
    -
    {{idx+1}}
    -
    -
    -
    - -
    -
    - {{abbr[char.name] || char.name}} -
    -
    -
    -
    {{pct(char.hold)}}
    -
    -
    - {{each char.cons con idx}} -
    {{pct(con.value)}}
    - {{/each}} - {{if mode ==="char"}} -
    {{pct(1-char.hold)}}
    - {{/if}} -
    -
    - {{each char.cons con idx}} -
    - {{/each}} -
    -
    +
    + {{abbr[char.name] || char.name}}
    +
    +
    +
    {{pct(char.hold)}}
    +
    +
    + {{each char.cons con idx}} +
    {{pct(con.value)}}
    + {{/each}} + {{if mode ==="char"}} +
    {{pct(1-char.hold)}}
    + {{/if}} +
    +
    + {{each char.cons con idx}} +
    {{/each}}
    -

    数据来源:DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}}

    -
    + {{/each}}
    - - - \ No newline at end of file +

    数据来源:DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}}

    +
    +
    +{{/block}} \ No newline at end of file diff --git a/resources/stat/common.css b/resources/stat/common.css index b0562970..c37dddab 100644 --- a/resources/stat/common.css +++ b/resources/stat/common.css @@ -9,7 +9,7 @@ body { color: #1e1f20; transform: scale(1.4); transform-origin: 0 0; - background: url("./bg1.png") top left no-repeat #2a3860; + background: url("./imgs/bg1.png") top left no-repeat #2a3860; background-size: contain; width: 600px; font-family: Number, YS2; @@ -17,7 +17,7 @@ body { .container { width: 600px; padding: 20px 15px 10px 15px; - background: url("./footer.png") left bottom no-repeat; + background: url("./imgs/footer.png") left bottom no-repeat; background-size: contain; } .head-box { diff --git a/resources/stat/common.less b/resources/stat/common.less index b1d69fa1..4fecf5e1 100644 --- a/resources/stat/common.less +++ b/resources/stat/common.less @@ -10,7 +10,7 @@ body { color: #1e1f20; transform: scale(1.4); transform-origin: 0 0; - background: url("./bg1.png") top left no-repeat #2a3860; + background: url("./imgs/bg1.png") top left no-repeat #2a3860; background-size: contain; width: 600px; font-family: Number, YS2; @@ -19,7 +19,7 @@ body { .container { width: 600px; padding: 20px 15px 10px 15px; - background: url("./footer.png") left bottom no-repeat; + background: url("./imgs/footer.png") left bottom no-repeat; background-size: contain; } diff --git a/resources/stat/bg1.png b/resources/stat/imgs/bg1.png similarity index 100% rename from resources/stat/bg1.png rename to resources/stat/imgs/bg1.png diff --git a/resources/stat/footer.png b/resources/stat/imgs/footer.png similarity index 100% rename from resources/stat/footer.png rename to resources/stat/imgs/footer.png diff --git a/resources/wiki/calendar.css b/resources/wiki/calendar.css index 684b0436..503ffccf 100644 --- a/resources/wiki/calendar.css +++ b/resources/wiki/calendar.css @@ -4,12 +4,6 @@ .font-number { font-family: Number, YS; } -@font-face { - font-family: "tttgbnumber"; - src: url("../common/font/tttgbnumber.ttf"); - font-weight: normal; - font-style: normal; -} * { margin: 0; padding: 0; @@ -217,7 +211,7 @@ body { border-right: 10px solid transparent; border-bottom: 20px solid #fff; position: absolute; - bottom: 0; + bottom: -8px; left: -9px; transform: scaleY(0.7); transform-origin: bottom center; @@ -232,6 +226,7 @@ body { .now-time { text-align: center; padding-top: 5px; + margin-bottom: 5px; } .now-time span { color: #fff; @@ -240,6 +235,7 @@ body { border-radius: 30px; padding: 10px 15px; border: 1px solid #fff; + display: inline-block; } .cal-abyss-cont { padding-top: 15px; diff --git a/resources/wiki/calendar.html b/resources/wiki/calendar.html index 38a12fe3..35f49cd6 100644 --- a/resources/wiki/calendar.html +++ b/resources/wiki/calendar.html @@ -1,85 +1,79 @@ - - - - - - - - - -
    -
    -
    - - - {{each dateList d}} - - {{/each}} - - - {{each dateList d}}{{each d.date dn}} - - {{/each}} {{/each}} - - - {{each dateList d}}{{each d.date dn}} - - {{/each}} {{/each}} - -
    {{d.month}}月
    {{dn}}日
    -
    -
    - - - - - - - -
    活动列表
    -
    -
    -
    - {{each abyss li}} -
    -
    - - {{li.title}} - {{li.label}} -
    -
    - {{/each}} -
    - {{each list li}} -
    - {{if li.banner2}} - - {{else if li.banner}} - - {{/if}} -
    - {{if li.type === "character"}} - - {{else}} - - {{/if}} - {{li.title}} - {{li.label}} -
    +{{extend elemLayout}} -
    - {{/each}} +{{block 'css'}} + +{{/block}} + +{{block 'main'}} +
    +
    + + + {{each dateList d}} + + {{/each}} + + + {{each dateList d}}{{each d.date dn}} + + {{/each}} {{/each}} + + + {{each dateList d}}{{each d.date dn}} + + {{/each}} {{/each}} + +
    {{d.month}}月
    {{dn}}日
    +
    +
    + + + + + + + +
    活动列表
    +
    +
    +
    + {{each abyss li}} +
    +
    + + {{li.title}} + {{li.label}}
    -
    -
    -
    - 当前时间:{{nowTime}} -
    - + {{/each}}
    - - \ No newline at end of file + {{each list li}} +
    + {{if li.banner2}} + + {{else if li.banner}} + + {{/if}} +
    + {{if li.type === "character"}} + + {{else}} + + {{/if}} + {{li.title}} + {{li.label}} +
    + +
    + {{/each}} +
    +
    +
    +
    +
    + 当前时间:{{nowTime}} +
    +{{/block}} \ No newline at end of file diff --git a/resources/wiki/calendar.less b/resources/wiki/calendar.less index 6e93e2ca..731117b8 100644 --- a/resources/wiki/calendar.less +++ b/resources/wiki/calendar.less @@ -12,13 +12,6 @@ font-family: Number, YS; } -@font-face { - font-family: "tttgbnumber"; - src: url("../common/font/tttgbnumber.ttf"); - font-weight: normal; - font-style: normal; -} - * { margin: 0; padding: 0; @@ -273,7 +266,7 @@ body { border-right: 10px solid transparent; border-bottom: 20px solid #fff; position: absolute; - bottom: 0; + bottom: -8px; left: -9px; transform: scaleY(.7); transform-origin: bottom center; @@ -294,6 +287,7 @@ body { .now-time { text-align: center; padding-top: 5px; + margin-bottom: 5px; span { color: #fff; @@ -302,6 +296,7 @@ body { border-radius: 30px; padding: 10px 15px; border: 1px solid #fff; + display: inline-block; } } diff --git a/resources/wiki/character.css b/resources/wiki/character.css index 36c8a7d8..d63bdc5a 100644 --- a/resources/wiki/character.css +++ b/resources/wiki/character.css @@ -206,7 +206,7 @@ body { } .talent-detail { padding: 30px 15px 5px 15px; - background: url(card-bg.png) left top repeat-x; + background: url(./imgs/card-bg.png) left top repeat-x; background-size: auto 100%; margin: 0; } @@ -262,7 +262,6 @@ body { margin-top: 15px; margin-bottom: 5px; display: block; - font-family: Number, YS; font-weight: normal; color: #d3bc8e; } @@ -309,50 +308,6 @@ body { .talent-table .tr > div:last-child { padding-right: 5px; } -/* - -.talent-table .td, -.talent-table .th { - font-size: 14px; - display: table-cell; - box-shadow: 0 0 1px 0 #888 inset; - padding: 7px 0; - line-height: 24px; -} - -.talent-table .tr:nth-child(odd) { - background: rgba(34, 41, 51, .6) -} - -.talent-table .tr:nth-child(even) { - background: rgba(34, 41, 51, .3) -} - -.talent-table .th { - background: rgba(34, 41, 51, .5); - -} - -.talent-table .lv { - font-family: tttgbnumber; - font-size: 18px; - line-height: 30px; -} - -.talent-table .th { - font-weight: bold; - padding: 5px 3px; - color: #d3bc8e; -} - -.talent-table .talent_name { - min-width: 120px; - padding: 10px 3px; - font-size: 15px; -} - - -*/ .passive-talent .talent-table { display: none; margin-right: 20px; diff --git a/resources/wiki/character.html b/resources/wiki/character.html index 24382eb5..4ef57bd1 100644 --- a/resources/wiki/character.html +++ b/resources/wiki/character.html @@ -1,157 +1,147 @@ - - - - - - - - - - -
    -
    -
    - -
    - + +
    +
    {{title}} · {{name}}
    +
    {{desc}}
    +
    +
    +
    90级基础数据
    +
    + {{each line item}} +
    +
    {{item.num}}
    +
    {{item.label}}
    - --> + {{/each}} +
    +
    +
    -
    -
    {{title}} · {{name}}
    -
    {{desc}}
    +{{if mode == "talent"}} + +{{each talent skill type}} +
    +
    +
    +
    + +
    +
    +
    {{skill.name}}
    +
    + {{each skill.desc d}} + {{ if d[0] === "<" }} + {{@d}} + {{else if d!=""}} + {{d}}
    + {{/if}} + {{/each}}
    -
    -
    90级基础数据
    -
    - {{each line item}} -
    -
    {{item.num}}
    -
    {{item.label}}
    +
    + {{if skill.tables && skill.tables.length > 0}} + + + + {{each skill.lvs lv idx}} + {{if (type=="a" && idx>4 && idx<11) || (type!="a" && idx>4 && idx < 13)}} + + {{/if}} + {{/each}} + + {{each skill.tables tr}} + + + {{if tr.isSame}} + + {{else}} + {{each tr.values v idx}} + {{if (type=="a" && idx>4 && idx<11) || (type!="a" && idx>4 && idx < 13)}} + + {{/if}} + {{/each}} + {{/if}} + + {{/each}} +
    {{lv}}
    + {{tr.name}} + {{tr.values[0]}}{{v}}
    + {{/if}} +
    +
    +
    +{{/each}} + +
    +
    + {{each passive pass idx}} +
    +
    + +
    +
    + {{pass.name}} +
    + {{if pass.tables}} + {{each pass.desc d}} + {{ if d[0] === "<" }} + {{@d}} + {{else if d!=""}} + {{d}}
    + {{/if}} + {{/each}} +
    + {{each pass.tables tr}} +
    +
    {{tr.name}}
    +
    {{tr.values[0]}}
    {{/each}}
    + {{else}} + {{@pass.desc}} + {{/if}}
    - - {{if mode == "talent"}} - - {{each talent skill type}} -
    -
    -
    -
    - -
    -
    -
    {{skill.name}}
    -
    - {{each skill.desc d}} - {{ if d[0] === "<" }} - {{@d}} - {{else if d!=""}} - {{d}}
    - {{/if}} - {{/each}} -
    -
    - {{if skill.tables && skill.tables.length > 0}} - - - - {{each skill.lvs lv idx}} - {{if (type=="a" && idx>4 && idx<11) || (type!="a" && idx>4 && idx < 13)}} - - {{/if}} - {{/each}} - - {{each skill.tables tr}} - - - {{if tr.isSame}} - - {{else}} - {{each tr.values v idx}} - {{if (type=="a" && idx>4 && idx<11) || (type!="a" && idx>4 && idx < 13)}} - - {{/if}} - {{/each}} - {{/if}} - - {{/each}} -
    {{lv}}
    - {{tr.name}} - {{tr.values[0]}}{{v}}
    - {{/if}} -
    -
    -
    - {{/each}} - -
    -
    - {{each passive pass idx}} -
    -
    - -
    -
    - {{pass.name}} -
    - {{if pass.tables}} - {{each pass.desc d}} - {{ if d[0] === "<" }} - {{@d}} - {{else if d!=""}} - {{d}}
    - {{/if}} - {{/each}} -
    - {{each pass.tables tr}} -
    -
    {{tr.name}}
    -
    {{tr.values[0]}}
    -
    - {{/each}} -
    - {{else}} - {{@pass.desc}} - {{/if}} -
    -
    -
    - {{/each}} -
    -
    - {{/if}} - - {{if mode == "cons"}} -
    -
    - {{each cons con idx}} -
    -
    - -
    -
    - {{con.name}} -
    - {{@con.desc}} -
    -
    -
    - {{/each}} -
    -
    - {{/if}} - -
    - - \ No newline at end of file + {{/each}} +
    +
    +{{/if}} + +{{if mode == "cons"}} +
    +
    + {{each cons con idx}} +
    +
    + +
    +
    + {{con.name}} +
    + {{@con.desc}} +
    +
    +
    + {{/each}} +
    +
    +{{/if}} +{{/block}} \ No newline at end of file diff --git a/resources/wiki/character.less b/resources/wiki/character.less index dd868f84..c8d06195 100644 --- a/resources/wiki/character.less +++ b/resources/wiki/character.less @@ -239,7 +239,7 @@ body { .talent-detail { padding: 30px 15px 5px 15px; - background: url(card-bg.png) left top repeat-x; + background: url(./imgs/card-bg.png) left top repeat-x; background-size: auto 100%; margin: 0; } @@ -302,7 +302,6 @@ body { margin-top: 15px; margin-bottom: 5px; display: block; - font-family: Number, YS; font-weight: normal; color: #d3bc8e; } @@ -361,51 +360,6 @@ body { } -/* - -.talent-table .td, -.talent-table .th { - font-size: 14px; - display: table-cell; - box-shadow: 0 0 1px 0 #888 inset; - padding: 7px 0; - line-height: 24px; -} - -.talent-table .tr:nth-child(odd) { - background: rgba(34, 41, 51, .6) -} - -.talent-table .tr:nth-child(even) { - background: rgba(34, 41, 51, .3) -} - -.talent-table .th { - background: rgba(34, 41, 51, .5); - -} - -.talent-table .lv { - font-family: tttgbnumber; - font-size: 18px; - line-height: 30px; -} - -.talent-table .th { - font-weight: bold; - padding: 5px 3px; - color: #d3bc8e; -} - -.talent-table .talent_name { - min-width: 120px; - padding: 10px 3px; - font-size: 15px; -} - - -*/ - .passive-talent .talent-table { display: none; margin-right: 20px; diff --git a/resources/wiki/card-bg.png b/resources/wiki/imgs/card-bg.png similarity index 100% rename from resources/wiki/card-bg.png rename to resources/wiki/imgs/card-bg.png