feat: 评分

This commit is contained in:
bietiaop 2024-07-28 23:43:25 +08:00
parent 1441b8efcc
commit 394bea4c87
9 changed files with 1024 additions and 334 deletions

View file

@ -0,0 +1,12 @@
{
"11103": 112,
"11102": 3,
"12103": 19,
"12102": 3,
"13103": 15,
"13102": 4.8,
"20103": 2.4,
"21103": 4.8,
"23203": 9,
"31403": 9
}

View file

@ -0,0 +1,82 @@
{
"1011": {},
"1021": {},
"1031": {},
"1041": {},
"1061": {},
"1081": {},
"1091": {},
"1101": {},
"1111": {},
"1121": {},
"1131": {},
"1141": {
"11103": 0,
"11102": 0,
"12103": 1,
"12102": 1,
"13103": 0,
"13102": 0,
"20103": 0.75,
"21103": 0.75,
"23203": 0.75,
"31403": 0
},
"1151": {
"11103": 0,
"11102": 0,
"12103": 1,
"12102": 1,
"13103": 0,
"13102": 0,
"20103": 0.75,
"21103": 0.75,
"23203": 0.5,
"31403": 0.5
},
"1161": {},
"1181": {},
"1191": {
"11103": 0,
"11102": 0,
"12103": 0.75,
"12102": 0.75,
"13103": 0,
"13102": 0,
"20103": 1,
"21103": 1,
"23203": 0.75,
"31403": 0
},
"1201": {},
"1211": {
"11103": 0,
"11102": 0,
"12103": 0.5,
"12102": 0.5,
"13103": 0,
"13102": 0,
"20103": 0.75,
"21103": 0.75,
"23203": 1,
"31403": 0.75
},
"1221": {},
"1241": {},
"1251": {},
"1271": {},
"1281": {
"11103": 0,
"11102": 0,
"12103": 0.75,
"12102": 0.75,
"13103": 0,
"13102": 0,
"20103": 0.5,
"21103": 0.5,
"23203": 0.5,
"31403": 1
},
"2011": {},
"2021": {}
}

View file

