Skip to content

Commit c71dac4

Browse files
author
Sami Kolari
committed
ui fixes + news banner
1 parent 3e58cdb commit c71dac4

File tree

8 files changed

+60
-90
lines changed

8 files changed

+60
-90
lines changed

public/img/RF-white.svg

+1-1
Loading

src/assets/css/transitions.css

-46
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,10 @@
77
transform: translateY(-10px) !important;
88
}
99

10-
.fade-down-enter-active, .fade-down-leave-active {
11-
transition: all 0.25s;
12-
transition-timing-function: cubic-bezier(0.14, 0.7, 0.56, 0.92);
13-
}
14-
.fade-down-enter-from, .fade-down-leave-to {
15-
opacity: 0;
16-
transform: translateY(10px) !important;
17-
}
18-
19-
.fade-slow-enter-active, .fade-slow-leave-active {
20-
transition: all 1.25s;
21-
transition-timing-function: cubic-bezier(0.14, 0.7, 0.56, 0.92);
22-
transition-delay: 0.3s;
23-
animation-fill-mode: forwards;
24-
}
25-
.fade-slow-enter-from, .fade-slow-leave-to {
26-
opacity: 0;
27-
transform: translateY(-10px) !important;
28-
}
29-
3010
.opacity-enter-active, .opacity-leave-active {
3111
transition: opacity 0.25s;
3212
transition-timing-function: cubic-bezier(0.14, 0.7, 0.56, 0.92);
3313
}
3414
.opacity-enter-from, .opacity-leave-to {
3515
opacity: 0;
3616
}
37-
.opacity-slide-enter-active, .opacity-slide-leave-active {
38-
transition: opacity 0.25s, margin-bottom 0.1s;
39-
transition-timing-function: cubic-bezier(0.14, 0.7, 0.56, 0.92);
40-
}
41-
.opacity-slide-enter-from, .opacity-slide-leave-to {
42-
opacity: 0;
43-
margin-bottom: -4.35rem;
44-
}
45-
46-
.list-enter-active, .list-leave-active {
47-
transition: opacity 0.25s, transform 0.25s;
48-
transition-timing-function: cubic-bezier(0.14, 0.7, 0.56, 0.92);
49-
}
50-
51-
.list-enter-from, .list-leave-to {
52-
opacity: 0;
53-
transform: translateX(10px) !important;
54-
}
55-
56-
.list-move {
57-
transition: transform 0.2s cubic-bezier(0.14, 0.7, 0.56, 0.92);
58-
}
59-
60-
.list-leave-active {
61-
position: absolute;
62-
}

src/components/Navbar.vue

+29-25
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
v-for="link in $tm('navbar.items')"
77
:key="link"
88
:href="`#${link}`"
9-
class="pl-small pr-small color-white font-title type-uppercase type-small border-right-white">
9+
class="pl-small pr-small color-white font-title type-uppercase type-no-underline type-small border-right-white">
1010
{{ link }}
1111
</a>
1212
<div class="relative">
@@ -16,33 +16,37 @@
1616
@click="dropdownOpen = !dropdownOpen">
1717
{{ $t('navbar.dropdownName') }}
1818
</button>
19-
<div
20-
v-if="dropdownOpen"
21-
class="dropdown-container bg-black color-white p-small type-right">
19+
<transition name="fade">
2220
<div
23-
v-for="item in $tm('navbar.dropdown')"
24-
:key="item.name">
21+
v-if="dropdownOpen"
22+
class="dropdown-container bg-black color-white p-small type-right">
23+
<div
24+
v-for="item in $tm('navbar.dropdown')"
25+
:key="item.name">
26+
<a
27+
:href="item.url">
28+
{{ item.name }}
29+
</a>
30+
<p class="type-small">
31+
{{ item.description }}
32+
</p>
33+
</div>
2534
<a
35+
v-for="item in dropdown"
36+
:key="item.name"
2637
:href="item.url">
2738
{{ item.name }}
2839
</a>
29-
<p class="type-small">
30-
{{ item.description }}
31-
</p>
3240
</div>
33-
<a
34-
v-for="item in dropdown"
35-
:key="item.name"
36-
:href="item.url">
37-
{{ item.name }}
38-
</a>
39-
</div>
40-
</div>
41-
<div
42-
v-if="navSticky"
43-
class="tiny-logo-container">
44-
<img :src="`${publicPath}img/RF-white.svg`" />
41+
</transition>
4542
</div>
43+
<transition name="opacity">
44+
<div
45+
v-if="navSticky"
46+
class="tiny-logo-container">
47+
<img :src="`${publicPath}img/RF-white.svg`" />
48+
</div>
49+
</transition>
4650
</div>
4751
</template>
4852

