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:
77
backend/views/admin/dashboard.ejs
Normal file
77
backend/views/admin/dashboard.ejs
Normal 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>
|
||||
57
backend/views/admin/login.ejs
Normal file
57
backend/views/admin/login.ejs
Normal 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>
|
||||
25
backend/views/admin/orders.ejs
Normal file
25
backend/views/admin/orders.ejs
Normal 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>
|
||||
29
backend/views/admin/products.ejs
Normal file
29
backend/views/admin/products.ejs
Normal 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>
|
||||
25
backend/views/admin/users.ejs
Normal file
25
backend/views/admin/users.ejs
Normal 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>
|
||||
13
backend/views/public/404.ejs
Normal file
13
backend/views/public/404.ejs
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>404 - Not Found</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="bg-light">
|
||||
<div class="container text-center" style="padding-top:100px;">
|
||||
<h1 class="display-1">404</h1>
|
||||
<p>Page not found</p>
|
||||
<a href="/" class="btn btn-primary">Go Home</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
249
backend/views/public/home.ejs
Normal file
249
backend/views/public/home.ejs
Normal file
@@ -0,0 +1,249 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SkyArtShop - Scrapbooking, Journaling & Crafting Supplies</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"
|
||||
/>
|
||||
<link rel="stylesheet" href="/assets/css/main.css" />
|
||||
<style>
|
||||
.hero-section {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 100px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.hero-section h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.hero-section p {
|
||||
font-size: 1.3rem;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.product-card {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.product-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.product-card img {
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
}
|
||||
.navbar-custom {
|
||||
background-color: #1a1a1a;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.footer-custom {
|
||||
background-color: #1a1a1a;
|
||||
color: #ffffff;
|
||||
padding: 40px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-palette-fill"></i> SkyArtShop
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNav"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/">Home</a>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link" href="/shop">Shop</a></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/portfolio">Portfolio</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/about">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/contact">Contact</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/login"
|
||||
><i class="bi bi-lock"></i> Admin</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero-section">
|
||||
<div class="container">
|
||||
<h1>Welcome to SkyArtShop</h1>
|
||||
<p class="lead">Premium Scrapbooking, Journaling & Crafting Supplies</p>
|
||||
<a href="/shop" class="btn btn-light btn-lg px-5 py-3">
|
||||
<i class="bi bi-cart"></i> Shop Now
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Featured Products -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="display-5 fw-bold">Featured Products</h2>
|
||||
<p class="text-muted">Discover our best-selling crafting supplies</p>
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
<% products.slice(0, 8).forEach(p => { %>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<div class="card product-card h-100">
|
||||
<% if (p.imagepath) { %>
|
||||
<img
|
||||
src="/uploads/images/<%= p.imagepath %>"
|
||||
class="card-img-top"
|
||||
alt="<%= p.name %>"
|
||||
/>
|
||||
<% } else { %>
|
||||
<div
|
||||
style="
|
||||
height: 250px;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
"
|
||||
>
|
||||
<i class="bi bi-image" style="font-size: 3rem; color: #999"></i>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= p.name %></h5>
|
||||
<% if (p.description) { %>
|
||||
<p class="card-text text-muted small">
|
||||
<%= p.description.substring(0, 60) %>...
|
||||
</p>
|
||||
<% } %>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<span class="h5 mb-0 text-primary"
|
||||
>$<%= parseFloat(p.price).toFixed(2) %></span
|
||||
>
|
||||
<a href="/shop" class="btn btn-sm btn-outline-primary"
|
||||
>View</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
<div class="text-center mt-5">
|
||||
<a href="/shop" class="btn btn-primary btn-lg">View All Products</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Features Section -->
|
||||
<section class="bg-light py-5">
|
||||
<div class="container">
|
||||
<div class="row text-center g-4">
|
||||
<div class="col-md-4">
|
||||
<div class="p-4">
|
||||
<i class="bi bi-truck display-4 text-primary mb-3"></i>
|
||||
<h4>Free Shipping</h4>
|
||||
<p class="text-muted">On orders over $50</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="p-4">
|
||||
<i class="bi bi-award display-4 text-primary mb-3"></i>
|
||||
<h4>Quality Products</h4>
|
||||
<p class="text-muted">Premium crafting supplies</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="p-4">
|
||||
<i class="bi bi-headset display-4 text-primary mb-3"></i>
|
||||
<h4>24/7 Support</h4>
|
||||
<p class="text-muted">Always here to help</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer-custom">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5><i class="bi bi-palette-fill"></i> SkyArtShop</h5>
|
||||
<p class="text-muted">
|
||||
Your one-stop shop for premium scrapbooking, journaling, and
|
||||
crafting supplies.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5>Quick Links</h5>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<a href="/" class="text-muted text-decoration-none">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/shop" class="text-muted text-decoration-none">Shop</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/about" class="text-muted text-decoration-none"
|
||||
>About</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/contact" class="text-muted text-decoration-none"
|
||||
>Contact</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5>Connect With Us</h5>
|
||||
<div class="d-flex gap-3">
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-facebook fs-4"></i
|
||||
></a>
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-instagram fs-4"></i
|
||||
></a>
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-twitter fs-4"></i
|
||||
></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="bg-light" />
|
||||
<div class="text-center text-muted">
|
||||
<p>© 2025 SkyArtShop. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
208
backend/views/public/shop.ejs
Normal file
208
backend/views/public/shop.ejs
Normal file
@@ -0,0 +1,208 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Shop - SkyArtShop</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"
|
||||
/>
|
||||
<link rel="stylesheet" href="/assets/css/main.css" />
|
||||
<style>
|
||||
.navbar-custom {
|
||||
background-color: #1a1a1a;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.page-header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 60px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.product-card {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.product-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.product-card img {
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
}
|
||||
.footer-custom {
|
||||
background-color: #1a1a1a;
|
||||
color: #ffffff;
|
||||
padding: 40px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-palette-fill"></i> SkyArtShop
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNav"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/shop">Shop</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/portfolio">Portfolio</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/about">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/contact">Contact</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/login"
|
||||
><i class="bi bi-lock"></i> Admin</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<section class="page-header">
|
||||
<div class="container">
|
||||
<h1 class="display-4">Our Products</h1>
|
||||
<p class="lead">Browse our collection of premium crafting supplies</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Products -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-12">
|
||||
<p class="text-muted"><%= products.length %> products found</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
<% products.forEach(p => { %>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<div class="card product-card h-100">
|
||||
<% if (p.imagepath) { %>
|
||||
<img
|
||||
src="/uploads/images/<%= p.imagepath %>"
|
||||
class="card-img-top"
|
||||
alt="<%= p.name %>"
|
||||
/>
|
||||
<% } else { %>
|
||||
<div
|
||||
style="
|
||||
height: 250px;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
"
|
||||
>
|
||||
<i class="bi bi-image" style="font-size: 3rem; color: #999"></i>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><%= p.name %></h5>
|
||||
<% if (p.description) { %>
|
||||
<p class="card-text text-muted small">
|
||||
<%= p.description.substring(0, 80) %>...
|
||||
</p>
|
||||
<% } %>
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-center mt-3"
|
||||
>
|
||||
<span class="h5 mb-0 text-primary"
|
||||
>$<%= parseFloat(p.price).toFixed(2) %></span
|
||||
>
|
||||
<button class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-cart-plus"></i> Add to Cart
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer-custom mt-5">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5><i class="bi bi-palette-fill"></i> SkyArtShop</h5>
|
||||
<p class="text-muted">
|
||||
Your one-stop shop for premium scrapbooking, journaling, and
|
||||
crafting supplies.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5>Quick Links</h5>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<a href="/" class="text-muted text-decoration-none">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/shop" class="text-muted text-decoration-none">Shop</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/about" class="text-muted text-decoration-none"
|
||||
>About</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/contact" class="text-muted text-decoration-none"
|
||||
>Contact</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5>Connect With Us</h5>
|
||||
<div class="d-flex gap-3">
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-facebook fs-4"></i
|
||||
></a>
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-instagram fs-4"></i
|
||||
></a>
|
||||
<a href="#" class="text-muted"
|
||||
><i class="bi bi-twitter fs-4"></i
|
||||
></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="bg-light" />
|
||||
<div class="text-center text-muted">
|
||||
<p>© 2025 SkyArtShop. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user