diff --git a/articles/2016/nove-stranky.md b/articles/2016/nove-stranky.md index bc71fb97f5b8a0207ea345cc5e4c716dacc15b6d..6e63243c3128db5b8c256b496febe42f6ceb1f23 100644 --- a/articles/2016/nove-stranky.md +++ b/articles/2016/nove-stranky.md @@ -3,6 +3,7 @@ title="NovĂ© stránky ok1kvk.cz" perex="Jak jste si jistÄ› všimli, tak jsme nasadili novou podobu stránek ok1kvk.cz. NenĂ to pouze novĂ˝ vzhled, ale kompletnÄ› novĂ˝ systĂ©m. VĂce informacĂ uvnitĹ™ ÄŤlánku." image="icon.png" +tags=["Radioklub"] [date] creation="2016-04-01 12:00:00" ``` @@ -41,5 +42,57 @@ pomocnĂka. K vytvoĹ™enĂ pomocnĂka jsme pouĹľili knihovnu [ClippyJS](https://w clippy.load('Clippy', function(agent) { agent.show(); agent.speak("Vypadá to, Ĺľe jste na našich novĂ˝ch stránkách poprvĂ©. PotĹ™ebujete s něčĂm pomoci?"); + var sleep = function(time) { + return function(agent) { + return new Promise(function(resolve, reject) { + agent._addToQueue(function (complete) { + window.setTimeout(function() {resolve(agent);complete();}, time); + }); + }); + } + } + Promise.resolve(agent) + .then(sleep(1000)) + .then(function(agent) { + var chipPos = $(".chip").first().offset(); + agent.moveTo(chipPos.left-120, chipPos.top-30); + agent.play("GestureLeft"); + agent.speak("Pro zobrazenĂ podobnĂ˝ch ÄŤlánkĹŻ mĹŻĹľete kliknout na štĂtek."); + return agent; + }) + .then(sleep(1000)) + .then(function(agent) { + var pos = $(".search-icon").first().offset(); + agent.moveTo(pos.left-120, pos.top); + agent.play("GestureLeft"); + agent.speak("Pro vyhledávánĂ pouĹľijte ikonu lupy"); + return agent; + }) + .then(sleep(1000)) + .then(function(agent) { + var pos = $("#o-nas").first().offset(); + agent.moveTo(pos.left-120, pos.top); + agent.play("GestureLeft"); + agent.speak("Pro navigaci stránkami pouĹľijte menu"); + return agent; + }) + .then(sleep(1000)) + .then(function(agent) { + var pos = $(".brand-logo").first().offset(); + var width = $(".brand-logo").first().width(); + agent.moveTo(pos.left+width, pos.top); + agent.play("GestureRight"); + agent.speak("Pro návrat na ĂşvodnĂ stránku mĹŻĹľete kliknout na logo OK1KVK"); + return agent; + }) + .then(sleep(1000)) + .then(function(agent) { + var width = $(document).width(); + var height = $(document).height(); + agent.moveTo(width/2-62, height - 200); + agent.play("GestureDown"); + agent.speak("Dalšà uĹľiteÄŤnĂ© odkazy naleznete v patiÄŤce stránky"); + return agent; + }); }); </script>