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..fa41faee3 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 @@
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..5bfd4f52f 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,12 +1,12 @@
-importance: 5
+důležitost: 5
---
-# Show an alert
+# Zobrazte zprávu
-Create a page that shows a message "I'm JavaScript!".
+VytvoÅte stránku, která zobrazà zprávu âJá jsem JavaScript!â.
-Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works.
+Nezáležà na tom, zda to udÄláte na pÃskoviÅ¡ti nebo lokálnÄ, jen se snažte, aby to fungovalo.
[demo src="solution"]
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..a12ad2425 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("Já jsem JavaScript!");
\ No newline at end of file
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..cfc96e3f1 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,7 @@
-The HTML code:
+HTML kód:
[html src="index.html"]
-For the file `alert.js` in the same folder:
+Pro soubor `alert.js` ve stejné složce:
[js src="alert.js"]
-
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..b81f6dd7d 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
@@ -2,8 +2,8 @@ importance: 5
---
-# Show an alert with an external script
+# Zobrazte zprávu pomocà externÃho skriptu
-Take the solution of the previous task
+
PÅed skriptem...
*!* */!* -
...After the script.
+
...a za skriptem.
@@ -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. +PÅÃklad si můžete pÅehrát kliknutÃm na tlaÄÃtko âPÅehrátâ v pravém hornÃm rohu ve výše uvedeném oknÄ. ``` -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"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder. +Zde `/cesta/ke/skriptu.js` je absolutnà cesta ke skriptu z koÅenové složky webového sÃdla. Můžeme uvést i relativnà cestu od aktuálnà stránky. NapÅÃklad `src="script.js"`, stejnÄ jako `src="./script.js"`, by znamenalo soubor `"script.js"` v aktuálnà složce. -We can give a full URL as well. For instance: +Můžeme poskytnout i úplné URL. NapÅÃklad: ```html ``` -To attach several scripts, use multiple tags: +Chceme-li pÅipojit vÃce skriptů, použijeme vÃce znaÄek: ```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. +Bývá pravidlem, že do HTML se ukládajà jen ty nejjednoduššà skripty. SložitÄjšà se umisÅ¥ujà do oddÄlených souborů. -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). +Výhodou oddÄleného souboru je, že prohlÞeÄ si jej stáhne a uložà do své [mezipamÄti](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. +Jiné stránky, které se odkazujà na stejný skript, si jej mÃsto opÄtovného staženà nahrajà z mezipamÄti, takže se soubor ve skuteÄnosti stáhne pouze jednou. -That reduces traffic and makes pages faster. +TÃm se snižuje pÅenos dat a naÄÃtánà stránek je tak rychlejÅ¡Ã. ``` -````warn header="If `src` is set, the script content is ignored." -A single ` ``` -We must choose either an external ` + ``` ```` -## Summary +## Shrnutà -- We can use a ``. +- JavaScriptový kód můžeme umÃstit na stránku pomocà znaÄky ``. -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. +O skriptech v prohlÞeÄi a jejich interakcà s webovou stránkou toho lze napsat mnohem vÃce. MÄjme vÅ¡ak na pamÄti, že tato Äást tutoriálu je vÄnována pouze jazyku JavaScript, takže bychom se zde nemÄli zatÄžovat specifiky jeho implementacà v prohlÞeÄÃch. Ke spouÅ¡tÄnà skriptů v JavaScriptu budeme použÃvat prohlÞeÄ, což je pÅi online Ätenà velmi výhodné, ale je to jen jedna z mnoha možnostÃ.