Game notes adjustments

This commit is contained in:
Roman Cervantes 2019-12-03 15:49:18 -07:00
parent 6c220abce4
commit 510c9f48a4
5 changed files with 21 additions and 4 deletions

View file

@ -1,6 +1,7 @@
<template lang="html"> <template lang="html">
<div class="game-description" @click="expand"> <div class="game-description" @click="expand">
<h3>Game description</h3>
<p :class="{ collapsed }"> <p :class="{ collapsed }">
{{ game.summary }} {{ game.summary }}
</p> </p>
@ -42,7 +43,7 @@ export default {
@import "~styles/styles"; @import "~styles/styles";
.game-description { .game-description {
margin-bottom: $gp; margin: $gp 0;
} }
p { p {

View file

@ -20,7 +20,10 @@
rows="5" rows="5"
/> />
<small><i class="fab fa-markdown"></i> Markdown supported</small> <small>
<i class="fab fa-markdown" />
<a href="https://guides.github.com/features/mastering-markdown/" target="_blank">Markdown supported</a>
</small>
<footer> <footer>
<button class="secondary" @click="reset"> <button class="secondary" @click="reset">

View file

@ -45,13 +45,12 @@
{{ $t('tags.addTag') }} {{ $t('tags.addTag') }}
</button> </button>
</div> </div>
<game-notes v-if="game" />
</div> </div>
</div> </div>
<div class="details" v-if="game"> <div class="details" v-if="game">
<game-description /> <game-description />
<game-notes />
<game-details /> <game-details />
<game-links /> <game-links />
<game-videos /> <game-videos />
@ -258,6 +257,10 @@ aside {
display: flex; display: flex;
align-items: center; align-items: center;
@media($small) {
justify-content: center;
}
button { button {
margin-right: $gp / 2; margin-right: $gp / 2;
} }

View file

@ -88,6 +88,15 @@ export default {
return platforms.filter(({ id }) => id !== state.platform.id && gamePlatforms.includes(id)); return platforms.filter(({ id }) => id !== state.platform.id && gamePlatforms.includes(id));
}, },
gameNote: ({ game, notes }) => {
const gameSelected = game && game.id;
const hasNote = gameSelected && notes[game.id];
return hasNote
? notes[game.id]
: '';
},
// eslint-disable-next-line // eslint-disable-next-line
activeList: ({ gameLists, platform, activeListIndex }) => gameLists[platform.code][activeListIndex], activeList: ({ gameLists, platform, activeListIndex }) => gameLists[platform.code][activeListIndex],

View file

@ -4,4 +4,5 @@
@import "_utility"; @import "_utility";
@import "_buttons"; @import "_buttons";
@import "_inputs"; @import "_inputs";
@import "_markdown";
@import "_settings"; @import "_settings";