gamebrary/src/components/GameCards/GameCardText.vue

67 lines
1.6 KiB
Vue
Raw Normal View History

2019-05-22 06:26:05 +00:00
<template lang="html">
<b-card no-body class="mb-2" @click="openDetails">
2020-08-11 23:39:11 +00:00
<b-row no-gutters class="game-card" v-if="game && game.name">
<b-card-body body-class="pt-0 pb-1 px-2">
<small>
{{ game.name }}
<b-badge variant="warning" v-if="gameNotes">
<b-icon-file-earmark-text />
</b-badge>
</small>
<b-badge
v-if="releaseDate"
variant="secondary"
class="mb-2"
>
Releases in
{{ releaseDate }}
</b-badge>
<b-form-rating
v-if="gameRating"
class="p-0"
inline
:value="gameRating"
readonly
variant="warning"
size="sm"
no-border
/>
<b-progress
v-if="gameProgress"
:value="gameProgress"
variant="success"
height="6px"
/>
<div v-if="showGameTags">
<b-badge
v-for="({ games, hex, tagTextColor }, name) in tags"
v-if="games.includes(game.id)"
:key="name"
pill
variant="primary"
tag="small"
:style="`background-color: ${hex}; color: ${tagTextColor}`"
>
{{ name }}
</b-badge>
</div>
</b-card-body>
</b-row>
</b-card>
2019-05-22 06:26:05 +00:00
</template>
<script>
import GameCardUtils from '@/components/GameCards/GameCard';
export default {
2019-11-08 19:56:03 +00:00
mixins: [GameCardUtils],
2019-05-22 06:26:05 +00:00
};
</script>