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

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.