feat: refactor how blog cards layout, add metadata, better responsiveness
This commit is contained in:
@@ -39,4 +39,11 @@ function formatDate(date: Date): string {
|
||||
})
|
||||
}
|
||||
|
||||
export { formatDate, timeago };
|
||||
function formatShortDate(date: Date): string {
|
||||
return new Date(date).toLocaleDateString('en-US', {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
})
|
||||
}
|
||||
|
||||
export { formatDate, formatShortDate, timeago };
|
||||
|
||||
@@ -6,7 +6,7 @@ const getSiteURL = () => {
|
||||
return 'https://www.alexlebens.dev';
|
||||
};
|
||||
|
||||
async function getDirectusImageURL(image: string) {
|
||||
function getDirectusImageURL(image: string) {
|
||||
return `${getDirectusURL()}/assets/${image}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user