widgets email and news 3

This commit is contained in:
Alma 2025-04-13 11:48:21 +02:00
parent 25fc47ecb3
commit 735d1e2241
3 changed files with 16 additions and 16 deletions

View File

@ -9,9 +9,9 @@ import { Parole } from "@/components/parole";
export default function Home() {
return (
<main className="container mx-auto py-6 px-8 space-y-6">
<main className="container mx-auto px-6 mt-8 space-y-4">
{/* First row */}
<div className="grid grid-cols-12 gap-6">
<div className="grid grid-cols-12 gap-4">
<div className="col-span-3">
<QuoteCard />
</div>
@ -27,7 +27,7 @@ export default function Home() {
</div>
{/* Second row */}
<div className="grid grid-cols-12 gap-6">
<div className="grid grid-cols-12 gap-4">
<div className="col-span-6">
<Email />
</div>

View File

@ -100,24 +100,24 @@ export function Email() {
<RefreshCw className="h-4 w-4" />
</Button>
</CardHeader>
<CardContent className="p-4">
<CardContent className="p-3">
{error ? (
<p className="text-center text-red-500">{error}</p>
) : (
<div className="space-y-3 max-h-[240px] overflow-y-auto pr-2">
<div className="space-y-2 max-h-[220px] overflow-y-auto">
{emails.length === 0 ? (
<p className="text-center text-gray-500">No emails available</p>
) : (
emails.map((email) => (
<div
key={email.id}
className="p-3 hover:bg-gray-50/50 rounded-lg transition-colors"
className="p-2 hover:bg-gray-50/50 rounded-lg transition-colors"
>
<div className="flex items-center justify-between mb-2">
<span className="text-sm font-medium text-gray-600">{email.sender.name}</span>
<div className="flex items-center space-x-3">
<div className="flex items-center justify-between mb-1">
<span className="text-sm text-gray-600">{email.sender.name}</span>
<div className="flex items-center space-x-2">
{email.isUnread && (
<span className="w-2 h-2 bg-blue-600 rounded-full"></span>
<span className="w-1.5 h-1.5 bg-blue-600 rounded-full"></span>
)}
<span className="text-sm text-gray-500">{email.date}</span>
</div>

View File

@ -78,22 +78,22 @@ export function News() {
<RefreshCw className="h-4 w-4" />
</Button>
</CardHeader>
<CardContent className="p-4">
<CardContent className="p-3">
{error ? (
<p className="text-center text-red-500">{error}</p>
) : (
<div className="space-y-3 max-h-[240px] overflow-y-auto pr-2">
<div className="space-y-2 max-h-[220px] overflow-y-auto">
{news.length === 0 ? (
<p className="text-center text-gray-500">No news available</p>
) : (
news.map((item) => (
<div
key={item.id}
className="p-3 hover:bg-gray-50/50 rounded-lg transition-colors"
className="p-2 hover:bg-gray-50/50 rounded-lg transition-colors"
>
<div className="flex items-center justify-between mb-2">
<span className="text-sm text-gray-600">{item.date}</span>
<span className="text-xs px-2.5 py-1 rounded-full bg-blue-50 text-blue-700">
<div className="flex items-center justify-between mb-1">
<span className="text-sm text-gray-500">{item.date}</span>
<span className="text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-600">
{item.category}
</span>
</div>