Files
santeh-ray/static/css/index.css
Azimkin 29d8302a4f
All checks were successful
Build and Push Docker Image / build (push) Successful in 51s
feat: add favorites feature for users
- Implemented `Favorite` model with unique user-item constraint and timestamped records
- Added `favorites:index` and `favorites:toggle` views with AJAX support for toggling favorites
- Built templates and front-end assets for the favorites page and integration with item grids
- Extended header with favorites link and dynamic counter
- Added tests covering models, views, and templates for the favorites functionality
- Updated admin to enable management of favorites via Django admin interface
2026-05-10 20:06:12 +02:00

799 lines
13 KiB
CSS

/* HERO */
.hero {
margin-top: 50px;
background-image: url(../img/hero.png);
background-repeat: no-repeat;
background-position: calc(50% - 350px) center;
height: 500px;
}
.hero-content {
width: 500px;
height: 400px;
margin-top: 80px;
}
.hero-title {
font-style: normal;
font-weight: 500;
font-size: 50px;
line-height: 60px;
letter-spacing: 0.05em;
text-align: left;
color: #36213e;
}
.hero-subtitle-container {
margin-top: 25px;
display: flex;
align-content: center;
flex-direction: row;
}
.hero-subtitle {
font-style: normal;
font-weight: 500;
font-size: 17px;
line-height: 20px;
text-align: left;
color: #36213e;
}
.hero-checkmark {
margin-top: auto;
margin-bottom: auto;
margin-right: 10px;
}
.hero-button-container {
margin-top: 30px;
margin-left: 45px;
}
.hero-button {
display: inline-block;
background: #63768d;
font-style: normal;
font-weight: 500;
font-size: 28px;
line-height: 34px;
text-align: left;
color: #ffffff;
padding: 20px 50px;
text-decoration: none;
}
/* -- ADVANTAGES -- */
.advantages {
margin-top: 100px;
}
.advantages-header {
display: flex;
justify-content: space-between;
/*align-items: flex-start;*/
}
.advantages-title {
margin-top: 50px;
width: 300px;
font-style: normal;
font-weight: 400;
font-size: 44px;
line-height: 1.4;
text-align: left;
color: #36213e;
}
.advantages-nav {
display: flex;
gap: 12px;
justify-content: end;
}
.advantages-nav-btn {
width: 48px;
height: 48px;
border-radius: 100%;
background: #63768d;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: white;
transition: background 0.2s, opacity 0.2s;
}
.advantages-nav-btn:hover {
background: #554971;
}
.advantages-nav-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.advantages-list {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.advantages-right {
max-width: 900px;
}
.advantages-carousel {
margin-top: 10px;
width: 900px;
height: 130px;
overflow: hidden;
}
.advantages-item {
width: 280px;
}
.advantages-item-number {
width: 42px;
height: 42px;
border-radius: 100%;
background: #63768d;
display: flex;
align-items: center;
justify-content: center;
/* Number in circle */
color: white;
font-style: normal;
font-weight: 400;
font-size: 30px;
line-height: 36px;
text-align: left;
}
.advantages-item-title {
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 22px;
text-align: left;
color: #36213e;
margin-top: 18px;
}
.advantages-item-subtitle {
margin-top: 10px;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 1.2;
text-align: left;
color: #36213e;
}
.advantages-cards {
display: flex;
justify-content: space-between;
margin-top: 120px;
}
.advantages-card {
width: 560px;
height: 300px;
background: #63768d;
}
.advantages-card-content {
margin: 40px 25px;
}
.advantages-card-left {
background-image: url(../img/sanitary-equipment-promo.jpg);
background-repeat: no-repeat;
background-size: 101%;
background-position-x: 2384%;
background-position-y: -2%;
}
.advantages-card-right {
background-image: url(../img/decor-promo.jpg);
background-repeat: no-repeat;
background-size: 66%;
background-position-x: 126%;
background-position-y: 17%;
}
.advantages-card-splash {
font-style: normal;
font-weight: 500;
font-size: 32px;
line-height: 22px;
color: #ffffff;
}
.advantages-card-title {
margin-top: 30px;
width: 291px;
height: 84px;
font-style: normal;
font-weight: 500;
font-size: 25px;
line-height: 1.3;
color: #ffffff;
}
.advantages-card-button {
display: inline-block;
margin-top: 25px;
padding: 10px 10px;
border: 1px solid #ffffff;
font-style: normal;
font-weight: 500;
font-size: 20px;
line-height: 20px;
text-align: left;
/*text-decoration: underline;*/
color: #ffffff;
}
/* -- ABOUT -- */
.about-section {
margin-top: 100px;
}
.about-title {
font-style: normal;
font-weight: 400;
font-size: 44px;
line-height: 53px;
text-align: left;
color: #36213e;
}
.about-left {
background-image: url(../img/stats-image.jpg);
height: 320px;
background-repeat: no-repeat;
background-position: right;
background-size: 600px auto;
margin-top: 20px;
display: flex;
flex-direction: column;
justify-content: center;
}
.about-left-block {
max-width: 500px;
}
.about-left-subtitle {
width: 495px;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #36213e;
}
.about-left-suggestion {
margin-top: 10px;
font-weight: 600;
font-size: 24px;
line-height: 29px;
text-align: left;
color: #36213e;
}
.about-left-list {
max-width: 480px;
}
.about-left-list-item {
width: 100%;
margin-top: 20px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.about-left-list-item-number {
width: 52px;
height: 52px;
border-radius: 100%;
background: #63768d;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 32px;
line-height: 31px;
text-align: left;
color: #ffffff;
}
.about-left-list-item-content {
width: 400px;
margin-top: 10px;
}
.about-left-list-item-content-title {
width: 279px;
display: block;
font-weight: 500;
font-size: 18px;
text-align: left;
color: #36213e;
}
.about-left-list-item-content-desc {
margin-top: 10px;
width: 350px;
font-weight: 400;
font-size: 14px;
text-align: left;
color: #36213e;
}
.about-right {
background-image: url(../img/about-image.jpg);
height: 300px;
background-repeat: no-repeat;
background-position: left;
background-size: 500px auto;
margin-top: 20px;
justify-content: center;
}
.about-right-block {
max-width: 600px;
}
.about-right-text {
width: 569px;
font-weight: 400;
font-size: 16px;
text-align: left;
color: #36213e;
}
.about-right-stats {
margin-top: 40px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.about-right-stats-item {
display: flex;
flex-direction: column;
align-items: center;
}
.about-right-stats-item-num {
font-weight: 400;
font-size: 32px;
color: #36213e;
}
.about-right-stats-item-label {
margin-top: 5px;
font-weight: 400;
font-size: 14px;
text-align: left;
color: #36213e;
}
/* -- KITCHEN BANNER -- */
.kitchen-banner {
margin-top: 120px;
height: 410px;
background-color: #63768d;
display: flex;
background-image: url(../img/kitchen-banner.jpg);
background-repeat: no-repeat;
background-position: right;
background-size: auto 110%;
}
.kitchen-content {
margin: 74px 80px;
}
.kitchen-content p {
width: 380px;
font-weight: 400;
font-size: 20px;
text-align: left;
color: #ffffff;
}
.kitchen-content h2 {
width: 480px;
margin-top: 20px;
font-weight: 400;
font-size: 48px;
text-align: left;
color: #ffffff;
}
.kitchen-content a {
display: inline-block;
margin-top: 45px;
font-weight: 400;
font-size: 24px;
text-align: left;
padding: 10px;
border: 1px solid #ffffff;
color: #ffffff;
}
/* POPULAR PRODUCTS */
.products-section {
margin-top: 120px;
}
.products-title {
font-weight: 400;
font-size: 44px;
line-height: 53px;
text-align: left;
color: #36213e;
}
.products-grid {
margin-top: 40px;
display: grid;
grid-template-columns: 460px 300px 360px;
grid-template-rows: repeat(11, 55px);
gap: 20px;
}
.product {
padding: 20px;
background: #d9d9d9;
}
.product-1 {
grid-column: 1;
grid-row: 1 / 7;
}
.product-2 {
grid-column: 2;
grid-row: 1 / 5;
}
.product-3 {
grid-column: 3;
grid-row: 1 / 8;
}
.product-4 {
grid-column: 1;
grid-row: 7 / -1;
}
.product-5 {
grid-column: 2;
grid-row: 5 / -1;
}
.product-6 {
grid-column: 3;
grid-row: 8 / -1;
}
.products-footer {
display: flex;
justify-content: end;
width: 100%;
}
.products-footer a {
margin-top: 25px;
padding: 22px 46px;
display: inline-block;
background: #63768d;
font-weight: 500;
font-size: 26px;
text-align: left;
color: #ffffff;
}
/* -- FAQ -- */
.faq-section {
margin-top: 120px;
padding-bottom: 90px;
}
.faq-messages {
margin-top: 28px;
display: flex;
flex-direction: column;
gap: 12px;
}
.faq-message {
padding: 14px 18px;
border: 1px solid #63768d;
background: rgba(99, 118, 141, 0.08);
color: #36213e;
font-weight: 500;
font-size: 18px;
line-height: 1.35;
}
.faq-message--success {
border-color: #4f7d4f;
background: rgba(79, 125, 79, 0.1);
}
.faq-message--error {
border-color: #a14b4b;
background: rgba(161, 75, 75, 0.1);
}
.faq-section h2 {
font-weight: 400;
font-size: 44px;
line-height: 53px;
text-align: left;
color: #36213e;
}
.faq-grid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.faq-item {
margin-top: 40px;
max-width: 530px;
flex: 1 0 50%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.faq-icon {
width: 42px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 100%;
background: #63768d;
font-weight: 400;
font-size: 20px;
line-height: 24px;
text-align: left;
color: #ffffff;
}
.faq-body {
width: 470px;
margin-top: 10px;
& > h4 {
font-weight: 700;
font-size: 20px;
line-height: 24px;
text-align: left;
color: #36213e;
}
& > p {
margin-top: 16px;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
}
.faq-cta {
margin-top: 55px;
width: 100%;
display: flex;
justify-content: center;
& > a {
padding: 15px 45px 15px 15px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26px;
line-height: 31px;
text-align: left;
color: #ffffff;
background: #63768d;
& > div {
width: 42px;
height: 42px;
background: #ffffff;
border-radius: 100%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 20px;
line-height: 24px;
text-align: left;
margin-right: 13px;
color: #63768d;
}
}
}
.back-form {
h2 {
font-weight: 400;
font-size: 44px;
line-height: 53px;
text-align: left;
color: #36213e;
}
display: flex;
align-items: center;
flex-direction: column;
form {
display: inline-flex;
flex-direction: column;
align-items: center;
}
}
.q-label {
margin-top: 25px;
display: inline-block;
& > input[type=text],
& > textarea {
width: 540px;
height: 43px;
padding: 1px 5px;
display: inline-block;
background: #d9d9d9;
border: 1px solid #554971;
}
& > textarea {
min-height: 140px;
resize: vertical;
padding-top: 10px;
}
}
.back-form-accept-checkbox {
margin-top: 7px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: start;
input {
margin-right: 5px;
}
label {
font-weight: 400;
font-size: 18px;
line-height: 22px;
text-align: left;
color: #554971;
}
}
.back-form .errorlist {
margin: 10px 0 0;
padding: 0;
list-style: none;
color: #a14b4b;
font-size: 16px;
line-height: 1.35;
max-width: 540px;
}
.back-form .errorlist li {
margin: 0;
}
.back-form .errorlist.nonfield {
margin-top: 20px;
text-align: center;
}
.back-form-submit {
margin-top: 69px;
background: #63768d;
padding: 25px 55px;
border: 0;
font-weight: 500;
font-size: 26px;
line-height: 31px;
text-align: left;
color: #b8f3ff;
}