@@ -70,12 +74,12 @@ export default {
7074
}
7175
.tiny-logo-container {
7276
position: absolute;
73-
top: 0.4rem;
74-
left: 0.4rem;
77+
top: 0;
78+
left: 0;
7579
}
7680
.tiny-logo-container > img {
77-
width: 1.5rem;
78-
height: 1.5rem;
81+
width: 3rem;
82+
height: 3rem;
7983
}
8084
.dropdown-container {
8185
position: absolute;

src/components/NewsBanner.vue

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<div class="bg-black">
3+
<div
4+
class="container color-white type-center"
5+
v-html="$t('newsBanner')" />
6+
</div>
7+
</template>

src/components/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import NewsBanner from './NewsBanner.vue'
12
import Banner from './Banner.vue'
23
import Navbar from './Navbar.vue'
34
import PageSection from './PageSection.vue'
45
import CompanyBlock from './CompanyBlock.vue'
56
import CompanyCarousel from './CompanyCarousel.vue'
67

78
export {
9+
NewsBanner,
810
Banner,
911
Navbar,
1012
PageSection,

src/registerServiceWorker.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ import { register } from 'register-service-worker'
44

55
if (process.env.NODE_ENV === 'production') {
66
register(`${process.env.BASE_URL}service-worker.js`, {
7-
ready () {
7+
ready() {
88
console.log(
99
'App is being served from cache by a service worker.\n' +
1010
'For more details, visit https://goo.gl/AFskqB'
1111
)
1212
},
13-
registered () {
13+
registered() {
1414
console.log('Service worker has been registered.')
1515
},
16-
cached () {
16+
cached() {
1717
console.log('Content has been cached for offline use.')
1818
},
19-
updatefound () {
19+
updatefound() {
2020
console.log('New content is downloading.')
2121
},
22-
updated () {
22+
updated() {
2323
console.log('New content is available; please refresh.')
2424
},
25-
offline () {
25+
offline() {
2626
console.log('No internet connection found. App is running in offline mode.')
2727
},
28-
error (error) {
28+
error(error) {
2929
console.error('Error during service worker registration:', error)
3030
}
3131
})

src/text-content/en.js

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default () => ({
2+
newsBanner: 'RF 4.0 is out! <a href="www.google.com">Click here</a> for release notes',
23
navbar: {
34
items: [
45
'Introduction',
@@ -8,16 +9,6 @@ export default () => ({
89
],
910
dropdownName: 'Links',
1011
dropdown: [
11-
{
12-
name: 'Foundation',
13-
url: 'https://robotframework.org/foundation/',
14-
description: 'Support the development'
15-
},
16-
{
17-
name: 'Robocon',
18-
url: 'https://robocon.io/',
19-
description: 'Annual conference'
20-
},
2112
{
2213
name: 'Github',
2314
url: 'https://github.com/robotframework/robotframework',
@@ -28,6 +19,16 @@ export default () => ({
2819
url: 'http://forum.robotframework.org/',
2920
description: 'Discuss Robot Framework'
3021
},
22+
{
23+
name: 'Foundation',
24+
url: 'https://robotframework.org/foundation/',
25+
description: 'Support the development'
26+
},
27+
{
28+
name: 'Robocon',
29+
url: 'https://robocon.io/',
30+
description: 'Annual conference'
31+
},
3132
{
3233
name: 'Shop',
3334
url: 'https://reddyshop.co/robotframework/',

src/views/Home.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<template>
2+
<news-banner v-if="$te('newsBanner')" />
23
<banner />
34
<navbar class="mb-medium" />
45
<div class="container">
@@ -20,11 +21,12 @@
2021
</template>
2122

2223
<script>
23-
import { Banner, Navbar, PageSection, CompanyCarousel } from 'Components'
24+
import { NewsBanner, Banner, Navbar, PageSection, CompanyCarousel } from 'Components'
2425
2526
export default {
2627
name: 'App',
2728
components: {
29+
NewsBanner,
2830
Banner,
2931
Navbar,
3032
PageSection,

0 commit comments

Comments
 (0)