Browse Source

check

master
Florian Eisenmenger 4 years ago
parent
commit
638a4d6865
19 changed files with 380 additions and 72 deletions
  1. +54
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js
  2. +3
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/base.scss
  3. +42
    -40
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_cms-block.scss
  4. +51
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_cms-element.scss
  5. +48
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_forms.scss
  6. +1
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_product-box.scss
  7. +29
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/layout/_header-minimal.scss
  8. +34
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/layout/_header.scss
  9. +4
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss
  10. +19
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/checkout/_cart.scss
  11. +17
    -0
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/checkout/_register.scss
  12. +15
    -4
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/product-detail/_product-detail.scss
  13. +10
    -0
      zenitPlatformAtmosSet1/src/Resources/views/storefront/component/account/register.html.twig
  14. +10
    -1
      zenitPlatformAtmosSet1/src/Resources/views/storefront/component/product/card/price-unit.html.twig
  15. +27
    -0
      zenitPlatformAtmosSet1/src/Resources/views/storefront/layout/header/header-minimal.html.twig
  16. +7
    -1
      zenitPlatformAtmosSet1/src/Resources/views/storefront/layout/header/header.html.twig
  17. +1
    -0
      zenitPlatformAtmosSet1/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig
  18. +4
    -13
      zenitPlatformAtmosSet1/src/Resources/views/storefront/page/product-detail/description.html.twig
  19. +4
    -13
      zenitPlatformAtmosSet1/src/Resources/views/storefront/page/product-detail/index.html.twig

+ 54
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js View File

@@ -34,6 +34,14 @@ $(document).ready(function() {
});
changeDelivery(fp);
}
var sticky = $(".thumbnail-container"),
parentContainer = sticky.parents(".aku-cms-factory-element"),
stickyTop = sticky.offset().top;
tagBar(sticky, parentContainer, stickyTop);
$(window).on('resize scroll', function() {
tagBar(sticky, parentContainer, stickyTop);
});
});

function manipulateDateInputValue() {
@@ -116,3 +124,49 @@ function setIncludedDays(delivery, fp, addDays) {
}
]);
}

$.fn.isInViewport = function() {
var elementTop = $(this).offset().top + 50;
var elementBottom = elementTop + $(this).outerHeight();

var viewportTop = $(window).scrollTop();
var viewportBottom = viewportTop + $(window).height();

return elementBottom > viewportTop && elementTop < viewportBottom;
};

function tagBar(sticky, parentContainer, stickyTop) {
var headerHeight = $(".header-inner").outerHeight() + 13,
windowTop = $(window).scrollTop() + headerHeight;
if (stickyTop < windowTop && parentContainer.height() + parentContainer.offset().top - sticky.height() > windowTop) {
sticky.css('position', 'fixed').css('top', headerHeight + 'px');
} else {
sticky.css('position', 'absolute').css('top', 0);
}

sticky.find("figure").removeClass("active");
if ($("#day1").isInViewport() && !$("#day2").isInViewport() &&
!$("#day3").isInViewport() && !$("#day4").isInViewport() &&
!$("#day5").isInViewport() && !$("#day6").isInViewport()) {
sticky.find(".day1Image").addClass("active");
}
if ($("#day2").isInViewport() &&
!$("#day3").isInViewport() && !$("#day4").isInViewport() &&
!$("#day5").isInViewport() && !$("#day6").isInViewport()) {
sticky.find(".day2Image").addClass("active");
}
if ($("#day3").isInViewport() && !$("#day4").isInViewport() &&
!$("#day5").isInViewport() && !$("#day6").isInViewport()) {
sticky.find(".day3Image").addClass("active");
}
if ($("#day4").isInViewport() &&
!$("#day5").isInViewport() && !$("#day6").isInViewport()) {
sticky.find(".day4Image").addClass("active");
}
if ($("#day5").isInViewport() && !$("#day6").isInViewport()) {
sticky.find(".day5Image").addClass("active");
}
if ($("#day6").isInViewport()) {
sticky.find(".day6Image").addClass("active");
}
}

+ 3
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/base.scss View File

@@ -1,10 +1,13 @@
@import 'layout/header';
@import 'layout/header-minimal';
@import 'layout/footer';
@import 'component/card';
@import 'component/cms-block';
@import 'component/cms-element';
@import 'component/filter-multi-select';
@import 'component/product-box';
@import 'component/forms';
@import 'page/content/breadcrumb';
@import 'page/checkout/register';
@import 'page/checkout/cart';
@import 'page/product-detail/product-detail';

