From 21895265c2c135832fd348ec2b886ed8738753f9 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 19:52:53 +0200 Subject: [PATCH 1/9] translated index.html --- 1-js/02-first-steps/01-hello-world/1-hello-alert/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html index ff1d871b0..9e332d59c 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html @@ -4,7 +4,7 @@ From 2c062e787da5e7fce5ef0fc95bb59b68859ceefb Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 19:55:17 +0200 Subject: [PATCH 2/9] translated text.md --- 1-js/02-first-steps/01-hello-world/1-hello-alert/task.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md index afed6a91d..fc56637ea 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md @@ -2,11 +2,11 @@ importance: 5 --- -# Show an alert +# Pokaži alert -Create a page that shows a message "I'm JavaScript!". +Napravi stranicu koja pokazuje poruku "Ja sam JavaScript!". -Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works. +Uradi bilo gdje, nije bitno, samo budi siguran da radi ispravno. [demo src="solution"] From 27f2b3d6d98a7712fa34b1a3f81786726ec6d9d1 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 19:56:37 +0200 Subject: [PATCH 3/9] translated index.html --- .../01-hello-world/1-hello-alert/solution.view/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html index 45e6744b3..9e332d59c 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html @@ -4,9 +4,9 @@ - \ No newline at end of file + From 20712a4aeca0f76cd98d2feb18d9a23e18e8667d Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 19:59:54 +0200 Subject: [PATCH 4/9] translated task.md --- .../01-hello-world/2-hello-alert-ext/task.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md index 26168d6a7..e684cf3cb 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md @@ -1,9 +1,9 @@ -importance: 5 +važnost: 5 --- -# Show an alert with an external script +# Pokaži alert sa eksternom skriptom -Take the solution of the previous task . Modify it by extracting the script content into an external file `alert.js`, residing in the same folder. +Uzmi rješenje prošlog zadatka . Izmjeni ga tako što ćeš sadržaj skripte prebaciti u eksternu datoteku `alert.js`, koja se nalazi u istom folderu. -Open the page, ensure that the alert works. +Otvori stranicu, budi siguran da alert radi ispravno. From 4b67edcb8c6a3a05ede79e5fc87b98ec00223906 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:00:29 +0200 Subject: [PATCH 5/9] translated task.md changed importance --- 1-js/02-first-steps/01-hello-world/1-hello-alert/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md index fc56637ea..2d31c8177 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md @@ -1,4 +1,4 @@ -importance: 5 +važnost: 5 --- From 1105b0b4bdb657ee20aa9d8838756dc7e53783b6 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:00:51 +0200 Subject: [PATCH 6/9] translated alert.js --- 1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js index 4de725971..f62db4e89 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js @@ -1 +1 @@ -alert("I'm JavaScript!"); \ No newline at end of file +alert("Ja sam JavaScript!"); From 73e629ff567039cfdc02299ef779cf92d154818b Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:01:33 +0200 Subject: [PATCH 7/9] translated solution.md --- .../01-hello-world/2-hello-alert-ext/solution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md index f42c41e6d..d9bf651f0 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md @@ -1,8 +1,8 @@ -The HTML code: +HTML kod: [html src="index.html"] -For the file `alert.js` in the same folder: +Za datoteku `alert.js` koja se nalazi u istom folderu: [js src="alert.js"] From 05a2fc00cc72e490a7ce0443b91ebf993ad170e5 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:44:23 +0200 Subject: [PATCH 8/9] Hello, world! --- 1-js/02-first-steps/01-hello-world/article.md | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index b3149f112..f774ea54b 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,17 +1,17 @@ # Hello, world! -This part of the tutorial is about core JavaScript, the language itself. +Ovaj dio tutorijala je o jezgri samog jezika, JavaScript-a. -But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial. +Ali nam treba radno okruženje gdje ćemo pokretati naše skripte, i pošto je ova knjiga na internetu, pretraživač je dobar izbor. Nećemo puno koristiti komande specifične za pretraživače (kao što je `alert`) tako da ne provedete puno vremena na njih ako planirate da se koncentrirate na drugo okruženje (kao na primjer Node.js). Fokusirat ćemo se na JavaScript u pretraživaču u [sljedećem dijelu](/ui) tutorijala. -So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`. +Prvo, hajmo vidjeti kako povezati skriptu sa web stranicom. Za okruženja sa serverske strane (kao što je Node.js), možete izvršiti skriptu sa ovom komandom `"node my.js"`. -## The "script" tag +## "script" oznaka (eng. tag) -JavaScript programs can be inserted into any part of an HTML document with the help of the ` */!* -

...After the script.

+

...Poslije skripte.

@@ -35,24 +35,24 @@ For instance: ``` ```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. +Možete pokrenuti ovaj primjer tako što ćete pritisnuti "Play" tipku u gornjem desnom uglu kocke iznad. ``` -The ` ``` - This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the ` + ``` -Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. +Ovdje, `/put/do/script.js` je apsolutan put do skripte od korijena stranice. Možete pružiti relativni put od trenutne stranice. Na primjer, `src="script.js"` bi značilo `"script.js"` je u trenutnom folderu. -We can give a full URL as well. For instance: +Možemo dati i potpuni URL također. Na primjer: ```html ``` -To attach several scripts, use multiple tags: +Da bismo povezali više skript datoteka, koristimo više tagova: ```html @@ -90,43 +90,43 @@ To attach several scripts, use multiple tags: ``` ```smart -As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. +Kao pravilo, samo najjednostavnije skripte se postavljaju direktno u HTML. One koje su više kompleksne trebaju biti u eksternim, odvojenim datotekama. -The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). +Prednost odvojene datoteke jeste to da će je pretraživač preuzeti i spasiti u [keš memoriju](https://en.wikipedia.org/wiki/Web_cache). -Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. +Ostale stranice koje uzimaju istu skriptu kao referencu uzeti će iz keš memorije umjesto ponovnog preuzimanja, tako da se ta datoteka samo jednom treba preuzeti. -That reduces traffic and makes pages faster. +To smanjuje promet i ubrzava stranicu. ``` -````warn header="If `src` is set, the script content is ignored." -A single ` ``` -We must choose either an external ` + ``` ```` -## Summary +## Sažetak -- We can use a ``. +- Možemo koristiti ``. -There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many. +Ima još mnogo toga da se nauči o skriptama u pretraživaču kao i o njihovoj interakciji sa web stranicom. Ali moramo imati na umu da je ovaj dio tutorijala posvećen JavaScript jeziku, tako da ne želimo odvratiti pažnju sa implementacijama specifičnim za pretraživače. Koristit ćemo pretraživač kao način da pokrenemo JavaScript, što je veoma pogodno za online čitanje, ali to je samo jedan od načina. From 0beca7991f447b5b29266f1a5e401ed7ae496a92 Mon Sep 17 00:00:00 2001 From: Aiyo <43038017+aiyodev@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:44:42 +0200 Subject: [PATCH 9/9] Update article.md --- 1-js/02-first-steps/01-hello-world/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index f774ea54b..0d2f56157 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -41,7 +41,7 @@ Možete pokrenuti ovaj primjer tako što ćete pritisnuti "Play" tipku u gornjem `