covidassist/src/App.vue
Tim Ktitarev ce90e16c22 Changed font on result page
Changed "probability" to "risk"
2020-03-22 22:52:12 +01:00

150 lines
3.3 KiB
Vue

<template>
<div id="app">
<transition>
<router-view/>
</transition>
</div>
</template>
<script>
export default {
created() {
if (this.$workbox) {
this.$workbox.addEventListener("waiting", () => {
this.showUpgradeUI = true;
});
}
},
methods: {
async accept() {
this.showUpgradeUI = false
await this.$workbox.messageSW({ type: "SKIP_WAITING" });
}
},
mounted() {
this.$store.commit("init")
if (!this.$store.state.surveyCompletedOnce) {
this.$router.push("/")
}
},
}
</script>
<style>
@font-face {
font-family: 'Zilla Slab';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Zilla Slab'), local('ZillaSlab-Regular'), url(./assets/fonts/zilla_slab.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(./assets/fonts/open_sans.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Comfortaa';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Comfortaa'), local('Comfortaa-Regular'), url(./assets/fonts/comfortaa.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* disables the rectangle feedback box when tapping something on a mobile device */
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-moz-tap-highlight-color: rgba(0, 0, 0, 0);
}
h1 {
font-size: 1.2em;
line-height: 1em;
color: #23286B;
}
img {
width: 100%;
height: auto;
}
a {
color: #2779E1;
}
a:visited {
color: #2779E1;
}
p {
color: #333333;
}
button {
background: #23286B;
color: #FFFFFF;
box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.25);
border-radius: 15px;
border: none;
padding: 0.4em 1.4em;
font-family: Open Sans,sans-serif;
font-style: normal;
font-weight: normal;
font-size: 0.9em;
cursor: pointer;
}
button.alert {
background-color: #E94A47;
}
/* slightly smaller font for very small devices */
@media screen and (max-width: 330px) {
body {
font-size: 22px;
}
button {
font-size: 0.8em;
}
}
/* regular font for devices wider than 330px */
@media screen and (min-width: 330px) {
body {
font-size: 24px;
}
button {
font-size: 0.9em;
}
}
/* div element used to center a button or multiple buttons */
.button-wrapper {
text-align: center;
margin: auto;
}
body {
background-color: #FCF7F8;
color: #0B2545;
font-family: Zilla Slab;
font-style: normal;
font-weight: normal;
line-height: 1.35em;
}
</style>