Refactor: mobile layout
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<GameResultDialog ref="resultDialog" :game="game" :course-id="courseID" />
|
||||
<v-row dense>
|
||||
<v-col cols="12">
|
||||
<p class="text-h6 text-center">{{ game.player1name }} vs. {{ game.player2name || '???' }}</p>
|
||||
<p class="text-h6 text-center">{{ game.player1name }} vs. {{ game.player2name || '?' }}</p>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-icon
|
||||
@@ -13,7 +13,7 @@
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-card class="d-flex align-center" height="250" :disabled="submittedAnswer === null" @click="nextQuestion">
|
||||
<span class="flex-grow-1 text-h5 font-weight-medium text-center">{{ selectedQuestion.question }}</span>
|
||||
<span class="flex-grow-1 text-h5 text--primary font-weight-medium text-center">{{ selectedQuestion.question }}</span>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col v-for="answer, i in answersShuffled" :key="i" cols="6">
|
||||
@@ -21,8 +21,7 @@
|
||||
:color="selectedQuestion.correctAnswer === answer ? answerColor : ''"
|
||||
class="d-flex align-center"
|
||||
height="150"
|
||||
:disabled="submittedAnswer !== null"
|
||||
@click="submitAnswer(answer)"
|
||||
@click="submittedAnswer === null ? submitAnswer(answer) : nextQuestion()"
|
||||
>
|
||||
<div class="flex-grow-1 text-h6 text-center">{{ answer }}</div>
|
||||
</v-card>
|
||||
@@ -378,3 +377,9 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-card--disabled {
|
||||
opacity: 0.87 !important; /* same as text--primary */
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<v-container fill-height>
|
||||
<!-- TODO: For demo purposes only. Delete in production. -->
|
||||
<DemoInfoDialog />
|
||||
<v-row justify="center" align="center">
|
||||
<v-col cols="12"><DemoInfoDialog /></v-col>
|
||||
<v-col cols="12">
|
||||
<!-- -->
|
||||
<v-card width="500" elevation="12" class="mx-auto">
|
||||
<v-card-title class="mb-3">
|
||||
<span class="text-h3 font-weight-black flex-grow-1 flex-shrink-0">Quiz App</span>
|
||||
<v-img src="/iu-logo.svg" height="40" contain class="flex-grow-0 flex-shrink-1"></v-img>
|
||||
<span class="text-h4 text-md-h3 font-weight-black flex-grow-1 flex-shrink-0">Quiz App</span>
|
||||
<v-img src="/iu-logo.svg" :height="$vuetify.breakpoint.mdAndUp ? 40 : 30" contain class="flex-grow-0 flex-shrink-1"></v-img>
|
||||
</v-card-title>
|
||||
<v-card-text v-if="existingUser">
|
||||
<v-form ref="loginForm" v-model="valid">
|
||||
@@ -102,6 +104,8 @@
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-dialog v-model="showPwResetDialog" width="500px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
|
||||
Reference in New Issue
Block a user