-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathPageFooter.vue
157 lines (154 loc) · 4.54 KB
/
PageFooter.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<template>
<div class="row bg-black color-white p-small pt-large pb-large">
<div class="container" style="line-height: 2;">
<div class="row">
<div class="col-sm-6 col-md-3">
<h3 class="mb-small">
<a href="https://robotframework.org/foundation/">Foundation</a>
</h3>
<div>
Robot Framework ry
</div>
<div>
Kampinkuja 2
</div>
<div>
00100 Helsinki
</div>
<div>
Finland
</div>
<a href="mailto:[email protected]">
{{ $t('footer.contact') }}
</a>
</div>
<div
class="col-sm-6 col-md-3"
:class="$store.state.isMobile ? 'type-right' : ''">
<h3 class="mb-small">
{{ $t('footer.community') }}
</h3>
<div>
<a href="https://github.com/robotframework/robotframework">
GitHub
</a>
</div>
<div>
<a href="https://forum.robotframework.org/">
Forum
</a>
</div>
<div>
<a href="https://www.facebook.com/robotframeworkofficial">
Facebook
</a>
</div>
<div>
<a href="https://twitter.com/robotframework">
Twitter
</a>
</div>
<div>
<a href="https://www.linkedin.com/groups/3710899/">
LinkedIn
</a>
</div>
</div>
<div v-if="$store.state.isMobile" class="col-sm-12 mb-large" />
<div class="col-sm-6 col-md-3">
<h3 class="mb-small">
{{ $t('footer.instructions.title') }}
</h3>
<div
v-for="item in $tm('footer.instructions.items')"
:key="item.title">
<a :href="item.href" target="_blank">
{{ item.title }}
</a>
</div>
</div>
<div class="col-sm-6 col-md-3 flex flex-col between">
<div class="relative">
<button
class="flex middle border-thin p-2xsmall pl-xsmall pr-xsmall"
:class="langDropdownOpen ? 'border-theme' : 'border-white'"
@click="langDropdownOpen = !langDropdownOpen">
<globe-icon
:color="langDropdownOpen ? 'theme' : 'white'"
style="transform: translateY(-1px);" />
<div
class="relative ml-2xsmall"
:class="langDropdownOpen ? 'color-theme' : 'color-white'">
{{ langNames.find(({ lang }) => lang === $i18n.locale).name }}
</div>
</button>
<transition name="fade-down">
<div
v-if="langDropdownOpen"
class="absolute bg-black p-small border-white border-thin"
style="bottom: 3rem;">
<div
v-for="({ lang, name }, i) in langNames"
:key="lang">
<button
class="type-uppercase"
:class="[lang === $i18n.locale ? 'color-theme' : 'color-white', {['mb-2xsmall'] : i !== langNames.length - 1}]"
@click="setLang(lang)">
{{ name }}
</button>
</div>
</div>
</transition>
</div>
<div :class="$store.state.isMobile ? 'type-right' : ''">
<div>
<router-link :to="{ name: 'PrivacyPolicy' }">
{{ $t('footer.privacyPolicy') }}
</router-link>
</div>
<div>
<router-link :to="{ name: 'CoC' }">
{{ $t('footer.coc') }}
</router-link>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import GlobeIcon from './icons/GlobeIcon.vue'
export default {
name: 'PageFooter',
components: {
GlobeIcon
},
data: () => ({
langDropdownOpen: false
}),
computed: {
langNames() {
return Object.keys(this.$i18n.messages)
.map((lang) => ({ lang, name: this.$i18n.messages[lang].langName }))
.filter(({ name }) => name !== 'translation')
}
},
methods: {
setLang(lang) {
this.$i18n.locale = lang
window.localStorage.setItem('lang', lang)
}
}
}
</script>
<style scoped>
@media screen and (max-width: 768px) {
div {
font-size: var(--type-small);
}
h3 {
font-size: var(--type-body);
}
}
</style>