Prechádzať zdrojové kódy

Fix article date layout

Ensure the article date doesn't overlap with the image div in `NewsCard.tsx`.
gpt-engineer-app[bot] 5 mesiacov pred
rodič
commit
8b98217f63
1 zmenil súbory, kde vykonal 43 pridanie a 43 odobranie
  1. 43 43
      src/components/NewsCard.tsx

+ 43 - 43
src/components/NewsCard.tsx

@@ -114,50 +114,50 @@ const NewsCard = ({
             <p className="text-sm text-muted-foreground leading-relaxed">
               {decodeHtmlEntities(news.description)}
             </p>
+          </div>
+        </div>
+        
+        <div className="flex items-center justify-between pt-2">
+          <span className="text-xs text-muted-foreground">
+            {new Date(news.publishedAt).toLocaleDateString('fr-FR', {
+              day: 'numeric',
+              month: 'long',
+              hour: '2-digit',
+              minute: '2-digit'
+            })}
+          </span>
+          
+          <div className="flex items-center gap-2">
+            {!news.isRead && (
+              <Button
+                variant="outline"
+                size="sm"
+                onClick={(e) => {
+                  e.stopPropagation();
+                  onMarkAsRead(news.id);
+                }}
+                disabled={!user}
+                className={cn("gap-1", !user && "opacity-50 cursor-not-allowed")}
+              >
+                <Eye className="h-3 w-3" />
+                Marquer lu
+              </Button>
+            )}
             
-            <div className="flex items-center justify-between">
-              <span className="text-xs text-muted-foreground">
-                {new Date(news.publishedAt).toLocaleDateString('fr-FR', {
-                  day: 'numeric',
-                  month: 'long',
-                  hour: '2-digit',
-                  minute: '2-digit'
-                })}
-              </span>
-              
-              <div className="flex items-center gap-2">
-                {!news.isRead && (
-                  <Button
-                    variant="outline"
-                    size="sm"
-                    onClick={(e) => {
-                      e.stopPropagation();
-                      onMarkAsRead(news.id);
-                    }}
-                    disabled={!user}
-                    className={cn("gap-1", !user && "opacity-50 cursor-not-allowed")}
-                  >
-                    <Eye className="h-3 w-3" />
-                    Marquer lu
-                  </Button>
-                )}
-                
-                {news.url && (
-                  <Button
-                    variant="default"
-                    size="sm"
-                    className="gap-1"
-                    onClick={(e) => {
-                      e.stopPropagation();
-                      window.open(news.url, '_blank');
-                    }}
-                  >
-                    <ExternalLink className="h-3 w-3" />
-                    Lire
-                  </Button>
-                )}
-              </div>
-            </div>
+            {news.url && (
+              <Button
+                variant="default"
+                size="sm"
+                className="gap-1"
+                onClick={(e) => {
+                  e.stopPropagation();
+                  window.open(news.url, '_blank');
+                }}
+              >
+                <ExternalLink className="h-3 w-3" />
+                Lire
+              </Button>
+            )}
           </div>
         </div>
       </CardContent>