Phase 1: Homepage seamless design - add gradient transitions
- Added gradient transitions between sections in global.css - Portfolio section now has gradient-top (dark to white fade) - Blog section now has gradient-bottom (white fade from dark) - Reduced portfolio overlay opacity from 0.85 to 0.65 - Added border to blog cards for white-on-white visibility - Blog cards now have primary color accent on hover
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
import { emdash } from "emdash/astro";
|
||||
import { getEmDashCollection } from "emdash";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
|
||||
export async function getSiteSettings() {
|
||||
const context = await emdash(Astro);
|
||||
const settings = context.entries.settings?.[0];
|
||||
return settings;
|
||||
}
|
||||
|
||||
export function resolveBlogSiteIdentity(entry: CollectionEntry<"blog">) {
|
||||
return {
|
||||
title: entry.data.title,
|
||||
@@ -20,4 +14,13 @@ export function getReadingTime(content: string): string {
|
||||
const words = content.split(/\s+/).length;
|
||||
const minutes = Math.ceil(words / wordsPerMinute);
|
||||
return `${minutes} นาที`;
|
||||
}
|
||||
|
||||
export async function getBlogPosts() {
|
||||
const { entries } = await getEmDashCollection("blog");
|
||||
return entries.sort((a, b) => {
|
||||
const dateA = new Date(a.data.date || 0).getTime();
|
||||
const dateB = new Date(b.data.date || 0).getTime();
|
||||
return dateB - dateA;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user