Browse Source

home products css display

Bachir Soussi Chiadmi 3 years ago
parent
commit
01bf726cca

+ 1 - 1
config/sync/core.entity_view_display.commerce_product_variation.materio_product_variation_type.summary.yml

@@ -35,7 +35,7 @@ content:
     region: content
     label: hidden
     settings:
-      link_to_entity: true
+      link_to_entity: false
     third_party_settings: {  }
 hidden:
   billing_schedule: true

+ 3 - 3
config/sync/core.entity_view_display.node.frontpage.default.yml

@@ -253,8 +253,8 @@ content:
     weight: 6
     region: content
     settings:
-      link: true
-      view_mode: default
+      view_mode: summary
+      link: false
     third_party_settings: {  }
     type: entity_reference_entity_view
   computed_showrooms_reference:
@@ -324,7 +324,7 @@ content:
     region: content
   field_pricing:
     weight: 5
-    label: hidden
+    label: above
     settings: {  }
     third_party_settings: {  }
     type: text_default

+ 1 - 1
web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedProdVariationsReferences.php

@@ -37,7 +37,7 @@ class ComputedProdVariationsReferences extends EntityReferenceFieldItemList
   protected function computeValue() {
     $query = \Drupal::entityQuery('commerce_product_variation')
         ->condition('status', 1)
-        ->sort('created', 'DESC')
+        ->sort('created', 'ASC')
         // ->exists('field_visuel')
         // ->condition('type', 'article')
         ->range(0,12);

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.css


+ 1 - 0
web/themes/custom/materiotheme/assets/styles/base/_colors.scss

@@ -4,6 +4,7 @@ $transparent-bg-blk: rgba(0,0,0, 0.75);
 $color-base:#69cdcf;
 $color-showrooms:#50aa3c;
 $color-blabla:#9458aa;
+$color-webshowroom:rgb(255, 159, 80);
 $alpha: 0.90;
 $color-base-transparent: change-color($color-base, $alpha: $alpha);
 $color-showrooms-transparent: change-color($color-showrooms, $alpha: $alpha);

+ 42 - 1
web/themes/custom/materiotheme/assets/styles/main.scss

@@ -808,7 +808,48 @@ article.node--type-frontpage{
       }
       &.home-pricing{
         @extend %part-centered-layout;
-
+        .field--name-field-pricing{
+          padding:2em 0;
+        }
+        .field--name-computed-products-reference{
+          display: flex;
+          flex-flow: row nowrap;
+          // TODO: mediaQuery column
+          >.field__item{
+            flex:0 0 50%;
+            text-align: center;
+            padding: 2em 0;
+            &:nth-child(1){
+              background-color: $color-base
+            }
+            &:nth-child(2){
+              background-color: $color-webshowroom;
+            }
+            color: #fff;
+            position: relative;
+            height:18em;
+            >div{
+              position: absolute;
+              top:50%; left:50%;
+              transform: translate(-50%, -50%);
+            }
+            .field--name-title{
+              @extend %front-col-field__label;
+              font-weight: 600;
+              line-height: 0.7;
+              padding-bottom: 0.5em;
+              text-align: center;
+              word-spacing: 30000px;
+            }
+            .field--name-field-description{
+              @extend %front-col-descritpion;
+              padding:0.5em;
+              p{
+                margin: 0;
+              }
+            }
+          }
+        }
       }
     }
   }

Some files were not shown because too many files changed in this diff