Skip to content

Commit

Permalink
Merge pull request #1 from teuswx/main
Browse files Browse the repository at this point in the history
Implementação da barra menu
  • Loading branch information
andremaravilha authored Sep 25, 2023
2 parents 77d6ff6 + 989a0af commit e523bbe
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 12 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"hover.css": "^2.3.2",
"marked": "^5.1.1",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
"vue-router": "^4.0.13"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.1",
Expand Down
27 changes: 27 additions & 0 deletions src/comuns/BackToMenu.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- ---------------------------------------------------------------------- -->
<!-- HTML -->
<!-- ---------------------------------------------------------------------- -->
<template>
<nav class="navbar bg-body-tertiary">
<form class="container-fluid mt-2" >
<RouterLink to="/" class="btn btn-outline-success"
>VOLTAR</RouterLink
>
</form>
</nav>
</template>


<!-- ---------------------------------------------------------------------- -->
<!-- JavaScript -->
<!-- ---------------------------------------------------------------------- -->
<script>
import { RouterLink, RouterView } from "vue-router";
</script>


<!-- ---------------------------------------------------------------------- -->
<!-- CSS -->
<!-- ---------------------------------------------------------------------- -->
<style scoped>
</style>
9 changes: 6 additions & 3 deletions src/views/DecksView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- ---------------------------------------------------------------------- -->
<template>

<BackToMenu/>
<!-- Modal para exibir detalhes do card -->
<div id="cardModal" class="modal" tabindex="-1">
<div class="modal-dialog modal-lg modal-fullscreen-md-down modal-dialog-centered modal-dialog-scrollable">
Expand All @@ -22,7 +23,7 @@
<div class="col-12 mb-3">
<div class="hstack gap-3">
<span v-if="modal.card?.genio" class="badge text-bg-success">Gênio</span>
<span v-for="tag of modal.card?.tags" class="badge text-bg-primary">{{ tag }}</span>
<span v-for="(tag, index) in modal.card?.tags" :key="index" class="badge text-bg-primary">{{ tag }}</span>
</div>
</div>
<div class="col-12" v-html="modal.card?.descricao">
Expand All @@ -39,7 +40,7 @@
<!-- Listagem dos cards -->
<div class="container">
<div class="row py-5 gx-5 gy-5">
<div v-for="card of cards" class="col-12 col-md-3">
<div v-for="(card, index) in cards" :key="index" class="col-12 col-md-3">
<Card :cardId="card.id" @click="() => { exibirModal(card.id) }" class="deck-card hvr-grow"></Card>
</div>
</div>
Expand All @@ -56,12 +57,14 @@ import { RouterLink, RouterView } from 'vue-router';
import Card from '@/components/Card.vue';
import * as bootstrap from 'bootstrap';
import cardUtils from '@/composables/card-utils.js';
import BackToMenu from '../comuns/BackToMenu.vue';

export default {
components: {
RouterLink,
RouterView,
Card
Card,
BackToMenu
},
data() {
return {
Expand Down
5 changes: 4 additions & 1 deletion src/views/JogoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ import { RouterLink, RouterView } from 'vue-router';
<!-- HTML -->
<!-- ---------------------------------------------------------------------- -->
<template>
<back-to-menu/>
<div class="container-fluid">
<div class="d-flex vh-100">
<div class="m-auto text-center">
<div>Jogo (em construção...)</div>
<RouterLink to="/" class="btn btn-secondary mt-3">VOLTAR</RouterLink>
</div>
</div>
</div>
</template>

<script>
import BackToMenu from '../comuns/BackToMenu.vue';
</script>

<!-- ---------------------------------------------------------------------- -->
<!-- CSS -->
Expand Down
3 changes: 2 additions & 1 deletion src/views/SobreView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<!-- HTML -->
<!-- ---------------------------------------------------------------------- -->
<template>
<back-to-menu/>
<div class="container-fluid">
<div class="d-flex vh-100">
<div class="m-auto text-center">
<div>Sobre (em construção...)</div>
<RouterLink to="/" class="btn btn-secondary mt-3">VOLTAR</RouterLink>
</div>
</div>
</div>
Expand All @@ -18,6 +18,7 @@
<!-- ---------------------------------------------------------------------- -->
<script setup>
import { RouterLink, RouterView } from 'vue-router';
import BackToMenu from '../comuns/BackToMenu.vue';
</script>


Expand Down
3 changes: 2 additions & 1 deletion src/views/TutorialView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<!-- HTML -->
<!-- ---------------------------------------------------------------------- -->
<template>
<back-to-menu/>
<div class="container-fluid">
<div class="d-flex vh-100">
<div class="m-auto text-center">
<div>Tutorial (em construção...)</div>
<RouterLink to="/" class="btn btn-secondary mt-3">VOLTAR</RouterLink>
</div>
</div>
</div>
Expand All @@ -18,6 +18,7 @@
<!-- ---------------------------------------------------------------------- -->
<script setup>
import { RouterLink, RouterView } from 'vue-router';
import BackToMenu from '../comuns/BackToMenu.vue';
</script>


Expand Down

0 comments on commit e523bbe

Please sign in to comment.