feat: gacha

This commit is contained in:
bietiaop 2024-07-09 16:30:45 +08:00
parent e28fbd8472
commit af3b551a6a
33 changed files with 579 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -0,0 +1,216 @@
.card {
margin: 0 1em;
}
.card .user-info {
margin: 0 1em;
margin-bottom: 1.5em;
}
.card .title {
border-image-slice: 37 27 37 131 fill;
border-image-width: 1em 1em 1em 4.5em;
border-image-outset: 0em 0em 0em 0em;
border-image-repeat: stretch stretch;
min-height: 7em;
padding: 0.7em 2.3em 0.7em 3.7em;
display: flex;
align-items: center;
}
.card .title.t1 {
border-image-source: url("./images/bg1.png");
}
.card .title.t2 {
border-image-source: url("./images/bg2.png");
}
.card .title.t3 {
border-image-source: url("./images/bg3.png");
}
.card .title.t4 {
border-image-source: url("./images/bg4.png");
}
.card .title .info {
flex-grow: 1;
flex-shrink: 1;
}
.card .title .info .type {
display: flex;
align-items: flex-end;
gap: 0.1em;
}
.card .title .info .type .label {
font-size: 1.5em;
text-shadow: 0.05em 0.05em 0.03em rgba(0, 0, 0, 0.4);
}
.card .title .info .type .status {
font-size: 0.8em;
color: #e4e4e4;
margin-bottom: 0.2em;
background: rgba(0, 0, 0, 0.5);
padding: 0em 0.5em;
border-radius: 1em;
backdrop-filter: blur(0.3em);
}
.card .title .info .type .status .value {
color: rgb(128, 237, 84);
margin: 0 0.1em;
}
.card .title .info .time {
font-size: 0.6em;
color: #e4e4e4;
}
.card .title .info .analysis {
width: 15em;
display: flex;
background-color: rgba(0, 0, 0, 0.5);
margin-left: 1em;
margin-top: 0.3em;
margin-bottom: 0.2em;
border-radius: 2em;
padding: 0.1em 0.5em;
}
.card .title .info .analysis .item {
flex-grow: 1;
flex-shrink: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.card .title .info .analysis .item .value {
font-size: 1.3em;
}
.card .title .info .analysis .item .label {
font-size: 0.8em;
color: #e4e4e4;
}
.card .title .comment {
flex-grow: 0;
flex-shrink: 0;
}
.card .title .comment .icon {
width: 4.5em;
aspect-ratio: 1;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin-bottom: 0.5em;
}
.card .title .comment.e1 .icon {
background-image: url("./images/emoji/1.png");
}
.card .title .comment.e2 .icon {
background-image: url("./images/emoji/2.png");
}
.card .title .comment.e3 .icon {
background-image: url("./images/emoji/3.png");
}
.card .title .comment.e4 .icon {
background-image: url("./images/emoji/4.png");
}
.card .title .comment.e5 .icon {
background-image: url("./images/emoji/5.png");
}
.card .title .comment.e6 .icon {
background-image: url("./images/emoji/6.png");
}
.card .title .comment.e7 .icon {
background-image: url("./images/emoji/7.png");
}
.card .title .comment.e8 .icon {
background-image: url("./images/emoji/8.png");
}
.card .title .comment.e9 .icon {
background-image: url("./images/emoji/9.png");
}
.card .title .comment.e10 .icon {
background-image: url("./images/emoji/10.png");
}
.card .title .comment.e11 .icon {
background-image: url("./images/emoji/11.png");
}
.card .title .comment.e12 .icon {
background-image: url("./images/emoji/12.png");
}
.card .title .comment.e13 .icon {
background-image: url("./images/emoji/13.png");
}
.card .title .comment.e14 .icon {
background-image: url("./images/emoji/14.png");
}
.card .title .comment.e15 .icon {
background-image: url("./images/emoji/15.png");
}
.card .title .comment.e16 .icon {
background-image: url("./images/emoji/16.png");
}
.card .title .comment .label {
font-size: 1em;
text-align: center;
}
.card .list {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1em;
padding: 0.5em 1.7em;
margin-bottom: 1.5em;
}
.card .list .item {
width: 100%;
position: relative;
border-radius: 0.5em;
overflow: hidden;
border: 0.2em solid #000000;
}
.card .list .item.up::after {
content: "";
display: block;
position: absolute;
top: 0.1em;
left: 0.2em;
width: 1.7em;
height: 1.7em;
background: url("./images/IconTabUP.png") no-repeat center center;
background-size: contain;
z-index: 1;
}
.card .list .item .rank {
position: absolute;
top: 0.2em;
right: 0.2em;
width: 1.5em;
aspect-ratio: 1;
background: url("./images/RANK_A.png") no-repeat center center;
background-size: contain;
color: white;
z-index: 2;
}
.card .list .item.rankS .rank {
background-image: url("./images/RANK_S.png");
}
.card .list .item.rankB .rank {
background-image: url("./images/RANK_B.png");
}
.card .list .item .image {
width: 100%;
aspect-ratio: 1.5;
background-color: #e2e2e2;
}
.card .list .item .image img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
}
.card .list .item .count {
position: absolute;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(0.3em);
border-top-right-radius: 0.5em;
color: white;
text-align: center;
padding: 0 0.3em;
font-size: 0.9em;
}
/*# sourceMappingURL=index.css.map */

