Skip to content

Commit

Permalink
feat: level detail header component
Browse files Browse the repository at this point in the history
  • Loading branch information
paring-chan committed Sep 23, 2024
1 parent d9001a9 commit 2fd3bcc
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/lib/components/levelDetail/LevelDetailHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Container } from '@adofai-gg/ui'
import { Container, Tag } from '@adofai-gg/ui'
import type { APILevel } from '~/lib/types'
import { getLevelThumbnail } from '~/lib/utils/parser'
Expand All @@ -17,7 +17,15 @@
style={thumbnailUrl ? `--background-image: url('${thumbnailUrl}')` : ''}
>
<Container>
{level.title}
<div class="label-container">
<Tag color="yellow">legendary</Tag>
<Tag color="blue">recommended</Tag>
<Tag color="white">unlisted</Tag>
<Tag color="gray">hidden</Tag>
</div>
<div class="level-title">
{level.title}
</div>
</Container>
</div>

Expand All @@ -30,4 +38,17 @@
background-position: center;
background-size: cover;
}
.label-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.level-title {
margin-top: 6px;
font-weight: 500;
font-size: 36px;
line-height: 140%;
}
</style>

0 comments on commit 2fd3bcc

Please sign in to comment.