Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #487 from Shopify/content-style-update
Browse files Browse the repository at this point in the history
Content style update
  • Loading branch information
cshold committed Nov 23, 2015
2 parents 3061e0d + cc8a07f commit 87b40e5
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 41 deletions.
2 changes: 1 addition & 1 deletion assets/timber.js.liquid
Expand Up @@ -184,7 +184,7 @@ timber.accessibleNav = function () {
timber.drawersInit = function () {
timber.LeftDrawer = new timber.Drawers('NavDrawer', 'left');
timber.RightDrawer = new timber.Drawers('CartDrawer', 'right', {
{% if settings.ajax_cart_enable %}'onDrawerOpen': ajaxCart.load{% endif %}
{% if settings.ajax_cart_method == "drawer" %}'onDrawerOpen': ajaxCart.load{% endif %}
});
};

Expand Down
4 changes: 2 additions & 2 deletions assets/timber.scss.liquid
Expand Up @@ -2405,7 +2405,7 @@ label.error {
/*============================================================================
#Ajax Cart Styles (conditionally loaded)
==============================================================================*/
{% if settings.ajax_cart_enable %}
{% if settings.ajax_cart_method == "drawer" %}

.ajaxcart__inner {
margin-bottom: $gutter;
Expand Down Expand Up @@ -2539,4 +2539,4 @@ label.error {
border-color: $colorDrawerBorder;
}

{% endif %} // settings.ajax_cart_enable
{% endif %} // settings.ajax_cart_method
6 changes: 3 additions & 3 deletions config/settings_data.json
Expand Up @@ -2,7 +2,7 @@
"current": "Default",
"presets": {
"Default": {
"ajax_cart_enable": true,
"ajax_cart_method": "drawer",
"cart_notes_enable": true,
"color_body_bg": "#fff",
"color_body_text": "#333333",
Expand All @@ -16,8 +16,8 @@
"footer_newsletter_enable": true,
"footer_social_enable": true,
"logo_use_image": false,
"social_facebook_link": "https://www.facebook.com/shopify",
"social_twitter_link": "https://twitter.com/shopify"
"social_facebook_link": "",
"social_twitter_link": ""
}
}
}
79 changes: 45 additions & 34 deletions config/settings_schema.json
Expand Up @@ -30,42 +30,42 @@
},
{
"type": "header",
"content": "General Colors"
"content": "General colors"
},
{
"type": "color",
"id": "color_primary",
"label": "Primary Color",
"label": "Primary",
"default": "#204a80",
"info": "Used for text links, and primary buttons"
},
{
"type": "color",
"id": "color_secondary",
"label": "Secondary Color",
"label": "Secondary",
"default": "#dcdcdc",
"info": "Used for secondary buttons"
},
{
"type": "color",
"id": "color_body_bg",
"label": "Body Background",
"default": "#ffffff"
},
{
"type": "color",
"id": "color_borders",
"label": "Border Colors",
"label": "Borders",
"default": "#e5e5e5"
},
{
"type": "header",
"content": "Body Text"
"content": "Body"
},
{
"type": "color",
"id": "color_body_bg",
"label": "Background",
"default": "#ffffff"
},
{
"type": "color",
"id": "color_body_text",
"label": "Body Text",
"label": "Text",
"default": "#333333"
},
{
Expand All @@ -75,19 +75,19 @@
{
"type": "color",
"id": "color_footer_bg",
"label": "Footer Background",
"label": "Background",
"default": "#f2f2f2"
},
{
"type": "color",
"id": "color_footer_text",
"label": "Footer Text",
"label": "Text",
"default": "#636363"
},
{
"type": "color",
"id": "color_footer_social_link",
"label": "Social Icons",
"label": "Social media icons",
"default": "#bbbbbb"
}
]
Expand All @@ -102,20 +102,20 @@
{
"type": "checkbox",
"id": "logo_use_image",
"label": "Use Custom Logo"
"label": "Use custom logo"
},
{
"type": "image",
"id": "logo.png",
"label": "Custom Logo",
"label": "Custom logo",
"max-width": 450,
"max-height": 200,
"info": "Maximum logo dimensions are 450px wide by 200px high. The uploaded file will be resized to fit within those constraints."
},
{
"type": "text",
"id": "logo_max_width",
"label": "Max Logo Width",
"label": "Max logo width",
"default": "450",
"info": "Defined in pixels. Do not add the 'px' unit."
},
Expand All @@ -126,12 +126,12 @@
{
"type": "checkbox",
"id": "favicon_enable",
"label": "Use custom icon?"
"label": "Use custom icon"
},
{
"type": "image",
"id": "favicon.png",
"label": "16px x 16px png",
"label": "16 x 16px png",
"max-width": 16,
"max-height": 16
}
Expand All @@ -143,60 +143,71 @@
{
"type": "checkbox",
"id": "footer_social_enable",
"label": "Show social media links"
"label": "Show social media icons"
},
{
"type": "text",
"id": "social_twitter_link",
"label": "Twitter link"
"label": "Twitter URL",
"info": "Example: https://twitter.com/shopify"
},
{
"type": "text",
"id": "social_facebook_link",
"label": "Facebook link"
"label": "Facebook URL",
"info": "Example: https://www.facebook.com/shopify"
},
{
"type": "checkbox",
"id": "footer_newsletter_enable",
"label": "Show Newsletter Field"
"label": "Show newsletter field"
},
{
"type": "text",
"id": "newsletter_form_action",
"label": "MailChimp Form Action URL",
"label": "MailChimp form action URL",
"info": "[Where do I find my MailChimp form action URL?](http:\/\/docs.shopify.com\/support\/configuration\/store-customization\/where-do-i-get-my-mailchimp-form-action)"
}
]
},
{
"name": "Cart Page",
"name": "Cart page",
"settings": [
{
"type": "checkbox",
"id": "cart_notes_enable",
"label": "Allow notes with orders"
"label": "Enable cart notes"
},
{
"type": "checkbox",
"id": "cart_vendor_enable",
"label": "Show product vendor"
},
{
"type": "checkbox",
"id": "ajax_cart_enable",
"label": "Enable Ajax Cart Drawer",
"info": "[View Documentation](http:\/\/shopify.com\/timber#ajax-cart)"
"type": "select",
"id": "ajax_cart_method",
"label": "Cart type",
"options": [
{
"value": "drawer",
"label": "Drawer"
},
{
"value": "page",
"label": "Page"
}
]
}
]
},
{
"name": "Social Sharing",
"name": "Social media",
"settings": [
{
"type": "text",
"id": "twittercard_handle",
"label": "Twitter Handle",
"default": "@"
"label": "Twitter handle",
"info": "Example: @shopify"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion layout/theme.liquid
Expand Up @@ -394,7 +394,7 @@
Documentation:
- http://shopify.com/timber#ajax-cart
{% endcomment %}
{% if settings.ajax_cart_enable %}
{% if settings.ajax_cart_method == "drawer" %}
{{ 'handlebars.min.js' | asset_url | script_tag }}
{% include 'ajax-cart-template' %}
{{ 'ajax-cart.js' | asset_url | script_tag }}
Expand Down

0 comments on commit 87b40e5

Please sign in to comment.