Skip to content

Commit

Permalink
Change styling of blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-playmod committed Aug 17, 2022
1 parent 5c1d7c3 commit f24591e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/Resources/assets/shop/scss/block/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './show.scss';
3 changes: 3 additions & 0 deletions src/Resources/assets/shop/scss/block/show.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.bitbag-block img {
max-width: 100%;
}
1 change: 1 addition & 0 deletions src/Resources/assets/shop/scss/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './block/main.scss';
10 changes: 6 additions & 4 deletions src/Resources/views/Shop/Block/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{% for block in blocks %}
<div class="column">
<div class="ui segment">
{{ bitbag_cms_render_block(block.code) }}
</div>
{% if block.name != null %}
<h4 class="ui horizontal section divider header">{{ block.name }}</h4>
{% endif %}

<div class="ui column segment">
{{ bitbag_cms_render_block(block.code) }}
</div>
{% endfor %}
13 changes: 0 additions & 13 deletions src/Resources/views/Shop/Block/show.html.twig
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<div class="bitbag-block">
{% if null != block.name %}
<h2>{{ block.name }}</h2>
{% if null != block.taxons %}
{% for taxon in block.taxons %}
<p>Taxon: {{ taxon.slug }}</p>
{% endfor %}
{% endif %}
{% if null != block.products %}
{% for product in block.products %}
<p>Product: {{ product }}</p>
{% endfor %}
{% endif %}
{% endif %}
{{ bitbag_cms_render_content(block) }}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
{{ sonata_block_render_event('sylius.shop.product.show.after_add_to_cart', {'product': product}) }}
</div>
</div>
<div class="ui two column stackable grid">
{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {'sectionCode' : 'products', 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}
{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_product_code', {'productCode' : product.code, 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}
</div>

{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {'sectionCode' : 'products', 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}

{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_product_code', {'productCode' : product.code, 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}

{{ bitbag_cms_render_product_pages(product) }}

Expand Down

0 comments on commit f24591e

Please sign in to comment.