Skip to content

Commit e5d44c0

Browse files
author
Sami Kolari
committed
package update, dark mode, mobile fixes, 404-page
1 parent eb28641 commit e5d44c0

18 files changed

+1655
-434
lines changed

package-lock.json

Lines changed: 1499 additions & 398 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "vue-cli-service serve",
76
"build": "vue-cli-service build",
8-
"lint": "vue-cli-service lint"
7+
"lint": "vue-cli-service lint",
8+
"dev": "vue-cli-service serve"
99
},
1010
"dependencies": {
1111
"@highlightjs/vue-plugin": "2.1.0",
@@ -18,12 +18,12 @@
1818
"vuex": "^4.0.0-0"
1919
},
2020
"devDependencies": {
21-
"@vue/cli-plugin-babel": "~4.5.0",
22-
"@vue/cli-plugin-eslint": "~4.5.0",
23-
"@vue/cli-plugin-pwa": "~4.5.0",
24-
"@vue/cli-plugin-router": "~4.5.0",
25-
"@vue/cli-plugin-vuex": "~4.5.0",
26-
"@vue/cli-service": "~4.5.0",
21+
"@vue/cli-plugin-babel": "4.5.14",
22+
"@vue/cli-plugin-eslint": "4.5.14",
23+
"@vue/cli-plugin-pwa": "4.5.14",
24+
"@vue/cli-plugin-router": "4.5.14",
25+
"@vue/cli-plugin-vuex": "4.5.14",
26+
"@vue/cli-service": "4.5.14",
2727
"@vue/compiler-sfc": "^3.0.0",
2828
"@vue/eslint-config-standard": "^5.1.2",
2929
"babel-eslint": "^10.1.0",

src/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
export default {
88
created() {
99
document.documentElement.lang = this.$i18n.locale
10-
this.$store.commit('SET_IS_MOBILE', window.innerWidth < 769)
11-
window.addEventListener('resize', () => this.$store.commit('SET_IS_MOBILE', window.innerWidth < 769))
10+
this.$store.commit('SET_IS_MOBILE', window.innerWidth < 700)
11+
this.$store.commit('SET_IS_DESKTOP', window.innerWidth > 1399)
12+
window.addEventListener('resize', () => {
13+
this.$store.commit('SET_IS_MOBILE', window.innerWidth < 700)
14+
this.$store.commit('SET_IS_DESKTOP', window.innerWidth > 1399)
15+
})
1216
window.addEventListener('click', () => document.body.classList.remove('accessible'))
1317
window.addEventListener('keydown', ({ key }) => {
1418
if (key === 'Tab') document.body.classList.add('accessible')

src/assets/css/colors.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,15 @@
7575
.hover-bright:hover {
7676
filter: brightness(1.1);
7777
}
78+
79+
@media (prefers-color-scheme: dark) {
80+
.bg-white-darkmode {
81+
background-color: var(--color-white);
82+
}
83+
.bg-grey-dark-darkmode {
84+
background-color: var(--color-grey-dark);
85+
}
86+
.color-white-darkmode {
87+
color: var(--color-white);
88+
}
89+
}

src/assets/css/index.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ select {
5151
body:not(.accessible) * {
5252
outline: none;
5353
}
54+
55+
@media (prefers-color-scheme: dark) {
56+
html, body {
57+
background-color: var(--color-background-darkmode);
58+
}
59+
60+
#app {
61+
color: var(--color-grey-light);
62+
}
63+
}

src/assets/css/text.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ h1 {
4545
line-height: var(--line-height-h1);
4646
}
4747

48+
@media (prefers-color-scheme: dark) {
49+
h1 {
50+
color: var(--color-black);
51+
}
52+
}
53+
4854
h2 {
4955
font-size: var(--type-xlarge);
5056
color: var(--color-theme);

src/assets/css/variables.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
--color-theme: #00c0b5; /* for theme color */
33
--color-theme-dark: #09504d; /* for theme color dark */
44
--color-background: #f0f0f0;
5+
--color-background-darkmode: #222222;
56

67
--color-white: #f5f5f5;
78
--color-grey-light: #e7e7e7;
@@ -11,7 +12,7 @@
1112
--color-link: #00c0b5;
1213
--color-link-visited: #578a88;
1314

14-
--bp-md: 768px; /* tablet breakpoint */
15+
--bp-md: 700px; /* tablet breakpoint */
1516
--bp-lg: 1400px; /* desktop breakpoint */
1617

1718
--layout-container-max-width: 1400px;

src/components/Banner.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<template>
22
<div class="row bg-theme center p-medium">
3-
<!-- <div class="logo">
4-
<img :src="`${publicPath}img/RF.svg`" />
5-
</div> -->
63
<div>
74
<h1 class="title">
85
ROBOT<br>
@@ -15,10 +12,7 @@
1512

1613
<script>
1714
export default {
18-
name: 'Banner',
19-
data: () => ({
20-
publicPath: process.env.BASE_URL
21-
})
15+
name: 'Banner'
2216
}
2317
</script>
2418

src/components/CommunityItems.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="bg-white row card"
3+
class="bg-white bg-grey-dark-darkmode row card"
44
:class="$store.state.isMobile ? 'pt-medium pb-medium' : 'p-large'">
55
<div class="row col-md-5 pr-medium">
66
<div
@@ -43,7 +43,7 @@
4343
<div
4444
class="col-md-2 pl-medium"
4545
:style="$store.state.isMobile ? 'padding-left: 4.7rem; margin-top: 1rem;' : ''">
46-
<h3 class="color-grey-dark mb-2xsmall">
46+
<h3 class="color-grey-dark color-white-darkmode mb-2xsmall">
4747
Other
4848
</h3>
4949
<div

src/components/CompanyCarousel.vue

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<div v-if="activeCompany">
3-
<div class="row carousel-container pt-small pb-small bg-white card">
3+
<div class="row carousel-container pt-small pb-small bg-white bg-grey-dark-darkmode card">
44
<button
55
class="col-sm-2 col-md-1 flex center middle"
66
aria-label="previous testimonial"
77
@click="setActiveCompany(-1)">
8-
<chevron-icon :size="48" />
8+
<chevron-icon :size="48" :color="isDarkMode ? 'white' : 'black'" />
99
</button>
1010
<transition :name="direction === 1 ? 'fade-left' : 'fade-right'" mode="out-in">
1111
<div
@@ -28,10 +28,35 @@
2828
class="col-sm-2 col-md-1 type-right flex center middle"
2929
aria-label="next testimonial"
3030
@click="setActiveCompany(1)">
31-
<chevron-icon direction="right" :size="48" />
31+
<chevron-icon
32+
direction="right"
33+
:color="isDarkMode ? 'white' : 'black'"
34+
:size="48" />
3235
</button>
3336
</div>
34-
<div class="row">
37+
<div v-if="$store.state.isMobile">
38+
<div class="row between">
39+
<button
40+
v-for="(company, i) in companiesShuffled.slice(0, 5)"
41+
:key="company.name"
42+
:aria-label="`${company.name} testimonial`"
43+
:style="`background-image: url(${publicPath}img/carousel-company-icons/${company.imgName})`"
44+
class="img-container-small bg-white card mt-small"
45+
:class="activeCompanyIndex === i ? 'logo-active border-black border-thin' : ''"
46+
@click="activeCompanyIndex = i" />
47+
</div>
48+
<div class="row between">
49+
<button
50+
v-for="(company, i) in companiesShuffled.slice(5, 10)"
51+
:key="company.name"
52+
:aria-label="`${company.name} testimonial`"
53+
:style="`background-image: url(${publicPath}img/carousel-company-icons/${company.imgName})`"
54+
class="img-container-small bg-white card mt-small"
55+
:class="activeCompanyIndex === i + 5 ? 'logo-active border-black border-thin' : ''"
56+
@click="activeCompanyIndex = i + 5" />
57+
</div>
58+
</div>
59+
<div v-else class="row">
3560
<button
3661
v-for="(company, i) in companiesShuffled"
3762
:key="company.name"
@@ -62,7 +87,8 @@ export default {
6287
publicPath: process.env.BASE_URL,
6388
direction: 0,
6489
companiesShuffled: [],
65-
eventSent: false
90+
eventSent: false,
91+
isDarkMode: false
6692
}),
6793
computed: {
6894
activeCompany() {
@@ -99,6 +125,7 @@ export default {
99125
[companies[i], companies[j]] = [companies[j], companies[i]]
100126
}
101127
this.companiesShuffled = companies
128+
this.isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
102129
}
103130
}
104131
</script>
@@ -126,7 +153,7 @@ export default {
126153
.description {
127154
padding-left: var(--size-medium);
128155
}
129-
@media screen and (max-width: 768px) {
156+
@media screen and (max-width: 699px) {
130157
.carousel-container {
131158
margin-left: -1rem;
132159
margin-right: -1rem;
@@ -136,5 +163,17 @@ export default {
136163
height: 10rem;
137164
overflow-y: scroll;
138165
}
166+
.img-container-small {
167+
width: calc((100vw - 2rem) / 7);
168+
height: calc((100vw - 2rem) / 7);
169+
}
170+
}
171+
@media (prefers-color-scheme: dark) {
172+
.img-container {
173+
background-color: var(--color-white);
174+
background-origin: content-box;
175+
padding: 0.5rem;
176+
border-radius: var(--border-radius-rounded);
177+
}
139178
}
140179
</style>

src/components/NewsBanner.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
22
<div
3-
class="container color-black type-center"
3+
class="container type-center pl-small pr-small"
44
v-html="$t('newsBanner')" />
55
</template>

src/components/PageSectionTwitter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<slot />
1717
</div>
1818
<div
19-
v-if="!$store.state.isMobile"
19+
v-if="$store.state.isDesktop"
2020
class="twitter col-sm-12 col-lg-3 p-none mt-small card"
2121
:style="`height: ${twitterHeight}px;`">
2222
<accessibility-link label="Skip twitter timeline" go-to="getting-started" />

src/content/english.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ export default () => ({
9696
description: 'Finnair is using Robot Framework to support Finnair digital platform development.',
9797
imgName: 'Finnair.svg'
9898
},
99+
{
100+
title: 'Finnish Tax Administration',
101+
description: `Finnish Tax Administration is using Robot Framework in multiple projects.
102+
Robot Framework is one of the core tools in their development to make Quality Assurance and Automation.`,
103+
imgName: 'Vero.svg'
104+
},
99105
{
100106
name: 'Juniper Networks',
101107
description: 'Juniper Networks has built an extensive automation framework on top of Robot Framework for end-to-end qualification of Juniper products. It is used extensively in multiple groups including engineering and support.',

src/router/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Home from '../views/Home.vue'
33
import PrivacyPolicy from '../views/PrivacyPolicy.vue'
44
import CoC from '../views/CoC.vue'
55
import Users from '../views/Users.vue'
6+
import NotFound from '../views/NotFound.vue'
67

78
const routes = [
89
{
@@ -24,6 +25,11 @@ const routes = [
2425
path: '/users',
2526
name: 'Users',
2627
component: Users
28+
},
29+
{
30+
path: '/:pathMatch(.*)*',
31+
name: 'NotFound',
32+
component: NotFound
2733
}
2834
]
2935

src/store/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import { createStore } from 'vuex'
22

33
export default createStore({
44
state: {
5-
isMobile: null
5+
isMobile: null,
6+
isDesktop: null
67
},
78
mutations: {
89
SET_IS_MOBILE(state, truthiness) {
910
state.isMobile = truthiness
11+
},
12+
SET_IS_DESKTOP(state, truthiness) {
13+
state.isDesktop = truthiness
1014
}
1115
},
1216
actions: {

src/views/Home.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
:title="$t('gettingStarted.title')"
2525
:body="$t('gettingStarted.body')">
2626
<tab-box
27-
class="col-sm-12 col-md-9 col-md-offset-3"
27+
class="col-sm-12 col-lg-9 col-lg-offset-3"
2828
:tabs="$tm('gettingStarted.tabs')">
2929
<!-- list of learning resouces on 3rd tab -->
3030
<template v-slot:tab-3>
@@ -42,7 +42,7 @@
4242
title-id="community"
4343
:title="$t('community.title')"
4444
:body="$t('community.body')">
45-
<div class="col-sm-12 col-md-9 col-md-offset-3 row">
45+
<div class="col-sm-12 col-lg-9 col-lg-offset-3 row">
4646
<community-items />
4747
<button class="theme mt-medium" :class="$store.state.isMobile ? 'ml-xsmall' : ''">
4848
<router-link :to="{ name: 'CoC' }" class="type-no-underline">
@@ -56,7 +56,7 @@
5656
title-id="resources"
5757
:title="$t('resources.title')"
5858
:body="$t('resources.body')">
59-
<resource-box class="col-sm-12 col-md-9 col-md-offset-3" />
59+
<resource-box class="col-sm-12 col-lg-9 col-lg-offset-3" />
6060
</page-section>
6161
</div>
6262
<page-footer />

src/views/NotFound.vue

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<template>
2+
<div class="container">
3+
<div class="row center type-center" style="margin-top: calc(100vh / 2 - 7rem)">
4+
<div class="col-sm-12">
5+
<h3>404 - Not found</h3>
6+
</div>
7+
<img :src="`${publicPath}img/RF-white.svg`" />
8+
<div class="col-sm-12 mt-medium">
9+
<router-link :to="{ name: 'Home' }">
10+
Back to home
11+
</router-link>
12+
</div>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
name: 'NotFound',
20+
data: () => ({
21+
publicPath: process.env.BASE_URL
22+
})
23+
}
24+
</script>

src/views/Users.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626
:key="user.name">
2727
<transition appear name="opacity-slow">
2828
<div
29-
class="card p-small mb-large"
30-
style="background-color: #fff;"
29+
class="card p-small mb-large bg-white user-card"
3130
:style="`transition-delay: ${(j / 10 + i / columns.length / 10) * columns.length + 0.1}s;`">
3231
<div
33-
class="img-container"
32+
class="img-container mb-small"
3433
:style="`background-image: url(${publicPath}img/users/${user.imgName})`" />
3534
<h3>
3635
<a :href="user.href" target="_blank">
@@ -108,10 +107,25 @@ export default {
108107
<style scoped>
109108
.img-container {
110109
width: 60%;
111-
margin: 0 auto;
110+
margin-left: auto;
111+
margin-right: auto;
112112
height: 5rem;
113113
background-repeat: no-repeat;
114114
background-size: contain;
115115
background-position: center;
116116
}
117+
.user-card {
118+
background-color: #fff;
119+
}
120+
@media (prefers-color-scheme: dark) {
121+
.user-card {
122+
background-color: var(--color-grey-dark);
123+
}
124+
.img-container {
125+
background-color: #fff;
126+
background-origin: content-box;
127+
padding: 0.5rem;
128+
border-radius: var(--border-radius-rounded);
129+
}
130+
}
117131
</style>

0 commit comments

Comments
 (0)