forked from snxraven/ravenscott-blog
update AI page
This commit is contained in:
parent
6e6194f820
commit
8006c44f81
@ -2,23 +2,25 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<!-- Meta and Title -->
|
<!-- Meta and Title -->
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="<%= process.env.OWNER_NAME %>'s Blog">
|
<meta name="description" content="<%= process.env.OWNER_NAME %>'s Blog">
|
||||||
<title><%= title %> | <%= process.env.OWNER_NAME %>'s' Blog</title>
|
<title>
|
||||||
<!-- Bootstrap CSS -->
|
<%= title %> | <%= process.env.OWNER_NAME %>'s' Blog
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
|
</title>
|
||||||
<!-- Font Awesome CSS for Icons -->
|
<!-- Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
|
||||||
<!-- Custom CSS -->
|
<!-- Font Awesome CSS for Icons -->
|
||||||
<link rel="stylesheet" href="<%= process.env.HOST_URL %>/css/styles.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
<!-- Custom CSS -->
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
<link rel="stylesheet" href="<%= process.env.HOST_URL %>/css/styles.css">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
<link rel="manifest" href="/site.webmanifest">
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<link rel="manifest" href="/site.webmanifest">
|
||||||
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
@ -229,17 +231,21 @@
|
|||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="<%= process.env.HOST_URL %>"><%= process.env.SITE_NAME %></a>
|
<a class="navbar-brand" href="<%= process.env.HOST_URL %>">
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
<%= 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">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarNav">
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<% menuItems.forEach(item => { %>
|
<% menuItems.forEach(item=> { %>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="<%= item.url %>" <%= item.openNewPage ? 'target="_blank"' : '' %>><%= item.title %></a>
|
<a class="nav-link" href="<%= item.url %>" <%=item.openNewPage ? 'target="_blank"' : ''
|
||||||
|
%>><%= item.title %></a>
|
||||||
</li>
|
</li>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -401,11 +407,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resets the chat messages
|
// Resets the chat messages
|
||||||
function resetChat() {
|
async function resetChat() {
|
||||||
const messagesContainer = document.getElementById('messages');
|
try {
|
||||||
messagesContainer.innerHTML = ''; // Clear all messages
|
// Send a POST request to reset the conversation on the server
|
||||||
displayAlert('success', 'Messages Cleared!');
|
const response = await fetch('https://infer.x64.world/reset-conversation', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
// Clear the messages in the UI
|
||||||
|
const messagesContainer = document.getElementById('messages');
|
||||||
|
messagesContainer.innerHTML = ''; // Clear all messages
|
||||||
|
|
||||||
|
// Display success message
|
||||||
|
displayAlert('success', 'Messages Cleared!');
|
||||||
|
} else {
|
||||||
|
// Handle error response from the server
|
||||||
|
displayAlert('error', 'Failed to reset conversation. Please try again.');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// Handle network or other errors
|
||||||
|
displayAlert('error', 'An error occurred while resetting the conversation.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user