Epikriza / src /templates /index.html
LukaVidakovic's picture
Update src/templates/index.html
905d44e verified
Raw History Blame Contribute Delete
4.92 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Епикриза</title>
<link rel="stylesheet" href="/static/css/style.css"/>
<!-- <style>
.chatbot-iframe {
position: fixed;
bottom: 0px;
left: 0px;
border: none;
transition-delay: 0.8s;
z-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>
<h1>Епикриза</h1>
<div class="button-container">
<button id="generateEpikrizaButton" class="btn">Генериши Епикризу</button>
</div>
<select id="patientIdDropdown" style="display: none"></select>
<div class="content-container">
<div class="form-group left">
<div style="display: flex; flex-direction: row; align-items: center; margin-bottom: 5px;">
<label for="podaciPacijentaBox">Извештај</label>
<button id="toggleViewButton" class="btn" style="display: none; margin-left: 10px">
<i id="tableIcn" class="fa-solid fa-table"></i>
<i id="txtIcn" class="fa-solid fa-file-lines"></i>
</button>
</div>
<textarea id="podaciPacijentaBox"></textarea>
<div id="detaljiTabelaKontejner"></div>
</div>
<div class="icon-buttons">
<button id="copyButton" class="btn icon-btn">
<i class="fa-regular fa-copy"></i>
</button>
<button id="deleteButton" class="btn icon-btn">
<i class="fa-regular fa-trash-can"></i>
</button>
<div class="upload-container">
<button id="uploadButton" class="btn icon-btn">
<i class="fa-solid fa-arrow-up-from-bracket"></i>
</button>
<input type="file" id="fileInput" accept=".txt" style="display: none"/>
</div>
<div class="upload-container">
<button id="uploadCsvButton" class="btn icon-btn">
<i class="fa-solid fa-file-csv"></i>
</button>
<input type="file" id="csvInput" accept=".csv" style="display: none"/>
</div>
</div>
<div class="form-group right">
<label id="rightLabel" for="epikrizaBox">Епикриза</label>
<textarea id="epikrizaBox"></textarea>
</div>
</div>
<div class="button-container">
<button id="postProcessButton" class="btn">Уреди Епикризу</button>
</div>
<div id="copyMessage" class="hidden">Копирано</div>
<div class="powered-by">
Powered by
<a href="https://www.labsoft.ai" target="_blank" class="labsoft-link">
<img src="/static/images/Logo.png" alt="Logo" class="logo-img-pb"/>
</a>
</div>
<!-- <iframe
src="https://d1cg2ftwsk9g5q.cloudfront.net"
class="chatbot-iframe close"
id="chatbot-iframe"
frameborder="0"
scrolling="no"> -->
<script src="/static/js/record.js"></script>
<script src="https://kit.fontawesome.com/e8304ae722.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script>
<!-- <script>
document.addEventListener("DOMContentLoaded", function () {
const cb = document.querySelector(".chatbot-iframe");
if (!cb) {
console.error("Chatbot iframe not found.");
return;
}
// Detekcija jezika iz URL-a
const currentUrl = window.location.href;
let detectedLang = "sr";
if (currentUrl.includes("/en/")) {
detectedLang = "en";
} else if (currentUrl.includes("/zh-hans/")) {
detectedLang = "zh-hans";
} else if (currentUrl.includes("/de/")) {
detectedLang = "de";
} else if (currentUrl.includes("/ru/")) {
detectedLang = "ru";
} else if (currentUrl.includes("/sr/")) {
detectedLang = "sr";
}
const chatbotUrl = `${cb.src}?lang=${detectedLang}`;
cb.src = chatbotUrl;
setTimeout(() => {
cb.contentWindow.postMessage(
{
screenWidth: window.innerWidth,
screenHeight: window.innerHeight,
},
"*"
);
}, 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>
</html>