#深渊界面样式微调

`#角色`增加探索度展示
This commit is contained in:
Kokomi 2023-02-11 03:40:55 +08:00
parent 60b53cd3bd
commit c96c32f1fd
16 changed files with 395 additions and 209 deletions

View File

@ -2,7 +2,7 @@
* 测试分支,暂未正式公开 * 测试分支,暂未正式公开
* 重写底层面板、角色数据获取与保存逻辑 * 重写底层面板、角色数据获取与保存逻辑
* 初步增加`#角色列表功能`,尚未完善 * 初步增加`#角色`功能查询并展示Mys角色信息,尚未完善
# 2.2.1 ~ 2.2.2 # 2.2.1 ~ 2.2.2

View File

@ -18,7 +18,7 @@ export async function renderAvatar (e, avatar, renderType = 'card') {
avatar = { id: char.id, name: char.name, detail: false } avatar = { id: char.id, name: char.name, detail: false }
} else { } else {
let player = Player.create(e) let player = Player.create(e)
await player.refreshMys() await player.refreshMysAvatar()
await player.refreshTalent(char.id) await player.refreshTalent(char.id)
avatar = player.getAvatar(char.id) avatar = player.getAvatar(char.id)
if (!avatar) { if (!avatar) {

View File

@ -164,7 +164,7 @@ export async function pokeWife (e, components) {
} }
async function getAvatarList (player, type, mys) { async function getAvatarList (player, type, mys) {
await player.refreshMys() await player.refreshMysAvatar()
let list = [] let list = []
player.forEachAvatar((avatar) => { player.forEachAvatar((avatar) => {
if (type !== false) { if (type !== false) {

View File

@ -1,6 +1,5 @@
import lodash from 'lodash' import { Cfg, Common } from '../../components/index.js'
import { Cfg, Common, Data } from '../../components/index.js' import { MysApi, Player } from '../../models/index.js'
import { MysApi, ProfileRank, Player } from '../../models/index.js'
export async function profileStat (e) { export async function profileStat (e) {
let isMatch = /^#(面板|喵喵|角色|武器|天赋|技能|圣遗物)练度统计?$/.test(e.original_msg || e.msg || '') let isMatch = /^#(面板|喵喵|角色|武器|天赋|技能|圣遗物)练度统计?$/.test(e.original_msg || e.msg || '')
@ -24,6 +23,8 @@ export async function profileStat (e) {
let player = Player.create(e) let player = Player.create(e)
await player.refreshMysInfo()
let avatarRet = await player.refreshAndGetAvatarData({ let avatarRet = await player.refreshAndGetAvatarData({
rank: true, rank: true,
retType: 'array', retType: 'array',
@ -35,10 +36,11 @@ export async function profileStat (e) {
return await Common.render(isAvatarList ? 'character/avatar-list' : 'character/profile-stat', { return await Common.render(isAvatarList ? 'character/avatar-list' : 'character/profile-stat', {
save_id: uid, save_id: uid,
uid, uid,
info: player.info || {},
isStat: !isAvatarList, isStat: !isAvatarList,
talentLvMap: '0,1,1,1,2,2,3,3,3,4,5'.split(','), talentLvMap: '0,1,1,1,2,2,3,3,3,4,5'.split(','),
avatars: avatarRet, avatars: avatarRet,
isSelf: e.isSelf, isSelf: e.isSelf,
talentNotice talentNotice
}, { e, scale: isAvatarList ? 2.2 : 1.8 }) }, { e, scale: 1.4 })
} }

View File

@ -196,7 +196,7 @@ async function abyssTeam (e) {
return true return true
} }
let player = Player.create(e) let player = Player.create(e)
await player.refreshMys() await player.refreshMysAvatar()
await player.refreshTalent() await player.refreshTalent()
let abyssData = await HutaoApi.getAbyssTeam() let abyssData = await HutaoApi.getAbyssTeam()
@ -465,7 +465,7 @@ async function uploadData (e) {
} }
} }
if (ds.percent) { if (ds.percent) {
pct(ds.percent, char.name) pct(ds.percent, char.sName)
pct(ds.percentTotal, '总记录') pct(ds.percentTotal, '总记录')
} else { } else {
msg.push({ msg.push({
@ -476,6 +476,18 @@ async function uploadData (e) {
} }
addMsg('最强一击', ret.data?.damage || abyssData?.stat?.dmg || {}) addMsg('最强一击', ret.data?.damage || abyssData?.stat?.dmg || {})
addMsg('最高承伤', ret.data?.takeDamage || abyssData?.stat.takeDmg || {}) addMsg('最高承伤', ret.data?.takeDamage || abyssData?.stat.takeDmg || {})
let abyssStat = abyssData?.stat || {}
lodash.forEach({ defeat: '最多击破', e: '元素战技', q: '元素爆发' }, (title, key) => {
if (abyssStat[key]) {
stat.push({
title,
id: abyssStat[key]?.id || 0,
value: `${abyssStat[key]?.value}`
})
} else {
stat.push({})
}
})
await player.refreshTalent(avatarIds) await player.refreshTalent(avatarIds)
let avatarData = player.getAvatarData(avatarIds) let avatarData = player.getAvatarData(avatarIds)
return await Common.render('stat/abyss-summary', { return await Common.render('stat/abyss-summary', {
@ -485,7 +497,7 @@ async function uploadData (e) {
save_id: uid, save_id: uid,
totalCount: overview?.collectedPlayerCount || 0, totalCount: overview?.collectedPlayerCount || 0,
uid uid
}, { e, scale: 1.8 }) }, { e, scale: 1.2 })
} else { } else {
e.reply('暂未获得本期深渊挑战数据...') e.reply('暂未获得本期深渊挑战数据...')
return true return true

View File

@ -57,7 +57,7 @@ export default class Player extends Base {
* 保存json文件 * 保存json文件
*/ */
save () { save () {
let ret = Data.getData(this, 'uid,name,level,word,face,card,sign,_mys,_profile') let ret = Data.getData(this, 'uid,name,level,word,face,card,sign,info,_info,_mys,_profile')
ret.avatars = {} ret.avatars = {}
lodash.forEach(this._avatars, (ds) => { lodash.forEach(this._avatars, (ds) => {
ret.avatars[ds.id] = ds.toJSON() ret.avatars[ds.id] = ds.toJSON()
@ -75,14 +75,16 @@ export default class Player extends Base {
*/ */
setBasicData (ds) { setBasicData (ds) {
this.name = ds.name || this.name || '' this.name = ds.name || this.name || ''
this.level = ds.level || this.level || 1 this.level = ds.level || this.level || ''
this.word = ds.word || this.word || 1 this.word = ds.word || this.word || ''
this.face = ds.face || this.face || '' this.face = ds.face || this.face || ''
this.card = ds.card || this.card || '' this.card = ds.card || this.card || ''
this.sign = ds.sign || this.sign || '' this.sign = ds.sign || this.sign || ''
this.info = ds.info || this.info || false
this._avatars = this._avatars || {} this._avatars = this._avatars || {}
this._profile = ds._profile || this._profile this._profile = ds._profile || this._profile
this._mys = ds._mys || this._mys this._mys = ds._mys || this._mys
this._info = ds._info || this._info
} }
// 设置角色列表 // 设置角色列表
@ -165,8 +167,12 @@ export default class Player extends Base {
} }
// 更新米游社数据 // 更新米游社数据
async refreshMys (force = false) { async refreshMysAvatar (force = false) {
return MysAvatar.refreshMys(this, force) return MysAvatar.refreshMysAvatar(this, force)
}
async refreshMysInfo (force = false) {
return await MysAvatar.refreshMysInfo(this, force)
} }
// 通过已有的Mys CharData更新 // 通过已有的Mys CharData更新
@ -187,7 +193,7 @@ export default class Player extends Base {
async refreshAndGetAvatarData (cfg) { async refreshAndGetAvatarData (cfg) {
// 更新角色信息 // 更新角色信息
await this.refreshMys(cfg.force) await this.refreshMysAvatar(cfg.force)
// 更新天赋信息 // 更新天赋信息
if (cfg.refreshTalent !== false) { if (cfg.refreshTalent !== false) {

View File

@ -9,7 +9,7 @@ const MysAvatar = {
* @param force * @param force
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
async refreshMys (player, force = false) { async refreshMysAvatar (player, force = false) {
let mys = player?.e?._mys let mys = player?.e?._mys
if (!mys) { if (!mys) {
return false return false
@ -25,6 +25,27 @@ const MysAvatar = {
MysAvatar.setMysCharData(player, charData) MysAvatar.setMysCharData(player, charData)
}, },
/**
* 更新米游社统计信息
* @param player
* @param force
* @returns {Promise<boolean>}
*/
async refreshMysInfo (player, force = false) {
let mys = player?.e?._mys
if (!mys) {
return false
} // 不必要更新
if (player._info && (new Date() * 1 - player._info < 10 * 60 * 1000) && !force) {
return false
}
let infoData = await mys.getIndex()
if (!infoData) {
return false
}
MysAvatar.setMysInfo(player, infoData)
},
/** /**
* 根据已有Mys CharData更新player * 根据已有Mys CharData更新player
* @param player * @param player
@ -39,7 +60,7 @@ const MysAvatar = {
lodash.forEach(charData.avatars, (ds) => { lodash.forEach(charData.avatars, (ds) => {
let avatar = Data.getData(ds, 'id,level,cons:actived_constellation_num,fetter') let avatar = Data.getData(ds, 'id,level,cons:actived_constellation_num,fetter')
avatar.elem = ds.element.toLowerCase() avatar.elem = ds.element.toLowerCase()
// 处理装数据 // 处理装数据
let costume = (ds?.costumes || [])[0] let costume = (ds?.costumes || [])[0]
if (costume && costume.id) { if (costume && costume.id) {
avatar.costume = costume.id avatar.costume = costume.id
@ -63,6 +84,45 @@ const MysAvatar = {
player.save() player.save()
}, },
setMysInfo (player, infoData) {
let role = infoData.role
// 设置角色信息
let homeLevel = ((infoData?.homes || [])[0])?.level
player.setBasicData({
level: role.level,
name: role.nickname
})
// 设置角色数据
lodash.forEach(infoData.avatars, (ds) => {
let avatar = Data.getData(ds, 'id,level,cons:actived_constellation_num,fetter')
avatar.elem = ds.element.toLowerCase()
player.setAvatar(avatar, 'mys')
})
let stats = {}
lodash.forEach(infoData.stats, (num, key) => {
key = key.replace('_number', '')
if (key !== 'spiral_abyss') {
stats[lodash.camelCase(key)] = num
}
})
let exploration = {}
lodash.forEach(infoData.world_explorations, (ds) => {
let { name } = ds
if (name === '层岩巨渊') {
return true
}
exploration[name === '层岩巨渊·地下矿区' ? '层岩巨渊' : name] = ds.exploration_percentage
})
player.info = {
homeLevel,
stats,
exploration
}
player._info = new Date() * 1
player.save()
},
/** /**
* 获取当前角色需要更新天赋的角色ID * 获取当前角色需要更新天赋的角色ID
* @param player * @param player

View File

@ -1,15 +1,44 @@
.container { .container {
width: 525px; width: 740px;
background-size: cover; background-size: cover;
} }
.head-box { .head-box {
margin-top: 0; margin-top: 0;
} }
#profile-stat { #avatar-list {
width: calc(100% + 30px); width: calc(100% + 30px);
margin: 0 -15px -5px; margin: 0 -15px -5px;
overflow: hidden; overflow: hidden;
} }
.exploration {
display: flex;
flex-wrap: wrap;
padding: 6px;
}
.exploration .item {
width: 95px;
height: 106.4px;
background: url('./imgs/exploration.webp') no-repeat;
background-size: auto 100%;
border-radius: 4px;
margin: 4px;
text-align: center;
color: #fff;
}
.exploration .item strong {
font-size: 18px;
display: block;
height: 22px;
line-height: 22px;
text-shadow: 0 0 1px #000, 1px 1px 3px rgba(0, 0, 0, 0.5);
}
.exploration .item span {
margin-top: 60px;
font-size: 12px;
height: 18px;
line-height: 18px;
display: block;
}
.cont-title { .cont-title {
padding: 8px 15px; padding: 8px 15px;
} }

View File

@ -8,10 +8,21 @@
{{block 'main'}} {{block 'main'}}
<div class="head-box"> <div class="head-box">
<div class="title">#角色列表</div> <div class="title">#角色</div>
<div class="label">UID:{{uid}} 共{{avatars.length }}名角色</div>
</div> </div>
<div id="profile-stat"> <div id="avatar-list">
{{if info && info.exploration}}
{{set citys = ['蒙德','龙脊雪山','璃月','层岩巨渊','稻妻','渊下宫','须弥'] }}
<div class="exploration">
{{each citys city idx}}
<div class="item city-{{idx+1}}" style="background-position:{{idx}}0% 0">
<span>{{city}}</span>
<strong>{{ (info.exploration[city]||0)/10 || '0'}}%</strong>
</div>
{{/each}}
</div>
{{/if}}
<div class="cont avatar-cont"> <div class="cont avatar-cont">
<div class="cont-title">角色列表</div> <div class="cont-title">角色列表</div>
<div class="avatar-list"> <div class="avatar-list">

View File

@ -1,6 +1,6 @@
.container { .container {
width: 525px; width: 740px;
background-size: cover; background-size: cover;
} }
@ -8,12 +8,47 @@
margin-top: 0; margin-top: 0;
} }
#profile-stat { #avatar-list {
width: calc(100% + 30px); width: calc(100% + 30px);
margin: 0 -15px -5px; margin: 0 -15px -5px;
overflow: hidden; overflow: hidden;
} }
.exploration {
display: flex;
flex-wrap: wrap;
padding: 6px;
.item {
width: 95px;
height: 95*1.12px;
background: url('./imgs/exploration.webp') no-repeat;
background-size: auto 100%;
border-radius: 4px;
margin: 4px;
text-align: center;
color: #fff;
strong {
font-size: 18px;
display: block;
height: 22px;
line-height: 22px;
text-shadow: 0 0 1px #000, 1px 1px 3px rgba(0, 0, 0, .5);
}
span {
margin-top: 60px;
font-size: 12px;
height: 18px;
line-height: 18px;
display: block;
}
}
}
.cont-title { .cont-title {
padding: 8px 15px; padding: 8px 15px;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -140,21 +140,21 @@
.avatar-card { .avatar-card {
margin: 3px; margin: 3px;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.8); box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.8);
font-size: 13px; font-size: 19.5px;
border-radius: 7px; border-radius: 10.5px;
} }
.avatar-card .card { .avatar-card .card {
border-radius: 7px; border-radius: 10.5px;
box-shadow: 0 2px 6px 0 rgba(132, 93, 90, 0.3); box-shadow: 0 2px 9px 0 rgba(132, 93, 90, 0.3);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: #e7e5d9; background: #e7e5d9;
width: 70px; width: 105px;
} }
.avatar-card .avatar-face { .avatar-card .avatar-face {
width: 70px; width: 105px;
height: 70px; height: 105px;
border-radius: 7px 7px 15px 0; border-radius: 10.5px 10.5px 22.5px 0;
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
position: relative; position: relative;
@ -180,18 +180,18 @@
top: 0; top: 0;
} }
.avatar-card .avatar-talent { .avatar-card .avatar-talent {
height: 21px; height: 30px;
padding: 3px 5px 2px; padding: 3px 5px 2px;
font-size: 12px; font-size: 18px;
width: 100%; width: 100%;
color: #222; color: #222;
text-align: center; text-align: center;
display: flex; display: flex;
} }
.avatar-card .avatar-talent .talent-item { .avatar-card .avatar-talent .talent-item {
width: 20px; width: 30px;
height: 16px; height: 24px;
line-height: 17px; line-height: 25.5px;
margin: 0 2px; margin: 0 2px;
text-align: center; text-align: center;
display: block; display: block;
@ -211,7 +211,7 @@
box-shadow: 0 0 2px 0 #000; box-shadow: 0 0 2px 0 #000;
} }
.avatar-card .avatar-talent.no-talent { .avatar-card .avatar-talent.no-talent {
font-size: 12px; font-size: 18px;
color: rgba(100, 100, 100, 0.5); color: rgba(100, 100, 100, 0.5);
text-align: center; text-align: center;
padding: 3px 0 2px; padding: 3px 0 2px;
@ -230,10 +230,10 @@
color: #333; color: #333;
} }
.avatar-card .avatar-name strong { .avatar-card .avatar-name strong {
font-size: 14px; font-size: 30px;
display: block; display: block;
height: 23px; height: 34.5px;
line-height: 20px; line-height: 30px;
} }
.avatar-card .avatar-name .cons { .avatar-card .avatar-name .cons {
position: initial; position: initial;
@ -245,13 +245,13 @@
display: none; display: none;
} }
.avatar-card.card-wide .card { .avatar-card.card-wide .card {
width: 146px; width: 219px;
display: flex; display: flex;
} }
.avatar-card.card-wide .avatar-face { .avatar-card.card-wide .avatar-face {
height: 126px; height: 189px;
width: 76px; width: 76px;
border-radius: 7px 0 0 7px; border-radius: 10.5px 0 0 10.5px;
} }
.avatar-card.card-wide .img { .avatar-card.card-wide .img {
background-size: 100% auto; background-size: 100% auto;
@ -260,7 +260,7 @@
margin-top: -9px; margin-top: -9px;
} }
.avatar-card.card-wide .avatar-info { .avatar-card.card-wide .avatar-info {
width: 70px; width: 105px;
} }
.avatar-card.card-wide .line { .avatar-card.card-wide .line {
display: block; display: block;
@ -271,55 +271,55 @@
transform: scale(0.8); transform: scale(0.8);
} }
.avatar-card.wide2 .card { .avatar-card.wide2 .card {
width: 298px; width: 447px;
} }
.avatar-card.wide2 .avatar-face { .avatar-card.wide2 .avatar-face {
width: 146px; width: 219px;
} }
.avatar-card.wide2 .avatar-face .img { .avatar-card.wide2 .avatar-face .img {
margin-top: -50px; margin-top: -75px;
height: 176px; height: 264px;
} }
.avatar-card.wide2 .avatar-info { .avatar-card.wide2 .avatar-info {
width: 146px; width: 219px;
padding-left: 5px; padding-left: 7.5px;
} }
.avatar-detail { .avatar-card .avatar-detail {
display: flex; display: flex;
padding: 0 1px 2px; padding: 0 1px 2px;
} }
.avatar-detail .item { .avatar-card .avatar-detail .item {
width: 31px; width: 46.5px;
height: 31px; height: 46.5px;
border-radius: 4px; border-radius: 4px;
margin: 1px; margin: 1px;
} }
.avatar-weapon .icon { .avatar-card .avatar-weapon .icon {
border-radius: 4px; border-radius: 4px;
} }
.avatar-weapon .cons { .avatar-card .avatar-weapon .cons {
top: initial; top: initial;
bottom: 0; bottom: 0;
padding: 1px 3px; padding: 1px 3px;
border-radius: 3px 0 0 0; border-radius: 3px 0 0 0;
} }
.avatar-artis { .avatar-card .avatar-artis {
position: relative; position: relative;
} }
.avatar-artis .artis { .avatar-card .avatar-artis .artis {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
.avatar-artis.artis2 .img { .avatar-card .avatar-artis.artis2 .img {
position: absolute; position: absolute;
transform: scale(0.7); transform: scale(0.7);
width: 92%; width: 92%;
height: 92%; height: 92%;
margin: 4%; margin: 4%;
} }
.avatar-artis.artis2 .img:first-child { .avatar-card .avatar-artis.artis2 .img:first-child {
transform-origin: left top; transform-origin: left top;
} }
.avatar-artis.artis2 .img:last-child { .avatar-card .avatar-artis.artis2 .img:last-child {
transform-origin: right bottom; transform-origin: right bottom;
} }
.item-list { .item-list {

View File

@ -1,23 +1,27 @@
.avatar-card { .avatar-card {
@px: 1.5px;
margin: 3px; margin: 3px;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.8); box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.8);
font-size: 13px; font-size: @px*13;
border-radius: 7px; border-radius: @px*7;
.card { .card {
border-radius: 7px; border-radius: @px*7;
box-shadow: 0 2px 6px 0 rgb(132 93 90 / 30%); box-shadow: 0 2px @px*6 0 rgb(132 93 90 / 30%);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: #e7e5d9; background: #e7e5d9;
width: 70px; width: @px*70;
} }
.avatar-face { .avatar-face {
width: 70px; width: @px*70;
height: 70px; height: @px*70;
border-radius: 7px 7px 15px 0; border-radius: @px*7 @px*7 @px*15 0;
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
position: relative; position: relative;
@ -27,7 +31,6 @@
background-position: center bottom; background-position: center bottom;
} }
.avatar-level { .avatar-level {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -38,10 +41,8 @@
color: #fff; color: #fff;
} }
} }
.cons { .cons {
border-radius: 0 0 0 5px; border-radius: 0 0 0 5px;
padding: 2px 5px; padding: 2px 5px;
@ -51,18 +52,18 @@
} }
.avatar-talent { .avatar-talent {
height: 21px; height: @px*20;
padding: 3px 5px 2px; padding: 3px 5px 2px;
font-size: 12px; font-size: @px*12;
width: 100%; width: 100%;
color: #222; color: #222;
text-align: center; text-align: center;
display: flex; display: flex;
.talent-item { .talent-item {
width: 20px; width: @px*20;
height: 16px; height: @px*16;
line-height: 17px; line-height: @px*17;
margin: 0 2px; margin: 0 2px;
text-align: center; text-align: center;
display: block; display: block;
@ -85,7 +86,7 @@
} }
&.no-talent { &.no-talent {
font-size: 12px; font-size: @px*12;
color: rgba(100, 100, 100, .5); color: rgba(100, 100, 100, .5);
text-align: center; text-align: center;
padding: 3px 0 2px; padding: 3px 0 2px;
@ -109,10 +110,10 @@
color: #333; color: #333;
strong { strong {
font-size: 14px; font-size: @px*20px;
display: block; display: block;
height: 23px; height: @px*23;
line-height: 20px; line-height: @px*20;
} }
.cons { .cons {
@ -129,14 +130,14 @@
} }
.card { .card {
width: 146px; width: @px*146;
display: flex; display: flex;
} }
.avatar-face { .avatar-face {
height: 126px; height: @px * 126;
width: 76px; width: 76px;
border-radius: 7px 0 0 7px; border-radius: @px*7 0 0 @px*7;
} }
.img { .img {
@ -147,7 +148,7 @@
} }
.avatar-info { .avatar-info {
width: 70px; width: @px*70;
} }
.line { .line {
@ -162,77 +163,77 @@
&.wide2 { &.wide2 {
.card { .card {
width: 298px; width: @px*298;
} }
.avatar-face { .avatar-face {
width: 146px; width: @px*146;
.img { .img {
margin-top: -50px; margin-top: @px*-50;
height: 176px; height: @px*176;
} }
} }
.avatar-info { .avatar-info {
width: 146px; width: @px*146;
padding-left: 5px; padding-left: @px*5;
} }
} }
}
.avatar-detail { .avatar-detail {
display: flex; display: flex;
padding: 0 1px 2px; padding: 0 1px 2px;
.item { .item {
width: 31px; width: @px*31;
height: 31px; height: @px*31;
border-radius: 4px; border-radius: 4px;
margin: 1px; margin: 1px;
}
}
.avatar-weapon {
.icon {
border-radius: 4px;
}
.cons {
top: initial;
bottom: 0;
padding: 1px 3px;
border-radius: 3px 0 0 0;
}
}
.avatar-artis {
position: relative;
.artis {
background: rgba(0, 0, 0, 0.5)
}
&.artis2 {
.img {
position: absolute;
transform: scale(.7);
width: 92%;
height: 92%;
margin: 4%;
&:first-child {
transform-origin: left top;
}
&:last-child {
transform-origin: right bottom;
}
} }
} }
.avatar-weapon {
.icon {
border-radius: 4px;
}
.cons {
top: initial;
bottom: 0;
padding: 1px 3px;
border-radius: 3px 0 0 0;
}
}
.avatar-artis {
position: relative;
.artis {
background: rgba(0, 0, 0, 0.5)
}
&.artis2 {
.img {
position: absolute;
transform: scale(.7);
width: 92%;
height: 92%;
margin: 4%;
&:first-child {
transform-origin: left top;
}
&:last-child {
transform-origin: right bottom;
}
}
}
}
} }

View File

@ -6,28 +6,41 @@
} }
body, body,
.container { .container {
width: 690px; width: 970px;
} }
.container { .container {
padding: 5px 0 10px 5px; padding: 5px 0 10px 5px;
} }
.head-box { .head-box {
margin-top: 0; display: flex;
padding-top: 0; width: 100%;
}
.head-box .title {
font-size: 45px;
padding-bottom: 10px;
width: 70%;
} }
.head-box .title span { .head-box .title span {
font-size: 20px; font-size: 30px;
margin-left: 5px; margin-left: 10px;
color: #d3bc8e;
}
.head-box .uid {
text-align: right;
width: 30%;
padding-top: 25px;
padding-right: 10px;
font-size: 25px;
} }
.abyss-stat-cont { .abyss-stat-cont {
display: flex; display: flex;
padding: 25px 5px 5px; padding: 5px;
} }
.abyss-stat { .abyss-stat {
display: flex; display: flex;
} }
.abyss-stat .cont { .abyss-stat .cont {
margin: 5px; margin: 5px 10px 5px 5px;
} }
.abyss-stat strong { .abyss-stat strong {
text-shadow: 0 0 3px #000; text-shadow: 0 0 3px #000;
@ -58,14 +71,14 @@ body,
padding: 5px 10px; padding: 5px 10px;
width: 100%; width: 100%;
text-shadow: 0 0 1px #000; text-shadow: 0 0 1px #000;
font-size: 12px; font-size: 14px;
} }
.abyss-stat .stat-msg .msg { .abyss-stat .stat-msg .msg {
display: block; display: block;
line-height: 22px; line-height: 25px;
} }
.abyss-stat .stat-msg .msg strong { .abyss-stat .stat-msg .msg strong {
font-size: 16px; font-size: 20px;
padding: 0 2px; padding: 0 2px;
font-weight: normal; font-weight: normal;
color: #d3bc8e; color: #d3bc8e;
@ -156,34 +169,37 @@ body,
.abyss-level .info { .abyss-level .info {
margin-bottom: 5px; margin-bottom: 5px;
display: flex; display: flex;
padding-left: 8px;
} }
.abyss-level .title { .abyss-level .title {
font-size: 16px;
white-space: nowrap; white-space: nowrap;
font-weight: bold; font-weight: bold;
} }
.abyss-level .star { .abyss-level .star {
height: 15px; height: 18px;
display: inline-block; display: inline-block;
background: url(./imgs/star.png); background: url(./imgs/star.png);
background-size: 15px 15px; background-size: 18px 18px;
margin-left: 5px; margin-left: 5px;
} }
.abyss-level .star.star1 { .abyss-level .star.star1 {
width: 15px; width: 18px;
margin-right: 30px; margin-right: 36px;
} }
.abyss-level .star.star2 { .abyss-level .star.star2 {
width: 30px; width: 36px;
margin-right: 15px; margin-right: 18px;
} }
.abyss-level .star.star3 { .abyss-level .star.star3 {
width: 45px; width: 54px;
margin-right: 0; margin-right: 0;
} }
.abyss-level .time { .abyss-level .time {
text-align: right; text-align: right;
width: 60%; width: 60%;
color: #aaa; color: #aaa;
font-size: 14px;
} }
.abyss-level .avatars { .abyss-level .avatars {
display: flex; display: flex;
@ -194,7 +210,7 @@ body,
position: relative; position: relative;
} }
.abyss-level .avatars .avatar-list.up { .abyss-level .avatars .avatar-list.up {
padding-right: 10px; padding-right: 15px;
} }
.abyss-level .avatars .avatar-list.up:after { .abyss-level .avatars .avatar-list.up:after {
content: ""; content: "";
@ -203,23 +219,26 @@ body,
width: 1px; width: 1px;
height: 16px; height: 16px;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
right: 5px; right: 8px;
top: 50%; top: 50%;
margin-top: -8px; margin-top: -8px;
} }
.abyss-level .avatars .avatar-icon { .abyss-level .avatars .avatar-icon {
width: 23px; width: 33px;
height: 23px; height: 33px;
border-radius: 50%; border-radius: 50%;
margin-right: 1px; margin-right: 2px;
} }
.abyss-level .avatars .avatar-icon .img { .abyss-level .avatars .avatar-icon .img {
background-size: auto 100%; background-size: auto 100%;
background-position: center; background-position: center;
width: 20px; width: 29px;
height: 20px; height: 29px;
margin: 2px; margin: 2px;
} }
.abyss-notice .cont-body {
font-size: 16px;
}
.avatar-banner.avatar-枫原万叶, .avatar-banner.avatar-枫原万叶,
.img.wide.avatar-枫原万叶 { .img.wide.avatar-枫原万叶 {
background-position: 0 -13%; background-position: 0 -13%;

View File

@ -8,31 +8,14 @@
{{block 'main'}} {{block 'main'}}
{{ set upDown = {up:'上半', down:'下半'} }} {{ set upDown = {up:'上半', down:'下半'} }}
<div class="head-box type">
<div class="title">#上传深渊<span>{{abyss.schedule}} · {{abyss.total}}次战斗</span></div>
<div class="uid">UID:{{uid}}</div>
</div>
<div class="info_box"> <div class="info_box">
<div class="abyss-stat-cont"> <div class="abyss-stat-cont">
<div>
<div class="head-box type">
<div class="title">#上传深渊<span>{{abyss.schedule}}</span></div>
<div class="label">UID:{{uid}} <span>· {{abyss.total}}次战斗</span></div>
</div>
<div class="abyss-data cont">
{{set st = abyss?.stat || {} }}
{{set dataMap = {defeat:"最多击破",e:"元素战技",q:"元素爆发"} }}
{{each dataMap title key}}
<div class="abyss-item">
<div class="info">
<strong>{{title}}</strong>
<span>{{st[key]?.value || 0}}</span>
</div>
{{if st[key]}}
<% include(_tpl_path+'/avatar-card.html', [avatars[st[key]?.id],{_res_path}]) %>
{{/if}}
</div>
{{/each}}
</div>
</div>
<div class="abyss-stat"> <div class="abyss-stat">
{{each stat ds}} {{each stat ds}}
{{set avatar = avatars[ds.id]}} {{set avatar = avatars[ds.id]}}
@ -44,6 +27,8 @@
</div> </div>
<div class="avatar-banner avatar-{{avatar.name}}" <div class="avatar-banner avatar-{{avatar.name}}"
style="background-image:url({{_res_path}}{{avatar.gacha}})"></div> style="background-image:url({{_res_path}}{{avatar.gacha}})"></div>
{{if ds.msg}}
<div class="stat-msg"> <div class="stat-msg">
{{each ds.msg msg}} {{each ds.msg msg}}
{{if msg.txt}} {{if msg.txt}}
@ -54,6 +39,7 @@
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
{{/if}}
</div> </div>
{{/each}} {{/each}}
</div> </div>

View File

@ -1,7 +1,8 @@
@import "../common/base.less"; @import "../common/base.less";
@scale: 1.4;
body, .container { body, .container {
width: 690px; width: 970px;
} }
.container { .container {
@ -9,27 +10,40 @@ body, .container {
} }
.head-box { .head-box {
margin-top: 0; display: flex;
padding-top: 0; width: 100%;
.title { .title {
font-size: 45px;
padding-bottom: 10px;
width: 70%;
span { span {
font-size: 20px; font-size: 30px;
margin-left: 5px; margin-left: 10px;
color: #d3bc8e;
} }
} }
.uid {
text-align: right;
width: 30%;
padding-top: 25px;
padding-right: 10px;
font-size: 25px;
}
} }
.abyss-stat-cont { .abyss-stat-cont {
display: flex; display: flex;
padding: 25px 5px 5px; padding: 5px;
} }
.abyss-stat { .abyss-stat {
display: flex; display: flex;
.cont { .cont {
margin: 5px; margin: 5px 10px 5px 5px;
} }
strong { strong {
@ -65,14 +79,14 @@ body, .container {
padding: 5px 10px; padding: 5px 10px;
width: 100%; width: 100%;
text-shadow: 0 0 1px #000; text-shadow: 0 0 1px #000;
font-size: 12px; font-size: 14px;
.msg { .msg {
display: block; display: block;
line-height: 22px; line-height: 25px;
strong { strong {
font-size: 16px; font-size: 20px;
padding: 0 2px; padding: 0 2px;
font-weight: normal; font-weight: normal;
color: #d3bc8e; color: #d3bc8e;
@ -188,32 +202,36 @@ body, .container {
.info { .info {
margin-bottom: 5px; margin-bottom: 5px;
display: flex; display: flex;
padding-left: 8px;
} }
.title { .title {
font-size: 16px;
white-space: nowrap; white-space: nowrap;
font-weight: bold; font-weight: bold;
} }
.star { .star {
height: 15px; @size: 18px;
height: @size;
display: inline-block; display: inline-block;
background: url(./imgs/star.png); background: url(./imgs/star.png);
background-size: 15px 15px; background-size: @size @size;
margin-left: 5px; margin-left: 5px;
&.star1 { &.star1 {
width: 15px; width: @size;
margin-right: 30px; margin-right: @size * 2;
} }
&.star2 { &.star2 {
width: 30px; width: @size * 2;
margin-right: 15px; margin-right: @size;
} }
&.star3 { &.star3 {
width: 45px; width: @size * 3;
margin-right: 0; margin-right: 0;
} }
} }
@ -222,6 +240,7 @@ body, .container {
text-align: right; text-align: right;
width: 60%; width: 60%;
color: #aaa; color: #aaa;
font-size: 14px;
} }
.avatars { .avatars {
@ -233,7 +252,7 @@ body, .container {
position: relative; position: relative;
&.up { &.up {
padding-right: 10px; padding-right: 15px;
} }
&.up:after { &.up:after {
@ -243,29 +262,35 @@ body, .container {
width: 1px; width: 1px;
height: 16px; height: 16px;
background: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .3);
right: 5px; right: 8px;
top: 50%; top: 50%;
margin-top: -8px; margin-top: -8px;
} }
} }
.avatar-icon { .avatar-icon {
width: 23px; width: 33px;
height: 23px; height: 33px;
border-radius: 50%; border-radius: 50%;
margin-right: 1px; margin-right: 2px;
.img { .img {
background-size: auto 100%; background-size: auto 100%;
background-position: center; background-position: center;
width: 20px; width: 29px;
height: 20px; height: 29px;
margin: 2px; margin: 2px;
} }
} }
} }
} }
.abyss-notice {
.cont-body {
font-size: 16px;
}
}
.avatar-banner, .img.wide { .avatar-banner, .img.wide {
&.avatar-枫原万叶 { &.avatar-枫原万叶 {
background-position: 0 -13%; background-position: 0 -13%;