initial commit
This commit is contained in:
313
src/pages/Category/CategoryPage.module.scss
Normal file
313
src/pages/Category/CategoryPage.module.scss
Normal file
@@ -0,0 +1,313 @@
|
||||
.categoryPage {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
max-width: 1366px;
|
||||
margin: auto;
|
||||
padding: 20px 1.375rem;
|
||||
box-sizing: border-box;
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
margin: 15px 0 0px 0;
|
||||
@media screen and (max-width: 1024px) {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
p {
|
||||
font-size: 14px;
|
||||
margin-top: 0;
|
||||
}
|
||||
// .sum {
|
||||
// @media screen and (min-width: 1024px) {
|
||||
// display: none;
|
||||
// }
|
||||
// }
|
||||
.breadcrumb {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
|
||||
.separator {
|
||||
margin: 0 8px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.bars {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
border-bottom: 1px solid #d1d5db;
|
||||
border-top: 1px solid #d1d5db;
|
||||
padding: 8px 0;
|
||||
@media screen and (min-width: 1024px) {
|
||||
display: none;
|
||||
}
|
||||
.sum {
|
||||
color: #6b7280;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
background-color: transparent;
|
||||
border: 1px solid #6b7280;
|
||||
padding: 3px 6px;
|
||||
display: block;
|
||||
border-radius: 0.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
// button {
|
||||
// background-color: #ec6323;
|
||||
// border-radius: 0.5rem;
|
||||
// font-size: 14px;
|
||||
// border: none;
|
||||
// padding: 11px;
|
||||
// font-weight: 600;
|
||||
// color: #ffffffff;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// gap: 5px;
|
||||
// img {
|
||||
// width: 16px;
|
||||
// height: 16px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
.subCategories {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 15px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
scroll-behavior: smooth;
|
||||
button {
|
||||
color: #6b7280;
|
||||
background-color: #fff;
|
||||
padding: 4px 16px;
|
||||
font-size: 14px;
|
||||
border-radius: 0.5rem;
|
||||
border: none;
|
||||
width: max-content;
|
||||
height: max-content;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media screen and (min-width: 1024px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.Container {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
aside {
|
||||
width: 250px;
|
||||
position: sticky;
|
||||
top: 5rem;
|
||||
background-color: #ffff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
overflow-x: auto;
|
||||
height: calc(-8.25rem + 100vh);
|
||||
@media screen and (max-width: 1280px) {
|
||||
width: 200px;
|
||||
}
|
||||
@media screen and (max-width: 1100px) {
|
||||
width: 180px;
|
||||
}
|
||||
@media screen and (max-width: 1023px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 10px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.filterSection {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
h3 {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
margin-bottom: 8px;
|
||||
color: #000000;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
width: auto;
|
||||
padding: 8px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customRadio {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 2px solid #d1d5db;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
background-color: #d1d5db;
|
||||
transition: background-color 0.2s, border-color 0.2s;
|
||||
}
|
||||
|
||||
input[type="radio"]:checked + .customRadio {
|
||||
background-color: #888888;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customCheckbox {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 8px;
|
||||
border-radius: 4px;
|
||||
background-color: #d1d5db;
|
||||
position: relative;
|
||||
transition: background-color 0.2s, border-color 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.checkIcon {
|
||||
display: none;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: #888888;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + .customCheckbox {
|
||||
background-color: #d1d5db;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + .customCheckbox .checkIcon {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #d1d5db;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.productsContainer {
|
||||
flex: 1;
|
||||
|
||||
.productGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
|
||||
gap: 20px;
|
||||
@media screen and (max-width: 1230px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
@media screen and (max-width: 1023px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 774px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 519px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 510px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.productCard {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.discount {
|
||||
position: absolute;
|
||||
// top: 10px;
|
||||
// left: 10px;
|
||||
background-color: #ff4d4f;
|
||||
color: #fff;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 10px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.price {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
font-size: 14px;
|
||||
|
||||
.oldPrice {
|
||||
text-decoration: line-through;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.addToCart {
|
||||
margin-top: 10px;
|
||||
background-color: #ff7f50;
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: #ff4500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user