FIX: Padding Issue on Video Thumbnails, ViewPort Issues in AuthModal
This commit is contained in:
@@ -52,16 +52,17 @@ const ListRow: React.FC<ListRowProps> = ({
|
||||
<h2 className="text-2xl font-bold">{title}</h2>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="relative overflow-hidden flex items-center z-0">
|
||||
|
||||
<ArrowLeftIcon onClick={slideLeft} size={20} className="absolute mr-1 cursor-pointer z-[999]" />
|
||||
|
||||
<div
|
||||
ref={slider}
|
||||
className="flex overflow-x-scroll whitespace-nowrap scroll-smooth scrollbar-hide gap-5"
|
||||
style={{ scrollbarWidth: 'none', paddingLeft: "30px", paddingTop: "10px", paddingBottom: "10px" }}
|
||||
className="flex overflow-x-scroll whitespace-nowrap scroll-smooth scrollbar-hide gap-5 pr-20"
|
||||
style={{ scrollbarWidth: 'none', paddingLeft: "30px", paddingTop: "10px", paddingBottom: "10px", paddingRight: "50px" }}
|
||||
>
|
||||
|
||||
{items.map((item) => (
|
||||
<ListItem
|
||||
key={`${item.type}-${item.id}`}
|
||||
@@ -98,35 +99,35 @@ export const ListItem: React.FC<ListItemProps> = ({
|
||||
streamCategory,
|
||||
viewers,
|
||||
thumbnail,
|
||||
onItemClick,
|
||||
onItemClick,
|
||||
}) => {
|
||||
return (
|
||||
<div className="">
|
||||
<div
|
||||
className="min-w-[430px] overflow-hidden flex-shrink-0 flex flex-col bg-purple-900 rounded-lg
|
||||
<div className="relative pr-[3]">
|
||||
<div
|
||||
className="min-w-[430px] overflow-visible flex-shrink-0 flex flex-col bg-purple-900 rounded-lg
|
||||
cursor-pointer hover:bg-pink-700 hover:scale-105 transition-all"
|
||||
onClick={onItemClick}
|
||||
>
|
||||
<div className="relative w-full pt-[56.25%] overflow-hidden rounded-t-lg">
|
||||
{thumbnail ? (
|
||||
<img
|
||||
src={thumbnail}
|
||||
alt={title}
|
||||
className="absolute top-0 left-0 w-full h-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="absolute top-0 left-0 w-full h-full bg-gray-600" />
|
||||
)}
|
||||
onClick={onItemClick}
|
||||
>
|
||||
<div className="relative w-full pt-[56.25%] overflow-hidden rounded-t-lg">
|
||||
{thumbnail ? (
|
||||
<img
|
||||
src={thumbnail}
|
||||
alt={title}
|
||||
className="absolute top-0 left-0 w-full h-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="absolute top-0 left-0 w-full h-full bg-gray-600" />
|
||||
)}
|
||||
</div>
|
||||
<div className="p-3">
|
||||
<h3 className="font-semibold text-lg text-center">{title}</h3>
|
||||
{type === "stream" && <p className="font-bold">{streamer}</p>}
|
||||
{type === "stream" && (
|
||||
<p className="text-sm text-gray-300">{streamCategory}</p>
|
||||
)}
|
||||
<p className="text-sm text-gray-300">{viewers} viewers</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-3">
|
||||
<h3 className="font-semibold text-lg text-center">{title}</h3>
|
||||
{type === "stream" && <p className="font-bold">{streamer}</p>}
|
||||
{type === "stream" && (
|
||||
<p className="text-sm text-gray-300">{streamCategory}</p>
|
||||
)}
|
||||
<p className="text-sm text-gray-300">{viewers} viewers</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ const Navbar: React.FC<NavbarProps> = ({ variant = "default" }) => {
|
||||
<>
|
||||
<Button
|
||||
onClick={() => handleSideBar()}
|
||||
extraClasses={`absolute ${showSideBar
|
||||
extraClasses={`fixed ${showSideBar
|
||||
? `fixed top-[20px] left-[20px] p-2 text-[1.5rem] text-white hover:text-white
|
||||
bg-black/30 hover:bg-purple-500/80 rounded-md border border-gray-300 hover:border-white h
|
||||
over:border-b-4 hover:border-l-4 active:border-b-2 active:border-l-2 transition-all `
|
||||
@@ -84,7 +84,7 @@ const Navbar: React.FC<NavbarProps> = ({ variant = "default" }) => {
|
||||
</Button>
|
||||
<div
|
||||
className={`fixed top-0 left-0 w-[250px] h-screen bg-[var(--bg-color)] text-[var(--text-color)] z-[90] overflow-y-auto scrollbar-hide
|
||||
transition-transform transition-opacity duration-500 ease-in-out ${showSideBar ? "translate-x-0 opacity-100" : "-translate-x-full opacity-0"
|
||||
transition-opacity duration-500 ease-in-out ${showSideBar ? "translate-x-0 opacity-100" : "-translate-x-full opacity-0"
|
||||
}`}
|
||||
>
|
||||
<Sidebar />
|
||||
|
||||
@@ -47,7 +47,7 @@ const Sidebar: React.FC<SideBarProps> = () => {
|
||||
const shownCategory = Object.entries(testCategory).map(([dummyCategory, { dummyLink, dummyImage }]) => {
|
||||
return (
|
||||
<li key={dummyCategory} className="flex items-center border border-7 border-black space-x-3 rounded-md p-0 text-center
|
||||
hover:bg-[#800020] hover:scale-110 hover:shadow-[-1px_1.5px_10px_white] transition-all duration-250 m-[0.25em]">
|
||||
hover:bg-[#800020] hover:shadow-[-1px_1.5px_10px_white] transition-all duration-250 m-[0.25em]">
|
||||
<img src={dummyImage} alt={dummyCategory} className="w-[2em] h-[2em] bg-white ml-[0.25em]" />
|
||||
<a href={dummyLink} className="pr-[7.5em] pt-[0.75em] pb-[0.75em]">{dummyCategory}</a>
|
||||
</li>
|
||||
@@ -57,13 +57,13 @@ const Sidebar: React.FC<SideBarProps> = () => {
|
||||
return (
|
||||
<>
|
||||
|
||||
<div>
|
||||
<div className="overflow-hidden">
|
||||
<h1 className="style"> Followed </h1>
|
||||
<ul>
|
||||
{shownStreamers}
|
||||
</ul>
|
||||
|
||||
<h1 className="category-style pt-[0.50em]"> Your Categories </h1>
|
||||
<h1 className="category-style pt-[0.50em] overflow-hidden"> Your Categories </h1>
|
||||
<ul>
|
||||
{shownCategory}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user