Upload 3 files
Browse filesFiles changed (3)
- blogs.js+27-13
- index.html+7-8
- styles.css+15-7
49 unmodified lines505152535455565758596061626364656667686970713 unmodified lines7576777879808182838485868788899091929394959697989910010149 unmodified lines}];const postList = document.querySelector("[data-post-list]");const categoryList = document.querySelector("[data-category-list]");const countLabel = document.querySelector("[data-post-count]");const formatDate = (date) => {const [year, month, day] = date.split("-");return `${year}年${Number(month)}月${Number(day)}日`;};const categories = ["全部", ...new Set(posts.map((post) => post.category))];function renderCategories(activeCategory = "全部") {categoryList.innerHTML = categories.map((category) => `<button class="filter-button ${category === activeCategory ? "is-active" : ""}" type="button" data-category="${category}">${category}</button>`).join("");3 unmodified lines});}function renderPosts(activeCategory = "全部") {const visiblePosts = activeCategory === "全部"? posts: posts.filter((post) => post.category === activeCategory);renderCategories(activeCategory);countLabel.textContent = `${visiblePosts.length} 篇文章`;postList.innerHTML = visiblePosts.map((post) => `<article class="post-card"><a class="post-image" href="${post.url}" target="_blank" rel="noopener"><img src="${post.cover}" alt="${post.title}" loading="lazy"></a><div class="post-content"><div class="post-meta"><span class="tag">${post.category}</span><time datetime="${post.date}">${formatDate(post.date)}</time></div><h2><a href="${post.url}" target="_blank" rel="noopener">${post.title}</a></h2><p>${post.excerpt}</p><a class="read-link" href="${post.url}" target="_blank" rel="noopener">阅读全文 <span aria-hidden="true">↗</span></a></div></article>`).join("");}renderPosts();49 unmodified lines505152535455565758596061626364656667686970717273747576777879808182838485863 unmodified lines9091929394959697989910010110210310410510610710810911011111211311411549 unmodified lines}];const categoryLabels = {"产品方案": "Product Solutions","功能更新": "Feature Updates","解决方案": "Solutions","深度洞察": "Insights","客户案例": "Customer Stories","操作指引": "Guides","干货分享": "Practical Insights"};const ALL_CATEGORY = "__all__";const postList = document.querySelector("[data-post-list]");const categoryList = document.querySelector("[data-category-list]");const countLabel = document.querySelector("[data-post-count]");const formatDate = (date) => new Intl.DateTimeFormat("en-US", {year: "numeric",month: "short",day: "numeric"}).format(new Date(`${date}T00:00:00`));const categoryLabel = (category) => categoryLabels[category] || category;const categories = [ALL_CATEGORY, ...new Set(posts.map((post) => post.category))];function renderCategories(activeCategory = ALL_CATEGORY) {categoryList.innerHTML = categories.map((category) => `<button class="filter-button ${category === activeCategory ? "is-active" : ""}" type="button" data-category="${category}">${category === ALL_CATEGORY ? "All" : categoryLabel(category)}</button>`).join("");3 unmodified lines});}function renderPosts(activeCategory = ALL_CATEGORY) {const visiblePosts = activeCategory === ALL_CATEGORY? posts: posts.filter((post) => post.category === activeCategory);renderCategories(activeCategory);countLabel.textContent = `${visiblePosts.length} articles`;postList.innerHTML = visiblePosts.map((post) => `<article class="post-card"><a class="post-image" href="${post.url}" target="_blank" rel="noopener"><img src="${post.cover}" alt="${post.title}" loading="lazy"></a><div class="post-content"><div class="post-meta"><span class="tag">${categoryLabel(post.category)}</span><time datetime="${post.date}">${formatDate(post.date)}</time></div><h2><a href="${post.url}" target="_blank" rel="noopener">${post.title}</a></h2><p>${post.excerpt}</p><a class="read-link" href="${post.url}" target="_blank" rel="noopener">Read full article <span aria-hidden="true">↗</span></a></div></article>`).join("");}renderPosts();
2 unmodified lines34567894 unmodified lines14151617181920212223242526272829303132333435362 unmodified lines<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="3chat.ai 产品、技术、模型与数据集更新博客。"><title>3chat.ai Blog</title><link rel="icon" href="https://www.3chatai.cn/blog/favicon.ico?favicon.120on8qamd06b.ico" type="image/x-icon"><link rel="stylesheet" href="styles.css">4 unmodified lines<div class="brand-lockup"><imgclass="site-logo"src="https://www.3chatai.cn/blog/images/3Chat.ai_Logo.svg"alt="3Chat.ai Logo"onerror="this.style.display='none'; this.nextElementSibling.style.display='block'"><strong class="logo-fallback">3chat.ai</strong><h1>3chat.ai</h1></div><p class="brand-tagline">让每一次模型、数据、产品的升级沉淀为知识。</p></header><section aria-labelledby="posts-title"><div class="section-heading"><h2 id="posts-title">文章列表</h2><span class="post-count" data-post-count></span></div><div class="filters" data-category-list aria-label="按文章分类筛选"></div><div class="post-list" data-post-list></div></section></main>2 unmodified lines34567894 unmodified lines141516171819202122232425262728293031323334352 unmodified lines<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="3chat.ai product, technology, model, and dataset updates."><title>3chat.ai Blog</title><link rel="icon" href="https://www.3chatai.cn/blog/favicon.ico?favicon.120on8qamd06b.ico" type="image/x-icon"><link rel="stylesheet" href="styles.css">4 unmodified lines<div class="brand-lockup"><imgclass="site-logo"src="https://www.3chatai.cn/images/3Chat.ai_Logo.svg"alt="3Chat.ai official logo"onerror="if (!this.dataset.fallback) { this.dataset.fallback='1'; this.src='https://www.3chatai.cn/blog/images/3Chat.ai_Logo.svg'; } else { this.style.display='none'; this.nextElementSibling.style.display='block'; }"><strong class="logo-fallback">3chat.ai</strong></div><p class="brand-tagline">Turn every upgrade to our models, data, and products into lasting knowledge.</p></header><section aria-labelledby="posts-title"><div class="section-heading"><h2 id="posts-title">Articles</h2><span class="post-count" data-post-count></span></div><div class="filters" data-category-list aria-label="Filter articles by category"></div><div class="post-list" data-post-list></div></section></main>
52 unmodified lines5354555657588 unmodified lines6768697071726 unmodified lines79808182838428 unmodified lines11311411511611711811912012112212312412512612712812913066 unmodified lines19719819920020120220352 unmodified linesdisplay: flex;align-items: center;gap: 22px;}.site-logo {8 unmodified linesdisplay: none;font-size: 1.6rem;letter-spacing: -0.04em;}h1,6 unmodified linesh1 {margin: 0;font-size: clamp(2.4rem, 6vw, 4rem);}.brand-tagline {28 unmodified lines}.filter-button {padding: 8px 14px;border: 1px solid var(--line);border-radius: 999px;background: var(--surface);color: var(--muted);cursor: pointer;}.filter-button:hover,.filter-button.is-active {border-color: #b9c5f8;background: var(--brand-soft);color: var(--brand);}66 unmodified lines.post-content h2 {margin: 12px 0 10px;font-size: clamp(1.15rem, 2vw, 1.48rem);}.post-content h2 a:hover {52 unmodified lines53545556575859606162638 unmodified lines727374757677786 unmodified lines8586878889909128 unmodified lines12012112212312412512612712812913013113213313413513613713866 unmodified lines20520620720820921021152 unmodified linesdisplay: flex;align-items: center;gap: 22px;width: fit-content;padding: 14px 22px;border-radius: 16px;background: linear-gradient(135deg, #111827 0%, #1e293b 55%, #263b67 100%);box-shadow: 0 10px 24px rgba(30, 41, 59, 0.16);}.site-logo {8 unmodified linesdisplay: none;font-size: 1.6rem;letter-spacing: -0.04em;color: #ffffff;}h1,6 unmodified linesh1 {margin: 0;font-size: clamp(2.4rem, 6vw, 4rem);color: #ffffff;}.brand-tagline {28 unmodified lines}.filter-button {padding: 6px 10px;border: 1px solid #dbe7fb;border-radius: 8px;background: #f4f8ff;color: var(--muted);font-size: 13px;cursor: pointer;}.filter-button:hover,.filter-button.is-active {border-color: #b9c9f7;background: #eaf1ff;color: var(--brand);}66 unmodified lines.post-content h2 {margin: 12px 0 10px;font-size: clamp(1.05rem, 1.8vw, 1.32rem);}.post-content h2 a:hover {
blogs.js+27-13
index.html+7-8
styles.css+15-7