update AI page

This commit is contained in:
Raven Scott 2024-10-02 05:30:13 -04:00
parent c2a658c61c
commit ded4c43700
5 changed files with 122 additions and 0 deletions

20
app.js
View File

@ -166,6 +166,26 @@ app.get('/about', (req, res) => {
}); });
}); });
// About Route (Load markdown and render using EJS)
app.get('/about-rayai', (req, res) => {
const aboutMarkdownFile = path.join(__dirname, 'me', 'about-rayai.md');
// Read the markdown file and convert to HTML
fs.readFile(aboutMarkdownFile, 'utf-8', (err, data) => {
if (err) {
return res.status(500).send('Error loading About page');
}
const aboutContentHtml = marked(data); // Convert markdown to HTML
res.render('about', {
title: `About RayAI`,
content: aboutContentHtml,
menuItems // Pass the menu items to the view
});
});
});
// Contact Route (Render the contact form) // Contact Route (Render the contact form)
app.get('/contact', (req, res) => { app.get('/contact', (req, res) => {
res.render('contact', { res.render('contact', {

19
me/about-rayai.md Normal file
View File

@ -0,0 +1,19 @@
<h1 style="text-align: center;">About RayAI</h1>
<h2 style="text-align: center;">System Overview</h2>
<p style="text-align: center;">OS: Ubuntu 24.04 LTS (x86_64)</p>
<p style="text-align: center;">Kernel: 15.5</p>
<h2 style="text-align: center;">Hardware Specs</h2>
<p style="text-align: center;">CPU: AMD FX-8320E (8 cores) @ 3.20 GHz</p>
<p style="text-align: center;">GPU: NVIDIA GeForce RTX 2060 SUPER</p>
<p style="text-align: center;">Total System Memory: 24 GB</p>
<h2 style="text-align: center;">AI Model</h2>
<p style="text-align: center;">Model: Meta-Llama-3.2 (3B)</p>
<p style="text-align: center;"><a href= "https://blog.raven-scott.fyi/rayai-at-home-chat-assistant-server">https://blog.raven-scott.fyi/rayai-at-home-chat-assistant-server</a></p>

View File

@ -212,3 +212,7 @@ function openTop() {
window.open('https://ai-top.x64.world/', 'liveLogGtopWindow', 'width=800,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes'); window.open('https://ai-top.x64.world/', 'liveLogGtopWindow', 'width=800,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes');
} }
function openAbout() {
window.open('https://raven-scott.fyi/about-rayai', 'liveLogGtopWindow', 'width=800,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes');
}

76
views/about-rayai.ejs Normal file
View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- 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><%= title %> | <%= process.env.OWNER_NAME %>'s' Blog</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">
<!-- Custom CSS -->
<link rel="stylesheet" href="<%= process.env.HOST_URL %>/css/styles.css">
<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">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container-fluid">
<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">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<% menuItems.forEach(item => { %>
<li class="nav-item">
<a class="nav-link" href="<%= item.url %>" <%= item.openNewPage ? 'target="_blank"' : '' %>><%= item.title %></a>
</li>
<% }) %>
</ul>
</div>
</div>
</nav>
<!-- About Me Section -->
<section class="about-me py-5">
<div class="container">
<div class="section-divider"></div>
<!-- Inject the HTML content generated from the markdown -->
<div class="markdown-content">
<%- content %>
</div>
</div>
</section>
<!-- Footer -->
<footer class="text-white text-center py-4">
<div class="container">
<h4 class="footer-logo mb-3"><%= process.env.FOOTER_TAGLINE %></h4>
<p class="footer-links mb-3">
<a href="/" class="text-white text-decoration-none me-3">Home</a>
<a href="/about" class="text-white text-decoration-none me-3">About</a>
<a href="/contact" class="text-white text-decoration-none me-3">Contact</a>
<a href="<%= process.env.HOST_URL %>/sitemap.xml" class="text-white text-decoration-none me-3">Sitemap</a>
<a href="<%= process.env.HOST_URL %>/rss" class="text-white text-decoration-none">RSS Feed</a>
</p>
<p class="mb-0">&copy; 2024 <%= process.env.OWNER_NAME %>. All rights reserved.</p>
</div>
</footer>
<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -72,6 +72,9 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#" onclick="openGpuStats()">GPU Stats</a> <a class="nav-link" href="#" onclick="openGpuStats()">GPU Stats</a>
</li> </li>
<li class="nav-item">
<a class="nav-link" href="#" onclick="openAbout()">About RayAI</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>