Skip to content

Commit e9e0fe4

Browse files
committed
Switched to overlay pill for new game indicator
1 parent aad7aed commit e9e0fe4

3 files changed

Lines changed: 33 additions & 4 deletions

File tree

src/components/game-selection/GameSelectionCard.vue

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<div class="game-card__placeholder">{{ game.displayName }}</div>
1010
</template>
1111
</div>
12+
<div class="game-card__new-badge" v-if="isNew">
13+
<i class="fas fa-bolt game-card__new-badge-icon"></i> New
14+
</div>
1215
<div class="game-card__overlay">
1316
<div class="game-card__overlay-spacer"></div>
1417
<div class="game-card__overlay-body">
@@ -21,10 +24,7 @@
2124
</div>
2225
</div>
2326
<div class="game-card-wrapper__footer">
24-
<p>
25-
<span class="tag" v-if="isNew">New</span>
26-
{{ game.displayName }}
27-
</p>
27+
<p>{{ game.displayName }}</p>
2828
<a :id="`${game.settingsIdentifier}-star`" href="#" @click.prevent="emit('toggle-favourite', game)">
2929
<i class="fas fa-star text-warning" v-if="isFavourited"></i>
3030
<i class="far fa-star" v-else></i>
@@ -100,6 +100,29 @@ function getImageHref(image: string) {
100100
background-color: var(--border-secondary, #c9d3ee);
101101
}
102102
103+
.game-card__new-badge {
104+
position: absolute;
105+
top: 0.5rem;
106+
right: 0.5rem;
107+
display: flex;
108+
align-items: center;
109+
gap: 0.25rem;
110+
padding: 0.2rem 0.55rem;
111+
background-color: var(--game-card-new-badge-background);
112+
border: 1px solid var(--game-card-new-badge-border);
113+
border-radius: 5px;
114+
font-size: 0.75rem;
115+
font-weight: 600;
116+
color: var(--v2-inactive-tag-color);
117+
backdrop-filter: blur(4px);
118+
pointer-events: none;
119+
}
120+
121+
.game-card__new-badge-icon {
122+
color: var(--v2-link-text-color);
123+
font-size: 0.65rem;
124+
}
125+
103126
.game-card__overlay {
104127
position: absolute;
105128
inset: 0;

src/css/scheme/dark.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@
7575
--ecosystem-update-error-text: #ffc5cf;
7676
--ecosystem-update-error-background: #4a1f2a;
7777
--ecosystem-update-error-border: #6d3240;
78+
79+
--game-card-new-badge-background: rgba(18, 22, 45, 0.85);
80+
--game-card-new-badge-border: rgba(100, 140, 255, 0.3);
7881
}
7982

8083
html.html--dark {

src/css/v2/_initial.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
--v2-inactive-menu-item-color: #222;
2929

3030
--input-placeholder-color: #b5b5b5;
31+
32+
--game-card-new-badge-background: rgba(18, 22, 45, 0.85);
33+
--game-card-new-badge-border: rgba(100, 140, 255, 0.3);
3134
}
3235

3336
html[class="html--dark"] {

0 commit comments

Comments
 (0)