From 241c4b313cab65ba9fb7310f557fafaf8d2be13a Mon Sep 17 00:00:00 2001 From: Pontus Ekdahl Date: Fri, 25 Apr 2025 09:02:33 +0000 Subject: [PATCH 1/2] This is the commit message --- .vscode/settings.json | 1 - 01_01b/index.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bdb57af..6de419c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,6 @@ "files.autoSave": "afterDelay", "screencastMode.onlyKeyboardShortcuts": true, "terminal.integrated.fontSize": 18, - "workbench.activityBar.visible": true, "workbench.colorTheme": "Visual Studio Dark", "workbench.fontAliasing": "antialiased", "workbench.statusBar.visible": true, diff --git a/01_01b/index.html b/01_01b/index.html index 6586406..40fd8a4 100644 --- a/01_01b/index.html +++ b/01_01b/index.html @@ -10,7 +10,7 @@
-

Data-driven image card

+

Image card

From 56d9f73e46876a5fa28780928832ab1c5c6695ec Mon Sep 17 00:00:00 2001 From: Pontus Ekdahl Date: Mon, 28 Apr 2025 11:53:23 +0000 Subject: [PATCH 2/2] TEst --- 01_01b/script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/01_01b/script.js b/01_01b/script.js index 9b84ce2..6a5b86d 100644 --- a/01_01b/script.js +++ b/01_01b/script.js @@ -12,6 +12,8 @@ const mainContent = document.querySelector(".main-content"); const Card = (data) => { const imgData = data[0]; + const date = new Date(imgData.created_at); + const markup = `
{ Photo by ${imgData.user.name}.

+

+ Uploaded on: + + ${date.toLocaleString("default", { + year: "numeric", + month: "long", + day: "numeric", + })} + +

View it on Unsplash.