From 0d07f273ac68b688935bbf59b99b191e2673310d Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Sun, 10 Dec 2023 01:15:15 +0100 Subject: [PATCH] :sparkles: logs is now finished --- src/data/watched.json | 706 +++++++++++++++++++++++++++++++++++ src/pages/logs/index.md | 8 +- src/pages/logs/watched.astro | 46 +++ src/pages/more.md | 2 +- 4 files changed, 756 insertions(+), 6 deletions(-) create mode 100644 src/data/watched.json create mode 100644 src/pages/logs/watched.astro diff --git a/src/data/watched.json b/src/data/watched.json new file mode 100644 index 0000000..5de941a --- /dev/null +++ b/src/data/watched.json @@ -0,0 +1,706 @@ +[ + { + "title": "The Hunger Games: Catching Fire", + "type": "movie", + "date": { + "year": "2023", + "month": "12", + "day": "03", + "string": "2023-12-03" + }, + "my_rating": 4 + }, + { + "title": "The Hunger Games", + "type": "movie", + "date": { + "year": "2023", + "month": "11", + "day": "26", + "string": "2023-11-26" + }, + "my_rating": 3 + }, + { + "title": "El Camino", + "type": "movie", + "date": { + "year": "2023", + "month": "11", + "day": "20", + "string": "2023-11-20" + }, + "my_rating": 5 + }, + { + "title": "Breaking Bad S01-S05", + "type": "anime", + "date": { + "year": "2023", + "month": "11", + "day": "20", + "string": "2023-11-20" + }, + "my_rating": 4 + }, + { + "title": "Gemini Man", + "type": "movie", + "date": { + "year": "2023", + "month": "11", + "day": "12", + "string": "2023-11-12" + }, + "my_rating": 4 + }, + { + "title": "Attack on Titan: Final Season", + "type": "anime", + "date": { + "year": "2023", + "month": "11", + "day": "05", + "string": "2023-11-05" + }, + "my_rating": 4 + }, + { + "title": "Barbie", + "type": "movie", + "date": { + "year": "2023", + "month": "11", + "day": "04", + "string": "2023-11-04" + }, + "my_rating": 5 + }, + { + "title": "The Little Mermaid (liveaction)", + "type": "movie", + "date": { + "year": "2023", + "month": "11", + "day": "03", + "string": "2023-11-03" + }, + "my_rating": 3 + }, + { + "title": "Mr. & Mrs. Smith", + "type": "movie", + "date": { + "year": "2023", + "month": "10", + "day": "26", + "string": "2023-10-26" + }, + "my_rating": 4 + }, + { + "title": "Sex Education S4", + "type": "series", + "date": { + "year": "2023", + "month": "10", + "day": "23", + "string": "2023-10-23" + }, + "my_rating": 4 + }, + { + "title": "Guardians of the Galaxy Vol. 3", + "type": "movie", + "date": { + "year": "2023", + "month": "10", + "day": "22", + "string": "2023-10-22" + }, + "my_rating": 4 + }, + { + "title": "Moneyball", + "type": "movie", + "date": { + "year": "2023", + "month": "10", + "day": "01", + "string": "2023-10-01" + }, + "my_rating": 5 + }, + { + "title": "Tetris", + "type": "movie", + "date": { + "year": "2023", + "month": "10", + "day": "01", + "string": "2023-10-01" + }, + "my_rating": 5 + }, + { + "title": "AlphaGo", + "type": "movie", + "date": { + "year": "2023", + "month": "09", + "day": "28", + "string": "2023-09-28" + }, + "my_rating": 3 + }, + { + "title": "One Piece S01 (liveaction)", + "type": "series", + "date": { + "year": "2023", + "month": "09", + "day": "10", + "string": "2023-09-10" + }, + "my_rating": 4 + }, + { + "title": "Jobs", + "type": "movie", + "date": { + "year": "2023", + "month": "08", + "day": "27", + "string": "2023-08-27" + }, + "my_rating": 3 + }, + { + "title": "The Queen's Gambit", + "type": "series", + "date": { + "year": "2023", + "month": "08", + "day": "23", + "string": "2023-08-23" + }, + "my_rating": 4 + }, + { + "title": "Dragon Ball", + "type": "anime", + "date": { + "year": "2023", + "month": "08", + "day": "20", + "string": "2023-08-20" + }, + "my_rating": 3 + }, + { + "title": "Lost in Translation", + "type": "movie", + "date": { + "year": "2023", + "month": "08", + "day": "11", + "string": "2023-08-11" + }, + "my_rating": 2 + }, + { + "title": "Transformers: Rise of the Beasts", + "type": "movie", + "date": { + "year": "2023", + "month": "08", + "day": "08", + "string": "2023-08-08" + }, + "my_rating": 4 + }, + { + "title": "How to Lose a Guy in 10 Days", + "type": "movie", + "date": { + "year": "2023", + "month": "08", + "day": "06", + "string": "2023-08-06" + }, + "my_rating": 4 + }, + { + "title": "Arrival", + "type": "movie", + "date": { + "year": "2023", + "month": "08", + "day": "06", + "string": "2023-08-06" + }, + "my_rating": 4 + }, + { + "title": "Oppenheimer", + "type": "movie", + "date": { + "year": "2023", + "month": "07", + "day": "22", + "string": "2023-07-22" + }, + "my_rating": 5 + }, + { + "title": "Formula 1: Drive to Survive S05", + "type": "series", + "date": { + "year": "2023", + "month": "07", + "day": "22", + "string": "2023-07-22" + }, + "my_rating": 3 + }, + { + "title": "Blade Runner 2049", + "type": "movie", + "date": { + "year": "2023", + "month": "07", + "day": "17", + "string": "2023-07-17" + }, + "my_rating": 4 + }, + { + "title": "Insurgent", + "type": "movie", + "date": { + "year": "2023", + "month": "07", + "day": "16", + "string": "2023-07-16" + }, + "my_rating": 3 + }, + { + "title": "Divergent", + "type": "movie", + "date": { + "year": "2023", + "month": "07", + "day": "15", + "string": "2023-07-15" + }, + "my_rating": 3 + }, + { + "title": "Demon Slayer S03", + "type": "anime", + "date": { + "year": "2023", + "month": "07", + "day": "03", + "string": "2023-07-03" + }, + "my_rating": 4 + }, + { + "title": "Vinland Saga S02", + "type": "anime", + "date": { + "year": "2023", + "month": "07", + "day": "03", + "string": "2023-07-03" + }, + "my_rating": 4 + }, + { + "title": "Bridget Jones's Baby", + "type": "movie", + "date": { + "year": "2023", + "month": "07", + "day": "01", + "string": "2023-07-01" + }, + "my_rating": 3 + }, + { + "title": "Spider-Man: Across the Spider-Verse", + "type": "movie", + "date": { + "year": "2023", + "month": "06", + "day": "27", + "string": "2023-06-27" + }, + "my_rating": 5 + }, + { + "title": "Dr. Stone S03", + "type": "anime", + "date": { + "year": "2023", + "month": "06", + "day": "24", + "string": "2023-06-24" + }, + "my_rating": 3 + }, + { + "title": "2001: A Space Odyssey", + "type": "movie", + "date": { + "year": "2023", + "month": "06", + "day": "13", + "string": "2023-06-13" + }, + "my_rating": 4 + }, + { + "title": "Stone Locals: Rediscovering the Soul of Climbing", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "29", + "string": "2023-05-29" + }, + "my_rating": 5 + }, + { + "title": "Fishpeople | Lives Transformed by the Sea", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "29", + "string": "2023-05-29" + }, + "my_rating": 3 + }, + { + "title": "Surfs Up", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "26", + "string": "2023-05-26" + }, + "my_rating": 5 + }, + { + "title": "S.W.A.T. S06", + "type": "series", + "date": { + "year": "2023", + "month": "05", + "day": "22", + "string": "2023-05-22" + }, + "my_rating": 3 + }, + { + "title": "Encanto", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "20", + "string": "2023-05-20" + }, + "my_rating": 4 + }, + { + "title": "Shang-Chi and the Legend of the Ten Rings", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "19", + "string": "2023-05-19" + }, + "my_rating": 4 + }, + { + "title": "Whiplash", + "type": "movie", + "date": { + "year": "2023", + "month": "05", + "day": "16", + "string": "2023-05-16" + }, + "my_rating": 4 + }, + { + "title": "Star Wars: Visions S02", + "type": "anime", + "date": { + "year": "2023", + "month": "05", + "day": "11", + "string": "2023-05-11" + }, + "my_rating": 4 + }, + { + "title": "The Last of Us S01", + "type": "series", + "date": { + "year": "2023", + "month": "04", + "day": "23", + "string": "2023-04-23" + }, + "my_rating": 5 + }, + { + "title": "The Mandalorian S03", + "type": "series", + "date": { + "year": "2023", + "month": "04", + "day": "23", + "string": "2023-04-23" + }, + "my_rating": 5 + }, + { + "title": "A girl and an astronaut", + "type": "series", + "date": { + "year": "2023", + "month": "04", + "day": "16", + "string": "2023-04-16" + }, + "my_rating": 1 + }, + { + "title": "The Terminal", + "type": "movie", + "date": { + "year": "2023", + "month": "04", + "day": "10", + "string": "2023-04-10" + }, + "my_rating": 5 + }, + { + "title": "The Whole Nine Yards", + "type": "movie", + "date": { + "year": "2023", + "month": "04", + "day": "09", + "string": "2023-04-09" + }, + "my_rating": 4 + }, + { + "title": "Murder Mystery 2", + "type": "movie", + "date": { + "year": "2023", + "month": "04", + "day": "08", + "string": "2023-04-08" + }, + "my_rating": 2 + }, + { + "title": "The Wind Rises", + "type": "movie", + "date": { + "year": "2023", + "month": "04", + "day": "03", + "string": "2023-04-03" + }, + "my_rating": 3 + }, + { + "title": "Ant-Man and the Wasp: Quantumania", + "type": "movie", + "date": { + "year": "2023", + "month": "03", + "day": "29", + "string": "2023-03-29" + }, + "my_rating": 5 + }, + { + "title": "Black Panther: Wakanda Forever", + "type": "movie", + "date": { + "year": "2023", + "month": "03", + "day": "24", + "string": "2023-03-24" + }, + "my_rating": 4 + }, + { + "title": "My Hero Academia S06", + "type": "anime", + "date": { + "year": "2023", + "month": "03", + "day": "24", + "string": "2023-03-24" + }, + "my_rating": 4 + }, + { + "title": "Rick and Morty S06", + "type": "series", + "date": { + "year": "2023", + "month": "03", + "day": "24", + "string": "2023-03-24" + }, + "my_rating": 3 + }, + { + "title": "Schumacher", + "type": "movie", + "date": { + "year": "2023", + "month": "03", + "day": "21", + "string": "2023-03-21" + }, + "my_rating": 5 + }, + { + "title": "Nightcrawler", + "type": "movie", + "date": { + "year": "2023", + "month": "03", + "day": "21", + "string": "2023-03-21" + }, + "my_rating": 5 + }, + { + "title": "How to Sell Drugs Online (Fast) S03", + "type": "series", + "date": { + "year": "2023", + "month": "03", + "day": "20", + "string": "2023-03-20" + }, + "my_rating": 3 + }, + { + "title": "Outer Banks S03", + "type": "series", + "date": { + "year": "2023", + "month": "03", + "day": "15", + "string": "2023-03-15" + }, + "my_rating": 4 + }, + { + "title": "Community S01-S06", + "type": "series", + "date": { + "year": "2023", + "month": "03", + "day": "15", + "string": "2023-03-15" + }, + "my_rating": 5 + }, + { + "title": "Free! S01-S03", + "type": "anime", + "date": { + "year": "2023", + "month": "03", + "day": "08", + "string": "2023-03-08" + }, + "my_rating": 3 + }, + { + "title": "Fantastic Beasts and Where to Find Them", + "type": "movie", + "date": { + "year": "2023", + "month": "02", + "day": "17", + "string": "2023-02-17" + }, + "my_rating": 5 + }, + { + "title": "Kaleidoscope", + "type": "series", + "date": { + "year": "2023", + "month": "02", + "day": "02", + "string": "2023-02-02" + }, + "my_rating": 3 + }, + { + "title": "The Recruit S01", + "type": "series", + "date": { + "year": "2023", + "month": "01", + "day": "30", + "string": "2023-01-30" + }, + "my_rating": 3 + }, + { + "title": "Avatar: The Way of Water", + "type": "movie", + "date": { + "year": "2023", + "month": "01", + "day": "28", + "string": "2023-01-28" + }, + "my_rating": 5 + }, + { + "title": "The Way of the Househusband S02", + "type": "anime", + "date": { + "year": "2023", + "month": "01", + "day": "23", + "string": "2023-01-23" + }, + "my_rating": 3 + }, + { + "title": "TRON: Legacy", + "type": "movie", + "date": { + "year": "2023", + "month": "01", + "day": "11", + "string": "2023-01-11" + }, + "my_rating": 4 + } +] \ No newline at end of file diff --git a/src/pages/logs/index.md b/src/pages/logs/index.md index 83f6635..d69cbd3 100644 --- a/src/pages/logs/index.md +++ b/src/pages/logs/index.md @@ -3,12 +3,10 @@ title: 'Logs' description: '' layout: "../../layouts/Layout.astro" --- -All my logs where I keep track of movies/TV-shows I’ve watched and books I’ve read. +All my logs where I keep track of movies / series I’ve watched and books / manga I’ve read. I don’t use any third-party services for my logs, I store everything in a JSON-format for this website. -[***📚 Book log***](/logs/books) +[📚 ***Books***](/logs/books) -[***📺 Movie log***](/logs/movies) - -[***📺 Serie log***](/logs/series) \ No newline at end of file +[📺 ***Watched***](/logs/watched) \ No newline at end of file diff --git a/src/pages/logs/watched.astro b/src/pages/logs/watched.astro new file mode 100644 index 0000000..502b6c9 --- /dev/null +++ b/src/pages/logs/watched.astro @@ -0,0 +1,46 @@ +--- +import SectionContainer from '../../components/SectionContainer.astro'; +import watched from '../../data/watched.json' + +const tvByYear = watched.reduce((acc:any, tv) => { + const year = new Date(tv.date.string).getFullYear(); + if (!acc[year]) { + acc[year] = []; + } + acc[year].push(tv); + return acc; +}, {}); + +const sortedYears = Object.keys(tvByYear).sort((a:any, b:any) => b - a); + +function getEmojiStars(rating:any) { + let stars = ''; + for (let i = 0; i < rating; i++) { + stars += '⭐'; + } + return stars; +} +--- + +
+

📺 La télévision

+

2023 - Currently Watching:

+

👀 One Piece ~ Final Saga

+

👀 Star Wars: The Clone Wars S02

+ {sortedYears.map(year => ( +
+
{year} - Finished
+
    + { + watched.map((tv) => ( +
    +

    {tv.title}

    +

    {getEmojiStars(tv.my_rating)}

    +
    + )) + } +
+
+ ))} +
+
\ No newline at end of file diff --git a/src/pages/more.md b/src/pages/more.md index 98617f3..637f28b 100644 --- a/src/pages/more.md +++ b/src/pages/more.md @@ -6,7 +6,7 @@ layout: "../layouts/Layout.astro" [📜 CV (under construction)](/) -[📚 Logs (under construction)](/logs) +[📚 Logs](/logs) [🌱 Digital garden (under construction)](/)