@ -437,13 +437,95 @@
position: relative;
z-index: 5;
}
.card .c .comment,
.card .C .comment {
background: linear-gradient(0deg, rgba(39, 211, 30, 0.3), rgb(39, 211, 30));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .b .comment,
.card .B .comment {
background: linear-gradient(0deg, rgba(94, 189, 249, 0.3), rgb(94, 189, 249));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .a .comment,
.card .A .comment {
background: linear-gradient(0deg, rgba(210, 86, 255, 0.3), rgb(210, 86, 255));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .s .comment,
.card .S .comment {
background: linear-gradient(0deg, rgba(255, 218, 190, 0.3), rgb(255, 218, 190));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .ss .comment,
.card .SS .comment {
background: linear-gradient(0deg, rgba(255, 225, 116, 0.4), rgb(255, 225, 116));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .sss .comment,
.card .SSS .comment {
background: linear-gradient(0deg, rgba(255, 163, 59, 0.4), rgb(255, 163, 59));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .ace .comment,
.card .ACE .comment {
background: linear-gradient(0deg, rgba(255, 59, 59, 0.4), rgb(255, 59, 59));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .equip-score {
display: flex;
justify-content: center;
font-size: 1.2em;
align-items: center;
gap: 0.2em;
}
.card .equip-score .comment-box {
font-size: 1.2em;
width: 2em;
display: flex;
justify-content: center;
align-items: center;
aspect-ratio: 1;
border-radius: 50%;
background-color: rgba(32, 32, 32, 0.4);
box-shadow: 0 0 1em rgba(0, 0, 0, 0.4);
border: 0.2em solid rgb(216, 216, 216);
position: relative;
z-index: 1;
}
.card .equip-score .value {
border: 0.1em solid rgb(155, 155, 155);
border-left: none;
padding: 0.1em 1em 0.1em 1em;
margin-left: -0.6em;
border-radius: 0 1em 1em 0;
}
.card .equip-score .value .subt {
font-size: 0.8em;
}
.card .equip-list {
width: 100%;
display: grid;
gap: 1em;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
padding: 0 1.8em;
align-items: stretch;
margin-top: 1em;
overflow: hidden;
}
.card .equip-list .box {
border-image-source: url("./images/equip_bg.png");
@ -569,8 +651,23 @@
white-space: nowrap;
text-align: center;
}
.card .equip-list .box .score {
display: flex;
justify-content: center;
gap: 0.2em;
font-size: 0.9em;
align-items: flex-end;
}
.card .equip-list .box .score .value {
font-size: 0.9em;
background: linear-gradient(0deg, rgba(255, 255, 255, 0.1), rgb(255, 255, 255));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.card .equip-list .box .property-list {
padding: 0 0.5em;
overflow: hidden;
}
.card .equip-list .box .property-list .properties {
display: flex;
@ -586,6 +683,21 @@
flex-grow: 0;
flex-shrink: 0;
}
.card .equip-list .box .property-list .properties .count {
display: flex;
align-items: center;
gap: 0.1em;
flex-grow: 0;
flex-shrink: 0;
}
.card .equip-list .box .property-list .properties .count span {
width: 0.3em;
aspect-ratio: 1;
border-right: 0.1em solid rgb(255, 255, 255);
border-top: 0.1em solid rgb(255, 255, 255);
rotate: 45deg;
margin-left: -0.15em;
}
.card .equip-list .box .property-list .properties .label {
flex-grow: 1;
flex-shrink: 1;
@ -594,10 +706,25 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
opacity: 1;
}
.card .equip-list .box .property-list .properties .label.hit0 {
opacity: 0.6;
}
.card .equip-list .box .property-list .properties .label.hit50 {
opacity: 0.8;
}
.card .equip-list .box .property-list .properties .label.hit75 {
opacity: 1;
}
.card .equip-list .box .property-list .properties .label.hit100 {
opacity: 1;
color: rgb(249, 189, 64);
}
.card .equip-list .box .property-list .properties .value {
color: rgb(249, 189, 64);
font-size: 0.7em;
margin-left: auto;
}
.card .equip-list .box .property-list .properties.main {
background-color: rgb(65, 147, 237);
@ -605,9 +732,17 @@
.card .equip-list .box .property-list .properties.main .prop-icon {
width: 1.2em;
margin-bottom: 0.2em;
filter: drop-shadow(0 0 0.4em rgba(0, 0, 0, 0.3));
}
.card .equip-list .box .property-list .properties.main .label {
color: rgb(255, 255, 255);
text-shadow: 0 0 0.4em rgba(0, 0, 0, 0.3);
font-size: 0.8em;
opacity: 1;
}
.card .equip-list .box .property-list .properties.main .value {
color: rgb(255, 255, 255);
text-shadow: 0 0 0.4em rgba(0, 0, 0, 0.3);
font-size: 1em;
}
.card .damage-title {

View file

@ -138,6 +138,17 @@
<div class="title">
<% include(sys.specialTitle, {en: 'METAL' , cn: '驱动盘信息' }) %>
</div>
{{if charData.equip_score !== false}}
<div class="equip-score {{charData.equip_comment}}">
<div class="comment-box">
<div class="comment">{{charData.equip_comment}}</div>
</div>
<div class="value">
<span>{{charData.equip_score}}</span>
<span class="subt"></span>
</div>
</div>
{{/if}}
<div class="equip-list">
{{each charData.equip equip}}
<div class="box">
@ -149,6 +160,12 @@
<div class="rarity-icon {{equip.rarity}}"></div>
</div>
<div class="name">{{equip.name}}</div>
{{if equip.score !== false}}
<div class="score {{equip.comment}}">
<div class="comment">{{equip.comment}}</div>
<div class="value">{{equip.score}}</div>
</div>
{{/if}}
<div class="property-list">
{{each equip.main_properties prop}}
@ -163,6 +180,13 @@
<div class="properties">
<div class="prop-icon {{prop.classname}}"></div>
<div class="label yellow">{{prop.property_name}}</div>
{{if prop.count}}
<div class="count">
<% for(let i=1 ; i <=prop.count ; i++) { %>
<span></span>
<% } %>
</div>
{{/if}}
<div class="value">{{prop.base}}</div>
</div>
{{/each}}
@ -177,7 +201,7 @@
<% } %>
</div>
{{if charData.damages && charData.damages.length}}
{{if charData?.damages && charData?.damages?.length}}
<div class="title damage-title">
<% include(sys.specialTitle, {en: 'DAMAGE' , cn: '伤害统计' }) %>
</div>

View file

@ -382,14 +382,139 @@
z-index: 5;
}
.c,
.C {
.comment {
background: linear-gradient(
0deg,
rgba(39, 211, 30, 0.3),
rgba(39, 211, 30, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.b,
.B {
.comment {
background: linear-gradient(
0deg,
rgba(94, 189, 249, 0.3),
rgba(94, 189, 249, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.a,
.A {
.comment {
background: linear-gradient(
0deg,
rgba(210, 86, 255, 0.3),
rgb(210, 86, 255)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.s,
.S {
.comment {
background: linear-gradient(
0deg,
rgba(255, 218, 190, 0.3),
rgba(255, 218, 190, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.ss,
.SS {
.comment {
background: linear-gradient(
0deg,
rgba(255, 225, 116, 0.4),
rgba(255, 225, 116, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.sss,
.SSS {
.comment {
background: linear-gradient(
0deg,
rgba(255, 163, 59, 0.4),
rgba(255, 163, 59, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.ace,
.ACE {
.comment {
background: linear-gradient(
0deg,
rgba(255, 59, 59, 0.4),
rgb(255, 59, 59)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.equip-score {
display: flex;
justify-content: center;
font-size: 1.2em;
align-items: center;
gap: 0.2em;
.comment-box {
font-size: 1.2em;
width: 2em;
display: flex;
justify-content: center;
align-items: center;
aspect-ratio: 1;
border-radius: 50%;
background-color: rgba(32, 32, 32, 0.4);
box-shadow: 0 0 1em rgba(0, 0, 0, 0.4);
border: 0.2em solid rgb(216, 216, 216);
position: relative;
z-index: 1;
}
.value {
border: 0.1em solid rgba(155, 155, 155);
border-left: none;
padding: 0.1em 1em 0.1em 1em;
margin-left: -0.6em;
border-radius: 0 1em 1em 0;
.subt {
font-size: 0.8em;
}
}
}
.equip-list {
width: 100%;
display: grid;
gap: 1em;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
padding: 0 1.8em;
align-items: stretch;
margin-top: 1em;
overflow: hidden;
.box {
$size: 3em;
border-image-source: url('./images/equip_bg.png');
@ -484,9 +609,28 @@
text-align: center;
}
.score {
display: flex;
justify-content: center;
gap: 0.2em;
font-size: 0.9em;
align-items: flex-end;
.value {
font-size: 0.9em;
background: linear-gradient(
0deg,
rgba(255, 255, 255, 0.1),
rgba(255, 255, 255, 1)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
}
.property-list {
padding: 0 0.5em;
overflow: hidden;
.properties {
display: flex;
align-items: center;
@ -502,6 +646,23 @@
flex-shrink: 0;
}
.count {
display: flex;
align-items: center;
gap: 0.1em;
flex-grow: 0;
flex-shrink: 0;
span {
// 箭头样式
width: 0.3em;
aspect-ratio: 1;
border-right: 0.1em solid rgb(255, 255, 255);
border-top: 0.1em solid rgb(255, 255, 255);
rotate: 45deg;
margin-left: -0.15em;
}
}
.label {
flex-grow: 1;
flex-shrink: 1;
@ -510,23 +671,44 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
opacity: 1;
&.hit0 {
opacity: 0.6;
}
&.hit50 {
opacity: 0.8;
}
&.hit75 {
opacity: 1;
}
&.hit100 {
opacity: 1;
color: rgb(249, 189, 64);
}
}
.value {
color: rgb(249, 189, 64);
font-size: 0.7em;
margin-left: auto;
}
&.main {
background-color: rgb(65, 147, 237);
.prop-icon {
width: 1.2em;
margin-bottom: 0.2em;
filter: drop-shadow(0 0 0.4em rgba(0, 0, 0, 0.3));
}
.label {
color: rgb(255, 255, 255);
text-shadow: 0 0 0.4em rgba(0, 0, 0, 0.3);
font-size: 0.8em;
opacity: 1;
}
.value {
color: rgb(255, 255, 255);
text-shadow: 0 0 0.4em rgba(0, 0, 0, 0.3);
font-size: 1em;
}
}