solidus_liquid 0.0.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +36 -0
  5. data/.travis.yml +10 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +3 -0
  8. data/Guardfile +37 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +84 -0
  11. data/Rakefile +35 -0
  12. data/app/controllers/concerns/solidus_liquid/liquid.rb +26 -0
  13. data/app/controllers/solidus_liquid/addresses_controller.rb +15 -0
  14. data/app/controllers/solidus_liquid/carts_controller.rb +15 -0
  15. data/app/controllers/solidus_liquid/collections_controller.rb +22 -0
  16. data/app/controllers/solidus_liquid/customers_controller.rb +16 -0
  17. data/app/controllers/solidus_liquid/home_controller.rb +15 -0
  18. data/app/controllers/solidus_liquid/liquid_controller.rb +25 -0
  19. data/app/controllers/solidus_liquid/orders_controller.rb +18 -0
  20. data/app/controllers/solidus_liquid/pages_controller.rb +22 -0
  21. data/app/controllers/solidus_liquid/products_controller.rb +30 -0
  22. data/app/controllers/solidus_liquid/registrations_controller.rb +25 -0
  23. data/app/controllers/solidus_liquid/responders/solidus_liquid/liquid_responder.rb +29 -0
  24. data/app/controllers/solidus_liquid/search_controller.rb +41 -0
  25. data/app/controllers/solidus_liquid/sessions_controller.rb +15 -0
  26. data/app/drops/rails_settings/scoped_settings_drop.rb +11 -0
  27. data/app/drops/solidus_liquid/errors_drop.rb +14 -0
  28. data/app/drops/solidus_liquid/link_drop.rb +15 -0
  29. data/app/drops/solidus_liquid/link_list_drop.rb +7 -0
  30. data/app/drops/solidus_liquid/nil_drop.rb +7 -0
  31. data/app/drops/solidus_liquid/page_drop.rb +7 -0
  32. data/app/drops/solidus_liquid/search_drop.rb +7 -0
  33. data/app/drops/spree/address_drop.rb +24 -0
  34. data/app/drops/spree/image_drop.rb +10 -0
  35. data/app/drops/spree/line_item_drop.rb +5 -0
  36. data/app/drops/spree/option_type_drop.rb +4 -0
  37. data/app/drops/spree/order_drop.rb +18 -0
  38. data/app/drops/spree/product_drop.rb +92 -0
  39. data/app/drops/spree/taxon_drop.rb +31 -0
  40. data/app/drops/spree/user_drop.rb +19 -0
  41. data/app/drops/spree/variant_drop.rb +80 -0
  42. data/app/filters/solidus_liquid/additional_filters.rb +22 -0
  43. data/app/filters/solidus_liquid/html_filters.rb +20 -0
  44. data/app/filters/solidus_liquid/money_filters.rb +15 -0
  45. data/app/filters/solidus_liquid/string_filters.rb +11 -0
  46. data/app/filters/solidus_liquid/url_filters.rb +55 -0
  47. data/app/helpers/solidus_liquid/liquid_helper.rb +107 -0
  48. data/app/helpers/solidus_liquid/shop_helper.rb +7 -0
  49. data/app/models/concerns/solidus_liquid/address.rb +15 -0
  50. data/app/models/concerns/solidus_liquid/full_name.rb +11 -0
  51. data/app/models/concerns/solidus_liquid/handle.rb +25 -0
  52. data/app/models/concerns/solidus_liquid/inventory_policy.rb +7 -0
  53. data/app/models/solidus_liquid/asset.rb +12 -0
  54. data/app/models/solidus_liquid/link.rb +10 -0
  55. data/app/models/solidus_liquid/link_list.rb +7 -0
  56. data/app/models/solidus_liquid/page.rb +5 -0
  57. data/app/models/solidus_liquid/setting.rb +8 -0
  58. data/app/models/solidus_liquid/theme.rb +19 -0
  59. data/app/models/spree/address_decorator.rb +20 -0
  60. data/app/models/spree/image_decorator.rb +19 -0
  61. data/app/models/spree/product_decorator.rb +14 -0
  62. data/app/models/spree/taxon_decorator.rb +5 -0
  63. data/app/models/spree/variant_decorator.rb +15 -0
  64. data/app/poro/solidus_liquid/search.rb +14 -0
  65. data/app/services/solidus_liquid/app_specific_string_io.rb +15 -0
  66. data/app/services/solidus_liquid/asset_compiler.rb +11 -0
  67. data/app/services/solidus_liquid/asset_postprocessor.rb +53 -0
  68. data/app/services/solidus_liquid/link_list_seeder.rb +26 -0
  69. data/app/services/solidus_liquid/liquid_asset_compiler.rb +19 -0
  70. data/app/services/solidus_liquid/scss_asset_compiler.rb +15 -0
  71. data/app/services/solidus_liquid/shop_settings_seeder.rb +26 -0
  72. data/app/services/solidus_liquid/theme_mechanic.rb +45 -0
  73. data/app/uploaders/solidus_liquid/asset_uploader.rb +10 -0
  74. data/app/views/solidus_liquid/global/content_for_header.html.erb +0 -0
  75. data/app/views/solidus_liquid/themes/skeleton-theme/README.md +54 -0
  76. data/app/views/solidus_liquid/themes/skeleton-theme/assets/arrow-down.svg.liquid +3 -0
  77. data/app/views/solidus_liquid/themes/skeleton-theme/assets/cart.svg.liquid +4 -0
  78. data/app/views/solidus_liquid/themes/skeleton-theme/assets/shop.js.liquid +75 -0
  79. data/app/views/solidus_liquid/themes/skeleton-theme/assets/shopify_common.js +14 -0
  80. data/app/views/solidus_liquid/themes/skeleton-theme/assets/style.scss.liquid +768 -0
  81. data/app/views/solidus_liquid/themes/skeleton-theme/config/settings.html +217 -0
  82. data/app/views/solidus_liquid/themes/skeleton-theme/config/settings_data.json +26 -0
  83. data/app/views/solidus_liquid/themes/skeleton-theme/layout/theme.liquid +181 -0
  84. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/article-grid-item.liquid +73 -0
  85. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/collection-grid-item.liquid +46 -0
  86. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/collection-listing.liquid +46 -0
  87. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/open-graph-tags.liquid +35 -0
  88. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/product-grid-item.liquid +70 -0
  89. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/site-nav.liquid +57 -0
  90. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/social-links.liquid +42 -0
  91. data/app/views/solidus_liquid/themes/skeleton-theme/snippets/twitter-card.liquid +41 -0
  92. data/app/views/solidus_liquid/themes/skeleton-theme/templates/404.liquid +2 -0
  93. data/app/views/solidus_liquid/themes/skeleton-theme/templates/article.liquid +160 -0
  94. data/app/views/solidus_liquid/themes/skeleton-theme/templates/blog.grid.liquid +30 -0
  95. data/app/views/solidus_liquid/themes/skeleton-theme/templates/blog.liquid +92 -0
  96. data/app/views/solidus_liquid/themes/skeleton-theme/templates/cart.liquid +123 -0
  97. data/app/views/solidus_liquid/themes/skeleton-theme/templates/collection.liquid +102 -0
  98. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/account.liquid +57 -0
  99. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/activate_account.liquid +26 -0
  100. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/addresses.liquid +173 -0
  101. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/login.liquid +90 -0
  102. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/order.liquid +103 -0
  103. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/register.liquid +32 -0
  104. data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/reset_password.liquid +27 -0
  105. data/app/views/solidus_liquid/themes/skeleton-theme/templates/index.liquid +39 -0
  106. data/app/views/solidus_liquid/themes/skeleton-theme/templates/list-collections.liquid +19 -0
  107. data/app/views/solidus_liquid/themes/skeleton-theme/templates/page.liquid +16 -0
  108. data/app/views/solidus_liquid/themes/skeleton-theme/templates/product.liquid +202 -0
  109. data/app/views/solidus_liquid/themes/skeleton-theme/templates/search.liquid +72 -0
  110. data/bin/rails +12 -0
  111. data/config/app.yml +0 -0
  112. data/config/initializers/carrierwave.rb +25 -0
  113. data/config/initializers/devise.rb +286 -0
  114. data/config/initializers/form_tag.rb +43 -0
  115. data/config/initializers/liquid.rb +202 -0
  116. data/config/initializers/sass.rb +15 -0
  117. data/config/initializers/theme_settings.rb +29 -0
  118. data/config/routes.rb +48 -0
  119. data/db/migrate/20170223064316_create_solidus_liquid_assets.solidus_liquid.rb +14 -0
  120. data/db/migrate/20170223064317_create_solidus_liquid_themes.solidus_liquid.rb +10 -0
  121. data/db/migrate/20170223064318_create_solidus_liquid_link_lists.solidus_liquid.rb +12 -0
  122. data/db/migrate/20170223064319_create_solidus_liquid_links.solidus_liquid.rb +13 -0
  123. data/db/migrate/20170223064320_create_solidus_liquid_settings.solidus_liquid.rb +22 -0
  124. data/db/migrate/20170223064321_create_solidus_liquid_pages.solidus_liquid.rb +16 -0
  125. data/db/migrate/20170223064322_add_attributes_to_spree_users.solidus_liquid.rb +7 -0
  126. data/db/migrate/20170223064323_add_handle_to_spree_taxons.solidus_liquid.rb +7 -0
  127. data/lib/generators/solidus_liquid/install/install_generator.rb +13 -0
  128. data/lib/solidus_liquid.rb +11 -0
  129. data/lib/solidus_liquid/configuration.rb +21 -0
  130. data/lib/solidus_liquid/engine.rb +24 -0
  131. data/lib/solidus_liquid/factories.rb +7 -0
  132. data/lib/solidus_liquid/version.rb +3 -0
  133. data/lib/tasks/download_theme.rake +18 -0
  134. data/lib/tasks/seed_default_theme.rake +8 -0
  135. data/lib/tasks/seed_everything.rake +14 -0
  136. data/lib/tasks/seed_link_list.rake +8 -0
  137. data/lib/tasks/seed_shop_settings.rake +8 -0
  138. data/solidus_liquid.gemspec +56 -0
  139. metadata +586 -0
