feat: change the layout of newsitem

This commit is contained in:
Kaiwen Gong 2024-07-22 16:46:19 +08:00
parent 1b864d8a68
commit 3014f15588

View file

@ -1,7 +1,6 @@
import React from "react"; import React from "react";
import Image from "next/image"; import Image from "next/image";
import { ReactMarkdown } from "@/components/Markdown"; import { ReactMarkdown } from "@/components/Markdown";
interface ContextItemProperties { interface ContextItemProperties {
item: { item: {
name: string; name: string;
@ -24,9 +23,9 @@ interface ContextItemProperties {
} }
const ProviderInfo: React.FC<{ name: string; date: string }> = ({ name, date }) => ( const ProviderInfo: React.FC<{ name: string; date: string }> = ({ name, date }) => (
<div className="absolute bottom-3 right-0 text-sm text-gray-700 dark:text-gray-300 flex items-end z-50"> <div className="absolute -bottom-3 right-0 text-sm text-gray-700 dark:text-gray-300 flex items-end z-50">
<div className="absolute z-50 right-60 top-0 bottom-0 w-40 h-10 bg-gradient-to-r from-transparent to-slate-900 pointer-events-none"></div> {/* <div className="absolute z-50 right-60 top-0 bottom-0 w-40 h-10 bg-gradient-to-r from-transparent to-slate-900 pointer-events-none"></div>
<div className="absolute z-50 right-0 top-0 bottom-0 w-60 h-10 bg-slate-900 pointer-events-none"></div> <div className="absolute z-50 right-0 top-0 bottom-0 w-60 h-10 bg-slate-900 pointer-events-none"></div> */}
<div className="relative z-50 dark:bg-slate-900 flex items-center"> <div className="relative z-50 dark:bg-slate-900 flex items-center">
<span className="truncate max-w-xs">{name}</span> <span className="truncate max-w-xs">{name}</span>
<span className="truncate max-w-xs text-xs text-gray-500 dark:text-gray-400 pl-3">{date}</span> <span className="truncate max-w-xs text-xs text-gray-500 dark:text-gray-400 pl-3">{date}</span>