+ 42
- 40
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_cms-block.scss View File

@@ -1,44 +1,46 @@
.aku-cms-factory-element {
height: 100%;
.hero-icons {
display: flex;
justify-content: center;
grid-gap: 50px;
.dicon {
width: 100%;
max-width: 120px;
text-align: center;
.icon-title {
position: relative;
display: inline-block;
border: 2px solid #222;
padding: 10px 12px;
text-align: center;
&:before {
content: '';
position: absolute;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #222;
border-bottom: 10px solid transparent;
right: 11%;
bottom: -21px;
height: 100%;
font-size: 18px;
line-height: 24px;
.hero-icons {
display: flex;
justify-content: center;
grid-gap: 50px;
.dicon {
width: 100%;
max-width: 120px;
text-align: center;
.icon-title {
position: relative;
display: inline-block;
border: 2px solid #222;
padding: 10px 12px;
text-align: center;
&:before {
content: '';
position: absolute;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #222;
border-bottom: 10px solid transparent;
right: 11%;
bottom: -21px;
}
&:after {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #fff;
border-bottom: 10px solid transparent;
right: 11%;
bottom: -18px;
}
}
}
&:after {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #fff;
border-bottom: 10px solid transparent;
right: 11%;
bottom: -18px;
}
}
}
}
}

+ 51
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_cms-element.scss View File

@@ -22,4 +22,55 @@
margin: 20px 0;
}
}
}
.cms-element-title-paragraph {
font-size: 44px;
font-weight: bold;
letter-spacing: 0;
line-height: 44px;
color: $sw-color-brand-primary;
}
.cms-element-text {
font-size: 18px;
line-height: 24px;
h2 {
font-size: 60px;
line-height: 54px;
}
}
.cms-block.bildlink .cms-element-image {
.cms-image-link {
position: relative;
&:after {
position: absolute;
bottom: 20%;
left: 50%;
z-index: 999;
transform: translateX(-50%);
display: inline-block;
content: 'alle ansehen';
text-align: center;
font-size: .9375rem;
line-height: 34px;
letter-spacing: 1px;
text-transform: uppercase;
padding: 5px 32px;
font-weight: 600;
background: $sw-color-brand-primary;
color: #fff;
border: 2px solid $sw-color-brand-primary;
border-radius: 3px;
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
&:hover {
&:after {
background: #E9F4FC;
border-color: #E9F4FC;
color: $sw-color-brand-primary;
}
}
}
}

+ 48
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_forms.scss View File

@@ -0,0 +1,48 @@
.form-control,
.custom-select {
border-bottom: 2px solid $sw-color-brand-primary;
padding-left: 0;
}
.form-text {
&.privacy-notice {
strong {
display: block;
font-size: 22px;
line-height: 24px;
font-weight: 500;
}
}
}
.js-label-floating label {
font-size: 18px;
left: calc(0rem + ( 10px / 2));
}
.js-floated label {
font-size: 10px;
}
.custom-control-label {
&:before {
top: 0;
width: 18px;
height: 18px;
border: 2px solid $sw-color-brand-primary;
border-radius: 3px;
}
&:after {
top: 0;
width: 18px;
height: 18px;
}
a {
color: #222;
text-decoration: underline;
&:hover {
color: $sw-color-brand-primary;
text-decoration: none;
}
}
}

+ 1
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/component/_product-box.scss View File

@@ -10,6 +10,7 @@
font-size: 18px;
line-height: 20px;
height: auto;
overflow: visible;
}
.product-info {
min-height: 110px;


+ 29
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/layout/_header-minimal.scss View File

@@ -0,0 +1,29 @@
@media (min-width: 768px) {
.header-minimal-contact {
span {
display: block;
margin-bottom: 12px;
}
strong {
font-size: 22px;
line-height: 24px;
font-weight: 500;
margin-right: 15px;
}
}
}
.header-minimal-back-to-shop {
.icon {
display: none;
}
.btn {
font-size: 16px;
text-transform: uppercase;
letter-spacing: 1.6px;
color: $sw-color-brand-primary;
&:hover {
background: transparent;
}
}
}

+ 34
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/layout/_header.scss View File

@@ -1,13 +1,32 @@
.top-bar-country {
transform: translateY(4px);
.top-bar-nav-btn.btn {
color: #222;
&:hover {
background: transparent;
color: $sw-color-brand-primary;
}
}
}
.header-row {
padding-top: 10px;
border-bottom: 1px solid #B1C3D9;
}
.header-main {
.header-actions-btn {
&:hover {
background: transparent;
}
}
.header-cart-btn {
.header-cart-total {
margin-right: 0;
}
&:hover {
background: transparent;
}
}
}
@@ -16,6 +35,7 @@
position: absolute;
top: 0;
right: 0;
z-index: 10;
}
}
@@ -71,3 +91,17 @@
}
}
.navigation-offcanvas-actions {
.top-bar-country {
z-index: 10;
}
}
.navigation-offcanvas-link {
&.is-home-link,
&.is-current-category {
background: #f3f4f5;
color: #222;
}
}

