Browse code

Style two-column layout for product detail page. Add properties to product heading.

Martin Filipovic Hinrichs authored on02/02/2026 12:48:58
Showing7 changed files
... ...
@@ -3,7 +3,10 @@
3 3
 
4 4
   @include media-breakpoint-up(lg) {
5 5
     display: block;
6
-    position: sticky;
6
+    height: $benefits-bar-height;
7
+    overflow: hidden;
8
+    position: fixed;
9
+    width: 100%;
7 10
     top: 0;
8 11
     z-index: 100;
9 12
     background-color: $dark;
... ...
@@ -32,6 +35,7 @@
32 35
 
33 36
 // Header
34 37
 header.header-main {
38
+  margin-top: $benefits-bar-height;
35 39
   padding: 2.5rem .25rem 1rem;
36 40
 }
37 41
 
... ...
@@ -3,6 +3,8 @@
3 3
 @import 'areas/main';
4 4
 @import 'areas/footer';
5 5
 
6
+@import 'components/cms-sections';
7
+
6 8
 @import 'scaffolding/typo';
7 9
 @import 'scaffolding/lists';
8 10
 @import 'scaffolding/tables';
9 11
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+.cms-section.sticky-sidebar {
2
+    overflow: visible;
3
+}
4
+
5
+.cms-section.sticky-sidebar .cms-section-sidebar-sidebar-content {
6
+    position: sticky;
7
+    top: $benefits-bar-height;
8
+    align-self: flex-start;
9
+}
0 10
\ No newline at end of file
... ...
@@ -39,7 +39,6 @@ $green: #3cc261;
39 39
 $blue: #26b6cf;
40 40
 
41 41
 $primary: $beige;
42
-//$secondary: #CDC6C3;
43 42
 $secondary: $light;
44 43
 
45 44
 $body-color: $dark;
... ...
@@ -69,6 +68,8 @@ $input-font-weight: $font-weight-light;
69 68
 
70 69
 
71 70
 
71
+$benefits-bar-height: 52px;
72
+
72 73
 :root{
73 74
   --animate-duration: .5s;
74 75
   --bs-body-color-inverse: #{$body-color-inverse};
... ...
@@ -1,65 +1,116 @@
1
-.is-ctl-product {
2
-  nav[aria-label="breadcrumb"] {
3
-    display: none;
4
-  }
5
-
6
-  .product-detail {
7
-    padding-top: 2.5rem;
8
-    @include media-breakpoint-up(md) {
9
-      padding-top: 3.5rem;
10
-    }
1
+.is-active-route-frontend-detail-page {
11 2
 
12
-    .product-detail-content {
13
-      .product-detail-delivery-information:not(:has(p)) {
14
-        display: none;
3
+  .cms-section-sidebar {
4
+    .cms-section-sidebar-sidebar-content.col-lg-4.col-xl-3,
5
+    .cms-section-sidebar-main-content.col-lg-8.col-xl-9 {
6
+      @include media-breakpoint-up(lg) {
7
+        width: 50%;
15 8
       }
9
+    }
16 10
 
17
-      .product-detail-price-container {
18
-        p.product-price.product-detail-price {
19
-          @include font-size(40px);
20
-          margin: 0;
21
-        }
11
+    .cms-section-sidebar-sidebar-content {
12
+      @include media-breakpoint-up(lg) {
13
+        display: flex;
14
+        flex-direction: column;
15
+        align-items: flex-end;
22 16
       }
17
+    }
23 18
 
24
-      .buy-widget-container {
25
-        flex-flow: nowrap;
19
+    .cms-section-sidebar-main-content .cms-block-gallery-buybox  .product-detail-media {
20
+      @include media-breakpoint-up(lg) {
21
+        display: none;
26 22
       }
23
+    }
24
+  }
27 25
 
28
-      .product-detail-tax-container {
29
-        p.product-detail-tax {
30
-          font-size: 0.75rem;
31
-
32
-          a.product-detail-tax-link {
33
-            color: $body-color;
34 26
 
35
-            &:hover {
36
-              color: $primary;
37
-            }
38
-          }
39
-        }
40
-      }
27
+  .product-heading-name-container {
28
+    .lage {
29
+      font-size: rfs-value(22px);
41 30
     }
42 31
 
43
-    .product-detail-cross-selling {
44
-      h2 {
45
-        @extend %special-headline;
46
-      }
32
+    h1 {
33
+      padding: .4rem 0;
34
+      font-size: rfs-value(28px);
35
+      margin: 0;
47 36
     }
48
-  }
49
-}
50 37
 
38
+    .weinlinie {
39
+      color: $primary;
40
+      font-size: rfs-value(22px);
51 41
 
52
-#productDetailPageBuyProductForm {
53
-  .row.g-2.mt-0.justify-content-end {
54
-    justify-content: flex-start !important;
55
-    padding-left: calc((var(--bs-gutter-x) * .25) + 25%) !important;
42
+      &::before {
43
+        content: open-quote;
44
+      }
56 45
 
57
-    .paypal-buttons {
58
-      width: 189px;
46
+      &::after {
47
+        content: close-quote;
48
+      }
59 49
     }
60 50
   }
61
-
62
-  .btn-buy {
63
-    width: 189px;
64
-  }
65
-}
66 51
\ No newline at end of file
52
+}
53
+//.is-ctl-product {
54
+//  nav[aria-label="breadcrumb"] {
55
+//    display: none;
56
+//  }
57
+//
58
+//  .product-detail {
59
+//    padding-top: 2.5rem;
60
+//    @include media-breakpoint-up(md) {
61
+//      padding-top: 3.5rem;
62
+//    }
63
+//
64
+//    .product-detail-content {
65
+//      .product-detail-delivery-information:not(:has(p)) {
66
+//        display: none;
67
+//      }
68
+//
69
+//      .product-detail-price-container {
70
+//        p.product-price.product-detail-price {
71
+//          @include font-size(40px);
72
+//          margin: 0;
73
+//        }
74
+//      }
75
+//
76
+//      .buy-widget-container {
77
+//        flex-flow: nowrap;
78
+//      }
79
+//
80
+//      .product-detail-tax-container {
81
+//        p.product-detail-tax {
82
+//          font-size: 0.75rem;
83
+//
84
+//          a.product-detail-tax-link {
85
+//            color: $body-color;
86
+//
87
+//            &:hover {
88
+//              color: $primary;
89
+//            }
90
+//          }
91
+//        }
92
+//      }
93
+//    }
94
+//
95
+//    .product-detail-cross-selling {
96
+//      h2 {
97
+//        @extend %special-headline;
98
+//      }
99
+//    }
100
+//  }
101
+//}
102
+//
103
+//
104
+//#productDetailPageBuyProductForm {
105
+//  .row.g-2.mt-0.justify-content-end {
106
+//    justify-content: flex-start !important;
107
+//    padding-left: calc((var(--bs-gutter-x) * .25) + 25%) !important;
108
+//
109
+//    .paypal-buttons {
110
+//      width: 189px;
111
+//    }
112
+//  }
113
+//
114
+//  .btn-buy {
115
+//    width: 189px;
116
+//  }
117
+//}
67 118
\ No newline at end of file
68 119
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+{% sw_extends '@Storefront/storefront/block/cms-block-product-heading.html.twig' %}
2
+
3
+{% from '@WeinmanufakturTheme/storefront/utilities/macros.html.twig' import get_product_property %}
4
+
5
+{% block block_product_heading %}
6
+    {% set productNameElement = block.slots.getSlot('left') %}
7
+    {% block block_product_heading_product_name_element %}
8
+        <div class="col product-heading-name-container" data-cms-element-id="{{ productNameElement.id }}">
9
+            <div>{{ get_product_property('Lage', page.product) }}</div>
10
+            {% block block_product_heading_product_name_inner %}
11
+                {{ parent() }}
12
+            {% endblock %}
13
+            <div>{{ get_product_property('Weinlinie', page.product) }}</div>
14
+        </div>
15
+    {% endblock %}
16
+{% endblock %}
0 17
\ No newline at end of file
1 18
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+{% macro get_product_property(name, product) %}
2
+    {{- (product.properties|filter(property => property.group.name == name)|first).name -}}
3
+{% endmacro %}