ravenscott-blog/views/chat.ejs

123 lines
5.9 KiB
Plaintext
Raw Normal View History

2024-10-02 03:32:27 -04:00
<!DOCTYPE html>
<html lang="en">
<head>
2024-10-02 03:38:25 -04:00
<!-- Meta and Title -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="<%= process.env.OWNER_NAME %>'s Blog">
<title>
2024-10-02 04:03:47 -04:00
<%= title %> | <%= process.env.OWNER_NAME %>'s Blog
2024-10-02 03:38:25 -04:00
</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
<!-- Font Awesome CSS for Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
2024-10-02 04:03:47 -04:00
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/atom-one-dark.min.css">
2024-10-02 03:38:25 -04:00
<!-- Custom CSS -->
<link rel="stylesheet" href="<%= process.env.HOST_URL %>/css/styles.css">
2024-10-02 04:43:43 -04:00
<link rel="stylesheet" href="<%= process.env.HOST_URL %>/css/chat.css">
2024-10-02 03:38:25 -04:00
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
2024-10-02 03:32:27 -04:00
</head>
<body class="bg-dark text-white">
<div class="chat-container">
<!-- Navbar -->
2024-10-02 03:36:38 -04:00
<nav class="navbar navbar-expand-lg navbar-dark">
2024-10-02 03:32:27 -04:00
<div class="container-fluid">
2024-10-02 03:38:25 -04:00
<a class="navbar-brand" href="<%= process.env.HOST_URL %>">
<%= process.env.SITE_NAME %>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
2024-10-02 03:32:27 -04:00
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
2024-10-02 03:38:25 -04:00
<% menuItems.forEach(item=> { %>
2024-10-02 03:32:27 -04:00
<li class="nav-item">
2024-10-02 05:51:00 -04:00
<a class="nav-link" href="<%= item.url %>" <%=item.openNewPage ? 'target="_blank"' : ''
%>>
2024-10-02 05:10:03 -04:00
<%= item.title %>
</a>
2024-10-02 03:32:27 -04:00
</li>
2024-10-02 05:51:00 -04:00
<% }) %>
<!-- Add a vertical divider -->
2024-10-04 21:03:07 -04:00
<!-- <li class="nav-item">
2024-10-02 05:51:00 -04:00
<span class="nav-link separator">|</span>
2024-10-04 21:03:07 -04:00
</li> -->
2024-10-02 05:51:00 -04:00
<!-- Inject custom menu items here as a dropdown -->
2024-10-04 21:02:47 -04:00
<!-- <li class="nav-item dropdown">
2024-10-02 05:51:00 -04:00
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Tools
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#" onclick="openLiveLog()">Live Log</a></li>
<li><a class="dropdown-item" href="#" onclick="openTop()">Top</a></li>
2024-10-02 05:53:47 -04:00
<li><a class="dropdown-item" href="#" onclick="openNetdata()">Netdata</a></li>
2024-10-02 05:51:00 -04:00
<li><a class="dropdown-item" href="#" onclick="openGpuStats()">GPU Stats</a>
</li>
<li><a class="dropdown-item" href="#" onclick="openAbout()">About RayAI</a></li>
</ul>
2024-10-04 21:02:47 -04:00
</li> -->
2024-10-02 03:32:27 -04:00
</ul>
</div>
</div>
</nav>
2024-10-02 05:10:03 -04:00
2024-10-02 05:51:00 -04:00
2024-10-02 03:32:27 -04:00
<!-- Alert Messages -->
<div id="success-alert" class="alert alert-success mt-3" style="display: none;"></div>
<div id="error-alert" class="alert alert-danger mt-3" style="display: none;"></div>
<!-- Chat Box -->
<div class="chat-box">
<div id="messages" class="messages"></div>
<!-- Input area with sticky behavior -->
<div class="input-area">
<textarea id="messageInput" class="form-control mb-2" rows="3" placeholder=""
2024-10-02 04:58:01 -04:00
onkeydown="handleKeyDown(event)" autofocus></textarea>
2024-10-02 03:32:27 -04:00
<!-- Buttons side by side -->
<div class="d-flex justify-content-between">
<button class="btn btn-secondary" onclick="resetChat()">Reset Chat</button>
2024-10-02 05:51:00 -04:00
2024-10-02 04:19:03 -04:00
<!-- Loading Indicator -->
<div id="loading" class="text-center mt-3" style="display: none;">
2024-10-02 04:23:20 -04:00
<div class="spinner-border spinner-border-sm text-primary" role="status">
2024-10-02 04:19:03 -04:00
<span class="visually-hidden">Loading...</span>
</div>
</div>
2024-10-02 04:14:25 -04:00
<button class="btn btn-primary" onclick="sendMessage()">Send Message</button>
2024-10-02 03:32:27 -04:00
</div>
</div>
2024-10-02 04:19:03 -04:00
2024-10-02 03:32:27 -04:00
</div>
</div>
<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<!-- Additional Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/3.0.7/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/he@1.2.0/he.min.js"></script>
<!-- Inline JavaScript -->
2024-10-02 04:45:18 -04:00
<script src="<%= process.env.HOST_URL %>/js/chat.js"></script>
2024-10-02 03:32:27 -04:00
</body>
</html>