+ 4
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss View File

@@ -7,6 +7,10 @@ Because of the !default flags, theme variable overrides have to be declared befo
https://getbootstrap.com/docs/4.0/getting-started/theming/#variable-defaults
*/

html {
scroll-behavior: smooth;
}

body {
background: #fff;
}


+ 19
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/checkout/_cart.scss View File

@@ -56,6 +56,12 @@
text-decoration: none;
}
}
.checkout-aside-summary-label {
span {
display: block;
color: #71819C;
}
}
.checkout-aside-summary-total {
border-top: 1px solid #B1C3D9;
}
@@ -102,4 +108,17 @@
}
}
}
.checkout-aside-item-image {
padding-left: 0;
padding-right: 0;
max-width: 62px;
}
}
@media (min-width: 1260px) {
.is-act-checkoutregisterpage .checkout .checkout-aside {
margin-left: 0;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}
}

+ 17
- 0
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/checkout/_register.scss View File

@@ -0,0 +1,17 @@
.register-login-collapse-toogle {
margin: 15px 0 50px;
svg {
color: $sw-color-brand-primary;
}
a {
font-size: 15px;
color: #222;
strong {
font-weight: 400;
}
}
}
.register-address {
margin-top: 3rem;
}

+ 15
- 4
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/page/product-detail/_product-detail.scss View File

