我正在创建一个自定义主题,使用黎明作为参考主题。我想要创建2预置,这改变了我的标题,页脚,公告栏,移动导航条,节和一般设置的所有默认颜色。现在,我通过在settings_data.json中设置预置名称和通用设置变量,成功地更改了常规设置的颜色,但似乎无法弄清楚如何更改区段颜色。那里试过很多东西,但都没有用。这是我的密码
{
"current": "Beige",
"presets": {
"Beige": {
"placeholder_color": "#F8E6DA",
"pagination_tab_bg_color": "#FFF8F2",
"pagination_number_color": "#000000",
"pagination_current_page_color": "#F8E6DA",
"pagination_arrow_tab_color": "#F8E6DA",
"button_hover": "#EFF6FF",
"customer_pages_bg_colors": "#ffffff",
"container_bg_color": "#FFF8F2",
"border_color": "#F8E6DA",
"primary_button_color": "#000000",
"predictive_search_bg_color": "#F8E6DA",
"predictive_search_button_color": "#FABF9D",
"predictive_search_button_text_color": "#000000",
"cart_notify_bg_color": "#FFF8F2",
"cart_notify_border_color": "#F8E6DA",
"cart_notify_primary_button_color": "#FABF9D",
"cart_notify_primary_button_text_color": "#000000",
"cart_notify_secondary_button_color": "#000000",
"cart_count_bubble_color": "#303036",
"gift_card_bg_color": "linear-gradient(#FFF1E8, #EFD1B8)",
"gift_card_badge_color": "#F8E6DA",
"gift_card_badge_text_color": "#000000",
"gift_card_primary_button_color": "#fabf9d",
"gift_card_secondary_button_color": "#000000",
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
"show_announce_home_page": false,
"text": "Welcome to our store",
"announce_font_size": 15,
"announce_text_align": "center",
"announce_bold": false,
"link": "",
"announce_text_color": "#E22120",
"announce_bg_color": "#ffffff"
}
}
},
"block_order": [
"announcement-bar-0"
],
"settings": {
}
},
"mobile-navigation": {
"type": "mobile-navigation",
"settings": {
"nav-menu": "main-menu",
"mobile_nav_text_color": "#000000",
"icon_color": "#000000",
"border_bottom": "#f8e6da",
"mobile_nav_bg_color": "#ffffff"
}
},
"header": {
"type": "header",
"settings": {
"logo_width": 100,
"menu": "main-menu",
"enable_sticky_header": true,
"show_search_box": true,
"enable_predictive_search": true,
"header_text_color": "#000000",
"icon_color": "#000000",
"header_bg_color": "#f8e6da",
"dropdown_hover_color": "#ebd3c3",
"dropdown_hover_text_color": "#000000"
}
},
"footer": {
"type": "footer",
"blocks": {
"footer-0": {
"type": "text",
"settings": {
"address": "<p>(218) 463-0260 36979 300th St<br\/>Roseau, Minnesota(MN), 56751<\/p>",
"contact": "<p>+1 (234) 567-89-90 <br\/>+1 (234) 567-89-90<\/p>",
"email": "info@collector.com"
}
},
"footer-1": {
"type": "menu",
"settings": {
"menu_heading": "Links",
"menu": "footer",
"menu_collapse": true
}
},
"88236e16-1b6c-438e-8543-f6fe494e04fb": {
"type": "menu",
"settings": {
"menu_heading": "Quick Links",
"menu": "footer-menu2",
"menu_collapse": true
}
},
"footer-2": {
"type": "info",
"settings": {
"additional_info": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc quis risus mi. Ut placerat quam lectus. Curabitur dictum velit non lacus<\/p>"
}
},
"footer-3": {
"type": "newsletter",
"settings": {
"newsletter_heading": "Subscribe to our emails",
"newsletter_btn_text": "Sign Up",
"newsletter_caption": "Phasellus dignissim, tellus in pellentesque mollis, mauris",
"newsletter_btn_color": "#fabf9d",
"newsletter_btn_text_color": "#000000"
}
}
},
"block_order": [
"footer-0",
"footer-1",
"88236e16-1b6c-438e-8543-f6fe494e04fb",
"footer-2",
"footer-3"
],
"settings": {
"footer_logo_width": 100,
"footer_top_bg_color": "#f8e6da",
"footer_top_text_color": "#000000",
"footer_bottom_bg_color": "#303036",
"footer_bottom_text_color": "#ffffff",
"show_social": true,
"payment_enable": true
}
}
},
"content_for_index": [
]
},
"Electronic": {
"placeholder_color": "#7DABE0",
"pagination_tab_bg_color": "#F8FBFF",
"pagination_current_page_color": "#EFF6FF",
"pagination_arrow_tab_color": "#EFF6FF",
"button_hover": "#EBD3C3",
"customer_pages_bg_colors": "#FCFEFF",
"container_bg_color": "#EFF6FF",
"border_color": "#134074",
"primary_button_color": "#E0691E",
"predictive_search_bg_color": "#C6D8ED",
"predictive_search_button_color": "#E0691E",
"predictive_search_button_text_color": "#ffffff",
"cart_notify_bg_color": "#EFF6FF",
"cart_notify_border_color": "#134074",
"cart_notify_primary_button_color": "#ED6F1E",
"cart_notify_primary_button_text_color": "#ffffff",
"cart_notify_secondary_button_color": "#134074",
"cart_count_bubble_color": "#ED6F1E",
"gift_card_bg_color": "linear-gradient(#EFF6FF, #7DABE0)",
"gift_card_badge_color": "#000000",
"gift_card_badge_text_color": "#ffffff",
"gift_card_primary_button_color": "#ED6F1E",
"gift_card_primary_text_button_color": "#ffffff",
"gift_card_secondary_button_color": "#134074",
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
"show_announce_home_page": false,
"text": "Welcome to our store",
"announce_font_size": 15,
"announce_text_align": "center",
"announce_bold": false,
"link": "",
"announce_text_color": "#E22120",
"announce_bg_color": "#ffffcf"
}
}
},
"block_order": [
"announcement-bar-0"
],
"settings": {
}
},
"mobile-navigation": {
"type": "mobile-navigation",
"settings": {
"nav-menu": "main-menu",
"mobile_nav_text_color": "#000000",
"icon_color": "#000000",
"border_bottom": "#f8e6da",
"mobile_nav_bg_color": "#fff7f2"
}
},
"header": {
"type": "header",
"settings": {
"logo_width": 100,
"menu": "main-menu",
"enable_sticky_header": true,
"show_search_box": true,
"enable_predictive_search": true,
"header_text_color": "#000000",
"icon_color": "#000000",
"header_bg_color": "#f8e6da",
"dropdown_hover_color": "#ebd3c3",
"dropdown_hover_text_color": "#000000"
}
},
"footer": {
"type": "footer",
"blocks": {
"footer-0": {
"type": "text",
"settings": {
"address": "<p>(218) 463-0260 36979 300th St<br\/>Roseau, Minnesota(MN), 56751<\/p>",
"contact": "<p>+1 (234) 567-89-90 <br\/>+1 (234) 567-89-90<\/p>",
"email": "info@collector.com"
}
},
"footer-1": {
"type": "menu",
"settings": {
"menu_heading": "Links",
"menu": "footer",
"menu_collapse": true
}
},
"88236e16-1b6c-438e-8543-f6fe494e04fb": {
"type": "menu",
"settings": {
"menu_heading": "Quick Links",
"menu": "footer-menu2",
"menu_collapse": true
}
},
"footer-2": {
"type": "info",
"settings": {
"additional_info": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc quis risus mi. Ut placerat quam lectus. Curabitur dictum velit non lacus<\/p>"
}
},
"footer-3": {
"type": "newsletter",
"settings": {
"newsletter_heading": "Subscribe to our emails",
"newsletter_btn_text": "Sign Up",
"newsletter_caption": "Phasellus dignissim, tellus in pellentesque mollis, mauris",
"newsletter_btn_color": "#fabf9d",
"newsletter_btn_text_color": "#000000"
}
}
},
"block_order": [
"footer-0",
"footer-1",
"88236e16-1b6c-438e-8543-f6fe494e04fb",
"footer-2",
"footer-3"
],
"settings": {
"footer_logo_width": 100,
"footer_top_bg_color": "#f8e6da",
"footer_top_text_color": "#000000",
"footer_bottom_bg_color": "#303036",
"footer_bottom_text_color": "#ffffff",
"show_social": true,
"payment_enable": true
}
}
},
"content_for_index": [
]
}
}
}一般设置变量与样式的变化一起工作,但其他如公告栏、移动导航、页眉、页脚不起作用。我的索引文件是json格式的。我们能做些什么来解决这个问题吗?
发布于 2022-06-19 21:25:07
不幸的是,Shopify预置只是一般的设置预置,例如,如果您的节中有颜色,则创建两个预置的唯一方法是两个创建两个不同的区段预置,此解决方案将在主题编辑器中的同一节的节选择器中创建两个部分。这就是为什么不建议向节中添加颜色,而是使用颜色模式。(就像黎明一样)
https://stackoverflow.com/questions/72629645
复制相似问题