-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
3,708 additions
and
13,733 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
.card-item { | ||
width: 90% ; | ||
height: 350px; | ||
margin-right: 20px; | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
position: relative; | ||
border-radius: 20px; | ||
overflow: hidden; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | ||
transition: transform 0.3s; | ||
|
||
} | ||
.card-item:hover { | ||
transform: scale(1.1); | ||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); | ||
} | ||
.title, | ||
.description { | ||
font-family: sans-serif; | ||
} | ||
.card-image { | ||
width: 100%; | ||
height: 100%; | ||
backdrop-filter: blur(10px); | ||
object-fit: cover; | ||
border-top-left-radius: 20px; | ||
border-top-right-radius: 20px; | ||
} | ||
|
||
.title, | ||
.description { | ||
width: 100%; | ||
text-align: center; | ||
color: black; | ||
font-size: 1.2rem; | ||
opacity: 0.7; | ||
} | ||
|
||
.title { | ||
top: 7%; | ||
text-align: left; | ||
left: 10px; | ||
font-size: 1rem; | ||
font-weight: 200; | ||
} | ||
|
||
.description { | ||
top: 22%; | ||
text-align: left; | ||
left: 10px; | ||
font-size: 1.5rem; | ||
font-weight: 500; | ||
|
||
} | ||
.title, | ||
.description { | ||
display: flex; | ||
position: absolute; /* equivalent to absolute in Tailwind */ | ||
z-index: 10; | ||
flex-direction: column; | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
padding: 10px; | ||
gap: 0.5rem; /* equivalent to space-y-2 in Tailwind */ | ||
backdrop-filter: blur(10px); /* equivalent to backdrop-blur-sm in Tailwind */ | ||
background-color: rgba(255, 255, 255, 0.7); /* equivalent to backdrop-opacity-70 in Tailwind */ | ||
border-radius: 1rem; /* equivalent to rounded-2xl in Tailwind */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { Component } from "react"; | ||
import Slider from "react-slick"; | ||
import './CardBanner.css'; | ||
|
||
class CardBanner extends Component { | ||
render() { | ||
const { data } = this.props; | ||
const settings = { | ||
className: "center", | ||
infinite: true, | ||
centerPadding: "60px", | ||
slidesToShow: 3, | ||
swipeToSlide: true, | ||
afterChange: function(index) { | ||
//eat five star do nothing | ||
}, | ||
responsive: [ | ||
{ | ||
breakpoint: 1190, | ||
settings: { | ||
slidesToShow: 2, | ||
infinite: true, | ||
dots: true | ||
} | ||
}, | ||
{ | ||
breakpoint: 600, | ||
settings: { | ||
slidesToShow: 1, | ||
} | ||
} | ||
] | ||
}; | ||
return ( | ||
<div style={{marginTop:25}}> | ||
<Slider {...settings}> | ||
{data.map((item, index) => ( | ||
<div key={index} style={{marginTop:20}}> | ||
<div className="card-item" style={{marginLeft:10}}> | ||
<img | ||
src={item.image} | ||
alt={`Item ${index + 1}`} | ||
className="card-image" | ||
/> | ||
<div className="title">{item.title}</div> | ||
<div className="description">{item.description}</div> | ||
</div> | ||
</div> | ||
))} | ||
</Slider> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default CardBanner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.