templates/areas/icon-writeup/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="settings">
  3.     <div class="position-relative settings-button-border">
  4.         <strong class="settings-header">Settings</strong><button class="toggle-settings"><i class="fa fa-plus"></i></button>
  5.         <div class="settings_container">
  6.             <div class="row middle-lg middle-md middle-sm" style="gap: 10px">
  7.                 <div>Layout</div>
  8.                 <div>
  9.                     {{
  10.                     pimcore_select("layout", {
  11.                         store: [
  12.                         ["flex", "Flex"],
  13.                         ["stacked", "Stacked"]
  14.                         ]
  15.                     })
  16.                     }}
  17.                 </div>
  18.             </div>
  19.             <div class="row middle-lg middle-md middle-sm" style="gap: 10px">
  20.                 <div>Columns</div>
  21.                 <div>
  22.                     {{
  23.                     pimcore_select("columns", {
  24.                         store: [
  25.                         ["1", "1"],
  26.                         ["2", "2"],
  27.                         ["3", "3"]
  28.                         ]
  29.                     })
  30.                     }}
  31.                 </div>
  32.             </div>
  33.         </div>
  34.         <div style="position: absolute; top: 10px; right: 0; font-weight: bold; text-transform: uppercase;">
  35.             Icon Writeup
  36.         </div>
  37.     </div>
  38. </div>
  39. {% endif %}
  40. {% set layout = pimcore_select("layout").getData() == 'flex' ? ' class=display-flex' : '' %}
  41. {% set columns = pimcore_select("columns").getData() == 2 ? ' two-col' : pimcore_select("columns").getData() == 3 ? ' three-col' : '' %}
  42. <div{{ layout }} style="margin-bottom: -3em;">
  43.     
  44.     {% for i in pimcore_block('iconWriteupBlock', {'limit': 4}).iterator %}
  45.     <div class="stylized-header{{ columns }}">
  46.         
  47.         {% if not pimcore_image("iconIcon").isEmpty() %}
  48.         <div class="icon-container">
  49.         {% endif %}
  50.             {% if editmode %}
  51.             {{
  52.                 pimcore_image("iconIcon", {
  53.                 title: "Drag your image here, SVG preferred for color matching of site.",
  54.                 width: 50,
  55.                 height: 50
  56.                 })
  57.             }}
  58.             {% else %} 
  59.             {% if pimcore_image("iconIcon").getName()|split('.')|last == 'svg' %}
  60.             {{ pimcore_image("iconIcon") }}
  61.             {% else %}
  62.             {{ pimcore_image("iconIcon", {
  63.                 "thumbnail": {
  64.                 "width": 200,
  65.                 "height": 200,
  66.                 "interlace": true,
  67.                 "quality": 90
  68.                 }
  69.             }) }}
  70.             {% endif %}
  71.             {% endif %}
  72.         {% if not pimcore_image("iconIcon").isEmpty() %}
  73.         </div>
  74.         {% endif %}
  75.         <p class="text--lg text-align-center font-weight-bold">
  76.             {{ pimcore_input("iconStrongText", { placeholder: "Icon Info" })|raw }}
  77.         </p>
  78.     </div>
  79.     {% endfor %}
  80. </div>