Skip to content

Commit 00584f6

Browse files
feat(terms): adds terms and condition and feedback link
1 parent 4aa0f11 commit 00584f6

File tree

9 files changed

+77
-0
lines changed

9 files changed

+77
-0
lines changed

src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { computed, onMounted, ref } from 'vue';
33
import { RouterView } from 'vue-router';
44
import AppHeader from '@/components/AppHeader.vue';
55
import NavComponent from '@/components/NavComponent.vue';
6+
import FooterComponent from '@/components/FooterComponent.vue';
67
import AppLayout from '@/components/AppLayout.vue';
78
import SmallScreenPage from '@/views/SmallScreenPage.vue';
89
import ModalComponent from '@/components/WelcomeModal.vue';
@@ -40,6 +41,9 @@ onMounted(async () => {
4041
<template #main>
4142
<RouterView />
4243
</template>
44+
<template #footer>
45+
<FooterComponent />
46+
</template>
4347
</AppLayout>
4448
</div>
4549
</template>

src/assets/base.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
--neutral-15: #e9e9e9;
55
--neutral-20: #cccccc;
66
--neutral-50: #aaa;
7+
--neutral-70: #5b5c5f;
8+
79
--neutral-80: #464749;
810
--neutral-90: #222325;
911
--neutral-100: #000000;

src/components/AppLayout.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const manageNavBarAnimations = () => {
3333
<slot name="sidebar"> </slot>
3434
</div>
3535
<div class="main" ref="content" @scroll="manageNavBarAnimations"><slot name="main"></slot></div>
36+
<div class="wl-footer">
37+
<slot name="footer"></slot>
38+
</div>
3639
</div>
3740
</template>
3841

@@ -76,4 +79,9 @@ const manageNavBarAnimations = () => {
7679
grid-template-rows: auto 1fr;
7780
}
7881
}
82+
83+
.wl-footer {
84+
background-color: var(--neutral-10);
85+
padding: 0.5rem;
86+
}
7987
</style>

src/components/FooterComponent.vue

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<script setup lang="ts">
2+
import { WL_FEEDBACK_FORM_URL } from '@/utils/constants';
3+
</script>
4+
5+
<template>
6+
<div class="footer-wrapper">
7+
<router-link class="terms" to="/terms">
8+
<span class="item-name">{{ $t('terms') }}</span>
9+
</router-link>
10+
11+
<a target="_blank" :href="WL_FEEDBACK_FORM_URL">{{ $t('giveFeedback') }}</a>
12+
</div>
13+
</template>
14+
15+
<style scoped>
16+
.footer-wrapper {
17+
padding: 0 5rem;
18+
display: flex;
19+
justify-content: center;
20+
color: var(--neutral-70);
21+
font-size: 0.9rem;
22+
}
23+
24+
a {
25+
all: unset;
26+
cursor: pointer;
27+
}
28+
29+
a.terms {
30+
margin-right: 1rem;
31+
padding-right: 1rem;
32+
border-right: 1px solid var(--neutral-70);
33+
}
34+
35+
a:hover {
36+
text-decoration: underline;
37+
}
38+
</style>

src/localisation/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ export const en = {
294294
fetching: 'Searching across {docs_nb} documents...',
295295
formulatingAnswer: 'Preparing your answer...'
296296
},
297+
terms: 'Terms and Conditions',
298+
giveFeedback: 'Give Feedback',
297299
subjects: {
298300
Anthropology: 'Anthropology',
299301
Arts: 'Arts',

src/localisation/fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ export const fr = {
298298
fetching: 'Recherche parmi {docs_nb} documents...',
299299
formulatingAnswer: 'Préparation de votre réponse...'
300300
},
301+
terms: "Conditions d'utilisation",
302+
giveFeedback: 'Donner un retour',
301303
subjects: {
302304
Anthropology: 'Anthropologie',
303305
Arts: 'Arts',

src/router/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ const router = createRouter({
3535
name: 'tutor',
3636
component: Tutor
3737
},
38+
{
39+
path: '/terms',
40+
name: 'terms',
41+
component: () => import('@/views/TermsPage.vue')
42+
},
3843
{
3944
...(isDevEnvironment && {
4045
path: '/microlearning',

src/utils/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const subjects = [
99
];
1010

1111
export const RELEVANCE_FACTOR = 0.75;
12+
export const WL_FEEDBACK_FORM_URL =
13+
'https://docs.google.com/forms/d/e/1FAIpQLSfL_zKY3aHMMKO-Hunm0LYo4Yp_fjbL87Ryi85qT_pbSqUX8g/viewform';
1214

1315
export const HELP_USER = {
1416
'q-and-a': [

src/views/TermsPage.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<div class="terms-page">
3+
<h1>{{ $t('terms.title') }}</h1>
4+
<p>{{ $t('terms.description') }}</p>
5+
</div>
6+
</template>
7+
8+
<style scoped>
9+
.terms-page {
10+
max-width: 70%;
11+
margin: 2rem auto;
12+
padding: 0 1rem;
13+
}
14+
</style>

0 commit comments

Comments
 (0)