Add Another Choice ...
 
Notifications
Clear all

Add Another Choice Of Background And Accent Option - Shopify 2.0

18 Posts
3 Users
2 Reactions
1,871 Views
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi, I'm using the Dawn 2.0 theme.

 

In default, there are 2 options for background and accent. I want to add one more option.

 

How do I do it?

 

Thanks


   
Quote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 

Hi Ben,

Katrine here from Plak theme support,

Could you tell me please which additional option you would like to add so I can assist you ?

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

The default in Shopify Dawn 2.0 them is when you select background 1 it will sync with the Accent 1 colour (e.g. section's background will be background 1 colour, so the button's colour will be accent 1 colour).

 

I want the same with Background 2 and Accent 2.

How can I solve it?

 

Thanks


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 
Posted by: @ben

Hi Katrine,

The default in Shopify Dawn 2.0 them is when you select background 1 it will sync with the Accent 1 colour (e.g. section's background will be background 1 colour, so the button's colour will be accent 1 colour).

 

I want the same with Background 2 and Accent 2.

How can I solve it?

 

Thanks

Your question is still unclear to me to help you, could you be more specific ? You can attach screenshots, links, ... or any valuable info to help change the color sheme in Dawn theme

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

 

When I'm choosing the section the background 1 option, the button colour will receive the accent 1 colour. You can see it in the picture below.

 

But it's not working the same with background 2 and accent 2.

 


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 

@ben Thanks for providing the screenshot, now i understand your concern.

Dawn was coded in a way to not to change the button color when it overlaps a background, for example, if the background 2 is red and the button back is red too, the button won't be visible.

The best way to go trough this is add a color selector for a specific section, could you tell me which section do you like to add the color selector for the button only?

Katrine

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

 

I would like it to be the first section in my home page, an "image with text" section.

 

Thanks


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 
Posted by: @ben

Hi Katrine,

 

I would like it to be the first section in my home page, an "image with text" section.

 

Thanks

In order to customize the button colors for Dawn theme for the section (Image with text), I invite you to follow these steps :

 

  • From your Shopify Admin, click Online store > Actions > Edit code
  • Open the file image-with-text.liquid
  • Replace the entire code with this one
{{ 'component-image-with-text.css' | asset_url | stylesheet_tag }}

