Skip to content

Commit

Permalink
Quotes page
Browse files Browse the repository at this point in the history
  • Loading branch information
kulcsarrudolf committed Oct 28, 2024
1 parent f07afee commit d19cffe
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
23 changes: 23 additions & 0 deletions src/app/quotes/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Title, Paragraph } from "@/components/general/typography";
import quotes from "@/components/quote/quotes";
import Quote from "@/types/quote.type";

const Quotes = () => {
return (
<>
<Title>My Favorite Quotes</Title>

{quotes.map((quote: Quote) => (
<div
className="border border-black-500 p-4 rounded-xl shadow-md mb-4"
key={quote.id}
>
<p className="text-xl font-medium italic mb-4">{quote.quote}</p>
<p className="text-[#3b64b8] font-bold">{quote.author}</p>
</div>
))}
</>
);
};

export default Quotes;
7 changes: 6 additions & 1 deletion src/components/quote/Quote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ const Quote = () => {
}

return (
<div className="border border-black-500 p-4 rounded-xl shadow-md mb-4 text-center">
<div
className="border border-black-500 p-4 rounded-xl shadow-md mb-4 text-center"
onClick={() => {
window.location.href = "/quotes";
}}
>
<p className="text-xl font-medium italic mb-4">{quote.quote}</p>
<p className="text-[#3b64b8] font-bold">{quote.author}</p>
</div>
Expand Down
23 changes: 16 additions & 7 deletions src/components/quote/quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,79 @@ import Quote from "@/types/quote.type";

const quotes: Quote[] = [
{
id: "1a2b3c4d",
quote: "If you cannot do great things, do small things in a great way.",
author: "Napoleon Hill",
},
{
id: "2b3c4d5e",
quote:
"Everyday life is like programming, I guess. If you love something you can put beauty into it.",
author: "Donald Knuth",
},
{
quote:
"Everyday life is like programming, I guess. If you love something you can put beauty into it.",
author: "Donald Knuth",
},
{
id: "3c4d5e6f",
quote: "Slowing down is sometimes the best way to speed up.",
author: "Mike Vance",
},
{
id: "4d5e6f7g",
quote:
"Focus on one thing, make it your priority, and stick with it no matter what!",
author: "Tyler Perry",
},
{
id: "5e6f7g8h",
quote:
"Perseverance is not a long race; it is many short races one after the other.",
author: "Walter Elliot",
},
{
id: "6f7g8h9i",
quote:
"There are two kinds of decisions - the right decision and a lesson learned.",
author: "Simon Sinek",
},
{
id: "7g8h9i0j",
quote:
"If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do you have to kepp moving forward.",
"If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do you have to keep moving forward.",
author: "Martin Luther King Jr.",
},
{
id: "8h9i0j1k",
quote: "Done is better than perfect.",
author: "Sheryl Sandberg",
},
{
id: "9i0j1k2l",
quote: "Focus is about saying, no.",
author: "Steve Jobs",
},
{
id: "0j1k2l3m",
quote:
"Examine your values and live by them - the more your actions reflect your beliefs, the better you feel.",
author: "American Heart Association",
},
{
id: "1k2l3m4n",
quote:
"The best time to plant a tree was 20 years ago. The second best time is now.",
author: "Chinese proverb",
},
{
quote: "Continuous improvement is better then delayed perfection.",
id: "2l3m4n5o",
quote: "Continuous improvement is better than delayed perfection.",
author: "Mark Twain",
},
{
id: "3m4n5o6p",
quote: "The only way to go fast is to go well.",
author: "Robert C. Martin",
},
{
id: "4n5o6p7q",
quote:
"The meaning of life is to find your gift. The purpose of life is to give it away.",
author: "Pablo Picasso",
Expand Down
1 change: 1 addition & 0 deletions src/types/quote.type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
interface Quote {
id: string;
quote: string;
author: string;
}
Expand Down

0 comments on commit d19cffe

Please sign in to comment.