templates/areas/col/areas.html.twig line 1

Open in your IDE?
  1. {% block areas %}
  2.   {% set sizeValueSM = [["auto", "ercas_doc_be_col_option_sizeSM_auto"|trans], ["2", "2/12"], ["3", "3/12"], ["4", "4/12"], ["5", "5/12"], ["6", "6/12"], ["7", "7/12"], ["8", "8/12"], ["9", "9/12"], ["10", "10/12"], ["11", "11/12"], ["12", "12/12"]] %}
  3.   {% set sizeValueMD = [["auto", "ercas_doc_be_col_option_sizeMD_auto"|trans], ["2", "2/12"], ["3", "3/12"], ["4", "4/12"], ["5", "5/12"], ["6", "6/12"], ["7", "7/12"], ["8", "8/12"], ["9", "9/12"], ["10", "10/12"], ["11", "11/12"], ["12", "12/12"]] %}
  4.   {% set sizeValueLG = [["auto", "ercas_doc_be_col_option_sizeLG_auto"|trans], ["2", "2/12"], ["3", "3/12"], ["4", "4/12"], ["5", "5/12"], ["6", "6/12"], ["7", "7/12"], ["8", "8/12"], ["9", "9/12"], ["10", "10/12"], ["11", "11/12"], ["12", "12/12"]] %}
  5.   {# Col Margin #}
  6.   {% set colMarginSelect = pimcore_select('colMargin', {
  7.     reload: false,
  8.     store: [
  9.       ["spacing-margin-bottom", "ercas_doc_be_col_option_margin_spacingLarge"|trans],
  10.       ["spacing-medium-margin-bottom", "ercas_doc_be_col_option_margin_spacingMedium"|trans],
  11.       ["spacing-small-margin-bottom", "ercas_doc_be_col_option_margin_spacingSmall"|trans],
  12.       ["spacing-extra-small-margin-bottom", "ercas_doc_be_col_option_margin_spacingColumn"|trans],
  13.       ["spacing-margin-bottom-none", "ercas_doc_be_col_option_margin_spacingNone"|trans]
  14.     ],
  15.     defaultValue: 'spacing-margin-bottom-none',
  16.     width: 300
  17.   }) %}
  18.   {# Col padding #}
  19.   {#{% set colPaddingSelect = pimcore_select('colPadding', {
  20.     reload: false,
  21.     width: 300,
  22.     store: [["spacing-component-padding", "area_spacing_large"|trans], ["spacing-component-small-padding", "area_spacing_small"|trans], ["spacing-component-none-padding", "area_spacing_none"|trans]]
  23.   }) %}
  24.   {% if editmode and colPaddingSelect.isEmpty() %}
  25.     {% do colPaddingSelect.setDataFromResource("spacing-component-none-padding") %}
  26.   {% endif %}
  27.   {% if colPadding is not defined %}
  28.     {% if contentInclude is defined %}
  29.       {% set colPadding = 'spacing-component-none-padding' %}
  30.     {% else %}
  31.       {% set colPadding = colPaddingSelect.getData() %}
  32.     {% endif %}
  33.   {% endif %}#}
  34.   {# Col align #}
  35.   {% set colAlignSelect = pimcore_select('colAlign', {
  36.     reload: false,
  37.     width: 300,
  38.     defaultValue: 'center',
  39.     store: [["auto", "ercas_doc_be_col_option_alignment_auto"|trans], ["start", "ercas_doc_be_col_option_alignment_top"|trans], ["center", "ercas_doc_be_col_option_alignment_center"|trans], ["end", "ercas_doc_be_col_option_alignment_bottom"|trans]]
  40.   }) %}
  41.   {% if editmode and colAlignSelect.isEmpty() %}
  42.       {% do colAlignSelect.setDataFromResource("auto") %}
  43.   {% endif %}
  44.   {% if colAlign is not defined %}
  45.     {% if contentInclude is defined %}
  46.       {% set colAlign = 'auto' %}
  47.     {% else %}
  48.       {% set colAlign = colAlignSelect.getData() %}
  49.     {% endif %}
  50.   {% endif %}
  51.   {# Col content align #}
  52.   {% set colAlignConetentSelect = pimcore_select('colAlignContent', {
  53.     reload: false,
  54.     width: 300,
  55.     defaultValue: 'center',
  56.     store: [["start", "ercas_doc_be_col_option_alignContent_top"|trans], ["center", "ercas_doc_be_col_option_alignContent_center"|trans], ["end", "ercas_doc_be_col_option_alignContent_bottom"|trans]]
  57.   }) %}
  58.   {% if editmode and colAlignConetentSelect.isEmpty() %}
  59.       {% do colAlignConetentSelect.setDataFromResource("auto") %}
  60.   {% endif %}
  61.   {% if colAlignContent is not defined %}
  62.     {% if contentInclude is defined %}
  63.       {% set colAlignContent = 'auto' %}
  64.     {% else %}
  65.       {% set colAlignContent = colAlignConetentSelect.getData() %}
  66.     {% endif %}
  67.   {% endif %}
  68.   {# Col border #}
  69.   {#% set colBorderSelect = pimcore_checkbox('colBorder') %#}
  70.   {# Col sticky #}
  71.   {% set colStickySelect = pimcore_checkbox('colSticky') %}
  72.   {# Col not Equal Hight #}
  73.   {% set colNotEqualHightSelect = pimcore_checkbox('colNotEqualHight') %}
  74.   {# Col create spacer #}
  75.   {% set colCreateSpacerSelect = pimcore_checkbox('colCreateSpacer') %}
  76.   {# Col background #}
  77.   {% set colBackgroundSelect = pimcore_select('colBackground', {
  78.     reload: true,
  79.     width: 300,
  80.     defaultValue: 'none',
  81.     store: [["none", "ercas_doc_be_col_option_backgroundColor_none"|trans], ["white", 'ercas_doc_be_col_option_backgroundColor_white'|trans], ["primary", 'ercas_doc_be_col_option_backgroundColor_primary'|trans], ["primary-light", 'ercas_doc_be_col_option_backgroundColor_primary_light'|trans], ["secondary", 'ercas_doc_be_col_option_backgroundColor_secondary'|trans], ["image", 'ercas_doc_be_col_option_backgroundColor_image'|trans], ["video", 'ercas_doc_be_col_option_backgroundColor_video'|trans], ["border", 'ercas_doc_be_col_option_backgroundColor_border'|trans]]
  82.   }) %}
  83.   {% if editmode and colBackgroundSelect.isEmpty() %}
  84.       {% do colBackgroundSelect.setDataFromResource("none") %}
  85.   {% endif %}
  86.   {% if colBackground is not defined %}
  87.     {% if contentInclude is defined %}
  88.       {% set colBackground = 'none' %}
  89.     {% elseif colBackgroundSelect.getData() == 'none' and (rowBackground != 'none' and rowBackground != 'video' and rowBackground != 'image') %}
  90.       {% set colBackground = rowBackground %}
  91.     {% else %}
  92.       {% set colBackground = colBackgroundSelect.getData() %}
  93.     {% endif %}
  94.   {% endif %}
  95.   {# Col offset #}
  96.   {# {% set colOffsetSelect = pimcore_select('colOffset', {
  97.     reload: false,
  98.     store: [["spacing-margin-top-none", "area_spacing_none"|trans], ["spacing-small-margin-top", "area_spacing_small"|trans], ["spacing-margin-top", "area_spacing_large"|trans], ["c-col__sticky-offset", "sticky offset"|trans]]
  99.   }) %} #}
  100.   {# Col Background opacity #}
  101.  {% set colOpacity = pimcore_numeric('colOpacity',{
  102.         "minValue" : 0,
  103.         "maxValue" : 100,
  104.         "decimalPrecision" : 0,
  105.     "defaultValue": 100,
  106.     width: 300,
  107.     }) %}
  108.   {# Col Size sm #}
  109.   {% set colSizeSmSelect = pimcore_select('colSizeSm', {
  110.     reload: false,
  111.     store: sizeValueSM,
  112.     width: 300,
  113.     defaultValue: '12'
  114.   }) %}
  115.   {# Col Size md #}
  116.   {% set colSizeMdSelect = pimcore_select('colSizeMd', {
  117.     reload: false,
  118.     store: sizeValueMD,
  119.     width: 300,
  120.     defaultValue: 'auto'
  121.   }) %}
  122.   {# Col Size lg #}
  123.   {% set colSizeLgSelect = pimcore_select('colSizeLg', {
  124.     reload: false,
  125.     store: sizeValueLG,
  126.     width: 300,
  127.     defaultValue: 'auto'
  128.   }) %}
  129.   {# Col Behave offset #}
  130.   {% set colBehaveOffset = pimcore_select('colBehaveOffset', {
  131.     reload: true,
  132.     width: 300,
  133.     store: [
  134.       ["spacing-margin-top-none", "ercas_doc_be_col_option_offset_none"|trans],
  135.       ["spacing-small-margin-top", "ercas_doc_be_col_option_offset_spacingSmall"|trans],
  136.       ["spacing-medium-margin-top", "ercas_doc_be_col_option_offset_spacingMedium"|trans],
  137.       ["spacing-margin-top", "ercas_doc_be_col_option_offset_spacingLarge"|trans],
  138.     ]
  139.   }) %}
  140.   {% if editmode and colBehaveOffset.isEmpty() %}
  141.       {% do colBehaveOffset.setDataFromResource("spacing-margin-top-none") %}
  142.   {% endif %}
  143.   {% if colOffset is not defined %}
  144.     {% if contentInclude is defined %}
  145.       {% set colOffset = 'spacing-margin-top-none' %}
  146.     {% else %}
  147.       {% set colOffset = colBehaveOffset.getData() %}
  148.     {% endif %}
  149.   {% endif %}
  150.   {# Col image #}
  151.   {% set colImage = pimcore_image('colImage', {
  152.     reload: true,
  153.     thumbnail: 'content-full'
  154.   }) %}
  155.   {# Col video #}
  156.   {% set colVideo = pimcore_video('colVideo', {
  157.     reload: true,
  158.     width: '100%',
  159.     height: '100%',
  160.     attributes: {
  161.       controls: false,
  162.       loop: 1,
  163.       autoplay: true,
  164.       muted: true
  165.     },
  166.     youtube: {
  167.       rel: 0,
  168.       controls: false,
  169.       loop: 1,
  170.       autoplay: true,
  171.       muted: true
  172.     }
  173.   }) %}
  174.   {# Col height select #}
  175.   {% set colHeightSelect = pimcore_select('colHeightSelect', {
  176.     reload: false,
  177.     width: 300,
  178.     store: [["auto", "ercas_doc_be_col_option_height_auto"|trans], ["square", "ercas_doc_be_col_option_height_square"|trans], ["50", "ercas_doc_be_col_option_height_50"|trans], ["60", "ercas_doc_be_col_option_height_60"|trans], ["70", "ercas_doc_be_col_option_height_70"|trans], ["80", "ercas_doc_be_col_option_height_80"|trans], ["90", "ercas_doc_be_col_option_height_90"|trans], ["100", "ercas_doc_be_col_option_height_100"|trans]]
  179.   }) %}
  180.   {% if editmode and colHeightSelect.isEmpty() %}
  181.       {% do colHeightSelect.setDataFromResource("auto") %}
  182.   {% endif %}
  183.   {# Col padding left-right select #}
  184.   {% set colPaddingLeftRightSelect = pimcore_select('colPaddingLeftRightSelect', {
  185.     reload: false,
  186.     width: 300,
  187.     defaultValue: 'spacing-component-padding-none-left-right',
  188.     store: [["spacing-component-padding-left-right", "ercas_doc_be_col_option_paddingLeftRight_large"|trans], ["spacing-component-medium-padding-left-right", "ercas_doc_be_col_option_paddingLeftRight_medium"|trans], ["spacing-component-small-padding-left-right", "ercas_doc_be_col_option_paddingLeftRight_small"|trans], ["spacing-component-extra-small-padding-left-right", "ercas_doc_be_col_option_paddingLeftRight_extraSmall"|trans], ["spacing-component-padding-none-left-right", "ercas_doc_be_col_option_paddingLeftRight_none"|trans]]
  189.   }) %}
  190.   {% if editmode and colPaddingLeftRightSelect.isEmpty() %}
  191.       {% do colPaddingLeftRightSelect.setDataFromResource("spacing-component-padding-left-right") %}
  192.   {% endif %}
  193.   {# Col padding top-bottom select #}
  194.   {% set colPaddingTopBottomSelect = pimcore_select('colPaddingTopBottomSelect', {
  195.     reload: false,
  196.     width: 300,
  197.     defaultValue: 'spacing-component-padding-none-top-bottom',
  198.     store: [["spacing-component-sticky-offset-padding-top-bottom", "area_spacing_sticky_offset"|trans], ["spacing-component-padding-top-bottom", "ercas_doc_be_col_option_paddingTopBottom_large"|trans], ["spacing-component-medium-padding-top-bottom", "ercas_doc_be_col_option_paddingTopBottom_medium"|trans], ["spacing-component-small-padding-top-bottom", "ercas_doc_be_col_option_paddingTopBottom_small"|trans], ["spacing-component-extra-small-padding-top-bottom", "ercas_doc_be_col_option_paddingTopBottom_extraSmall"|trans], ["spacing-component-padding-none-top-bottom", "ercas_doc_be_col_option_paddingTopBottom_none"|trans]]
  199.   }) %}
  200.   {% if editmode and colPaddingTopBottomSelect.isEmpty() %}
  201.       {% do colPaddingTopBottomSelect.setDataFromResource("spacing-component-padding-top-bottom") %}
  202.   {% endif %}
  203.    {# Col Inner padding top-bottom select #}
  204.   {#% set colInnerTopBottomSelect = pimcore_select('colInnerTopBottomSelect', {
  205.     reload: false,
  206.     width: 300,
  207.     defaultValue: 'spacing-component-medium-Innerpadding-top-bottom',
  208.     store: [["spacing-component-sticky-offset-Innerpadding-top-bottom", "area_spacing_sticky_offset"|trans], ["spacing-component-Innerpadding-top-bottom", "Innerercas_doc_be_col_option_paddingTopBottom_large"|trans], ["spacing-component-medium-Innerpadding-top-bottom", "Innerercas_doc_be_col_option_paddingTopBottom_medium"|trans], ["spacing-component-small-Innerpadding-top-bottom", "Innerercas_doc_be_col_option_paddingTopBottom_small"|trans], ["spacing-component-extra-small-Innerpadding-top-bottom", "Innerercas_doc_be_col_option_paddingTopBottom_extraSmall"|trans], ["spacing-component-Innerpadding-none-top-bottom", "Innerercas_doc_be_col_option_paddingTopBottom_none"|trans]]
  209.   }) %}
  210.   {% if editmode and colInnerTopBottomSelect.isEmpty() %}
  211.       {% do colInnerTopBottomSelect.setDataFromResource("spacing-component-padding-top-bottom") %}
  212.   {% endif %#}
  213.   {# col gradient color select #}
  214.   {% set colGradientColorSelect = pimcore_select('colGradientColorSelect', {
  215.     reload: false,
  216.     width: 300,
  217.     store: [["dark", "ercas_doc_be_col_option_gradientColor_dark"|trans], ["bright", "ercas_doc_be_col_option_gradientColor_light"|trans], ["multi", "ercas_doc_be_col_option_gradientColor_multi"|trans]]
  218.   }) %}
  219.   {% if editmode and colGradientColorSelect.isEmpty() %}
  220.       {% do colGradientColorSelect.setDataFromResource("multi") %}
  221.   {% endif %}
  222.   {# Col gradient opacity #}
  223.   {% set colGradientOpacity = pimcore_numeric('colGradientOpacity',{
  224.     'minValue': 0,
  225.     'maxValue':100,
  226.     'decimalPrecision': 0,
  227.     defaultValue: 50,
  228.     width: 300,
  229.   }) %}
  230.   {# Col gradient height #}
  231.   {% set colGradientSize = pimcore_numeric('colGradientSize', {
  232.     'minValue': 0,
  233.     'maxValue':100,
  234.     'decimalPrecision': 0,
  235.     defaultValue: 100,
  236.     width: 300,
  237.   }) %}
  238.   {% set colGradientAlignment = pimcore_select('colGradientAlignment', {
  239.     reload: false,
  240.     width: 300,
  241.     store: [
  242.       ["none", "ercas_doc_be_col_option_gradientAlignment_none"|trans],
  243.       ["top", "ercas_doc_be_col_option_gradientAlignment_top"|trans],
  244.       ["left", 'ercas_doc_be_col_option_gradientAlignment_left'|trans],
  245.       ["right", 'ercas_doc_be_col_option_gradientAlignment_right'|trans],
  246.       ["bottom", 'ercas_doc_be_col_option_gradientAlignment_bottom'|trans],
  247.       ["full", "ercas_doc_be_col_option_gradientAlignment_full"|trans]
  248.     ],
  249.     defaultValue: 'none'
  250.   }) %}
  251.   {% block editables %}
  252.   {% endblock %}
  253. {% endblock %}