<div class="image-with-text {% if section.settings.full_width %}image-with-text--full-width{% else %}page-width{% endif %} image-with-text--{{ section.settings.content_layout }} color-scheme-{{ section.settings.color_scheme }}">
<div class="image-with-text__grid grid grid--gapless grid--1-col grid--{% if section.settings.desktop_image_width == 'medium' %}2-col-tablet{% else %}3-col-tablet{% endif %}{% if section.settings.layout == 'text_first' %} image-with-text__grid--reverse{% endif %}{% if section.settings.content_layout == 'no-overlap' %} gradient color-{{ section.settings.color_scheme }}{% endif %}">
<div class="image-with-text__media-item image-with-text__media-item--{{ section.settings.desktop_image_width }} image-with-text__media-item--{{ section.settings.desktop_content_position }} grid__item">
<div class="image-with-text__media image-with-text__media--{{ section.settings.height }} {% if section.settings.image != blank %}media{% else %}image-with-text__media--placeholder placeholder{% endif %}"
{% if section.settings.height == 'adapt' and section.settings.image != blank %} style="padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%;"{% endif %}
>
{%- if section.settings.image != blank -%}
<img
srcset="{%- if section.settings.image.width >= 165 -%}{{ section.settings.image | img_url: '165x' }} 165w,{%- endif -%}
{%- if section.settings.image.width >= 360 -%}{{ section.settings.image | img_url: '360x' }} 360w,{%- endif -%}
{%- if section.settings.image.width >= 535 -%}{{ section.settings.image | img_url: '535x' }} 535w,{%- endif -%}
{%- if section.settings.image.width >= 750 -%}{{ section.settings.image | img_url: '750x' }} 750w,{%- endif -%}
{%- if section.settings.image.width >= 1070 -%}{{ section.settings.image | img_url: '1070x' }} 1070w,{%- endif -%}
{%- if section.settings.image.width >= 1500 -%}{{ section.settings.image | img_url: '1500x' }} 1500w,{%- endif -%}
{{ section.settings.image | img_url: 'master' }} {{ section.settings.image.width }}w"
src="{{ section.settings.image | img_url: '1500x' }}"
sizes="(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 2 }}px, (min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2)"
alt="{{ section.settings.image.alt | escape }}"
loading="lazy"
width="{{ section.settings.image.width }}"
height="{{ section.settings.image.height }}"
>
{%- else -%}
{{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
{%- endif -%}
</div>
</div>
<div class="image-with-text__text-item grid__item">
<div id="ImageWithText--{{ section.id }}" class="image-with-text__content image-with-text__content--{{ section.settings.desktop_content_position }} image-with-text__content--desktop-{{ section.settings.desktop_content_alignment }} image-with-text__content--mobile-{{ section.settings.mobile_content_alignment }} image-with-text__content--{{ section.settings.height }} gradient color-{{ section.settings.color_scheme }}">
{%- for block in section.blocks -%}
{% case block.type %}
{%- when 'heading' -%}
<h2 class="image-with-text__heading {{ block.settings.heading_size }}" {{ block.shopify_attributes }}>
{{ block.settings.heading | escape }}
</h2>
{%- when 'caption' -%}
<p class="image-with-text__text image-with-text__text--caption {{ block.settings.text_style }} {{ block.settings.text_style }}--{{ block.settings.text_size }} {{ block.settings.text_style }}" {{ block.shopify_attributes }}>{{ block.settings.caption | escape }}</p>
{%- when 'text' -%}
<div class="image-with-text__text rte {{ block.settings.text_style }}" {{ block.shopify_attributes }}>{{ block.settings.text }}</div>
{%- when 'button' -%}
{%- if block.settings.button_label != blank -%}
<a{% if block.settings.button_link == blank %} role="link" aria-disabled="true"{% else %} href="{{ block.settings.button_link }}"{% endif %} class="button" {{ block.shopify_attributes }}
style="color : {{block.settings.colors_button_txt}};background : {{block.settings.colors_button_bk}};border-color: {{block.settings.colors_button_brdr}};">
{{ block.settings.button_label | escape }}
</a>
{%- endif -%}
{%- endcase -%}
{%- endfor -%}
</div>
</div>
</div>
</div>

{% schema %}
{
"name": "t:sections.image-with-text.name",
"class": "spaced-section spaced-section--full-width",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "t:sections.image-with-text.settings.image.label"
},
{
"type": "select",
"id": "height",
"options": [
{
"value": "adapt",
"label": "t:sections.image-with-text.settings.height.options__1.label"
},
{
"value": "small",
"label": "t:sections.image-with-text.settings.height.options__2.label"
},
{
"value": "large",
"label": "t:sections.image-with-text.settings.height.options__3.label"
}
],
"default": "adapt",
"label": "t:sections.image-with-text.settings.height.label"
},
{
"type": "select",
"id": "desktop_image_width",
"options": [
{
"value": "small",
"label": "t:sections.image-with-text.settings.desktop_image_width.options__1.label"
},
{
"value": "medium",
"label": "t:sections.image-with-text.settings.desktop_image_width.options__2.label"
},
{
"value": "large",
"label": "t:sections.image-with-text.settings.desktop_image_width.options__3.label"
}
],
"default": "medium",
"label": "t:sections.image-with-text.settings.desktop_image_width.label",
"info": "t:sections.image-with-text.settings.desktop_image_width.info"
},
{
"type": "select",
"id": "layout",
"options": [
{
"value": "image_first",
"label": "t:sections.image-with-text.settings.layout.options__1.label"
},
{
"value": "text_first",
"label": "t:sections.image-with-text.settings.layout.options__2.label"
}
],
"default": "image_first",
"label": "t:sections.image-with-text.settings.layout.label",
"info": "t:sections.image-with-text.settings.layout.info"
},
{
"type": "select",
"id": "desktop_content_position",
"options": [
{
"value": "top",
"label": "t:sections.image-with-text.settings.desktop_content_position.options__1.label"
},
{
"value": "middle",
"label": "t:sections.image-with-text.settings.desktop_content_position.options__2.label"
},
{
"value": "bottom",
"label": "t:sections.image-with-text.settings.desktop_content_position.options__3.label"
}
],
"default": "top",
"label": "t:sections.image-with-text.settings.desktop_content_position.label"
},
{
"type": "select",
"id": "desktop_content_alignment",
"options": [
{
"value": "left",
"label": "t:sections.image-with-text.settings.desktop_content_alignment.options__1.label"
},
{
"value": "center",
"label": "t:sections.image-with-text.settings.desktop_content_alignment.options__2.label"
},
{
"value": "right",
"label": "t:sections.image-with-text.settings.desktop_content_alignment.options__3.label"
}
],
"default": "left",
"label": "t:sections.image-with-text.settings.desktop_content_alignment.label"
},
{
"type": "select",
"id": "content_layout",
"options": [
{
"value": "no-overlap",
"label": "t:sections.image-with-text.settings.content_layout.options__1.label"
},
{
"value": "overlap",
"label": "t:sections.image-with-text.settings.content_layout.options__2.label"
}
],
"default": "no-overlap",
"label": "t:sections.image-with-text.settings.content_layout.label"
},
{
"type": "select",
"id": "color_scheme",
"options": [
{
"value": "background-1",
"label": "t:sections.image-with-text.settings.color_scheme.options__1.label"
},
{
"value": "background-2",
"label": "t:sections.image-with-text.settings.color_scheme.options__2.label"
},
{
"value": "inverse",
"label": "t:sections.image-with-text.settings.color_scheme.options__3.label"
},
{
"value": "accent-1",
"label": "t:sections.image-with-text.settings.color_scheme.options__4.label"
},
{
"value": "accent-2",
"label": "t:sections.image-with-text.settings.color_scheme.options__5.label"
}
],
"default": "background-1",
"label": "t:sections.image-with-text.settings.color_scheme.label"
},
{
"type": "header",
"content": "Mobile layout"
},
{
"type": "select",
"id": "mobile_content_alignment",
"options": [
{
"value": "left",
"label": "t:sections.image-with-text.settings.mobile_content_alignment.options__1.label"
},
{
"value": "center",
"label": "t:sections.image-with-text.settings.mobile_content_alignment.options__2.label"
},
{
"value": "right",
"label": "t:sections.image-with-text.settings.mobile_content_alignment.options__3.label"
}
],
"default": "left",
"label": "t:sections.image-with-text.settings.mobile_content_alignment.label"
}
],
"blocks": [
{
"type": "heading",
"name": "t:sections.image-with-text.blocks.heading.name",
"limit": 1,
"settings": [
{
"type": "text",
"id": "heading",
"default": "Image with text",
"label": "t:sections.image-with-text.blocks.heading.settings.heading.label"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.image-with-text.blocks.heading.settings.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.image-with-text.blocks.heading.settings.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.image-with-text.blocks.heading.settings.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.image-with-text.blocks.heading.settings.heading_size.label"
}
]
},
{
"type": "caption",
"name": "t:sections.image-with-text.blocks.caption.name",
"limit": 1,
"settings": [
{
"type": "text",
"id": "caption",
"default": "Add a tagline",
"label": "t:sections.image-with-text.blocks.caption.settings.text.label"
},
{
"type": "select",
"id": "text_style",
"options": [
{
"value": "subtitle",
"label": "t:sections.image-with-text.blocks.caption.settings.text_style.options__1.label"
},
{
"value": "caption-with-letter-spacing",
"label": "t:sections.image-with-text.blocks.caption.settings.text_style.options__2.label"
}
],
"default": "caption-with-letter-spacing",
"label": "t:sections.image-with-text.blocks.caption.settings.text_style.label"
},
{
"type": "select",
"id": "text_size",
"options": [
{
"value": "small",
"label": "t:sections.image-with-text.blocks.caption.settings.caption_size.options__1.label"
},
{
"value": "medium",
"label": "t:sections.image-with-text.blocks.caption.settings.caption_size.options__2.label"
},
{
"value": "large",
"label": "t:sections.image-with-text.blocks.caption.settings.caption_size.options__3.label"
}
],
"default": "medium",
"label": "t:sections.image-with-text.blocks.caption.settings.caption_size.label"
}
]
},
{
"type": "text",
"name": "t:sections.image-with-text.blocks.text.name",
"limit": 1,
"settings": [
{
"type": "richtext",
"id": "text",
"default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
"label": "t:sections.image-with-text.blocks.text.settings.text.label"
},
{
"type": "select",
"id": "text_style",
"options": [
{
"value": "body",
"label": "t:sections.image-with-text.blocks.text.settings.text_style.options__1.label"
}, {
"value": "subtitle",
"label": "t:sections.image-with-text.blocks.text.settings.text_style.options__2.label"
}
],
"default": "body",
"label": "t:sections.image-with-text.blocks.text.settings.text_style.label"
}
]
},
{
"type": "button",
"name": "t:sections.image-with-text.blocks.button.name",
"limit": 1,
"settings": [
{
"type": "text",
"id": "button_label",
"default": "Button label",
"label": "t:sections.image-with-text.blocks.button.settings.button_label.label",
"info": "t:sections.image-with-text.blocks.button.settings.button_label.info"
},
{
"type": "url",
"id": "button_link",
"label": "t:sections.image-with-text.blocks.button.settings.button_link.label"
},
{
"type": "color",
"id": "colors_button_bk",
"default": "#000000",
"label": "Button background"
},
{
"type": "color",
"id": "colors_button_txt",
"default": "#FFFFFF",
"label": "Button text color"
},
{
"type": "color",
"id": "colors_button_brdr",
"default": "#FCFBD4",
"label": "Button border"
}
]
}
],
"presets": [
{
"name": "t:sections.image-with-text.presets.name",
"blocks": [
{
"type": "heading"
},
{
"type": "text"
},
{
"type": "button"
}
]
}
]
}
{% endschema %}
  • Click Save

 

