Compare commits
No commits in common. "82033ac3b9443df1c4ced1a4be801f1a4d2996b6" and "bc7ff38c70e5073fff9cf84a904b5e6804557384" have entirely different histories.
82033ac3b9
...
bc7ff38c70
@ -1,16 +1,11 @@
|
|||||||
* {
|
|
||||||
box-sizing: border-box; }
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
box-sizing: border-box;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
background-image: url(../img/background.jpg);
|
background-image: url(../img/background.jpg);
|
||||||
background-size: cover;
|
background-size: cover; }
|
||||||
background-attachment: fixed; }
|
|
||||||
body .screen {
|
body .screen {
|
||||||
width: 800px;
|
width: 800px;
|
||||||
max-width: 90vw;
|
max-width: 90vw;
|
||||||
@ -75,12 +70,7 @@ body {
|
|||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
border: 1px solid lightgray;
|
border: 1px solid lightgray;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
text-align: left;
|
text-align: left; }
|
||||||
counter-increment: answer; }
|
|
||||||
.ingame-screen .question .question-answers .answer::before {
|
|
||||||
content: counter(answer);
|
|
||||||
color: lightgray;
|
|
||||||
padding: 0.5em; }
|
|
||||||
.ingame-screen .question .question-estimate {
|
.ingame-screen .question .question-estimate {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 7fr 3fr; }
|
grid-template-columns: 7fr 3fr; }
|
||||||
@ -150,36 +140,5 @@ body {
|
|||||||
transform: scale(1.2); }
|
transform: scale(1.2); }
|
||||||
100% {
|
100% {
|
||||||
transform: scale(1); } }
|
transform: scale(1); } }
|
||||||
@media screen and (max-width: 600px) {
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0; }
|
|
||||||
body .screen {
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
max-width: 100vw;
|
|
||||||
min-height: 100vh;
|
|
||||||
overflow-y: scroll; }
|
|
||||||
body .screen .headline {
|
|
||||||
text-align: center; }
|
|
||||||
body .screen .btn-start {
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
width: auto; }
|
|
||||||
body .header {
|
|
||||||
flex-direction: column; }
|
|
||||||
body .question-text {
|
|
||||||
font-size: 14pt; }
|
|
||||||
body .question.estimate {
|
|
||||||
max-width: 95vw;
|
|
||||||
height: auto;
|
|
||||||
box-sizing: border-box; }
|
|
||||||
body .question.estimate .question-estimate {
|
|
||||||
display: block; }
|
|
||||||
body .question.estimate .input-estimate,
|
|
||||||
body .question.estimate .btn-submit-estimate {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0.5rem 1rem; }
|
|
||||||
body .question.estimate .question-result {
|
|
||||||
width: 60%; } }
|
|
||||||
|
|
||||||
/*# sourceMappingURL=style.css.map */
|
/*# sourceMappingURL=style.css.map */
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAAA,CAAC;EACC,UAAU,EAAE,UAAU;;AAExB,IAAI;EACF,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,UAAU;EACtB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;EACnB,gBAAgB,EAAE,0BAA0B;EAC5C,eAAe,EAAE,KAAK;EACtB,qBAAqB,EAAE,KAAK;EAE5B,YAAO;IACL,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,IAAI;IAChB,gBAAgB,EAAE,wBAAuB;EAE3C,OAAE;IACA,WAAW,EAAE,gBAAgB;IAC7B,SAAS,EAAE,IAAI;EAEjB,OAAE;IACA,WAAW,EAAE,MAAM;EAErB,iBAAY;IACV,gBAAgB,EAAE,IAAI;;AAE1B,0BAA0B;EACxB,O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],
|
||||||
"file": "style.css"
|
"file": "style.css"
|
||||||
|
|||||||
@ -1,16 +1,11 @@
|
|||||||
*
|
|
||||||
box-sizing: border-box
|
|
||||||
|
|
||||||
body
|
body
|
||||||
height: 100vh
|
min-height: 100vh
|
||||||
box-sizing: border-box
|
|
||||||
display: flex
|
display: flex
|
||||||
align-items: center
|
align-items: center
|
||||||
justify-content: center
|
justify-content: center
|
||||||
font-family: Roboto
|
font-family: Roboto
|
||||||
background-image: url(../img/background.jpg)
|
background-image: url(../img/background.jpg)
|
||||||
background-size: cover
|
background-size: cover
|
||||||
background-attachment: fixed
|
|
||||||
|
|
||||||
.screen
|
.screen
|
||||||
width: 800px
|
width: 800px
|
||||||
@ -96,12 +91,6 @@ body
|
|||||||
border: 1px solid lightgray
|
border: 1px solid lightgray
|
||||||
border-radius: 0
|
border-radius: 0
|
||||||
text-align: left
|
text-align: left
|
||||||
counter-increment: answer
|
|
||||||
|
|
||||||
&::before
|
|
||||||
content: counter(answer)
|
|
||||||
color: lightgray
|
|
||||||
padding: .5em
|
|
||||||
|
|
||||||
.question-estimate
|
.question-estimate
|
||||||
display: grid
|
display: grid
|
||||||
@ -184,45 +173,4 @@ body
|
|||||||
75%
|
75%
|
||||||
transform: scale(1.2)
|
transform: scale(1.2)
|
||||||
100%
|
100%
|
||||||
transform: scale(1)
|
transform: scale(1)
|
||||||
|
|
||||||
@media screen and (max-width: 600px)
|
|
||||||
body
|
|
||||||
margin: 0
|
|
||||||
padding: 0
|
|
||||||
|
|
||||||
.screen
|
|
||||||
width: 100vw
|
|
||||||
height: 100vh
|
|
||||||
max-width: 100vw
|
|
||||||
min-height: 100vh
|
|
||||||
overflow-y: scroll
|
|
||||||
|
|
||||||
.headline
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
.btn-start
|
|
||||||
padding: 1rem 2rem
|
|
||||||
width: auto
|
|
||||||
|
|
||||||
.header
|
|
||||||
flex-direction: column
|
|
||||||
|
|
||||||
.question-text
|
|
||||||
font-size: 14pt
|
|
||||||
|
|
||||||
.question.estimate
|
|
||||||
max-width: 95vw
|
|
||||||
height: auto
|
|
||||||
box-sizing: border-box
|
|
||||||
|
|
||||||
.question-estimate
|
|
||||||
display: block
|
|
||||||
|
|
||||||
.input-estimate,
|
|
||||||
.btn-submit-estimate
|
|
||||||
width: 100%
|
|
||||||
padding: .5rem 1rem
|
|
||||||
|
|
||||||
.question-result
|
|
||||||
width: 60%
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<section v-if="mode === STARTSCREEN" class="start-screen screen">
|
<section v-if="mode === STARTSCREEN" class="start-screen screen">
|
||||||
<img class="logo" src="img/wiai-logo.png" alt="Logo der Fachschaft WIAI"/>
|
<img class="logo" src="img/wiai-logo.png" alt="Logo der Fachschaft WIAI"/>
|
||||||
<h1 class="headline">Willkommen zum WIAI-Weihnachtsquiz!</h1>
|
<h1 class="headline">Willkommen zum WIAI-Weihnachtsquiz!</h1>
|
||||||
<button v-on:click="enterGame" class="btn-start" v-focus v-on:keyup.enter="enterGame">Starten</button>
|
<button v-on:click="enterGame" class="btn-start" tabindex="0" v-on:keyup.enter="enterGame">Starten</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-if="mode === INGAME" class="ingame-screen screen">
|
<section v-if="mode === INGAME" class="ingame-screen screen">
|
||||||
@ -33,7 +33,6 @@
|
|||||||
<div class="question-answers">
|
<div class="question-answers">
|
||||||
<button
|
<button
|
||||||
v-for="answer in currentQuestion.answers"
|
v-for="answer in currentQuestion.answers"
|
||||||
v-bind:disabled="currentQuestionAnswered"
|
|
||||||
@click="evaluateChoice(answer.id)"
|
@click="evaluateChoice(answer.id)"
|
||||||
v-bind:class="{ correct: isCorrectAnswer(answer.id), answer: true, chosen: isUserChoice(answer.id) }">
|
v-bind:class="{ correct: isCorrectAnswer(answer.id), answer: true, chosen: isUserChoice(answer.id) }">
|
||||||
{{answer.text}}
|
{{answer.text}}
|
||||||
@ -44,8 +43,8 @@
|
|||||||
<article v-if="isEstimate" class="question estimate" v-bind:class="{revealed: currentQuestionAnswered}">
|
<article v-if="isEstimate" class="question estimate" v-bind:class="{revealed: currentQuestionAnswered}">
|
||||||
<h2 class="question-text">{{currentQuestion.text}}</h2>
|
<h2 class="question-text">{{currentQuestion.text}}</h2>
|
||||||
<div class="question-estimate">
|
<div class="question-estimate">
|
||||||
<input value="" id="input-estimate" type="number"
|
<input v-bind:value="currentEstimate" id="input-estimate" type="number"
|
||||||
min="0" class="input-estimate" @v-on:keyup.enter="evaluateEstimate" v-bind:disabled="currentQuestionAnswered" v-focus/>
|
min="0" class="input-estimate" @v-keyup.enter="evaluateEstimate" v-bind:disabled="currentQuestionAnswered"/>
|
||||||
<input type="submit" @click="evaluateEstimate" class="btn-submit-estimate" v-bind:disabled="currentQuestionAnswered" value="Auswerten"/>
|
<input type="submit" @click="evaluateEstimate" class="btn-submit-estimate" v-bind:disabled="currentQuestionAnswered" value="Auswerten"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
43
js/app.js
43
js/app.js
@ -1,9 +1,3 @@
|
|||||||
Vue.directive('focus', {
|
|
||||||
inserted: function (el) {
|
|
||||||
el.focus()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data: {
|
data: {
|
||||||
@ -33,36 +27,12 @@ const app = new Vue({
|
|||||||
beforeMount () {
|
beforeMount () {
|
||||||
this.questions = []
|
this.questions = []
|
||||||
const questionCandidates = questionCatalog.slice()
|
const questionCandidates = questionCatalog.slice()
|
||||||
for (let i = 0; i < Math.min(9, questionCatalog.length); i++) {
|
for (let i = 0; i < Math.min(20, questionCatalog.length); i++) {
|
||||||
const index = Math.floor(Math.random() * questionCandidates.length)
|
const index = Math.floor(Math.random() * questionCandidates.length)
|
||||||
this.questions.push(questionCandidates[index])
|
this.questions.push(questionCandidates[index])
|
||||||
questionCandidates.splice(index, 1)
|
questionCandidates.splice(index, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
|
||||||
window.addEventListener('keypress', e => {
|
|
||||||
switch (e.key) {
|
|
||||||
case '1':
|
|
||||||
this.isChoice && !this.currentQuestionAnswered && this.evaluateChoice(0)
|
|
||||||
return
|
|
||||||
case '2':
|
|
||||||
this.isChoice && !this.currentQuestionAnswered && this.evaluateChoice(1)
|
|
||||||
return
|
|
||||||
case '3':
|
|
||||||
this.isChoice && !this.currentQuestionAnswered && this.evaluateChoice(2)
|
|
||||||
return
|
|
||||||
case 'Enter':
|
|
||||||
if (this.currentQuestionAnswered) {
|
|
||||||
this.showNextQuestion()
|
|
||||||
} else if (this.isEstimate && document.querySelector('#input-estimate').value !== '') {
|
|
||||||
this.evaluateEstimate()
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
console.log(e.key)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
enterGame: function (event) {
|
enterGame: function (event) {
|
||||||
this.mode = this.INGAME
|
this.mode = this.INGAME
|
||||||
@ -82,7 +52,7 @@ const app = new Vue({
|
|||||||
this.currentQuestionAnswerID = answerID
|
this.currentQuestionAnswerID = answerID
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
evaluateEstimate: function () {
|
evaluateEstimate: function (value) {
|
||||||
if (!this.currentQuestionAnswered) {
|
if (!this.currentQuestionAnswered) {
|
||||||
const estimateInput = document.querySelector('#input-estimate')
|
const estimateInput = document.querySelector('#input-estimate')
|
||||||
|
|
||||||
@ -125,22 +95,17 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showNextQuestion: function () {
|
showNextQuestion: function (event) {
|
||||||
if (this.currentQuestionAnswered) {
|
if (this.currentQuestionAnswered) {
|
||||||
if (this.currentQuestion.type === 'estimate') {
|
|
||||||
document.querySelector('#input-estimate').value = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
this.currentQuestionAnswered = false
|
this.currentQuestionAnswered = false
|
||||||
this.currentQuestionAnswerID = null
|
this.currentQuestionAnswerID = null
|
||||||
|
|
||||||
if (this.currentQuestionID + 1 < this.questions.length) {
|
if (this.currentQuestionID + 1 < this.questions.length) {
|
||||||
this.currentQuestionID++
|
this.currentQuestionID++
|
||||||
this.$forceUpdate
|
|
||||||
} else {
|
} else {
|
||||||
this.mode = this.ENDSCREEN
|
this.mode = this.ENDSCREEN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
event.stopPropagation()
|
||||||
},
|
},
|
||||||
isCorrectAnswer: function (answerID) {
|
isCorrectAnswer: function (answerID) {
|
||||||
return this.currentQuestion.correctAnswerID === answerID
|
return this.currentQuestion.correctAnswerID === answerID
|
||||||
|
|||||||
@ -21,7 +21,7 @@ const questionCatalog = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'choice',
|
type: 'choice',
|
||||||
text: 'Wie hoch ist der Bamberger Dom?',
|
text: 'Wie hoch ist der Bamberger Kaiserdom?',
|
||||||
correctAnswerID: 1,
|
correctAnswerID: 1,
|
||||||
answers: [
|
answers: [
|
||||||
{ id: 2, text: 'ca. 62 Meter' },
|
{ id: 2, text: 'ca. 62 Meter' },
|
||||||
@ -39,71 +39,6 @@ const questionCatalog = [
|
|||||||
{ id: 2, text: 'Honorius III. (1216–1227)' }
|
{ id: 2, text: 'Honorius III. (1216–1227)' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'choice',
|
|
||||||
text: 'In welcher Straße befindet sich die Außenfassade des Hauses von Herrn Taschenbier in der Verfilmung von „Das Sams“ durch den holländischen Regisseur Ben Verbong?',
|
|
||||||
correctAnswerID: 2,
|
|
||||||
answers: [
|
|
||||||
{ id: 0, text: 'Kleberstraße 30' },
|
|
||||||
{ id: 1, text: 'Grüner Markt 13' },
|
|
||||||
{ id: 2, text: 'Judenstraße 16' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'choice',
|
|
||||||
text: 'In welchem Jahr wurde nach einem Großbrand im Bamberger Dom ein kompletter Neubau erforderlich?',
|
|
||||||
correctAnswerID: 1,
|
|
||||||
answers: [
|
|
||||||
{ id: 0, text: '1081 n. Chr.' },
|
|
||||||
{ id: 1, text: '1185 n. Chr.' },
|
|
||||||
{ id: 2, text: '1020 n. Chr.' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele für Studierende zugängliche Toiletten („Porzellanthröne”) gibt es an der Weberei?',
|
|
||||||
correctAnswer: 109
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele Professor:innen lehren und forschen aktuell an der Fakultät WIAI?',
|
|
||||||
correctAnswer: 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele Studierende sind im Wintersemester 2020/21 insgesamt aktuell an der Universität Bamberg eingeschrieben? (Stand: 29.10.2020)',
|
|
||||||
correctAnswer: 12475
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele Personen studieren aktuell an der Fakultät WIAI? (Stand: 29.10.2020)',
|
|
||||||
correctAnswer: 2105
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele neue Studierende haben dieses Wintersemester trotz Corona an der Fakultät WIAI ein Studium begonnen? (Stand: 29.10.2020)',
|
|
||||||
correctAnswer: 334
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie hoch über dem Meeresspiegel liegt die Altenburg und überblickt somit ungehindert ganz Bamberg?',
|
|
||||||
correctAnswer: 390
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Auf wie viele Standorte ist die Universität Bamberg verteilt? (einschließlich Prüfungsräume wie den “Volkspark”)',
|
|
||||||
correctAnswer: 57
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele eigene (Teil-)Bibliotheken hat die Universität Bamberg?',
|
|
||||||
correctAnswer: 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'estimate',
|
|
||||||
text: 'Wie viele Jahre vergingen zwischen der Grundsteinlegung des Bamberger Doms und seiner Weihe?',
|
|
||||||
correctAnswer: 8
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'estimate',
|
type: 'estimate',
|
||||||
text: 'Wie viele wissenschaftliche Mitarbeiter:innen und Postdocs treiben die Forschung und die Lehre an unserer Fakultät voran? (externe Doktorand:innen ausgeschlossen)',
|
text: 'Wie viele wissenschaftliche Mitarbeiter:innen und Postdocs treiben die Forschung und die Lehre an unserer Fakultät voran? (externe Doktorand:innen ausgeschlossen)',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user