# About - Sky Art Shop

href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" />

# Blog

Inspiration, tips, and creative ideas

Loading...

Loading blog posts...

id="noPosts" style="display: none; text-align: center; padding: 40px; color: #666" >

No blog posts available at the moment.

// Load blog posts from API async function loadBlog() { try { const response = await fetch("/api/blog/posts"); if (response.ok) { const data = await response.json(); const posts = data.posts || []; document.getElementById("loadingMessage").style.display = "none"; if (posts.length === 0) { document.getElementById("noPosts").style.display = "block"; return; } const grid = document.getElementById("blogGrid"); grid.innerHTML = posts .map( (post) => `
${ post.imageurl ? `
` : "" }
${new Date( post.createdat ).toLocaleDateString()}

## ${ post.title }

${ post.excerpt || post.content?.substring(0, 150) + "..." || "" }

Read More
` ) .join(""); } else { document.getElementById("noPosts").style.display = "block"; } } catch (error) { console.error("Error loading blog:", error); document.getElementById("loadingMessage").innerHTML = '

Error loading blog posts. Please try again later.

'; } // Initialize loadBlog();