After which, you will be able to change the button colors directly from the editor

 

 

Let me know if you have any other questions.

Kind regards,
Katrine

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

 

Thank you, but it's not working as you see, background 2 is brown and accent 2 is green, the button is still black which means it didn't sync with the accent 2 color.

 


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 

@ben The new code I provide works only for the section (Image with text) and it is independent from the general settings colors

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

I know, the screenshot was taken from the "image with text" section in the top of my homepage.

 

What do you mean "it is independent from the general settings colors"?


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 
Posted by: @ben

Hi Katrine,

I know, the screenshot was taken from the "image with text" section in the top of my homepage.

 

What do you mean "it is independent from the general settings colors"?

It means that you can change the buttons colors on the section "image with text" only

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

 

You can see in the last post I wrote you that it's still not working, I attached a picture in that post to show what happen after choosing background 2.

 


   
ReplyQuote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 
Posted by: @ben

Hi Katrine,

 

You can see in the last post I wrote you that it's still not working, I attached a picture in that post to show what happen after choosing background 2.

 

Did you try to change the button color from the (image with text ) section ?

I attached a video to let you see that it is working

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ReplyQuote
 Ben
(@ben)
Eminent Member
Joined: 3 years ago
Posts: 24
Topic starter  

Hi Katrine,

 

It works, but you removed other default options made of the 2.0 theme, I want to keep the default options I have, I'm using them all the time in many image with text sections:

 


 

Thanks,

Ben


   
ReplyQuote
Page 1 / 2
Share:

Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.

Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple