Fix: Complete blog page overhaul - fix Bootstrap Icons, HTML structure, footer, and JavaScript
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"
|
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"
|
||||||
/>
|
/>
|
||||||
<link rel="stylesheet" href="/assets/css/theme-colors.css" />
|
<link rel="stylesheet" href="/assets/css/theme-colors.css" />
|
||||||
@@ -154,6 +156,8 @@
|
|||||||
mobileMenu.classList.remove('active');
|
mobileMenu.classList.remove('active');
|
||||||
overlay.classList.remove('active');
|
overlay.classList.remove('active');
|
||||||
document.body.style.overflow = '';
|
document.body.style.overflow = '';
|
||||||
|
}
|
||||||
|
|
||||||
if (mobileToggle) mobileToggle.addEventListener('click', openMenu);
|
if (mobileToggle) mobileToggle.addEventListener('click', openMenu);
|
||||||
if (mobileClose) mobileClose.addEventListener('click', closeMenu);
|
if (mobileClose) mobileClose.addEventListener('click', closeMenu);
|
||||||
if (overlay) overlay.addEventListener('click', closeMenu);
|
if (overlay) overlay.addEventListener('click', closeMenu);
|
||||||
@@ -166,12 +170,16 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Blog</h1>
|
<h1>Blog</h1>
|
||||||
<p class="hero-subtitle">Inspiration, tips, and creative ideas</p>
|
<p class="hero-subtitle">Inspiration, tips, and creative ideas</p>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="blog-section" style="padding: 60px 0; background: #ffebeb">
|
<section class="blog-section" style="padding: 60px 0; background: #ffebeb">
|
||||||
|
<div class="container">
|
||||||
<div id="loadingMessage" style="text-align: center; padding: 40px">
|
<div id="loadingMessage" style="text-align: center; padding: 40px">
|
||||||
<div class="spinner-border text-primary" role="status">
|
<div class="spinner-border text-primary" role="status">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
<p style="margin-top: 15px; color: #666">Loading blog posts...</p>
|
<p style="margin-top: 15px; color: #666">Loading blog posts...</p>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
id="blogGrid"
|
id="blogGrid"
|
||||||
style="
|
style="
|
||||||
@@ -180,6 +188,7 @@
|
|||||||
gap: 30px;
|
gap: 30px;
|
||||||
"
|
"
|
||||||
></div>
|
></div>
|
||||||
|
<div
|
||||||
id="noPosts"
|
id="noPosts"
|
||||||
style="display: none; text-align: center; padding: 40px; color: #666"
|
style="display: none; text-align: center; padding: 40px; color: #666"
|
||||||
>
|
>
|
||||||
@@ -188,7 +197,11 @@
|
|||||||
style="font-size: 48px; color: #ccc; margin-bottom: 15px"
|
style="font-size: 48px; color: #ccc; margin-bottom: 15px"
|
||||||
></i>
|
></i>
|
||||||
<p>No blog posts available at the moment.</p>
|
<p>No blog posts available at the moment.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
|
<div class="container">
|
||||||
<div class="footer-grid">
|
<div class="footer-grid">
|
||||||
<div class="footer-col">
|
<div class="footer-col">
|
||||||
<h3 class="footer-title">Sky Art Shop</h3>
|
<h3 class="footer-title">Sky Art Shop</h3>
|
||||||
@@ -197,11 +210,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="social-links">
|
<div class="social-links">
|
||||||
<a href="#" class="social-link"><i class="bi bi-facebook"></i></a>
|
<a href="#" class="social-link"><i class="bi bi-facebook"></i></a>
|
||||||
<a href="#" class="social-link"
|
<a href="#" class="social-link"><i class="bi bi-instagram"></i></a>
|
||||||
><i class="bi bi-instagram"></i
|
|
||||||
></a>
|
|
||||||
<a href="#" class="social-link"><i class="bi bi-twitter"></i></a>
|
<a href="#" class="social-link"><i class="bi bi-twitter"></i></a>
|
||||||
><i class="bi bi-pinterest"></i
|
<a href="#" class="social-link"><i class="bi bi-pinterest"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer-col">
|
||||||
<h4 class="footer-heading">Shop</h4>
|
<h4 class="footer-heading">Shop</h4>
|
||||||
<ul class="footer-links">
|
<ul class="footer-links">
|
||||||
<li><a href="/shop">All Products</a></li>
|
<li><a href="/shop">All Products</a></li>
|
||||||
@@ -209,18 +223,30 @@
|
|||||||
<li><a href="/shop?category=prints">Prints</a></li>
|
<li><a href="/shop?category=prints">Prints</a></li>
|
||||||
<li><a href="/shop?category=supplies">Art Supplies</a></li>
|
<li><a href="/shop?category=supplies">Art Supplies</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-col">
|
||||||
<h4 class="footer-heading">About</h4>
|
<h4 class="footer-heading">About</h4>
|
||||||
|
<ul class="footer-links">
|
||||||
<li><a href="/about">Our Story</a></li>
|
<li><a href="/about">Our Story</a></li>
|
||||||
<li><a href="/portfolio">Portfolio</a></li>
|
<li><a href="/portfolio">Portfolio</a></li>
|
||||||
<li><a href="/blog">Blog</a></li>
|
<li><a href="/blog">Blog</a></li>
|
||||||
<li><a href="/contact">Contact</a></li>
|
<li><a href="/contact">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-col">
|
||||||
<h4 class="footer-heading">Customer Service</h4>
|
<h4 class="footer-heading">Customer Service</h4>
|
||||||
|
<ul class="footer-links">
|
||||||
<li><a href="/shipping-info">Shipping Info</a></li>
|
<li><a href="/shipping-info">Shipping Info</a></li>
|
||||||
<li><a href="/returns">Returns</a></li>
|
<li><a href="/returns">Returns</a></li>
|
||||||
<li><a href="/faq">FAQ</a></li>
|
<li><a href="/faq">FAQ</a></li>
|
||||||
<li><a href="/privacy">Privacy Policy</a></li>
|
<li><a href="/privacy">Privacy Policy</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="footer-bottom">
|
<div class="footer-bottom">
|
||||||
<p>© 2025 Sky Art Shop. All rights reserved.</p>
|
<p>© 2025 Sky Art Shop. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="/assets/js/page-transitions.js?v=1766709739"></script>
|
<script src="/assets/js/page-transitions.js?v=1766709739"></script>
|
||||||
<script src="/assets/js/back-button-control.js?v=1766723554"></script>
|
<script src="/assets/js/back-button-control.js?v=1766723554"></script>
|
||||||
@@ -228,6 +254,7 @@
|
|||||||
<script src="/assets/js/navigation.js"></script>
|
<script src="/assets/js/navigation.js"></script>
|
||||||
<script src="/assets/js/shop-system.js"></script>
|
<script src="/assets/js/shop-system.js"></script>
|
||||||
<script src="/assets/js/shopping.js"></script>
|
<script src="/assets/js/shopping.js"></script>
|
||||||
|
<script>
|
||||||
// Load blog posts from API
|
// Load blog posts from API
|
||||||
async function loadBlog() {
|
async function loadBlog() {
|
||||||
try {
|
try {
|
||||||
@@ -261,9 +288,8 @@
|
|||||||
}
|
}
|
||||||
<div style="padding: 25px;">
|
<div style="padding: 25px;">
|
||||||
<div style="display: flex; align-items: center; gap: 15px; margin-bottom: 12px; color: #999; font-size: 13px;">
|
<div style="display: flex; align-items: center; gap: 15px; margin-bottom: 12px; color: #999; font-size: 13px;">
|
||||||
<span><i class="bi bi-calendar"></i> ${new Date(
|
<span><i class="bi bi-calendar"></i> ${post.createdat && Object.keys(post.createdat).length > 0 ? new Date(post.createdat).toLocaleDateString() : 'Recent'}</span>
|
||||||
post.createdat
|
</div>
|
||||||
).toLocaleDateString()}</span>
|
|
||||||
<h2 style="font-size: 22px; font-weight: 600; margin-bottom: 12px; color: #333; line-height: 1.3;">${
|
<h2 style="font-size: 22px; font-weight: 600; margin-bottom: 12px; color: #333; line-height: 1.3;">${
|
||||||
post.title
|
post.title
|
||||||
}</h2>
|
}</h2>
|
||||||
@@ -288,8 +314,11 @@
|
|||||||
console.error("Error loading blog:", error);
|
console.error("Error loading blog:", error);
|
||||||
document.getElementById("loadingMessage").innerHTML =
|
document.getElementById("loadingMessage").innerHTML =
|
||||||
'<p style="color: #dc3545;">Error loading blog posts. Please try again later.</p>';
|
'<p style="color: #dc3545;">Error loading blog posts. Please try again later.</p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
loadBlog();
|
loadBlog();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user