Skip to content

Commit fb1c42d

Browse files
committedNov 3, 2023
Add quotes
1 parent 703a5c8 commit fb1c42d

File tree

4 files changed

+131
-3
lines changed

4 files changed

+131
-3
lines changed
 

‎data/quotes.ts

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
export type Quote = {
2+
text: {
3+
en: string;
4+
fr: string;
5+
};
6+
author: string;
7+
};
8+
9+
export const quotes: Quote[] = [
10+
{
11+
text: {
12+
fr: "Le moment où tu assumes la responsabilité de tout dans ta vie est le moment où tu acquiers le pouvoir de changer n'importe quoi dans ta vie.",
13+
en: "The moment you take responsibility for everything in your life is the moment you can change anything in your life.",
14+
},
15+
author: "Hal Elrod",
16+
},
17+
{
18+
text: {
19+
en: "If you don’t ask, the answer will always be no.",
20+
fr: "Si vous ne demandez pas, la réponse sera toujours non.",
21+
},
22+
author: "Unknown",
23+
},
24+
{
25+
text: {
26+
fr: "Tu ne peux pas changer les gens autour de toi mais tu peux changer les gens autour de toi.",
27+
en: "You can't change the people around you but you can change the people around you.",
28+
},
29+
author: "Unknown",
30+
},
31+
{
32+
text: {
33+
en: "If the path before you is clear, you're probably on someone else's.",
34+
fr: "Si le chemin devant vous est clair, vous êtes probablement sur celui de quelqu'un d'autre.",
35+
},
36+
author: "Joseph Campbell",
37+
},
38+
{
39+
text: {
40+
en: "The day you plant the seed is not the day you eat the fruit.",
41+
fr: "Le jour où vous plantez la graine n'est pas le jour où vous mangez le fruit.",
42+
},
43+
author: "Fabienne Fredrickson",
44+
},
45+
{
46+
text: {
47+
en: "Perfection is a road, not a destination.",
48+
fr: "La perfection est un chemin, pas une destination.",
49+
},
50+
author: "Unknown",
51+
},
52+
{
53+
text: {
54+
en: "Because she competes with no one, no one can compete with her.",
55+
fr: "Parce qu'elle ne se bat avec personne, personne ne peut se battre contre elle.",
56+
},
57+
author: "Lao Tzu, Tao Te Ching",
58+
},
59+
{
60+
text: {
61+
en: "An expert is someone who has made every possible mistake in a very narrow field.",
62+
fr: "Un expert est quelqu'un qui a commis toutes les erreurs possibles dans un domaine très spécifique.",
63+
},
64+
author: "Niels Bohr",
65+
},
66+
{
67+
text: {
68+
fr: "L’efficience c’est faire comme il faut, l’efficacité c’est faire ce qu’il faut.",
69+
en: "Efficiency is doing things right, effectiveness is doing the right things.",
70+
},
71+
author: "Peter Drucker",
72+
},
73+
{
74+
text: {
75+
en: "Pain of discipline or pain of regret, choose yours.",
76+
fr: "La douleur de la discipline ou la douleur du regret, choisissez la vôtre.",
77+
},
78+
author: "Unknown",
79+
},
80+
{
81+
text: {
82+
en: "Have no fear of perfection, you'll never reach it.",
83+
fr: "N'ayez pas peur de la perfection, vous ne l'atteindrez jamais.",
84+
},
85+
author: "Salvador Dali",
86+
},
87+
{
88+
text: {
89+
en: "The bullet isn't dangerous until it starts moving.",
90+
fr: "La balle n'est pas dangereuse tant qu'elle ne commence pas à bouger.",
91+
},
92+
author: "Unknown",
93+
},
94+
{
95+
text: {
96+
en: "Success is falling down seven times and getting up eight.",
97+
fr: "Le succès, c'est tomber sept fois et se relever huit fois.",
98+
},
99+
author: "Japanese proverb",
100+
},
101+
{
102+
text: {
103+
en: "The only limit to our achievement tomorrow will be our doubts today.",
104+
fr: "La seule limite à nos réalisations demain seront nos doutes d'aujourd'hui.",
105+
},
106+
author: "Franklin D. Roosevelt",
107+
},
108+
{
109+
text: {
110+
en: "Success is having what you want. Happiness is wanting what you have.",
111+
fr: "Le succès, c'est d'avoir ce que vous voulez. Le bonheur, c'est vouloir ce que vous avez.",
112+
},
113+
author: "W.P. Kinsella",
114+
},
115+
];

‎locales/en/writing.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"search_article" : "Search article",
1212
"blog" : "Blog",
1313
"quotes" : "Quotes",
14-
"empty_quotes" : "No quotes yet, check back soon!"
14+
"empty_quotes" : "No quotes yet, check back soon!",
15+
"unknown_author" : "Unknown author"
1516
}

‎locales/fr/writing.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"search_article" : "Rechercher un article",
1212
"blog" : "Blog",
1313
"quotes" : "Citations",
14-
"empty_quotes" : "Aucune citation pour le moment, mais ça ne saurait tarder !"
14+
"empty_quotes" : "Aucune citation pour le moment, mais ça ne saurait tarder !",
15+
"unknown_author" : "Auteur inconnu"
1516
}

‎pages/writing.vue

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { Article } from "~/types/Article";
3+
import { quotes } from "~/data/quotes";
34
45
definePageMeta({
56
name: "Writing",
@@ -123,9 +124,19 @@ const items = computed(() => [
123124
</div>
124125
</template>
125126
<template #quotes>
126-
<div class="h-64 flex items-center justify-center">
127+
<div class="h-64 flex items-center justify-center" v-if="!quotes.length">
127128
{{ $t("writing.empty_quotes") }}
128129
</div>
130+
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2 mt-8" v-else>
131+
<SpotlightCard white v-for="quote in quotes" :key="quote.text" class="flex flex-col gap-2 p-4">
132+
<div class="text-lg text-shadow-sm italic font-light">
133+
{{ quote.text[locale] }}
134+
</div>
135+
<div class="text-sm text-muted">
136+
{{ quote.author === "Unknown" ? $t("writing.unknown_author") : quote.author }}
137+
</div>
138+
</SpotlightCard>
139+
</div>
129140
</template>
130141
</UTabs>
131142
</LayoutInfoWrapper>

0 commit comments

Comments
 (0)
Failed to load comments.