@@ -6,14 +6,25 @@
}
.aku-cms-factory-element {
display: flex;
position: relative;
margin-left: 100px;
.thumbnail-container {
max-width: 75px;
width: 75px;
margin-right: 25px;
position: absolute;
top: 0;
margin-left: -100px;
figure {
margin: 10px 0;
border: 1px solid transparent;
border-radius: 3px;
padding: 9px 9px 6px 9px;
transition: border 0.2s ease-in-out;
&.active {
border-color: #b1c3d9;
}
img {
max-width: 55px;
margin-bottom: 10px;
width: 55px;
margin-bottom: 4px;
}
figcaption {
font-family: $sw-font-family-base;


+ 10
- 0
zenitPlatformAtmosSet1/src/Resources/views/storefront/component/account/register.html.twig View File

@@ -0,0 +1,10 @@
{% sw_extends '@Storefront/storefront/component/account/register.html.twig' %}
{% block component_account_register_submit %}
<div class="register-submit">
<button type="submit"
class="btn btn-outline-primary">
{{ "account.registerSubmit"|trans|sw_sanitize }}
</button>
</div>
{% endblock %}

+ 10
- 1
zenitPlatformAtmosSet1/src/Resources/views/storefront/component/product/card/price-unit.html.twig View File

@@ -35,7 +35,16 @@
</span>
{% endif %}
</span>
<span>{{ product.customFields.custom_productteaser_price|trans }} € pro Tag</span>
{% set weekProductCount = 0 %}
{% if (product.customFields.custom_weightlossplan_day1_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if (product.customFields.custom_weightlossplan_day2_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if (product.customFields.custom_weightlossplan_day3_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if (product.customFields.custom_weightlossplan_day4_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if (product.customFields.custom_weightlossplan_day5_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if (product.customFields.custom_weightlossplan_day6_image != null) %}{% set weekProductCount = weekProductCount + 1 %}{% endif %}
{% if weekProductCount >= 1 %}
<span>{{ (price.unitPrice / weekProductCount) | json_encode() | round(2) | replace({'.': ','}) }} € pro Tag</span>
{% endif %}
</div>
{% if product.translated.customFields.deposittype %}
<div class="product-deposittype">


+ 27
- 0
zenitPlatformAtmosSet1/src/Resources/views/storefront/layout/header/header-minimal.html.twig View File

@@ -0,0 +1,27 @@
{% sw_extends '@Storefront/storefront/layout/header/header-minimal.html.twig' %}
{% block layout_header_minimal_logo %}
<div class="col-6 col-md-2 header-minimal-logo">
{% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %}
</div>
{% endblock %}
{% block layout_header_minimal_contact %}
<div class="col-md-6 header-minimal-contact">
{{ "header.supportInfo"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block layout_header_minimal_button %}
<div class="col-6 col-md-4 header-minimal-back-to-shop">
<a href="{{ path('frontend.home.page') }}"
class="btn header-minimal-back-to-shop-button"
title="{{ "checkout.finishButtonBackToShop"|trans|striptags }}">
{% sw_icon 'arrow-medium-left' style {
'size': 'sm',
'pack': 'solid'
} %}
<span class="d-none d-sm-inline-block">{{ "checkout.finishButtonBackToShop"|trans|striptags }}</span>
</a>
</div>
{% endblock %}

+ 7
- 1
zenitPlatformAtmosSet1/src/Resources/views/storefront/layout/header/header.html.twig View File

@@ -1,8 +1,14 @@
{% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %}
{% block layout_header_actions %}
<div class="header-actions-col {{ actionClasses }}">
<div class="row no-gutters">
{% block layout_header_top_bar_language %}
{% if not context.customer %}
<div class="col-auto d-none d-lg-block">
{% sw_include '@CogiDetectLocation/storefront/layout/header/actions/country-widget.html.twig' %}
</div>
{% endif %}
{% endblock %}
{% block layout_header_search_toggle %}
<div class="col-auto{% if theme_config('zen-search-style') is same as('default') %} d-sm-none"{% endif %}">
<div class="search-toggle">


+ 1
- 0
zenitPlatformAtmosSet1/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig View File

@@ -12,6 +12,7 @@
data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
{{ "checkout.summaryShipping"|trans|sw_sanitize }}
</a>
<span>{{ "checkout.freeShipping"|trans|sw_sanitize }}</span>
</dt>
{% endblock %}


+ 4
- 13
zenitPlatformAtmosSet1/src/Resources/views/storefront/page/product-detail/description.html.twig View File

@@ -1,16 +1,7 @@
{% sw_extends '@Storefront/storefront/page/product-detail/description.html.twig' %}
{% block page_product_detail_description_content_text %}
{{ parent() }}
{% if product.customFields.custom_weightlossplan_day1_image is defined %}
{{ product.customFields.custom_weightlossplan_day1_image }}
{% endif %}
{% if product.customFields.custom_weightlossplan_day1_notice is defined %}
{{ product.customFields.custom_weightlossplan_day1_notice|trans }}
{% endif %}
{% if product.customFields.custom_weightlossplan_day1_shake is defined %}
{{ product.customFields.custom_weightlossplan_day1_shake|trans }}
{% endif %}
{% block page_product_detail_description_title %}
<div class="h3 product-detail-description-title">
{{ "detail.descriptionTitle"|trans|sw_sanitize }} {{ page.product.translated.name }}
</div>
{% endblock %}

+ 4
- 13
zenitPlatformAtmosSet1/src/Resources/views/storefront/page/product-detail/index.html.twig View File

@@ -1,18 +1,9 @@
{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
{% block page_product_detail_content %}
{{ parent() }}
{% if page.product.customFields.custom_weightlossplan_day1_image is defined %}
{% set day1ImageId = page.product.customFields.custom_weightlossplan_day1_image %}
{% set mediaCollection = searchMedia([day1ImageId], context.context) %}
{% set day1Image = mediaCollection.get(day1ImageId) %}
<div class="day1Image">
<img src="{{ day1Image.url }}">
{% block zen_page_product_detail_short_description %}
{% if page.product.customFields.custom_description_small_description and theme_config('zen-product-details-short-description') %}
<div class="product-detail-short-description">
{{ page.product.customFields.custom_description_small_description|trans|sw_sanitize }}
</div>
{% endif %}
{% if page.product.customFields.custom_weightlossplan_day1_shake is defined %}
Shake: {{ page.product.customFields.custom_weightlossplan_day1_shake|trans }}
{% endif %}
{% endblock %}

Loading…
Cancel
Save