View file

@ -0,0 +1,54 @@
{{extend defaultLayout}}
{{block 'css'}}
<link rel="stylesheet" href="{{@sys.currentPath}}/index.css">
{{/block}}
{{block 'main'}}
<div class="card">
{{include sys.playerInfo}}
{{each data item i}}
<div class="title t{{i+1}}">
<div class="info">
<div class="type">
<div class="label">{{item.name}}</div>
<div class="status"><span class="value">{{item.lastFive}}</span>抽未出S级</div>
</div>
<div class="time">{{item.timeRange}}</div>
<div class="analysis">
<div class="item">
<div class="value">{{item.avgFive}}</div>
<div class="label">平均出金</div>
</div>
<div class="item">
<div class="value">{{item.avgUp}}</div>
<div class="label">平均UP</div>
</div>
<div class="item">
<div class="value">{{item.totalCount}}</div>
<div class="label">抽卡总数</div>
</div>
</div>
</div>
<!-- <div class="comment e1">
<div class="icon"></div>
<div class="label">平稳保底</div>
</div> -->
</div>
<div class="list">
{{each item.list inv j}}
<div class="item rankS {{inv.isUp && 'up'}}">
<div class="rank rankS"></div>
<div class="image">
<img src="./images/role_square_avatar_1011.png" alt="">
</div>
<div class="count">{{inv?.totalCount || '-'}}抽</div>
</div>
{{/each}}
</div>
{{/each}}
</div>
{{/block}}

View file

@ -0,0 +1,172 @@
.card {
margin: 0 1em;
.user-info {
margin: 0 1em;
margin-bottom: 1.5em;
}
.title {
border-image-slice: 37 27 37 131 fill;
border-image-width: 1em 1em 1em 4.5em;
border-image-outset: 0em 0em 0em 0em;
border-image-repeat: stretch stretch;
min-height: 7em;
padding: 0.7em 2.3em 0.7em 3.7em;
display: flex;
align-items: center;
@for $i from 1 through 4 {
&.t#{$i} {
border-image-source: url('./images/bg#{$i}.png');
}
}
.info {
flex-grow: 1;
flex-shrink: 1;
.type {
display: flex;
align-items: flex-end;
gap: 0.1em;
.label {
font-size: 1.5em;
text-shadow: 0.05em 0.05em 0.03em rgba(0, 0, 0, 0.4);
}
.status {
font-size: 0.8em;
color: #e4e4e4;
margin-bottom: 0.2em;
background: rgba(0, 0, 0, 0.5);
padding: 0em 0.5em;
border-radius: 1em;
backdrop-filter: blur(0.3em);
.value {
color: rgb(128, 237, 84);
margin: 0 0.1em;
}
}
}
.time {
font-size: 0.6em;
color: #e4e4e4;
}
.analysis {
width: 15em;
display: flex;
background-color: rgba(0, 0, 0, 0.5);
margin-left: 1em;
margin-top: 0.3em;
margin-bottom: 0.2em;
border-radius: 2em;
padding: 0.1em 0.5em;
.item {
flex-grow: 1;
flex-shrink: 1;
display: flex;
flex-direction: column;
align-items: center;
.value {
font-size: 1.3em;
}
.label {
font-size: 0.8em;
color: #e4e4e4;
}
}
}
}
.comment {
flex-grow: 0;
flex-shrink: 0;
.icon {
width: 4.5em;
aspect-ratio: 1;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin-bottom: 0.5em;
}
@for $i from 1 through 16 {
&.e#{$i} {
.icon {
background-image: url('./images/emoji/#{$i}.png');
}
}
}
.label {
font-size: 1em;
text-align: center;
}
}
}
.list {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1em;
padding: 0.5em 1.7em;
margin-bottom: 1.5em;
.item {
width: 100%;
position: relative;
border-radius: 0.5em;
overflow: hidden;
border: 0.2em solid #000000;
&.up {
&::after {
content: '';
display: block;
position: absolute;
top: 0.1em;
left: 0.2em;
width: 1.7em;
height: 1.7em;
background: url('./images/IconTabUP.png') no-repeat center center;
background-size: contain;
z-index: 1;
}
}
.rank {
position: absolute;
top: 0.2em;
right: 0.2em;
width: 1.5em;
aspect-ratio: 1;
background: url('./images/RANK_A.png') no-repeat center center;
background-size: contain;
color: white;
z-index: 2;
}
&.rankS {
.rank {
background-image: url('./images/RANK_S.png');
}
}
&.rankB {
.rank {
background-image: url('./images/RANK_B.png');
}
}
.image {
width: 100%;
aspect-ratio: 1.5;
background-color: #e2e2e2;
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
}
}
.count {
position: absolute;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(0.3em);
border-top-right-radius: 0.5em;
color: white;
text-align: center;
padding: 0 0.3em;
font-size: 0.9em;
}
}
}
}