Compare commits

..

2 Commits

Author SHA1 Message Date
373cc15e4d Update CSS
All checks were successful
Build and Push Docker Image / build (push) Successful in 53s
2026-06-10 21:34:59 +02:00
778d15d734 Update CSS 2026-06-10 21:01:01 +02:00
10 changed files with 48 additions and 29 deletions

View File

@@ -228,8 +228,8 @@ class CatalogViewTests(TestCase):
self.assertContains(response, 'data-price-slider', html=False) self.assertContains(response, 'data-price-slider', html=False)
self.assertContains(response, 'type="range"', count=2, html=False) self.assertContains(response, 'type="range"', count=2, html=False)
self.assertContains(response, 'min="200.00"', html=False) self.assertContains(response, 'min="200"', html=False)
self.assertContains(response, 'max="1600.00"', html=False) self.assertContains(response, 'max="1600"', html=False)
self.assertContains(response, 'src="/static/js/catalog-price-slider.js"', html=False) self.assertContains(response, 'src="/static/js/catalog-price-slider.js"', html=False)
def test_item_card_uses_primary_image(self): def test_item_card_uses_primary_image(self):

View File

@@ -1,5 +1,5 @@
from dataclasses import dataclass from dataclasses import dataclass
from decimal import Decimal, InvalidOperation from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
from urllib.parse import urlencode from urllib.parse import urlencode
from django.core.paginator import Paginator from django.core.paginator import Paginator
@@ -91,7 +91,7 @@ def _resolve_catalog_scope(scope_value: str | None) -> tuple[str | None, str | N
def _format_price_value(value: Decimal) -> str: def _format_price_value(value: Decimal) -> str:
return str(int(value)) return format(value.quantize(Decimal("1"), rounding=ROUND_HALF_UP), "f")
def index(request: HttpRequest, category: str | None = None) -> HttpResponse: def index(request: HttpRequest, category: str | None = None) -> HttpResponse:

View File

@@ -13,7 +13,7 @@
.cart-section-title { .cart-section-title {
margin: 0 0 28px; margin: 0 0 28px;
color: var(--dark); color: var(--dark);
font-family: 'BerlinType', serif; font-family: var(--font-logo);
font-size: 38px; font-size: 38px;
font-weight: 400; font-weight: 400;
line-height: 1.05; line-height: 1.05;
@@ -339,7 +339,7 @@
} }
.checkout-services h3 { .checkout-services h3 {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 19px; font-size: 19px;
font-weight: 400; font-weight: 400;
} }

View File

@@ -64,7 +64,7 @@ aside {
border: 1px solid #63768d; border: 1px solid #63768d;
background: #63768d; background: #63768d;
color: #ffffff; color: #ffffff;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 15px; font-size: 15px;
line-height: 1; line-height: 1;
text-transform: uppercase; text-transform: uppercase;
@@ -175,7 +175,7 @@ aside {
border: 1px solid #63768d; border: 1px solid #63768d;
background: #63768d; background: #63768d;
color: #ffffff; color: #ffffff;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 15px; font-size: 15px;
line-height: 1; line-height: 1;
text-transform: uppercase; text-transform: uppercase;
@@ -265,9 +265,10 @@ aside {
.item-card-favorite-button { .item-card-favorite-button {
width: 16px; width: 16px;
height: 16px; height: 16px;
box-sizing: border-box;
border: 0; border: 0;
background: transparent; background: transparent;
padding: 0; padding: 2px;
color: #63768d; color: #63768d;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@@ -283,8 +284,11 @@ aside {
} }
.item-card-favorite-button svg { .item-card-favorite-button svg {
width: 18px; width: 12px;
height: 18px; height: 12px;
max-width: 100%;
max-height: 100%;
transform: translateY(2px);
} }
.item-card-favorite-button.is-active { .item-card-favorite-button.is-active {
@@ -552,7 +556,7 @@ aside {
.product-summary__button { .product-summary__button {
min-height: 38px; min-height: 38px;
border: 1px solid #63768d; border: 1px solid #63768d;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 18px; font-size: 18px;
line-height: 1; line-height: 1;
text-transform: uppercase; text-transform: uppercase;
@@ -767,7 +771,7 @@ aside {
border: 1px solid rgba(54, 33, 62, 0.14); border: 1px solid rgba(54, 33, 62, 0.14);
background: #ffffff; background: #ffffff;
color: #554971; color: #554971;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 16px; font-size: 16px;
line-height: 1; line-height: 1;
text-decoration: none; text-decoration: none;

View File

@@ -27,7 +27,7 @@
} }
.contacts-card h2 { .contacts-card h2 {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-weight: 600; font-weight: 600;
font-size: 30px; font-size: 30px;
line-height: 1.1; line-height: 1.1;
@@ -83,7 +83,7 @@
.contacts-map .leaflet-control-attribution, .contacts-map .leaflet-control-attribution,
.contacts-map .leaflet-control-attribution a { .contacts-map .leaflet-control-attribution a {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
color: #554971; color: #554971;
} }
@@ -96,7 +96,7 @@
.contacts-map .leaflet-popup-content { .contacts-map .leaflet-popup-content {
margin: 12px 16px; margin: 12px 16px;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
} }
@@ -106,7 +106,7 @@
} }
.contacts-map .leaflet-container { .contacts-map .leaflet-container {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
} }
.contacts-map--fallback { .contacts-map--fallback {
@@ -126,7 +126,7 @@
} }
.contacts-map-fallback h3 { .contacts-map-fallback h3 {
font-family: 'BerlinType', serif; font-family: var(--font-logo);
font-weight: 400; font-weight: 400;
font-size: 32px; font-size: 32px;
line-height: 1.1; line-height: 1.1;
@@ -166,7 +166,7 @@
} }
.contacts-map-marker strong { .contacts-map-marker strong {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 15px; font-size: 15px;
font-weight: 700; font-weight: 700;
letter-spacing: 0.02em; letter-spacing: 0.02em;

View File

@@ -55,7 +55,7 @@
.favorites-counter__value { .favorites-counter__value {
display: block; display: block;
color: #36213e; color: #36213e;
font-family: "BerlinType", serif; font-family: var(--font-logo);
font-size: 44px; font-size: 44px;
line-height: 1; line-height: 1;
} }

View File

@@ -504,6 +504,12 @@
background: #d9d9d9; background: #d9d9d9;
} }
.product-actions .bi-heart {
box-sizing: border-box;
padding: 2px;
transform: translateY(2px);
}
.product-1 { .product-1 {
grid-column: 1; grid-column: 1;
grid-row: 1 / 7; grid-row: 1 / 7;

View File

@@ -154,7 +154,7 @@
padding: 12px 14px; padding: 12px 14px;
background: #d9d9d9; background: #d9d9d9;
border: 1px solid #554971; border: 1px solid #554971;
font-family: 'Noah', sans-serif; font-family: var(--font-content);
font-size: 18px; font-size: 18px;
color: #36213e; color: #36213e;
} }

View File

@@ -60,6 +60,9 @@
} }
:root { :root {
--font-logo: 'BerlinType', serif;
--font-content: 'Inter', sans-serif;
--font-accent: 'Inter', sans-serif;
--dark: #36213e; --dark: #36213e;
--mid: #554971; --mid: #554971;
--blue-gray: #63768d; --blue-gray: #63768d;
@@ -69,7 +72,7 @@
} }
body { body {
font-family: 'Noah', sans-serif; font-family: var(--font-content);
color: var(--dark); color: var(--dark);
background: var(--bg); background: var(--bg);
overflow-x: hidden; overflow-x: hidden;
@@ -141,7 +144,7 @@ body {
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: 'BerlinType', serif; font-family: var(--font-logo);
} }
@media (max-width: 640px) { @media (max-width: 640px) {
@@ -219,14 +222,14 @@ header {
} }
.logo { .logo {
font-family: 'BerlinType', serif; font-family: var(--font-logo);
font-size: 32px; font-size: 32px;
color: var(--dark); color: var(--dark);
white-space: nowrap; white-space: nowrap;
letter-spacing: 1px; letter-spacing: 1px;
a { a {
font-family: 'BerlinType', serif; font-family: var(--font-logo);
} }
} }
@@ -267,7 +270,7 @@ header {
border: 0; border: 0;
background: transparent; background: transparent;
color: var(--mid); color: var(--mid);
font-family: 'Inter', sans-serif; font-family: var(--font-accent);
font-size: 13px; font-size: 13px;
line-height: 1.2; line-height: 1.2;
text-align: left; text-align: left;
@@ -328,7 +331,7 @@ header {
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
text-align: left; text-align: left;
font-family: 'Inter', sans-serif; font-family: var(--font-accent);
transition: background-color .15s ease, color .15s ease; transition: background-color .15s ease, color .15s ease;
} }
@@ -423,6 +426,12 @@ header {
height: 28px; height: 28px;
} }
.header-icons .bi-heart {
box-sizing: border-box;
padding: 2px;
transform: translateY(2px);
}
.nav-bar { .nav-bar {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -511,7 +520,7 @@ footer {
} }
.footer-logo { .footer-logo {
font-family: 'BerlinType', serif; font-family: var(--font-logo);
font-size: 30px; font-size: 30px;
color: rgba(184, 243, 255, .85); color: rgba(184, 243, 255, .85);
margin-bottom: 8px; margin-bottom: 8px;

View File

@@ -82,7 +82,7 @@
<div class="header-icons"> <div class="header-icons">
<a href="{% if request.user.is_authenticated %}{% url 'favorites:index' %}{% else %}{% url 'users:login' %}{% endif %}" <a href="{% if request.user.is_authenticated %}{% url 'favorites:index' %}{% else %}{% url 'users:login' %}{% endif %}"
aria-label="Избранное"> aria-label="Избранное">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor"
class="bi bi-heart" viewBox="0 0 16 16"> class="bi bi-heart" viewBox="0 0 16 16">
<path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143q.09.083.176.171a3 3 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15"></path> <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143q.09.083.176.171a3 3 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15"></path>
</svg> </svg>