Files
moreminimore-new/dist/server/chunks/index_sUErzmtK.mjs
2026-04-22 09:02:55 +07:00

32 lines
2.7 KiB
JavaScript

import { c as createComponent } from './astro-component_BaTxfI_2.mjs';
import 'piccolore';
import { h as renderComponent, r as renderTemplate, m as maybeRenderHead, f as addAttribute } from './server_CWPsUuvN.mjs';
import { $ as $$Layout } from './Layout_C5ObnTcG.mjs';
import { g as getCollection } from './_astro_content_DoK7oWIE.mjs';
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
const posts = await getCollection("blog");
const sortedPosts = posts.sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
);
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "บล็อก", "description": "บทความและความรู้ด้าน Digital Transformation, AI และการตลาดออนไลน์สำหรับ SMEs ไทย", "data-astro-cid-5tznm7mj": true }, { "default": async ($$result2) => renderTemplate` ${maybeRenderHead()}<section class="page-header" data-astro-cid-5tznm7mj> <div class="container" data-astro-cid-5tznm7mj> <h1 data-astro-cid-5tznm7mj>บลอก</h1> <p data-astro-cid-5tznm7mj> SMEs </p> </div> </section> <section class="blog-list" data-astro-cid-5tznm7mj> <div class="container" data-astro-cid-5tznm7mj> <div class="posts-grid" data-astro-cid-5tznm7mj> ${sortedPosts.map((post) => renderTemplate`<article class="post-card" data-astro-cid-5tznm7mj> <h2 data-astro-cid-5tznm7mj> <a${addAttribute(`/blog/${post.slug}`, "href")} data-astro-cid-5tznm7mj>${post.data.title}</a> </h2> <p class="post-meta" data-astro-cid-5tznm7mj> <span data-astro-cid-5tznm7mj>${post.data.author}</span> <span data-astro-cid-5tznm7mj></span> <time${addAttribute(post.data.pubDate.toISOString(), "datetime")} data-astro-cid-5tznm7mj> ${post.data.pubDate.toLocaleDateString("th-TH", {
year: "numeric",
month: "long",
day: "numeric"
})} </time> </p> <p class="post-description" data-astro-cid-5tznm7mj>${post.data.description}</p> <div class="post-tags" data-astro-cid-5tznm7mj> ${post.data.tags?.slice(0, 3).map((tag) => renderTemplate`<span class="tag" data-astro-cid-5tznm7mj>${tag}</span>`)} </div> </article>`)} </div> </div> </section> ` })}`;
}, "/Users/kunthawatgreethong/Gitea/moreminimore-new/src/pages/blog/index.astro", void 0);
const $$file = "/Users/kunthawatgreethong/Gitea/moreminimore-new/src/pages/blog/index.astro";
const $$url = "/blog";
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
__proto__: null,
default: $$Index,
file: $$file,
url: $$url
}, Symbol.toStringTag, { value: 'Module' }));
const page = () => _page;
export { page };