From af0bb795f722ff35adba91df7e72a24267c45da3 Mon Sep 17 00:00:00 2001 From: tomsokiWIN Date: Wed, 23 Jul 2025 21:06:20 +0200 Subject: [PATCH 1/4] installed an npm package, created gitignore --- .gitignore | 5 +++++ package-lock.json | 18 ++++++++++++++++++ package.json | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 .gitignore create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4317407 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Node.js stuff +node_modules/ + +#npm stuff +.npm/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7265fc8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "primjer", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "corporate-ipsum": "^1.0.1" + } + }, + "node_modules/corporate-ipsum": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/corporate-ipsum/-/corporate-ipsum-1.0.1.tgz", + "integrity": "sha512-Oz9Xvi9pNvlyxdJm6aVJEHpb/8quhDWPf5O2uOsKIuyQNm9zm+j55nmBw/7SaTHGvi5goUagm2IIS3rkPr8WVw==", + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f0717c6 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "corporate-ipsum": "^1.0.1" + } +} From 34ccad2440bf94a219ddbfcb4d357d58b2eac265 Mon Sep 17 00:00:00 2001 From: tomsokiWIN Date: Thu, 24 Jul 2025 22:52:45 +0200 Subject: [PATCH 2/4] included script.js into the html --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index ddbce82..233b54c 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Lorem ipsum + From 93950d10e33f48e58d6c77a712a116fb1c05dad0 Mon Sep 17 00:00:00 2001 From: tomsokiWIN Date: Thu, 24 Jul 2025 23:05:25 +0200 Subject: [PATCH 3/4] corrected the load order of script.js --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 233b54c..607ea8b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,6 @@ Lorem ipsum - @@ -21,6 +20,9 @@

Lorem ipsum

recusandae? Recusandae aut maxime culpa debitis iure sunt odio in voluptatem maiores expedita fuga quaerat, qui atque sint molestiae ut distinctio dolores mollitia facilis. Atque ex perferendis repudiandae expedita officia animi?

+ + + \ No newline at end of file From ab7f30a3df7e99194ba2164d758314e353ad4c1a Mon Sep 17 00:00:00 2001 From: tomsokiWIN Date: Thu, 24 Jul 2025 23:25:13 +0200 Subject: [PATCH 4/4] added scripts.js to root, inluded the adding of a pargraph --- .gitignore | 3 ++- scripts.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 scripts.js diff --git a/.gitignore b/.gitignore index 4317407..185a997 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ #npm stuff -.npm/ \ No newline at end of file +.npm/ + diff --git a/scripts.js b/scripts.js new file mode 100644 index 0000000..783454b --- /dev/null +++ b/scripts.js @@ -0,0 +1,7 @@ +const noviParagraf = document.createElement('p'); +const godina = new Date(); +const formatiranaGodina = godina.toLocaleDateString('hr-HR'); + +noviParagraf.textContent = formatiranaGodina; + +document.body.insertAdjacentElement("beforeend", noviParagraf); \ No newline at end of file