Skip to content

Instantly share code, notes, and snippets.

@prince-joel
Created October 23, 2022 00:20
Show Gist options
  • Save prince-joel/ede986dba221767999f27352b886bb51 to your computer and use it in GitHub Desktop.
Save prince-joel/ede986dba221767999f27352b886bb51 to your computer and use it in GitHub Desktop.
Stylesheet for Custom Dashboard built with Refine
.main {
margin: 20px 80px;
}
.main .center-main {
width: 40%;
margin: 50px auto;
}
.main .center-main img {
width: 100%;
object-fit: contain;
}
.hero {
width: 100%;
height: 400px;
position: relative;
}
.hero .swiper {
width: 100%;
height: 100%;
}
.brand {
position: absolute;
top: 30px;
left: 30px;
z-index: 10000;
padding: 10px 20px;
display: flex;
background: rgba(000, 000, 000, 0.6);
border-radius: 50px;
}
.brand img {
width: 80px;
object-fit: contain;
margin-right: 10px;
}
.brand h1 {
color: #fff;
line-height: 10px;
}
.swiper-slide {
text-align: center;
font-size: 18px;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
position: relative;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide .btns {
position: absolute;
bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
width: 80%;
margin: auto;
}
.swiper-slide .btns button {
width: 35px;
height: 35px;
padding: 0px;
border-radius: 50%;
background: rgba(250, 250, 250, 0.6);
border: none;
display: flex;
align-items: center;
cursor: pointer;
justify-content: center;
}
.swiper-slide .btns button img {
width: 25px;
height: 25px;
}
.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.swiper-pagination-bullet {
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
font-size: 12px;
color: #000;
opacity: 1;
background: #88888824;
}
.swiper-pagination-bullet-active {
color: #a5a5a5;
background: #000;
}
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
}
.grid .swiper {
width: 100%;
height: 180px;
border: 1px solid #88888824;
box-shadow: 2px 2px 5px #888;
}
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 40px 40px;
margin: 80px 0px;
}
.gallery .col {
position: relative;
width: 100%;
height: 250px;
overflow: hidden;
}
.gallery .col p {
position: absolute;
bottom: -16px;
padding: 10px 20px;
width: 100%;
background: rgba(250, 250, 250, 0.6);
}
.gallery .col img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform ease-in-out 0.4s;
}
.gallery .col img:hover {
transform: scale(1.2);
}
.gallery .col .btns {
position: absolute;
bottom: 50px;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0px 10%;
}
.gallery .col .btns button {
width: 35px;
height: 35px;
padding: 0px;
border-radius: 50%;
cursor: pointer;
background: rgba(250, 250, 250, 0.6);
border: none;
display: flex;
align-items: center;
justify-content: center;
}
.gallery .col .btns button img {
width: 25px;
height: 25px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment