From 0bf2b9296b22ec9e3be3481bc38a497ffbfb0a75 Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 00:00:04 +0100 Subject: [PATCH 01/78] level-0: add name and username --- index.html | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 9a400d1..3a857ed 100644 --- a/index.html +++ b/index.html @@ -1,21 +1,23 @@ - - - - TV Show Project | My Name (My GitHub username) - - - - -
-
+ + + + TV Show Project | Edina Kurdi (edinakurdi) + + + - - + +
+
- - - - + + + + + + + + \ No newline at end of file From cacd272bbf1a88db519742979c8d3107fbe279c3 Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 22:10:51 +0100 Subject: [PATCH 02/78] add episode generator function --- script.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/script.js b/script.js index 87a7de8..4c54eb9 100644 --- a/script.js +++ b/script.js @@ -1,9 +1,23 @@ //You can edit ALL of the code here function setup() { const allEpisodes = getAllEpisodes(); + + // console.log(allEpisodes); + // console.log(allEpisodes[0]); + makePageForEpisodes(allEpisodes); } +function makeEpisodeCode(season, episodeNumber) { + season = String(season).padStart(2, "0"); + episodeNumber = String(episodeNumber).padStart(2, "0"); + const code = "S" + season + "E" + episodeNumber; + return code; +} + +// console.log(makeEpisodeCode(2, 7)); // expected: S02E07 +// console.log(makeEpisodeCode(10, 3)); // expected: S10E03 + function makePageForEpisodes(episodeList) { const rootElem = document.getElementById("root"); rootElem.textContent = `Got ${episodeList.length} episode(s)`; From 08ba2e1c755848d4dd0d3543f27feddf67802362 Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 22:34:20 +0100 Subject: [PATCH 03/78] add episode-card template to html --- index.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 3a857ed..665828a 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,14 @@
+ @@ -20,4 +28,10 @@ - \ No newline at end of file + + \ No newline at end of file From bdf28c19d570502f7e87044325233b6c0759f471 Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 23:01:42 +0100 Subject: [PATCH 04/78] reorder functions and add comment to function --- script.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index 4c54eb9..88855e1 100644 --- a/script.js +++ b/script.js @@ -8,6 +8,12 @@ function setup() { makePageForEpisodes(allEpisodes); } +function makePageForEpisodes(episodeList) { + const rootElem = document.getElementById("root"); + rootElem.textContent = `Got ${episodeList.length} episode(s)`; +} + +//create episode codes function makeEpisodeCode(season, episodeNumber) { season = String(season).padStart(2, "0"); episodeNumber = String(episodeNumber).padStart(2, "0"); @@ -18,9 +24,4 @@ function makeEpisodeCode(season, episodeNumber) { // console.log(makeEpisodeCode(2, 7)); // expected: S02E07 // console.log(makeEpisodeCode(10, 3)); // expected: S10E03 -function makePageForEpisodes(episodeList) { - const rootElem = document.getElementById("root"); - rootElem.textContent = `Got ${episodeList.length} episode(s)`; -} - window.onload = setup; From ab20f1e23a720e9027eaca65a32158bdf59a7afc Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 23:44:48 +0100 Subject: [PATCH 05/78] create episode card --- script.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/script.js b/script.js index 88855e1..defe591 100644 --- a/script.js +++ b/script.js @@ -24,4 +24,27 @@ function makeEpisodeCode(season, episodeNumber) { // console.log(makeEpisodeCode(2, 7)); // expected: S02E07 // console.log(makeEpisodeCode(10, 3)); // expected: S10E03 +//create episode card +const template = document.getElementById("episode-card"); + +function createEpisodeCard(episode) { + const card = template.content.cloneNode(true); + + card.querySelector("h2").textContent = episode.name; + + const episodeNumber = makeEpisodeCode(episode.season, episode.number); + card.querySelector("[data-episode-number]").textContent = episodeNumber; + + const image = card.querySelector("img"); + image.src = episode.image.medium; + image.alt = `Scene from ${episodeNumber}, ${episode.name}`; + + card.querySelector("[data-summary]").innerHTML = episode.summary; + + return card; +} + +// create all cards +function makePageForEpisodes() {} + window.onload = setup; From 4a10edca49b502c11a469ae68f1f4e224d3bf83d Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Wed, 5 Aug 2026 23:54:09 +0100 Subject: [PATCH 06/78] create all cards --- script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index defe591..0c5d856 100644 --- a/script.js +++ b/script.js @@ -45,6 +45,12 @@ function createEpisodeCard(episode) { } // create all cards -function makePageForEpisodes() {} +function makePageForEpisodes(episodeList) { + const rootElem = document.getElementById("root"); + + const episodeCards = episodeList.map(createEpisodeCard); + + rootElem.append(...episodeCards); +} window.onload = setup; From 902428978f5410129c2dd5a76dee059ca4133d87 Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Thu, 6 Aug 2026 00:04:03 +0100 Subject: [PATCH 07/78] add simple style --- style.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/style.css b/style.css index 77cb8d4..fb52eca 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,10 @@ #root { - color: red; + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; } + +section { + border: 1px solid; + padding: 1rem; +} \ No newline at end of file From 6cf9091611dd7ce608d3a7c7fd5b7bf5efd5a8ad Mon Sep 17 00:00:00 2001 From: Edina Kurdi Date: Thu, 6 Aug 2026 00:07:12 +0100 Subject: [PATCH 08/78] add tvmaze ref as footer --- index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html b/index.html index 665828a..80ebb33 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,15 @@

episode title

+ + From 30341a2484ab883cc9bccb62959f0eba7bdb2b6a Mon Sep 17 00:00:00 2001 From: Tomislav Dukez Date: Fri, 7 Aug 2026 15:04:05 +0100 Subject: [PATCH 09/78] fix remove para inside para in summary --- script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 0c5d856..ea89c87 100644 --- a/script.js +++ b/script.js @@ -39,7 +39,10 @@ function createEpisodeCard(episode) { image.src = episode.image.medium; image.alt = `Scene from ${episodeNumber}, ${episode.name}`; - card.querySelector("[data-summary]").innerHTML = episode.summary; + // remove the

tags from the summary + card.querySelector("[data-summary]").innerHTML = episode.summary + .replace(/

/gi, "") + .replace(/<\/p>/gi, ""); return card; } From bc77647e7683d06b6fed304d2cef69c9cd814239 Mon Sep 17 00:00:00 2001 From: Tomislav Dukez Date: Fri, 7 Aug 2026 15:16:51 +0100 Subject: [PATCH 10/78] add card-container and refactor episode rendering into it --- index.html | 2 ++ script.js | 4 ++-- style.css | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 80ebb33..0550a09 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,8 @@

+
+