From 58f2c2b8166aef51c9f4cb14e03ce81781dfcdbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info> Date: Mon, 4 Apr 2016 21:20:16 +0200 Subject: [PATCH] =?UTF-8?q?Vylep=C5=A1en=20pan=20Sponka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/2016/nove-stranky.md | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/articles/2016/nove-stranky.md b/articles/2016/nove-stranky.md index bc71fb97..6e63243c 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> -- GitLab