스큐어모피즘 미디어 컴포넌트
스큐어모피즘에서 영감을 받은 미디어 컴포넌트는 단색 색 구성표와 복잡한 복잡성 수준을 사용하여 블로그/콘텐츠 목적에 맞게 조정되었습니다. 기능에는 반응형 디자인과 JavaScript 없이 어두운 테마 지원이 포함됩니다.
HTML 코드
<div class="container mx-auto p-6 bg-gray-100 dark:bg-gray-800 shadow-lg rounded-xl">
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<!-- Featured Article Card -->
<div class="bg-white dark:bg-gray-700 rounded-lg shadow-xl overflow-hidden transform transition duration-500 hover:scale-105 group">
<img class="w-full h-64 object-cover" src="https://picsum.photos/800/600?random=1" alt="Featured Article Image">
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-800 dark:text-gray-200 mb-2">Featured Article Title</h2>
<p class="text-gray-600 dark:text-gray-400 text-sm">Published on <span class="font-semibold">October 26, 2023</span></p>
<p class="text-gray-700 dark:text-gray-300 mt-4">This is a summary of the featured article. It gives a brief overview of the content to entice readers to click and learn more. The design mimics a physical object with subtle borders and shadow.</p>
<div class="flex items-center mt-6">
<img class="w-10 h-10 rounded-full mr-4 border-2 border-gray-300 dark:border-gray-600" src="https://randomuser.me/api/portraits/men/32.jpg" alt="Author Avatar">
<span class="font-semibold text-gray-700 dark:text-gray-300">John Doe</span>
</div>
<a href="#" class="inline-block mt-6 text-blue-600 dark:text-blue-400 hover:underline">Read More</a>
</div>
</div>
<!-- Recent Articles List -->
<div class="bg-white dark:bg-gray-700 rounded-lg shadow-xl p-6">
<h3 class="text-xl font-bold text-gray-800 dark:text-gray-200 mb-4">Recent Articles</h3>
<ul>
<li class="border-b border-gray-200 dark:border-gray-600 py-3 last:border-b-0">
<a href="#" class="text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400">
<h4 class="font-semibold">Recent Article Title 1</h4>
<p class="text-sm text-gray-600 dark:text-gray-400">A short description of the recent article.</p>
</a>
</li>
<li class="border-b border-gray-200 dark:border-gray-600 py-3 last:border-b-0">
<a href="#" class="text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400">
<h4 class="font-semibold">Recent Article Title 2</h4>
<p class="text-sm text-gray-600 dark:text-gray-400">Another short description of a recent article.</p>
</a>
</li>
<li class="py-3">
<a href="#" class="text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400">
<h4 class="font-semibold">Recent Article Title 3</h4>
<p class="text-sm text-gray-600 dark:text-gray-400">A final short description for the list.</p>
</a>
</li>
</ul>
<button class="mt-6 w-full px-4 py-2 bg-blue-600 text-white font-semibold rounded-md shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 dark:bg-blue-700 dark:hover:bg-blue-800 dark:focus:ring-blue-600">View All Articles</button>
</div>
</div>
</div>
관련 구성 요소
Glassmorphic 미디어 컴포넌트
Tailwind CSS로 제작된 glassmorphism 디자인(젖빛 유리 효과)이 있는 반응형 미디어 카드 구성 요소입니다. 호버로 표시되는 재생 아이콘이 있는 이미지 자리 표시자(picsum.photos), 텍스트 콘텐츠, 아바타가 있는 작성자 섹션(randomuser.me 에서) 및 작업 버튼이 있습니다. 이 구성 요소는 Tailwind CSS 'dark:' 변형을 사용하여 다크 모드를 지원하며 다양한 화면 크기에 반응합니다. JavaScript가 필요하지 않습니다. 최적의 시각 효과를 얻으려면 이 구성 요소를 대비되는 배경에 배치하십시오. 다크 모드 기능은 적절한 Tailwind CSS 구성(예: tailwind.config.js의 'darkMode: "class"')을 가정합니다.