Increasing Accessibility by Stress Testing During Stressful Times for iDKHOW

Building an Apple Music and Spotify Powered Stress Test

Image for post
Image for post

Questions

Image for post
Image for post
Original wireframe
const contentful = require('contentful')export default ({ app }, inject) => {
const config = {
space: process.env.CTF_SPACE_ID,
accessToken: process.env.CTF_CDA_ACCESS_TOKEN
}
inject('contentful', contentful.createClient(config))
}
async asyncData({ app }) {
const { items } = await app.$contentful.getEntries({
locale: '*'
})
return {
questions: items
}
}

Administering Test

let questions = []
let question = 0
let time = 0
let max = 5
let timer = setInterval(() => {
if (this.time < this.max - 1) {
this.time += 1
} else {
if (question + 1 < questions.length) {
question += 1
time = 0
} else {
clearInterval(timer)
}
}
}, 1000)

Calculating Result

Stress Evaluation Result
Stress Evaluation Result
import Vue from 'vue'export const state = () => ({
answers: []
})
export const getters = {
score(state) {
let sum = state.answers.reduce((a, v) => a + v)
return Math.round(sum / state.answers.length)
}
}
export const mutations = {
updateAnswer(state, payload) {
Vue.set(state.answers, payload.index, payload.value)
}
}

Reactions

transform: scale(1, -1);
filter: blur(2px);

Thanks

Image for post
Image for post

Written by

I develop websites for rock 'n' roll bands and get paid in sex and drugs. Previously Silva Artist Management, SoundCloud, and Songkick. Currently: Available

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store