I have made my own button block and when I add the button it duplicates but does not show to lots of text.
Here is a video of me explaining the issue: https://www.loom.com/share/7c5d9bd983714c41a618501562ad16af
This is all the code:
<section class="about-left">
<div class="container">
<div class="content">
<div class="col left">
<div class="image">
{% for block in section.blocks %}
{% if block.settings.image != blank %}
<img src="{{ block.settings.image | img_url: '571x391' }}"/>
{% endif %}
{% endfor %}
</div>
</div>
<div class="col right">
<div class="standard__rte font--3">
<div class="custom-block-title">
{% for block in section.blocks %}
{% if block.settings.custom-block-title1 != blank %}
<h2>{{ block.settings.custom-block-title1 }}</h2>
{% endif %}
{% endfor %}
</div>
</div>
<div class="standard__rte p">
<div class="custom-block-para">
{% for block in section.blocks %}
{% if block.settings.custom-block-para1 != blank %}
<p>{{ block.settings.custom-block-para1 }}</p>
{% endif %}
{% endfor %}
</div>
</div>
<div>
<div id="shop-now-button">
{% for block in section.blocks %}
<button>
<a href="{{ block.settings.link }}" class="shop-now-btn">{{ block.settings.linktext }}</a>
</button>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</section>
<style type="text/css">
.col.left > .image > img {
width: 94%;
min-height: 50px;
background-attachment: fixed;
margin-left: 22px;
}
p {
padding-right: 50px;
}
.container {
width: 100%;
margin: 0 auto;
padding-left: 15px;
padding-right: 15px;
}
.content {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-left: -15px;
margin-right: -15px;
}
.col left {
display: flex;
position: absolute;
top: 0;
right: 0;
z-index: 200;
width: 100%;
height: 100%;
overflow: hidden;
width: 670px;
height: 412px;
}
.col.right {
padding-left: 46px;
padding-right: 46px;
padding-top: 35px;
}
.content .col {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
padding-left: 15px;
padding-right: 15px;
}
.flexbox {
display: flex;
}
.custom-block-title {
font-size: 32px;
text-transform: uppercase;
font-family: 'Cormorant Garamond', serif;
font-weight: 400;
color: #676565;
}
.standard__rte.font--3 {
font-size: calc(var(--font-3)*var(---font-adjust-body));
}
</style>
{% schema %}
{
"blocks": [
{
"type": "image",
"name": "image left",
"settings": [
{
"id": "image",
"type": "image_picker",
"label": "Image"
}
]
},
{
"type": "first-title",
"name": "first-title",
"settings": [
{
"id": "custom-block-title1",
"type": "richtext",
"label": "Block Title"
}
]
},
{
"type": "main-paragraph",
"name": "main-paragraph",
"settings": [
{
"id": "custom-block-para1",
"type": "richtext",
"label": "Main paragraph"
}
]
},
{
"type": "select",
"name": "Add Button",
"settings": [
{
"id": "link",
"type": "url",
"label": "Button link"
},
{
"id": "linktext",
"type": "text",
"label": "Button text",
"default": "Shop Now"
}
]
},
{
"type": "right-paragraph",
"name": "right-paragraph",
"settings": [
{
"id": "custom-block-para3",
"type": "richtext",
"label": "Right paragraph"
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}