Update src/templates/index.html
Browse files4 unmodified lines5678910112 unmodified lines141516171819202150 unmodified lines7273747576777879807 unmodified lines888990919293949596979811 unmodified lines1101111121131141151161171181191201211221231241251261271281291301311321331341351361371383 unmodified lines1421431441451461474 unmodified lines<title>Епикриза</title><link rel="stylesheet" href="/static/css/style.css"/><style>.chatbot-iframe {position: fixed;bottom: 0px;left: 0px;2 unmodified linesz-index: 9999;}.chatbot-iframe.open {transition-delay: 0s;}</style></head><body>50 unmodified lines<img src="/static/images/Logo.png" alt="Logo" class="logo-img-pb"/></a></div><iframesrc="https://d1cg2ftwsk9g5q.cloudfront.net"class="chatbot-iframe"id="chatbot-iframe"frameborder="0"scrolling="no">7 unmodified linesconsole.error("Chatbot iframe not found.");return;}// Postavi početne dimenzijecb.style.width = "80px";cb.style.height = "80px";// Detekcija jezika iz URL-aconst currentUrl = window.location.href;let detectedLang = "sr";11 unmodified linesconst chatbotUrl = `${cb.src}?lang=${detectedLang}`;cb.src = chatbotUrl;// Podesi dimenzije prilikom otvaranja i zatvaranjawindow.addEventListener("message", (event) => {if (event.data === "closeChatbot") {cb.classList.remove("open");cb.style.width = "80px";cb.style.height = "80px";} else if (event.data === "openChatbot") {cb.classList.add("open");if (window.innerWidth <= 768) {// Podesi za manje ekranecb.style.width = "100dvw";cb.style.height = "100dvh";cb.style.left = "0";cb.style.bottom = "0";} else {// Podesi za veće ekranecb.style.width = "430px";cb.style.height = "630px";}}});// Pošalji veličinu ekrana iframe-usetTimeout(() => {cb.contentWindow.postMessage({3 unmodified lines"*");}, 250);});</script></body>4 unmodified lines5678910112 unmodified lines1415161718192021222324252627282930313233343550 unmodified lines8687888990919293947 unmodified lines10210310410510610711 unmodified lines1191201211221231243 unmodified lines1281291301311321331341351361371381391401411421434 unmodified lines<title>Епикриза</title><link rel="stylesheet" href="/static/css/style.css"/><style>.chatbot-iframe {position: fixed;bottom: 0px;left: 0px;2 unmodified linesz-index: 9999;}.chatbot-iframe.open {width: 430px;height: 630px;transition-delay: 0s;}.chatbot-iframe.close {width: 100px;height: 100px;}@media only screen and (max-width: 768px) {.chatbot-iframe.open {width: 100dvw;height: 100dvh;left: 0;bottom: 0;}}</style></head><body>50 unmodified lines<img src="/static/images/Logo.png" alt="Logo" class="logo-img-pb"/></a></div><iframesrc="https://d1cg2ftwsk9g5q.cloudfront.net"class="chatbot-iframe close"id="chatbot-iframe"frameborder="0"scrolling="no">7 unmodified linesconsole.error("Chatbot iframe not found.");return;}// Detekcija jezika iz URL-aconst currentUrl = window.location.href;let detectedLang = "sr";11 unmodified linesconst chatbotUrl = `${cb.src}?lang=${detectedLang}`;cb.src = chatbotUrl;setTimeout(() => {cb.contentWindow.postMessage({3 unmodified lines"*");}, 250);window.addEventListener("message", (event) => {if (event.data === "closeChatbot") {cb.classList.remove("open");cb.classList.add("close");} else if (event.data === "openChatbot") {cb.classList.remove("close");cb.classList.add("open");}});});</script></body>
src/templates/index.html+27-31