|
|
@@ -156,54 +156,32 @@ function App() {
|
|
|
};
|
|
|
|
|
|
const MatingContestants = () => (
|
|
|
- <div className="space-y-6">
|
|
|
- <h1 className="text-4xl font-extrabold text-white mb-8 tracking-tight">
|
|
|
- Posts
|
|
|
- </h1>
|
|
|
- {loading ? (
|
|
|
- <div className="text-center py-20">
|
|
|
- <svg className="animate-spin h-12 w-12 text-blue-500 mx-auto" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
|
- <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
|
|
|
- <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
|
- </svg>
|
|
|
- <p className="mt-4 text-gray-400">Loading posts...</p>
|
|
|
- </div>
|
|
|
- ) : error ? (
|
|
|
- <div className="text-center text-red-400 font-medium p-8 bg-red-900 rounded-lg border border-red-700">
|
|
|
- <p>{error}</p>
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
|
- {Object.keys(markdownPosts).map((tensorRelease) => (
|
|
|
- <div
|
|
|
- key={tensorRelease}
|
|
|
- onClick={() => travelToExpress(tensorRelease)}
|
|
|
- className="group cursor-pointer bg-gray-800 rounded-2xl shadow-lg hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1 p-6 flex flex-col justify-between h-full"
|
|
|
- >
|
|
|
- <div>
|
|
|
- <h2 className="text-2xl font-semibold text-gray-200 group-hover:text-blue-500 transition-colors duration-200 mb-2">
|
|
|
- <div dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].title }} />
|
|
|
- </h2>
|
|
|
- {/* <p className="text-gray-400 text-sm">
|
|
|
- Public
|
|
|
- </p> */}
|
|
|
- </div>
|
|
|
- <div className="flex-grow mt-4">
|
|
|
- <div
|
|
|
- className="text-gray-300 leading-relaxed"
|
|
|
- dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].description }}
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div className="mt-4">
|
|
|
- <button className="text-blue-500 font-medium hover:underline focus:outline-none">
|
|
|
- Read more →
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- ))}
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
|
+ {Object.keys(markdownPosts).map((tensorRelease) => (
|
|
|
+ <div
|
|
|
+ key={tensorRelease}
|
|
|
+ onClick={() => travelToExpress(tensorRelease)}
|
|
|
+ className="group cursor-pointer bg-white border border-gray-200 rounded-xl hover:border-blue-400 transition-colors duration-200 p-6 flex flex-col justify-between h-full"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <h2 className="text-xl font-semibold text-gray-900 group-hover:text-blue-600 transition-colors duration-200 mb-2">
|
|
|
+ <div dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].title }} />
|
|
|
+ </h2>
|
|
|
+ </div>
|
|
|
+ <div className="flex-grow mt-4">
|
|
|
+ <div
|
|
|
+ className="text-gray-600 leading-relaxed"
|
|
|
+ dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].description }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div className="mt-4">
|
|
|
+ <button className="text-blue-600 font-medium hover:underline focus:outline-none">
|
|
|
+ Read more →
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ ))}
|
|
|
+</div>
|
|
|
);
|
|
|
|
|
|
const WiltedFlower = ({ tensorRelease }) => {
|
|
|
@@ -257,65 +235,63 @@ function App() {
|
|
|
|
|
|
return (
|
|
|
<div className="w-full">
|
|
|
- <div className="bg-gray-800 text-gray-200 rounded-2xl shadow-xl p-8 md:p-12 lg:p-16">
|
|
|
- <button
|
|
|
- onClick={getOut}
|
|
|
- className="text-gray-400 hover:text-white transition-colors duration-200 mb-6 flex items-center"
|
|
|
- >
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 mr-2" viewBox="0 0 20 20" fill="currentColor">
|
|
|
- <path
|
|
|
- fillRule="evenodd"
|
|
|
- d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z"
|
|
|
- clipRule="evenodd"
|
|
|
- />
|
|
|
- </svg>
|
|
|
- Back to Home
|
|
|
- </button>
|
|
|
- <div className="mb-8">
|
|
|
- <h1 className="text-4xl md:text-5xl font-extrabold text-white mb-2 leading-tight">
|
|
|
- <div dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].title }} />
|
|
|
- </h1>
|
|
|
- <div className="text-xl italic font-light text-gray-400"
|
|
|
- dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].description }} />
|
|
|
- </div>
|
|
|
- <hr className="border-gray-600 mb-8" />
|
|
|
- <div
|
|
|
- className="markdown-content text-gray-300 font-normal leading-relaxed text-lg"
|
|
|
- dangerouslySetInnerHTML={{ __html: sanitizedHtml }}
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div className="bg-white text-gray-800 border border-gray-200 rounded-xl p-8 md:p-12 lg:p-16">
|
|
|
+ <button
|
|
|
+ onClick={getOut}
|
|
|
+ className="text-gray-500 hover:text-gray-900 transition-colors duration-200 mb-6 flex items-center"
|
|
|
+ >
|
|
|
+ ← Back to Home
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <div className="mb-8">
|
|
|
+ <h1 className="text-3xl md:text-4xl font-bold text-gray-900 mb-2 leading-tight">
|
|
|
+ <div dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].title }} />
|
|
|
+ </h1>
|
|
|
+ <div
|
|
|
+ className="text-lg italic font-light text-gray-500"
|
|
|
+ dangerouslySetInnerHTML={{ __html: markdownPosts[tensorRelease].description }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <hr className="border-gray-200 mb-8" />
|
|
|
+
|
|
|
+ <div
|
|
|
+ className="markdown-content text-gray-700 leading-relaxed text-lg"
|
|
|
+ dangerouslySetInnerHTML={{ __html: sanitizedHtml }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
);
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
- <div className="min-h-screen bg-gray-900 font-sans text-gray-200 antialiased flex flex-col">
|
|
|
- <div className="max-w-7xl mx-auto w-full flex-grow">
|
|
|
- <header className="py-6 border-b border-gray-700">
|
|
|
- <div className="text-3xl font-black text-white">
|
|
|
- <span className="text-blue-500">Goon</span>Blog
|
|
|
- </div>
|
|
|
- <nav>
|
|
|
- <ul className="flex space-x-4">
|
|
|
- <li>
|
|
|
- <a
|
|
|
- href="#"
|
|
|
- onClick={getOut}
|
|
|
- className="text-gray-400 hover:text-white transition-colors duration-200 font-medium"
|
|
|
- >
|
|
|
- Home
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </nav>
|
|
|
- </header>
|
|
|
-
|
|
|
- <main className="py-12 px-4 sm:px-6 lg:px-8">
|
|
|
- {selectedPost === null ? <MatingContestants /> : <WiltedFlower tensorRelease={selectedPost} />}
|
|
|
- </main>
|
|
|
- </div>
|
|
|
+ <div className="min-h-screen bg-white font-sans text-gray-800 antialiased flex flex-col">
|
|
|
+ <div className="max-w-5xl mx-auto w-full flex-grow">
|
|
|
+ <header className="headercontainer py-6 border-b border-gray-200 flex items-center justify-between">
|
|
|
+ <div className="text-2xl font-bold text-gray-900">
|
|
|
+ <span className="text-blue-600">Goon</span>Blog
|
|
|
+ </div>
|
|
|
+ <nav>
|
|
|
+ <ul className="flex space-x-4">
|
|
|
+ <li>
|
|
|
+ <a
|
|
|
+ href="#"
|
|
|
+ onClick={getOut}
|
|
|
+ className="text-gray-600 hover:text-gray-900 transition-colors duration-200 font-medium"
|
|
|
+ >
|
|
|
+ Home
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </header>
|
|
|
+
|
|
|
+ <main className="py-10 px-4 sm:px-6 lg:px-8">
|
|
|
+ {selectedPost === null ? <MatingContestants /> : <WiltedFlower tensorRelease={selectedPost} />}
|
|
|
+ </main>
|
|
|
</div>
|
|
|
- );
|
|
|
+ </div>
|
|
|
+);
|
|
|
}
|
|
|
|
|
|
export default App;
|