组件 社区论坛 社区论坛组件

社区论坛组件

一个采用拟物化元素设计的社区论坛组件,具备响应式设计、暗黑主题支持以及头像和占位图像。

预览

HTML 代码

<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg max-w-4xl mx-auto">
    <h1 class="text-2xl font-bold text-gray-800 dark:text-gray-100 mb-4">Community Forum</h1>
    <div class="border-b border-gray-300 dark:border-gray-600 mb-4 pb-2">
        <h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Latest Discussions</h2>
    </div>
    <div class="flex items-start mb-4 p-4 border border-gray-300 dark:border-gray-600 rounded-lg transition-shadow hover:shadow-lg">
        <img class="w-12 h-12 rounded-full mr-4" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar">
        <div>
            <h3 class="text-lg font-medium text-gray-800 dark:text-gray-200">John Doe</h3>
            <p class="text-gray-600 dark:text-gray-400">What’s the best way to learn Tailwind CSS?</p>
            <span class="text-gray-500 dark:text-gray-300 text-sm">5 comments - 2 hours ago</span>
        </div>
    </div>
    <div class="flex items-start mb-4 p-4 border border-gray-300 dark:border-gray-600 rounded-lg transition-shadow hover:shadow-lg">
        <img class="w-12 h-12 rounded-full mr-4" src="https://randomuser.me/api/portraits/women/2.jpg" alt="User Avatar">
        <div>
            <h3 class="text-lg font-medium text-gray-800 dark:text-gray-200">Jane Smith</h3>
            <p class="text-gray-600 dark:text-gray-400">Can someone explain the flexbox model?</p>
            <span class="text-gray-500 dark:text-gray-300 text-sm">3 comments - 1 hour ago</span>
        </div>
    </div>
    <div class="flex items-start mb-4 p-4 border border-gray-300 dark:border-gray-600 rounded-lg transition-shadow hover:shadow-lg">
        <img class="w-12 h-12 rounded-full mr-4" src="https://randomuser.me/api/portraits/men/3.jpg" alt="User Avatar">
        <div>
            <h3 class="text-lg font-medium text-gray-800 dark:text-gray-200">Mark Johnson</h3>
            <p class="text-gray-600 dark:text-gray-400">Tailwind vs Bootstrap: Which one to choose?</p>
            <span class="text-gray-500 dark:text-gray-300 text-sm">8 comments - 30 minutes ago</span>
        </div>
    </div>
    <div class="mt-6">
        <h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Join the discussion!</h2>
        <textarea class="mt-2 w-full h-24 p-4 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring focus:ring-blue-500 dark:focus:ring-blue-400" placeholder="Type your message here..."></textarea>
        <button class="mt-2 bg-blue-500 dark:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg hover:bg-blue-600 dark:hover:bg-blue-800 transition-all">Post</button>
    </div>
</div>

相关组件

社区论坛组件

一个社区论坛组件,具有拟物化设计、三元配色方案和简单复杂性,用于社交媒体目的,使用 Tailwind CSS 构建。包括响应式设计和深色主题支持。

打开

社区论坛组件

用于投资组合的 Neumorphism 风格的社区论坛组件,具有柔和的配色方案和复杂的响应式设计,并支持深色主题。它包括论坛列表、最近的活动和用户配置文件,所有这些都使用 Tailwind CSS 实现,无需 JavaScript。

打开

社区论坛组件

一个简单、干净且值得信赖的社区论坛组件,专为运动/健身应用程序而设计,具有多色渐变方案和完全响应能力,支持深色模式。

打开