Update CSS

This commit is contained in:
2026-06-10 21:01:01 +02:00
parent ad962d946b
commit 778d15d734
8 changed files with 28 additions and 25 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;
@@ -552,7 +552,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 +767,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

@@ -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: 'Noah', 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;
} }
@@ -511,7 +514,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;