@@ -0,0 +1,46 @@
1
+ {% comment %}If no value is passed to the snippet, we will set the snippet variable to a sensible default.{% endcomment %}
2
+ {% if collection-grid-item == '' %}{% assign collection-grid-item = 'three-per-row' %}{% endif %}
3
+
4
+ <li class="{{ collection-grid-item }} centered">
5
+
6
+ <div class="coll-image-wrap">
7
+ <a href="{{ collection.url }}">
8
+ {% if collection.image %}
9
+ <img src="{{ collection | img_url: 'grande' }}" alt="{{ collection.image.alt | escape }}" />
10
+ {% else %}
11
+ <img src="{{ collection.products.first | img_url: 'grande' }}" alt="{{ collection.title | escape }}" />
12
+ {% endif %}
13
+ </a>
14
+ </div><!-- .coll-image-wrap -->
15
+
16
+ <div class="coll-caption">
17
+ <a class="coll-title" href="{{ collection.url }}">
18
+ {{ collection.title }}
19
+ </a>
20
+ <span class="coll-item-count">
21
+ {{ collection.all_products_count }} {{ collection.all_products_count | pluralize:'item','items' }}
22
+ </span>
23
+ </div><!-- .coll-caption -->
24
+
25
+ </li>
26
+
27
+ {% comment %}
28
+ You don't need to use a clearing div. Use whatever it is you use to clear
29
+ floated elements. The code that follows just just shows you how to use a cycle element.
30
+ Notice that we named it ( 'clear' ). We need to name it because there's another cycle
31
+ element in this file ( we called that other one 'last' ). If you have more than one
32
+ cycle element in a rendered view, you'll need to name all of them.
33
+ The cycle element is documented here: http://docs.shopify.com/themes/liquid-basics/logic#cycle
34
+ {% endcomment %}
35
+
36
+ {% if collection-grid-item == 'six-per-row' %}
37
+ {% cycle 'clear': '', '', '', '', '', '<div style="clear:both"></div>' %}
38
+ {% elsif collection-grid-item == 'five-per-row' %}
39
+ {% cycle 'clear': '', '', '', '', '<div style="clear:both"></div>' %}
40
+ {% elsif collection-grid-item == 'four-per-row' %}
41
+ {% cycle 'clear': '', '', '', '<div style="clear:both"></div>' %}
42
+ {% elsif collection-grid-item == 'three-per-row' %}
43
+ {% cycle 'clear': '', '', '<div style="clear:both"></div>' %}
44
+ {% elsif collection-grid-item == 'two-per-row' %}
45
+ {% cycle 'clear': '', '<div style="clear:both"></div>' %}
46
+ {% endif %}
@@ -0,0 +1,46 @@
1
+ {% comment %}
2
+ Be prepared to use this snippet to showcase collections specified in a link list as per this solution here:
3
+ "Featuring collections using a Link List" http://docs.shopify.com/support/your-store/collections/featuring-collections-using-link-lists
4
+ If this snippet is called with an argument, we'll assume it is the handle of a link list, and we will use that list.
5
+ If this snippet is not called with an argument, we'll assume we are on the /collections page and will list all collections in the shop, all except the 'frontpage' and 'all' collections.
6
+ Merchants often create an 'all' collection to control their Catalog page at /collections/all as per these instructions:
7
+ "Taking Control of your Catalog Page" http://docs.shopify.com/support/your-store/collections/taking-control-of-your-catalog-page
8
+ and don't want that collection to appear on their /collections page.
9
+ {% endcomment %}
10
+
11
+ {% assign products_per_page = settings.products_per_row | times: settings.number_of_rows %}
12
+ {% assign numbers = 'one, two, three, four, five, six' | split: ',' %}
13
+ {% assign products_per_row = settings.products_per_row | minus: 1 %}
14
+ {% assign products_per_row = numbers[products_per_row] | strip | append: '-per-row' %}
15
+
16
+ {% assign using_link_list = false %}
17
+
18
+ {% if collection-listing != '' and linklists[collection-listing].handle == collection-listing and linklists[collection-listing].links.size > 0 %}
19
+ {% assign using_link_list = true %}
20
+ {% endif %}
21
+
22
+ <h1>{% if using_link_list %}{{ linklists[collection-listing].title }}{% else %}Collections{% endif %}</h1>
23
+
24
+ {% if using_link_list %}
25
+ <ul class="grid clearfix">
26
+ {% for link in linklists[collection-listing].links %}
27
+ {% if link.type == 'collection_link' %}
28
+ {% assign collection = link.object %}
29
+ {% include 'collection-grid-item' with products_per_row %}
30
+ {% endif %}
31
+ {% endfor %}
32
+ </ul>
33
+ {% else %}
34
+ {% paginate collections by products_per_page %}
35
+ <ul class="grid clearfix">
36
+ {% for collection in collections %}
37
+ {% include 'collection-grid-item' with products_per_row %}
38
+ {% endfor %}
39
+ </ul>
40
+ {% if paginate.pages > 1 %}
41
+ <div id="pagination">
42
+ {{ paginate | default_pagination }}
43
+ </div>
44
+ {% endif %}
45
+ {% endpaginate %}
46
+ {% endif %}
@@ -0,0 +1,35 @@
1
+ {% if template contains 'product' %}
2
+ <meta property="og:type" content="product" />
3
+ <meta property="og:title" content="{{ product.title | strip_html | escape }}" />
4
+ {% for image in product.images %}
5
+ <meta property="og:image" content="http:{{ image | img_url: 'grande' }}" />
6
+ <meta property="og:image:secure_url" content="https:{{ image | img_url: 'grande' }}" />
7
+ {% endfor %}
8
+ <meta property="og:price:amount" content="{{ product.price | money_without_currency }}" />
9
+ <meta property="og:price:currency" content="{{ shop.currency }}" />
10
+ {% elsif template contains 'article' %}
11
+ <meta property="og:type" content="article" />
12
+ <meta property="og:title" content="{{ article.title | strip_html | escape }}" />
13
+ {% assign img_tag = '<' | append: 'img' %}
14
+ {% if article.content contains img_tag %}
15
+ {% assign src = article.content | split: 'src="' %}
16
+ {% assign src = src[1] | split: '"' | first | remove: 'https:' | remove: 'http:' %}
17
+ {% if src %}
18
+ <meta property="og:image" content="http:{{ src }}" />
19
+ <meta property="og:image:secure_url" content="https:{{ src }}" />
20
+ {% endif %}
21
+ {% endif %}
22
+ {% else %}
23
+ {% if settings.use_logo %}
24
+ <meta property="og:image" content="http:{{ 'logo.png' | asset_url }}" />
25
+ <meta property="og:image:secure_url" content="https:{{ 'logo.png' | asset_url }}" />
26
+ {% endif %}
27
+ <meta property="og:title" content="{{ page_title | escape }}" />
28
+ <meta property="og:type" content="website" />
29
+ {% endif %}
30
+
31
+ {% if page_description %}
32
+ <meta property="og:description" content="{{ page_description }}" />
33
+ {% endif %}
34
+ <meta property="og:url" content="{{ canonical_url }}" />
35
+ <meta property="og:site_name" content="{{ shop.name }}" />
@@ -0,0 +1,70 @@
1
+ {% comment %}
2
+ It may be a good idea to provide a theme setting that lets a merchant decide how many products to show per row
3
+ on collection pages. Or, it may be a good idea to provide a control on the store front which lets a shopper decide
4
+ whether items be presented in a grid or in a list.
5
+ That information about the presentation can be passed on to the product-grid-item.liquid snippet via the 'with' argument.
6
+ Use of the 'with' argument is explained here: http://docs.shopify.com/themes/theme-templates/snippets.
7
+ The information can then be referred to by accessing the variable which goes by the same name as the snippet,
8
+ in this case product-grid-item. If the 'with' argument is not used, the snippet variable is set to an empty string.
9
+ Here, for the sake of teaching, we will use 2 presentation options:
10
+ - 3 products per row, when passing the value 'three-per-row' to the snippet
11
+ - 4 products per row, when passing the value 'four-per-row' to the snippet
12
+ {% endcomment %}
13
+
14
+ {% comment %}If no value is passed to the snippet, we will set the snippet variable to a sensible default.{% endcomment %}
15
+ {% if product-grid-item == '' %}{% assign product-grid-item = 'three-per-row' %}{% endif %}
16
+
17
+ {% comment %}Is this product on sale?{% endcomment %}
18
+ {% assign on_sale = false %}
19
+ {% if product.compare_at_price > product.price %}
20
+ {% assign on_sale = true %}
21
+ {% endif %}
22
+
23
+ <li class="{{ product-grid-item }}{% unless product.available %} sold-out{% endunless %}{% if on_sale %} on-sale{% endif %}{% if product-grid-item == 'four-per-row' %}{% cycle 'last': '', '', '', ' last-in-row' %}{% elsif product-grid-item == 'three-per-row' %}{% cycle 'last': '', '', ' last-in-row' %}{% endif %} centered">
24
+
25
+ <div class="prod-image-wrap">
26
+ <a href="{{ product.url | within: collection }}">
27
+ <img src="{{ product | img_url: 'grande' }}" alt="{{ product.featured_image.alt | escape }}" />
28
+ </a>
29
+ </div><!-- .prod-image-wrap -->
30
+
31
+ <div class="prod-caption">
32
+ <a href="{{ product.url | within: collection }}">
33
+ {{ product.title }}
34
+ </a>
35
+ <span class="prod-price">
36
+ {% if product.price_varies %}From{% endif %}
37
+ {{ product.price | money }}
38
+ {% if on_sale %}
39
+ <s class="compare-at-price">{{ product.compare_at_price | money }}</s>
40
+ {% endif %}
41
+ </span>
42
+ {% comment %}
43
+ All themes by Shopify should support the Product Reviews app out of the box.
44
+ https://apps.shopify.com/product-reviews
45
+ {% endcomment %}
46
+ <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
47
+ </div><!-- .prod-caption -->
48
+
49
+ </li>
50
+
51
+ {% comment %}
52
+ You don't need to use a clearing div. Use whatever it is you use to clear
53
+ floated elements. The code that follows just just shows you how to use a cycle element.
54
+ Notice that we named it ( 'clear' ). We need to name it because there's another cycle
55
+ element in this file ( we called that other one 'last' ). If you have more than one
56
+ cycle element in a rendered view, you'll need to name all of them.
57
+ The cycle element is documented here: http://docs.shopify.com/themes/liquid-basics/logic#cycle
58
+ {% endcomment %}
59
+
60
+ {% if product-grid-item == 'six-per-row' %}
61
+ {% cycle 'clear': '', '', '', '', '', '<div style="clear:both"></div>' %}
62
+ {% elsif product-grid-item == 'five-per-row' %}
63
+ {% cycle 'clear': '', '', '', '', '<div style="clear:both"></div>' %}
64
+ {% elsif product-grid-item == 'four-per-row' %}
65
+ {% cycle 'clear': '', '', '', '<div style="clear:both"></div>' %}
66
+ {% elsif product-grid-item == 'three-per-row' %}
67
+ {% cycle 'clear': '', '', '<div style="clear:both"></div>' %}
68
+ {% elsif product-grid-item == 'two-per-row' %}
69
+ {% cycle 'clear': '', '<div style="clear:both"></div>' %}
70
+ {% endif %}
@@ -0,0 +1,57 @@
1
+ {% comment %}
2
+ A word on drop-down menus: Shopify has no concept of them.
3
+ Drop-down menus in Shopify themes are a hack that relies on a naming convention.
4
+ To create a drop-down menu, the merchant must create a link list that has the same name as the link he wants the drop-down for.
5
+ For example, if he wants a drop-down under a 'Shop by brand' link (say, he has such link in his Main Menu), he needs to create a linklist called 'Shop by brand', and populate it with links. Once he has done that, there'll be a drop-down under 'Shop by brand'.
6
+ Shopify has a visual how-to guide here: http://docs.shopify.com/manual/your-website/navigation/create-drop-down-menu.
7
+ The naming convention hack won't work well if a shop's navigation uses non-English characters. There's a much more verbose coding solution that handles non-English characters here: http://docs.shopify.com/manual/configuration/store-customization/currencies-and-translations/translations/can-i-have-drop-down-menus-that-use-non-english-characters.
8
+ A word on sub-categories: Shopify manages sub-categories using product tags: http://docs.shopify.com/manual/configuration/store-customization/page-specific/collections/subcategories
9
+ {% endcomment %}
10
+
11
+ <nav role="navigation" class="left">
12
+ <ul class="nav">
13
+ {% for link in linklists.main-menu.links %}
14
+ {% assign has_sub_menu = false %}
15
+ {% assign has_sub_categories = false %}
16
+ {% assign parent_link_active = false %}
17
+ {% assign child_list_handle = link.title | handle %}
18
+ {% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %}
19
+ {% assign has_sub_menu = true %}
20
+ {% for l in linklists[child_list_handle].links %}
21
+ {% if handle != blank and handle == l.object.handle %}
22
+ {% assign parent_link_active = true %}
23
+ {% elsif page_title == l.title %}
24
+ {% assign parent_link_active = true %}
25
+ {% endif %}
26
+ {% endfor %}
27
+ {% elsif link.type == 'collection_link' and link.object.all_tags.size > 0 %}
28
+ {% assign has_sub_categories = true %}
29
+ {% endif %}
30
+ <li class="{% if link.active or parent_link_active %} active{% endif %}{% if has_sub_menu or has_sub_categories %} has-dropdown{% endif %}{% if forloop.first %} first{% elsif forloop.last %} last{% endif %}">
31
+ <a href="{{ link.url }}">{{ link.title }}{% if has_sub_menu or has_sub_categories %} <i class="fa fa-angle-down"></i>{% endif %}</a>
32
+ {% if has_sub_menu or has_sub_categories %}
33
+ <ul class="sub-nav">
34
+ {% if has_sub_menu %}
35
+ {% for l in linklists[child_list_handle].links %}
36
+ <li class="{% if l.active %} active{% endif %}">
37
+ <a href="{{ l.url }}">{{ l.title }}</a>
38
+ </li>
39
+ {% endfor %}
40
+ {% elsif has_sub_categories %}
41
+ {% for tag in link.object.all_tags %}
42
+ <li class="{% if current_tags contains tag %} active{% endif %}">
43
+ <a href="{{ link.url }}/{{ tag | handle }}">{{ tag }}</a>
44
+ </li>
45
+ {% endfor %}
46
+ {% endif %}
47
+ </ul>
48
+ {% endif %}
49
+ </li>
50
+ {% endfor %}
51
+ <li class="show-on-small{% if template == 'search' %} active{% endif %}">
52
+ <a href="/search">
53
+ <i class="fa fa-search"></i>
54
+ </a>
55
+ </li>
56
+ </ul>
57
+ </nav>
@@ -0,0 +1,42 @@
1
+ {% unless settings.facebook_url == blank %}
2
+ <a href="{{ settings.facebook_url }}" title="Follow us on Facebook" target="_blank"><span class="shopify-social-icon-facebook{{ settings.social_icons_style }}"></span></a>
3
+ {% endunless %}
4
+ {% unless settings.twitter_url == blank %}
5
+ <a href="{{ settings.twitter_url }}" title="Follow us on Twitter" target="_blank"><span class="shopify-social-icon-twitter{{ settings.social_icons_style }}"></span></a>
6
+ {% endunless %}
7
+ {% unless settings.pinterest_url == blank %}
8
+ <a href="{{ settings.pinterest_url }}" title="Follow us on Pinterest" target="_blank"><span class="shopify-social-icon-pinterest{{ settings.social_icons_style }}"></span></a>
9
+ {% endunless %}
10
+ {% unless settings.googleplus_url == blank %}
11
+ <a href="{{ settings.googleplus_url }}" title="Follow us on Google+" target="_blank"><span class="shopify-social-icon-googleplus{{ settings.social_icons_style }}"></span></a>
12
+ {% endunless %}
13
+ {% unless settings.instagram_url == blank %}
14
+ <a href="{{ settings.instagram_url }}" title="Follow us on Instagram" target="_blank"><span class="shopify-social-icon-instagram{{ settings.social_icons_style }}"></span></a>
15
+ {% endunless %}
16
+ {% unless settings.linkedin_url == blank %}
17
+ <a href="{{ settings.linkedin_url }}" title="Follow us on linkedin" target="_blank"><span class="shopify-social-icon-linkedin{{ settings.social_icons_style }}"></span></a>
18
+ {% endunless %}
19
+ {% unless settings.flickr_url == blank %}
20
+ <a href="{{ settings.flickr_url }}" title="Follow us on Flickr" target="_blank"><span class="shopify-social-icon-flickr{{ settings.social_icons_style }}"></span></a>
21
+ {% endunless %}
22
+ {% unless settings.yelp_url == blank %}
23
+ <a href="{{ settings.yelp_url }}" title="Look us up on Yelp" target="_blank"><span class="shopify-social-icon-yelp{{ settings.social_icons_style }}"></span></a>
24
+ {% endunless %}
25
+ {% unless settings.vimeo_url == blank %}
26
+ <a href="{{ settings.vimeo_url }}" title="Follow us on Vimeo" target="_blank"><span class="shopify-social-icon-vimeo{{ settings.social_icons_style }}"></span></a>
27
+ {% endunless %}
28
+ {% unless settings.youtube_url == blank %}
29
+ <a href="{{ settings.youtube_url }}" title="Follow us on YouTube" target="_blank"><span class="shopify-social-icon-youtube{{ settings.social_icons_style }}"></span></a>
30
+ {% endunless %}
31
+ {% unless settings.tumblr_url == blank %}
32
+ <a href="{{ settings.tumblr_url }}" title="Come visit our blog" target="_blank"><span class="shopify-social-icon-tumblr{{ settings.social_icons_style }}"></span></a>
33
+ {% endunless %}
34
+ {% unless settings.wordpress_url == blank %}
35
+ <a href="{{ settings.wordpress_url }}" title="Come visit our blog" target="_blank"><span class="shopify-social-icon-wordpress{{ settings.social_icons_style }}"></span></a>
36
+ {% endunless %}
37
+ {% unless settings.featured_blog == blank %}
38
+ <a href="/blogs/{{ settings.featured_blog }}.atom" title="Subscribe to our blog" target="_blank"><span class="shopify-social-icon-feed{{ settings.social_icons_style }}"></span></a>
39
+ {% endunless %}
40
+ {% unless settings.contact_email == blank %}
41
+ <a href="mailto:{{ settings.contact_email }}" title="Email us" target="_blank"><span class="shopify-social-icon-email{{ settings.social_icons_style }}"></span></a>
42
+ {% endunless %}
@@ -0,0 +1,41 @@
1
+ {% comment %}
2
+
3
+ This snippet renders meta data needed to create a Twitter card
4
+ for products and articles.
5
+
6
+ Your cards must be approved by Twitter to be activated
7
+ - https://dev.twitter.com/docs/cards/validation/validator
8
+
9
+ More information:
10
+ - https://dev.twitter.com/docs/cards/types/product-card
11
+ - https://dev.twitter.com/docs/cards/types/summary-card
12
+
13
+ {% endcomment %}
14
+
15
+ {% if template contains 'product' %}
16
+ <meta name="twitter:card" content="product" />
17
+ <meta name="twitter:title" content="{{ product.title | escape }}" />
18
+ <meta name="twitter:description" content="{{ product.description | strip_html | strip_newlines | truncatewords: 60, '' | escape }}" />
19
+ <meta name="twitter:image" content="http:{{ product | img_url: 'large' }}" />
20
+ <meta name="twitter:label1" content="Price" />
21
+ <meta name="twitter:data1" content="{% if product.price_varies %}From {% endif %}{{ product.price | money_with_currency | strip_html }}" />
22
+ {% if product.vendor == blank %}
23
+ <meta name="twitter:label2" content="Availability" />
24
+ <meta name="twitter:data2" content="In stock" />
25
+ {% else %}
26
+ <meta name="twitter:label2" content="Brand" />
27
+ <meta name="twitter:data2" content="{{ product.vendor | escape }}" />
28
+ {% endif %}
29
+ {% elsif template contains 'article' %}
30
+ <meta name="twitter:card" content="summary" />
31
+ <meta name="twitter:title" content="{{ article.title | escape }}" />
32
+ <meta name="twitter:description" content="{{ article.excerpt_or_content | strip_html | truncatewords: 60, '' | escape }}" />
33
+ {% assign img_tag = '<' | append: 'img' %}
34
+ {% if article.content contains img_tag %}
35
+ {% assign src = article.content | split: 'src="' %}
36
+ {% assign src = src[1] | split: '"' | first | remove: 'https:' | remove: 'http:' %}
37
+ {% if src %}
38
+ <meta property="twitter:image" content="http:{{ src }}" />
39
+ {% endif %}
40
+ {% endif %}
41
+ {% endif %}
@@ -0,0 +1,2 @@
1
+ <h1 class="centered">404 Page Not Found</h1>
2
+ <h2 class="delta centered">The page you requested does not exist. Click <a href="/collections/all">here</a> to continue shopping.</h2>
@@ -0,0 +1,160 @@
1
+ {% paginate article.comments by 50 %}
2
+
3
+ {% comment %}
4
+ When a comment has just been submitted, it's not shown right away.
5
+ Shopify needs to wait until it knows for sure that it is not spam to publish it.
6
+ We can still show right away *to its author* the comment he just submitted
7
+ — although that comment may not have been published yet.
8
+ When a comment is submitted, the browser is redirected to a page that
9
+ includes the new comment id in its URL. Example:
10
+ http://shopname.myshopify.com/blogs/news/2022072-my-post?comment=3721372
11
+ When a comment ID is specified in an article URL, that comment is accessible in the
12
+ template through a Liquid object called comment.
13
+ That comment is a full-fledged comment variable that has all the regular comment properties:
14
+ http://docs.shopify.com/themes/liquid-variables/comment.
15
+ Note that comment.created_at will only be defined if the comment did not have any blank field
16
+ — was posted without error.
17
+ {% endcomment %}
18
+
19
+ {% assign number_of_comments = article.comments_count %}
20
+
21
+ {% comment %}If a comment was just submitted, and it has no blank fields.{% endcomment %}
22
+ {% if comment and comment.created_at %}
23
+ {% assign number_of_comments = article.comments_count | plus: 1 %}
24
+ {% endif %}
25
+
26
+ <h2 class="delta"><a href="{{ blog.url }}">{{ blog.title }}</a></h2>
27
+
28
+ <div class="article">
29
+ <h1 class="title">
30
+ {{ article.title }}
31
+ </h1>
32
+ <h3 class="date">
33
+ <time pubdate datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: '%b %d, %Y' }}</time>
34
+ </h3>
35
+ <div class="rte">
36
+ {{ article.content }}
37
+ </div>
38
+ <div class="meta">
39
+ {% if blog.comments_enabled? and article.comments_count > 0 %}
40
+ <span class="meta-comments">
41
+ <a href="#comments"><i class="fa fa-comment"></i> {{ article.comments_count }} {{ article.comments_count | pluralize: 'comment','comments' }}</a>
42
+ </span>
43
+ {% endif %}
44
+ {% if article.tags.size > 0 %}
45
+ <span class="tags">
46
+ {% for tag in article.tags %}
47
+ <a href="{{ blog.url }}/tagged/{{ tag | handle }}">{% if forloop.first %}<i class="fa fa-tag"></i> {% endif %}{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
48
+ {% endfor %}
49
+ </span>
50
+ {% endif %}
51
+ </div>
52
+ </div>
53
+
54
+ {% if blog.comments_enabled? %}
55
+ <div id="comments">
56
+
57
+ {% comment %}If a comment was just submitted with no blank field.{% endcomment %}
58
+ {% if comment and comment.created_at %}
59
+ <p class="success feedback">
60
+ {% if blog.moderated? %}
61
+ Your comment was posted successfully. We will publish it in a little while, as our blog is moderated.
62
+ {% else %}
63
+ Your comment was posted successfully! Thank you!
64
+ {% endif %}
65
+ </p>
66
+ {% endif %}
67
+
68
+ {% if number_of_comments > 0 %}
69
+ <ul>
70
+ {% comment %}If a comment was just submitted with no blank field, let's show it.{% endcomment %}
71
+ {% if comment and comment.created_at %}
72
+ <li id="{{ comment.id }}" class="comment first{% if article.comments_count == 0 %} last{% endif %}">
73
+ <h3 class="comment-author">{{ comment.author }} says...</h3>
74
+ <div class="comment-content">
75
+ {{ comment.content }}
76
+ </div>
77
+ <p class="comment-date">
78
+ On {{ comment.created_at | date: "%B %d, %Y" }}
79
+ </p>
80
+ </li>
81
+ {% endif %}
82
+ {% comment %}Showing the rest of the comments.{% endcomment %}
83
+ {% for comment in article.comments %}
84
+ <li id="{{ comment.id }}" class="comment{% unless number_of_comments > article.comments_count %}{% if forloop.first %} first{% endif %}{% endunless %}{% if forloop.last %} last {% endif %}">
85
+ <h3 class="comment-author">{{ comment.author }} says...</h3>
86
+ <div class="comment-content">
87
+ {{ comment.content }}
88
+ </div>
89
+ <p class="comment-date">
90
+ On {{ comment.created_at | date: "%B %d, %Y" }}
91
+ </p>
92
+ </li>
93
+ {% endfor %}
94
+ </ul>
95
+ {% endif %}
96
+
97
+ {% comment %}Comments are paginated.{% endcomment %}
98
+ {% if paginate.pages > 1 %}
99
+ <div id="pagination">
100
+ {{ paginate | default_pagination }}
101
+ </div>
102
+ {% endif %}
103
+
104
+ {% comment %}Comment submission form.{% endcomment %}
105
+ {% form "new_comment", article %}
106
+
107
+ <h3 id="add-comment-title">Leave a comment</h3>
108
+
109
+ {% if form.errors %}
110
+ <div class="feedback error">
111
+ {{ form.errors | default_errors }}
112
+ </div>
113
+ {% endif %}
114
+
115
+ <p>
116
+ <label for="comment-author">Name</label>
117
+ <input required{% if form.errors contains "author" %} class="error"{% endif %} type="text" name="comment[author]" placeholder="Your name" id="comment-author" value="{{ form.author }}" />
118
+ </p>
119
+
120
+ <p>
121
+ <label for="comment-email">Email</label>
122
+ <input required{% if form.errors contains "email" %} class="error"{% endif %} type="email" name="comment[email]" placeholder="your@email.com" id="comment-email" value="{{ form.email }}" />
123
+ </p>
124
+
125
+ <p>
126
+ <label for="comment-body">Message</label>
127
+ <textarea required{% if form.errors contains "body" %} class="error"{% endif %} name="comment[body]" id="comment-body">{{ form.body }}</textarea>
128
+ </p>
129
+
130
+ <input type="submit" value="Post Comment" />
131
+
132
+ {% if form.errors %}
133
+ <script>
134
+ window.location.hash = '#add-comment-title';
135
+ </script>
136
+ {% endif %}
137
+
138
+ {% if form.posted_successfully? %}
139
+ <script>
140
+ window.location.hash = '#comments';
141
+ </script>
142
+ {% endif %}
143
+
144
+ {% endform %}
145
+
146
+ </div>
147
+ {% endif %}
148
+
149
+ {% if blog.next_article or blog.previous_article %}
150
+ <p class="clearfix">
151
+ {% if blog.next_article %}
152
+ <span class="left">{{ '&larr; Next Post' | link_to: blog.next_article }}</span>
153
+ {% endif %}
154
+ {% if blog.previous_article %}
155
+ <span class="right">{{ 'Previous Post &rarr;' | link_to: blog.previous_article }}</span>
156
+ {% endif %}
157
+ </p>
158
+ {% endif %}
159
+
160
+ {% endpaginate %}