-
-
- {new Date(post.date!).toLocaleString('default', {
- month: 'short',
- day: 'numeric',
- year: 'numeric'
- })}
-
-
@@ -87,6 +110,26 @@
.blog-card {
@apply flex w-full max-w-5xl overflow-hidden rounded-lg bg-slate-100 text-slate-950 drop-shadow-xl transition-all hover:drop-shadow-2xl;
+ .toast {
+ @apply absolute top-0 right-0 rounded-bl-lg p-2 font-bold text-slate-50;
+ }
+
+ &.updated {
+ box-shadow: 0 0 0 4px var(--color-purple-600);
+
+ .toast {
+ @apply bg-purple-600;
+ }
+ }
+
+ &.new {
+ box-shadow: 0 0 0 4px var(--color-amber-600);
+
+ .toast {
+ @apply bg-amber-600;
+ }
+ }
+
img.thumbnail {
@apply absolute h-full w-full object-cover transition-transform;
diff --git a/src/lib/util/Blogs.ts b/src/lib/util/Blogs.ts
index a45ceaa..47939b5 100644
--- a/src/lib/util/Blogs.ts
+++ b/src/lib/util/Blogs.ts
@@ -1,6 +1,7 @@
import path from 'path';
export const THUMBNAIL_DEFAULT = "https://teasanctuary.ru/common/background-day.webp";
+export const BLOG_POST_FRESHNESS_MILLIS = 3 * 24 * 60 * 60 * 1000; // 3 дня
export type PostComparer = (a: App.BlogPost, b: App.BlogPost) => number;