Skip to content

Commit

Permalink
Add quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRCD committed Nov 3, 2023
1 parent 703a5c8 commit fb1c42d
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 3 deletions.
115 changes: 115 additions & 0 deletions data/quotes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
export type Quote = {
text: {
en: string;
fr: string;
};
author: string;
};

export const quotes: Quote[] = [
{
text: {
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.",
en: "The moment you take responsibility for everything in your life is the moment you can change anything in your life.",
},
author: "Hal Elrod",
},
{
text: {
en: "If you don’t ask, the answer will always be no.",
fr: "Si vous ne demandez pas, la réponse sera toujours non.",
},
author: "Unknown",
},
{
text: {
fr: "Tu ne peux pas changer les gens autour de toi mais tu peux changer les gens autour de toi.",
en: "You can't change the people around you but you can change the people around you.",
},
author: "Unknown",
},
{
text: {
en: "If the path before you is clear, you're probably on someone else's.",
fr: "Si le chemin devant vous est clair, vous êtes probablement sur celui de quelqu'un d'autre.",
},
author: "Joseph Campbell",
},
{
text: {
en: "The day you plant the seed is not the day you eat the fruit.",
fr: "Le jour où vous plantez la graine n'est pas le jour où vous mangez le fruit.",
},
author: "Fabienne Fredrickson",
},
{
text: {
en: "Perfection is a road, not a destination.",
fr: "La perfection est un chemin, pas une destination.",
},
author: "Unknown",
},
{
text: {
en: "Because she competes with no one, no one can compete with her.",
fr: "Parce qu'elle ne se bat avec personne, personne ne peut se battre contre elle.",
},
author: "Lao Tzu, Tao Te Ching",
},
{
text: {
en: "An expert is someone who has made every possible mistake in a very narrow field.",
fr: "Un expert est quelqu'un qui a commis toutes les erreurs possibles dans un domaine très spécifique.",
},
author: "Niels Bohr",
},
{
text: {
fr: "L’efficience c’est faire comme il faut, l’efficacité c’est faire ce qu’il faut.",
en: "Efficiency is doing things right, effectiveness is doing the right things.",
},
author: "Peter Drucker",
},
{
text: {
en: "Pain of discipline or pain of regret, choose yours.",
fr: "La douleur de la discipline ou la douleur du regret, choisissez la vôtre.",
},
author: "Unknown",
},
{
text: {
en: "Have no fear of perfection, you'll never reach it.",
fr: "N'ayez pas peur de la perfection, vous ne l'atteindrez jamais.",
},
author: "Salvador Dali",
},
{
text: {
en: "The bullet isn't dangerous until it starts moving.",
fr: "La balle n'est pas dangereuse tant qu'elle ne commence pas à bouger.",
},
author: "Unknown",
},
{
text: {
en: "Success is falling down seven times and getting up eight.",
fr: "Le succès, c'est tomber sept fois et se relever huit fois.",
},
author: "Japanese proverb",
},
{
text: {
en: "The only limit to our achievement tomorrow will be our doubts today.",
fr: "La seule limite à nos réalisations demain seront nos doutes d'aujourd'hui.",
},
author: "Franklin D. Roosevelt",
},
{
text: {
en: "Success is having what you want. Happiness is wanting what you have.",
fr: "Le succès, c'est d'avoir ce que vous voulez. Le bonheur, c'est vouloir ce que vous avez.",
},
author: "W.P. Kinsella",
},
];
3 changes: 2 additions & 1 deletion locales/en/writing.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"search_article" : "Search article",
"blog" : "Blog",
"quotes" : "Quotes",
"empty_quotes" : "No quotes yet, check back soon!"
"empty_quotes" : "No quotes yet, check back soon!",
"unknown_author" : "Unknown author"
}
3 changes: 2 additions & 1 deletion locales/fr/writing.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"search_article" : "Rechercher un article",
"blog" : "Blog",
"quotes" : "Citations",
"empty_quotes" : "Aucune citation pour le moment, mais ça ne saurait tarder !"
"empty_quotes" : "Aucune citation pour le moment, mais ça ne saurait tarder !",
"unknown_author" : "Auteur inconnu"
}
13 changes: 12 additions & 1 deletion pages/writing.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { Article } from "~/types/Article";
import { quotes } from "~/data/quotes";
definePageMeta({
name: "Writing",
Expand Down Expand Up @@ -123,9 +124,19 @@ const items = computed(() => [
</div>
</template>
<template #quotes>
<div class="h-64 flex items-center justify-center">
<div class="h-64 flex items-center justify-center" v-if="!quotes.length">
{{ $t("writing.empty_quotes") }}
</div>
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2 mt-8" v-else>
<SpotlightCard white v-for="quote in quotes" :key="quote.text" class="flex flex-col gap-2 p-4">
<div class="text-lg text-shadow-sm italic font-light">
{{ quote.text[locale] }}
</div>
<div class="text-sm text-muted">
{{ quote.author === "Unknown" ? $t("writing.unknown_author") : quote.author }}
</div>
</SpotlightCard>
</div>
</template>
</UTabs>
</LayoutInfoWrapper>
Expand Down

1 comment on commit fb1c42d

@vercel
Copy link

@vercel vercel bot commented on fb1c42d Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.