Website restoration: Node.js backend, restored design, GitHub sync disabled

- Replaced broken .NET backend with Node.js/Express
- Restored original website design with purple gradient hero
- Updated homepage and shop pages with Bootstrap 5 responsive design
- Disabled GitHub remote sync - all code now stored locally only
- Created backup scripts and documentation
- All changes saved on Ubuntu server at /var/www/SkyArtShop
This commit is contained in:
Local Server
2025-12-13 17:53:34 -06:00
parent d90bb4cb5d
commit 8bb6430a70
3132 changed files with 285659 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.css">
<style>
.sidebar { min-height: 100vh; background: #2c3e50; }
.sidebar .nav-link { color: #ecf0f1; padding: 12px 20px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: #34495e; color: #fff; }
.main-content { padding: 20px; background: #ecf0f1; min-height: 100vh; }
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 sidebar px-0">
<div class="p-3 text-white border-bottom">
<h5><i class="bi bi-shop"></i> SkyArtShop</h5>
<small>Admin Panel</small>
</div>
<ul class="nav flex-column pt-3">
<li><a class="nav-link active" href="/admin/dashboard"><i class="bi bi-speedometer2"></i> Dashboard</a></li>
<li><a class="nav-link" href="/admin/products"><i class="bi bi-box-seam"></i> Products</a></li>
<li><a class="nav-link" href="/admin/orders"><i class="bi bi-receipt"></i> Orders</a></li>
<li><a class="nav-link" href="/admin/users"><i class="bi bi-people"></i> Users</a></li>
<li><a class="nav-link text-danger mt-4" href="/admin/logout"><i class="bi bi-box-arrow-right"></i> Logout</a></li>
</ul>
<div class="p-3 text-white-50" style="position:absolute;bottom:0;width:100%;">
<small>Logged: <strong><%= user.name %></strong></small>
</div>
</nav>
<main class="col-md-10 main-content">
<h1 class="h2 mb-4"><i class="bi bi-speedometer2"></i> Dashboard</h1>
<div class="row g-3 mb-4">
<div class="col-md-3">
<div class="card shadow-sm">
<div class="card-body">
<h6 class="text-muted">Products</h6>
<h2><%= stats.products %></h2>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card shadow-sm">
<div class="card-body">
<h6 class="text-muted">Orders</h6>
<h2><%= stats.orders %></h2>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card shadow-sm">
<div class="card-body">
<h6 class="text-muted">Users</h6>
<h2><%= stats.users %></h2>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card shadow-sm">
<div class="card-body">
<h6 class="text-muted">Pages</h6>
<h2><%= stats.pages %></h2>
</div>
</div>
</div>
</div>
<div class="alert alert-success"><i class="bi bi-check-circle"></i> System operational</div>
</main>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.css">
</head>
<body class="bg-light">
<div class="container">
<div class="row justify-content-center align-items-center min-vh-100">
<div class="col-md-5">
<div class="card shadow-lg">
<div class="card-body p-5">
<div class="text-center mb-4">
<h2 class="fw-bold"><i class="bi bi-shop text-primary"></i> SkyArtShop</h2>
<p class="text-muted">Admin Login</p>
</div>
<% if (error === 'invalid') { %>
<div class="alert alert-danger"><i class="bi bi-exclamation-triangle"></i> Invalid email or password</div>
<% } else if (error === 'server') { %>
<div class="alert alert-danger"><i class="bi bi-exclamation-triangle"></i> Server error. Please try again.</div>
<% } %>
<form method="POST" action="/admin/login">
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<div class="input-group">
<span class="input-group-text"><i class="bi bi-envelope"></i></span>
<input type="email" class="form-control" id="email" name="email" required autofocus>
</div>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<div class="input-group">
<span class="input-group-text"><i class="bi bi-lock"></i></span>
<input type="password" class="form-control" id="password" name="password" required>
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-lg"><i class="bi bi-box-arrow-in-right"></i> Login</button>
</div>
</form>
<div class="text-center mt-4">
<small class="text-muted"><a href="/" class="text-decoration-none"><i class="bi bi-arrow-left"></i> Back to website</a></small>
</div>
</div>
</div>
<div class="text-center mt-3">
<small class="text-muted">Default: admin@example.com / password</small>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title><%= title %></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container my-4">
<h1>Orders</h1>
<a href="/admin/dashboard" class="btn btn-secondary mb-3">Back</a>
<table class="table">
<thead><tr><th>Order #</th><th>Amount</th><th>Status</th><th>Date</th></tr></thead>
<tbody>
<% orders.forEach(o => { %>
<tr>
<td>#<%= o.ordernumber %></td>
<td>$<%= parseFloat(o.totalamount).toFixed(2) %></td>
<td><%= o.status %></td>
<td><%= new Date(o.createdat).toLocaleDateString() %></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><%= title %></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container my-4">
<h1>Products</h1>
<a href="/admin/dashboard" class="btn btn-secondary mb-3">Back to Dashboard</a>
<table class="table">
<thead>
<tr><th>Name</th><th>Price</th><th>Stock</th><th>Status</th></tr>
</thead>
<tbody>
<% products.forEach(p => { %>
<tr>
<td><%= p.name %></td>
<td>$<%= parseFloat(p.price).toFixed(2) %></td>
<td><%= p.stockquantity %></td>
<td><%= p.isactive ? 'Active' : 'Inactive' %></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title><%= title %></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container my-4">
<h1>Admin Users</h1>
<a href="/admin/dashboard" class="btn btn-secondary mb-3">Back</a>
<table class="table">
<thead><tr><th>Name</th><th>Email</th><th>Role</th><th>Last Login</th></tr></thead>
<tbody>
<% users.forEach(u => { %>
<tr>
<td><%= u.name %></td>
<td><%= u.email %></td>
<td><%= u.role %></td>
<td><%= u.lastlogin ? new Date(u.lastlogin).toLocaleDateString() : 'Never' %></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</body>
</html>