chgpt / static /main2.html
Miguel Diaz
fix
3978ce4
raw
history blame
3.67 kB
<html>
<head>
<title> Chatbot </title>
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="static/favicon.png" type="image/png">
<link rel="stylesheet" href="static/css/app.css?v={% version %}">
<link rel="stylesheet" href="static/css/app2.css?v={% version %}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js" integrity="sha512-9khQRAUBYEJDCDVP2yw3LRUQvjJ0Pjx0EShmaQjcHa6AXiOv6qHQu9lCAIR8O+/D8FtaCoJ2c0Tf9Xo7hYH01Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha512-SkmBfuA2hqjzEVpmnMt/LINrjop3GKWqsuLSSB3e7iBmYK7JuWw4ldmmxwD9mdm2IRTTi0OxSAfEGvgEi0i2Kw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="static/js/chatHandler.js?v={% version %}"></script>
<script src="static/js/windowHandler.js?v={% version %}"></script>
</head>
<body>
<div class="wrapper">
<div class="tab">
<button class="tablinks" onclick="openTab(event, 'tab1')">Tab 1</button>
<button class="tablinks" onclick="openTab(event, 'tab2')">Tab 2</button>
<button class="tablinks" onclick="openTab(event, 'tab3')">Tab 3</button>
</div>
<div id="tab1" class="tabcontent">
<div class="chat" id="chat1"></div>
<div class="input-box">
<textarea class="input-text" id="input-text1" placeholder="Type something" type="text" autofocus></textarea>
<button class="input-send" id="input-send1"></button>
<button class="input-delete" id="input-delete1"></button>
</div>
</div>
<div id="tab2" class="tabcontent">
<div class="chat" id="chat2"></div>
<div class="input-box">
<textarea class="input-text" id="input-text2" placeholder="Type something" type="text" autofocus></textarea>
<button class="input-send" id="input-send2"></button>
<button class="input-delete" id="input-delete2"></button>
</div>
</div>
<div id="tab3" class="tabcontent">
<div class="chat" id="chat3"></div>
<div class="input-box">
<textarea class="input-text" id="input-text3" placeholder="Type something" type="text" autofocus></textarea>
<button class="input-send" id="input-send3"></button>
<button class="input-delete" id="input-delete3"></button>
</div>
</div>
</div>
<script>
let windH = null;
let chatH = null;
$(document).ready(function() {
chatH = new ChatGPT("{% token %}");
windH = new WindowHandler();
});
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
</body>
</html>