solidify 0.0.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +40 -0
  5. data/.travis.yml +10 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +3 -0
  8. data/Guardfile +51 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +75 -0
  11. data/Rakefile +42 -0
  12. data/app/controllers/concerns/solidify/liquid.rb +26 -0
  13. data/app/controllers/solidify/addresses_controller.rb +15 -0
  14. data/app/controllers/solidify/carts_controller.rb +15 -0
  15. data/app/controllers/solidify/collections_controller.rb +26 -0
  16. data/app/controllers/solidify/customers_controller.rb +16 -0
  17. data/app/controllers/solidify/home_controller.rb +15 -0
  18. data/app/controllers/solidify/liquid_controller.rb +25 -0
  19. data/app/controllers/solidify/orders_controller.rb +19 -0
  20. data/app/controllers/solidify/pages_controller.rb +22 -0
  21. data/app/controllers/solidify/products_controller.rb +34 -0
  22. data/app/controllers/solidify/registrations_controller.rb +25 -0
  23. data/app/controllers/solidify/responders/solidify/liquid_responder.rb +29 -0
  24. data/app/controllers/solidify/search_controller.rb +41 -0
  25. data/app/controllers/solidify/sessions_controller.rb +15 -0
  26. data/app/drops/rails_settings/scoped_settings_drop.rb +11 -0
  27. data/app/drops/solidify/errors_drop.rb +14 -0
  28. data/app/drops/solidify/link_drop.rb +15 -0
  29. data/app/drops/solidify/link_list_drop.rb +7 -0
  30. data/app/drops/solidify/nil_drop.rb +7 -0
  31. data/app/drops/solidify/page_drop.rb +7 -0
  32. data/app/drops/solidify/search_drop.rb +7 -0
  33. data/app/drops/spree/address_drop.rb +28 -0
  34. data/app/drops/spree/image_drop.rb +32 -0
  35. data/app/drops/spree/line_item_drop.rb +98 -0
  36. data/app/drops/spree/option_type_drop.rb +4 -0
  37. data/app/drops/spree/order_drop.rb +64 -0
  38. data/app/drops/spree/product_drop.rb +97 -0
  39. data/app/drops/spree/taxon_drop.rb +53 -0
  40. data/app/drops/spree/user_drop.rb +54 -0
  41. data/app/drops/spree/variant_drop.rb +111 -0
  42. data/app/fields/spree/address_fields.rb +18 -0
  43. data/app/fields/spree/image_fields.rb +12 -0
  44. data/app/fields/spree/line_item_fields.rb +21 -0
  45. data/app/fields/spree/order_fields.rb +22 -0
  46. data/app/fields/spree/product_fields.rb +22 -0
  47. data/app/fields/spree/taxon_fields.rb +18 -0
  48. data/app/fields/spree/user_fields.rb +14 -0
  49. data/app/fields/spree/variant_fields.rb +19 -0
  50. data/app/filters/solidify/additional_filters.rb +22 -0
  51. data/app/filters/solidify/html_filters.rb +16 -0
  52. data/app/filters/solidify/money_filters.rb +39 -0
  53. data/app/filters/solidify/string_filters.rb +47 -0
  54. data/app/filters/solidify/url_filters.rb +59 -0
  55. data/app/helpers/solidify/liquid_helper.rb +111 -0
  56. data/app/helpers/solidify/shop_helper.rb +7 -0
  57. data/app/models/concerns/solidify/address.rb +15 -0
  58. data/app/models/concerns/solidify/full_name.rb +11 -0
  59. data/app/models/concerns/solidify/handle.rb +25 -0
  60. data/app/models/concerns/solidify/inventory_policy.rb +7 -0
  61. data/app/models/concerns/solidify/validation_cancel.rb +33 -0
  62. data/app/models/concerns/spree/order_state.rb +19 -0
  63. data/app/models/solidify/asset.rb +12 -0
  64. data/app/models/solidify/link.rb +10 -0
  65. data/app/models/solidify/link_list.rb +7 -0
  66. data/app/models/solidify/page.rb +5 -0
  67. data/app/models/solidify/setting.rb +8 -0
  68. data/app/models/solidify/theme.rb +19 -0
  69. data/app/models/spree/address_decorator.rb +13 -0
  70. data/app/models/spree/image_decorator.rb +7 -0
  71. data/app/models/spree/line_item_decorator.rb +7 -0
  72. data/app/models/spree/order_decorator.rb +10 -0
  73. data/app/models/spree/product_decorator.rb +8 -0
  74. data/app/models/spree/taxon_decorator.rb +20 -0
  75. data/app/models/spree/user_decorator.rb +9 -0
  76. data/app/models/spree/variant_decorator.rb +11 -0
  77. data/app/poro/solidify/search.rb +14 -0
  78. data/app/services/solidify/app_specific_string_io.rb +15 -0
  79. data/app/services/solidify/asset_compiler.rb +11 -0
  80. data/app/services/solidify/asset_postprocessor.rb +53 -0
  81. data/app/services/solidify/collections_all_builder.rb +12 -0
  82. data/app/services/solidify/link_list_seeder.rb +26 -0
  83. data/app/services/solidify/liquid_asset_compiler.rb +19 -0
  84. data/app/services/solidify/scss_asset_compiler.rb +15 -0
  85. data/app/services/solidify/shop_settings_seeder.rb +26 -0
  86. data/app/services/solidify/theme_mechanic.rb +30 -0
  87. data/app/uploaders/solidify/asset_uploader.rb +10 -0
  88. data/app/views/solidify/global/content_for_header.html.erb +0 -0
  89. data/app/views/solidify/themes/skeleton-theme/README.md +54 -0
  90. data/app/views/solidify/themes/skeleton-theme/assets/arrow-down.svg.liquid +3 -0
  91. data/app/views/solidify/themes/skeleton-theme/assets/cart.svg.liquid +4 -0
  92. data/app/views/solidify/themes/skeleton-theme/assets/shop.js.liquid +75 -0
  93. data/app/views/solidify/themes/skeleton-theme/assets/shopify_common.js +14 -0
  94. data/app/views/solidify/themes/skeleton-theme/assets/style.scss.liquid +768 -0
  95. data/app/views/solidify/themes/skeleton-theme/config/settings.html +217 -0
  96. data/app/views/solidify/themes/skeleton-theme/config/settings_data.json +26 -0
  97. data/app/views/solidify/themes/skeleton-theme/layout/theme.liquid +181 -0
  98. data/app/views/solidify/themes/skeleton-theme/snippets/article-grid-item.liquid +73 -0
  99. data/app/views/solidify/themes/skeleton-theme/snippets/collection-grid-item.liquid +46 -0
  100. data/app/views/solidify/themes/skeleton-theme/snippets/collection-listing.liquid +46 -0
  101. data/app/views/solidify/themes/skeleton-theme/snippets/open-graph-tags.liquid +35 -0
  102. data/app/views/solidify/themes/skeleton-theme/snippets/product-grid-item.liquid +70 -0
  103. data/app/views/solidify/themes/skeleton-theme/snippets/site-nav.liquid +57 -0
  104. data/app/views/solidify/themes/skeleton-theme/snippets/social-links.liquid +42 -0
  105. data/app/views/solidify/themes/skeleton-theme/snippets/twitter-card.liquid +41 -0
  106. data/app/views/solidify/themes/skeleton-theme/templates/404.liquid +2 -0
  107. data/app/views/solidify/themes/skeleton-theme/templates/article.liquid +160 -0
  108. data/app/views/solidify/themes/skeleton-theme/templates/blog.grid.liquid +30 -0
  109. data/app/views/solidify/themes/skeleton-theme/templates/blog.liquid +92 -0
  110. data/app/views/solidify/themes/skeleton-theme/templates/cart.liquid +123 -0
  111. data/app/views/solidify/themes/skeleton-theme/templates/collection.liquid +102 -0
  112. data/app/views/solidify/themes/skeleton-theme/templates/customers/account.liquid +57 -0
  113. data/app/views/solidify/themes/skeleton-theme/templates/customers/activate_account.liquid +26 -0
  114. data/app/views/solidify/themes/skeleton-theme/templates/customers/addresses.liquid +173 -0
  115. data/app/views/solidify/themes/skeleton-theme/templates/customers/login.liquid +90 -0
  116. data/app/views/solidify/themes/skeleton-theme/templates/customers/order.liquid +103 -0
  117. data/app/views/solidify/themes/skeleton-theme/templates/customers/register.liquid +32 -0
  118. data/app/views/solidify/themes/skeleton-theme/templates/customers/reset_password.liquid +27 -0
  119. data/app/views/solidify/themes/skeleton-theme/templates/index.liquid +39 -0
  120. data/app/views/solidify/themes/skeleton-theme/templates/list-collections.liquid +19 -0
  121. data/app/views/solidify/themes/skeleton-theme/templates/page.liquid +16 -0
  122. data/app/views/solidify/themes/skeleton-theme/templates/product.liquid +202 -0
  123. data/app/views/solidify/themes/skeleton-theme/templates/search.liquid +72 -0
  124. data/bin/rails +12 -0
  125. data/config/app.yml +0 -0
  126. data/config/initializers/carrierwave.rb +25 -0
  127. data/config/initializers/devise.rb +286 -0
  128. data/config/initializers/form_tag.rb +43 -0
  129. data/config/initializers/liquid.rb +213 -0
  130. data/config/initializers/sass.rb +15 -0
  131. data/config/initializers/spree.rb +7 -0
  132. data/config/initializers/theme_settings.rb +29 -0
  133. data/config/routes.rb +52 -0
  134. data/config/spring.rb +2 -0
  135. data/db/migrate/20170223064316_create_solidify_assets.solidify.rb +14 -0
  136. data/db/migrate/20170223064317_create_solidify_themes.solidify.rb +10 -0
  137. data/db/migrate/20170223064318_create_solidify_link_lists.solidify.rb +12 -0
  138. data/db/migrate/20170223064319_create_solidify_links.solidify.rb +13 -0
  139. data/db/migrate/20170223064320_create_solidify_settings.solidify.rb +22 -0
  140. data/db/migrate/20170223064321_create_solidify_pages.solidify.rb +16 -0
  141. data/db/migrate/20170223064322_add_attributes_to_spree_users.solidify.rb +7 -0
  142. data/db/migrate/20170223064323_add_handle_to_spree_taxons.solidify.rb +7 -0
  143. data/db/migrate/20170228115149_add_state_and_country_fields_to_spree_addresses.solidify.rb +7 -0
  144. data/lib/generators/solidify/install/install_generator.rb +23 -0
  145. data/lib/solidify.rb +11 -0
  146. data/lib/solidify/configuration.rb +21 -0
  147. data/lib/solidify/engine.rb +24 -0
  148. data/lib/solidify/testing_support/factories.rb +5 -0
  149. data/lib/solidify/testing_support/factories/assets.rb +75 -0
  150. data/lib/solidify/testing_support/factories/solidify_pages.rb +10 -0
  151. data/lib/solidify/testing_support/factories/spree_addresses.rb +9 -0
  152. data/lib/solidify/testing_support/factories/spree_line_items.rb +10 -0
  153. data/lib/solidify/testing_support/factories/spree_orders.rb +9 -0
  154. data/lib/solidify/testing_support/factories/spree_products.rb +8 -0
  155. data/lib/solidify/testing_support/factories/spree_taxons.rb +7 -0
  156. data/lib/solidify/testing_support/factories/spree_variants.rb +7 -0
  157. data/lib/solidify/testing_support/factories/themes.rb +7 -0
  158. data/lib/solidify/version.rb +3 -0
  159. data/lib/tasks/download_theme.rake +18 -0
  160. data/lib/tasks/seed_default_theme.rake +8 -0
  161. data/lib/tasks/seed_everything.rake +12 -0
  162. data/lib/tasks/seed_link_list.rake +8 -0
  163. data/lib/tasks/seed_shop_settings.rake +8 -0
  164. data/solidify.gemspec +61 -0
  165. metadata +668 -0
@@ -0,0 +1,217 @@
1
+ <p>Theme settings allow designers to provide an easy way for any user to customize the look and feel of their shop without having to delve into HTML or CSS code. Please see our <a title="Open Theme Settings documentation in a new window" target="docs" href="http://docs.shopify.com/themes/theme-templates/settings">help page on theme settings</a> to learn more about how you can make your theme customizable.</p>
2
+
3
+ <fieldset>
4
+ <legend>Colors</legend>
5
+ <h3>Background</h3>
6
+ <table>
7
+ <tr>
8
+ <th><label for="background_color">Background color</label></th>
9
+ <td><input id="background_color" name="background_color" type="text" class="color" /></td>
10
+ </tr>
11
+ </table>
12
+ <h3>Text</h3>
13
+ <table>
14
+ <tr>
15
+ <th><label for="text_color">Text color</label></th>
16
+ <td><input id="text_color" name="text_color" type="text" class="color" /></td>
17
+ </tr>
18
+ <tr>
19
+ <th><label for="link_color">Link color</label></th>
20
+ <td><input id="link_color" name="link_color" type="text" class="color" /></td>
21
+ </tr>
22
+ </table>
23
+ </fieldset>
24
+
25
+ <fieldset>
26
+ <legend>Typography</legend>
27
+ <table>
28
+ <tr>
29
+ <th><label for="base_font_family">Typeface</label></th>
30
+ <td>
31
+ <select id="base_font_family" name="base_font_family" class="font">
32
+ <optgroup label="Google Fonts">
33
+ <option value="'Source Sans Pro', sans-serif">Source Sans Pro</option>
34
+ </optgroup>
35
+ </select>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <th><label for="base_font_size">Base font size</label></th>
40
+ <td>
41
+ <select id="base_font_size" name="base_font_size">
42
+ <option value="13px">13px</option>
43
+ <option value="14px">14px</option>
44
+ <option value="15px">15px</option>
45
+ <option value="16px">16px</option>
46
+ </select>
47
+ </td>
48
+ </tr>
49
+ </table>
50
+ </fieldset>
51
+
52
+ <fieldset>
53
+ <legend>Header</legend>
54
+ <h3>Logo Options</h3>
55
+ <table>
56
+ <tr>
57
+ <td><label for="use_logo">Use Custom Logo?</label></td>
58
+ <td><input type="checkbox" id="use_logo" name="use_logo" /></td>
59
+ </tr>
60
+ <tr>
61
+ <td><label for="logo_image">Custom Logo</label></td>
62
+ <td><input type="file" name="logo.png" id="logo_image" data-max-width="1200" data-max-height="1200" /></td>
63
+ </tr>
64
+ <tr>
65
+ <td colspan="2"><small>Recommend the optimal width and height for your logo here.</small></td>
66
+ </tr>
67
+ </table>
68
+ <h3>Social links</h3>
69
+ <table>
70
+ <tr>
71
+ <td colspan="2"><small>All links, except the email one, must begin with <i>http://</i>, <i>https://</i> or <i>//</i>. The email must be your email address with no <i>mailto:</i> prefix. Leave the text box blank if you don't want to use the corresponding icon.</small></td>
72
+ </tr>
73
+ <tr>
74
+ <th><label for="facebook_url">Facebook URL</label></th>
75
+ <td><input type="text" id="facebook_url" name="facebook_url" /></td>
76
+ </tr>
77
+ <tr>
78
+ <th><label for="twitter_url">Twitter URL</label></th>
79
+ <td><input type="text" id="twitter_url" name="twitter_url" /></td>
80
+ </tr>
81
+ <tr>
82
+ <th><label for="pinterest_url">Pinterest URL</label></th>
83
+ <td><input type="text" id="pinterest_url" name="pinterest_url" /></td>
84
+ </tr>
85
+ <tr>
86
+ <th><label for="googleplus_url">Google+ URL</label></th>
87
+ <td><input type="text" id="googleplus_url" name="googleplus_url" /></td>
88
+ </tr>
89
+ <tr>
90
+ <th><label for="flickr_url">Flickr URL</label></th>
91
+ <td><input type="text" id="flickr_url" name="flickr_url" /></td>
92
+ </tr>
93
+ <tr>
94
+ <th><label for="instagram_url">Instagram URL</label></th>
95
+ <td><input type="text" id="instagram_url" name="instagram_url" /></td>
96
+ </tr>
97
+ <tr>
98
+ <th><label for="linkedin_url">Linkedin URL</label></th>
99
+ <td><input type="text" id="linkedin_url" name="linkedin_url" /></td>
100
+ </tr>
101
+ <tr>
102
+ <th><label for="vimeo_url">Vimeo URL</label></th>
103
+ <td><input type="text" id="vimeo_url" name="vimeo_url" /></td>
104
+ </tr>
105
+ <tr>
106
+ <th><label for="youtube_url">Youtube URL</label></th>
107
+ <td><input type="text" id="youtube_url" name="youtube_url" /></td>
108
+ </tr>
109
+ <tr>
110
+ <th><label for="tumblr_url">Tumblr URL</label></th>
111
+ <td><input type="text" id="tumblr_url" name="tumblr_url" /></td>
112
+ </tr>
113
+ <tr>
114
+ <th><label for="wordpress_url">Wordpress URL</label></th>
115
+ <td><input type="text" id="wordpress_url" name="wordpress_url" /></td>
116
+ </tr>
117
+ <tr>
118
+ <th><label for="yelp_url">Yelp URL</label></th>
119
+ <td><input type="text" id="yelp_url" name="yelp_url" /></td>
120
+ </tr>
121
+ <tr>
122
+ <th><label for="contact_email">Email</label></th>
123
+ <td><input type="email" id="contact_email" name="contact_email" /></td>
124
+ </tr>
125
+ <tr>
126
+ <th><label for="featured_blog">Blog feed</label></th>
127
+ <td><select class="blog" id="featured_blog" name="featured_blog" value="news" /></td>
128
+ </tr>
129
+ <tr>
130
+ <th><label for="social_icons_style">Social icons style</label></th>
131
+ <td>
132
+ <select id="social_icons_style" name="social_icons_style">
133
+ <option value="">Silhouette</option>
134
+ <option value="-circle">Circle</option>
135
+ <option value="-rounded">Rounded corners</option>
136
+ <option value="-square">Square</option>
137
+ </select>
138
+ </td>
139
+ </tr>
140
+ </table>
141
+ </fieldset>
142
+
143
+ <fieldset>
144
+ <legend>Footer</legend>
145
+ <table>
146
+ </table>
147
+ </fieldset>
148
+
149
+ <fieldset>
150
+ <legend>Homepage</legend>
151
+ <h3>Content</h3>
152
+ <table>
153
+ <tr>
154
+ <th><label for="homepage_page">Show content of this page</label></th>
155
+ <td><select id="homepage_page" class="page" name="homepage_page" value="frontpage" /></td>
156
+ </tr>
157
+ </table>
158
+ <h3>Featured collection</h3>
159
+ <table>
160
+ <tr>
161
+ <th><label for="homepage_collection">Feature products from this collection</label></th>
162
+ <td><select id="homepage_collection" class="collection" name="homepage_collection" value="frontpage" /></td>
163
+ </tr>
164
+ </table>
165
+ </fieldset>
166
+
167
+ <fieldset>
168
+ <legend>Product pages</legend>
169
+ <table>
170
+ </table>
171
+ </fieldset>
172
+
173
+ <fieldset>
174
+ <legend>Collection pages</legend>
175
+ <h3>Product Grid</h3>
176
+ <table>
177
+ <tr>
178
+ <th><label for="products_per_row">Number of products per row</label></th>
179
+ <td>
180
+ <select id="products_per_row" name="products_per_row">
181
+ <option value="2">2</option>
182
+ <option value="3">3</option>
183
+ <option value="4" selected="selected">4</option>
184
+ <option value="5">5</option>
185
+ <option value="6">6</option>
186
+ </select>
187
+ </td>
188
+ </tr>
189
+ <tr>
190
+ <th><label for="number_of_rows">Number of rows</label></th>
191
+ <td>
192
+ <select id="number_of_rows" name="number_of_rows">
193
+ <option value="1">1</option>
194
+ <option value="2">2</option>
195
+ <option value="3" selected="selected">3</option>
196
+ <option value="4">4</option>
197
+ <option value="5">5</option>
198
+ <option value="6">6</option>
199
+ <option value="7">7</option>
200
+ <option value="8">8</option>
201
+ </select>
202
+ </td>
203
+ </tr>
204
+ </table>
205
+ </fieldset>
206
+
207
+ <fieldset>
208
+ <legend>Blog pages</legend>
209
+ <table>
210
+ </table>
211
+ </fieldset>
212
+
213
+ <fieldset>
214
+ <legend>Cart page</legend>
215
+ <table>
216
+ </table>
217
+ </fieldset>
@@ -0,0 +1,26 @@
1
+ {
2
+ "current": "Slate",
3
+ "presets": {
4
+ "Slate": {
5
+ "customer_layout": "theme",
6
+ "background_color": "#e6ebeb",
7
+ "text_color": "#555555",
8
+ "link_color": "#b5792b",
9
+ "facebook_url": "https://www.facebook.com/shopify",
10
+ "twitter_url": "https://twitter.com/shopify",
11
+ "pinterest_url": "http://pinterest.com/shopify/",
12
+ "instagram_url": "http://instagram.com/shopify",
13
+ "vimeo_url": "http://vimeo.com/shopify",
14
+ "youtube_url": "https://www.youtube.com/user/shopify",
15
+ "social_icons_style": "",
16
+ "use_logo": false,
17
+ "base_font_size": "16px",
18
+ "base_font_family": "'Source Sans Pro', sans-serif",
19
+ "featured_blog": "news",
20
+ "homepage_page": "frontpage",
21
+ "homepage_collection": "frontpage",
22
+ "products_per_row": "3",
23
+ "number_of_rows": "4"
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,181 @@
1
+ <!doctype html>
2
+ <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
3
+ <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
4
+ <!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->
5
+ <!--[if IE 9 ]><html class="ie9 no-js"> <![endif]-->
6
+ <!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
7
+ <head>
8
+ <meta charset="utf-8" />
9
+ <!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' /><![endif]-->
10
+
11
+ <title>
12
+ {{ page_title }}{% if current_tags %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif %}{% if current_page != 1 %} &ndash; Page {{ current_page }}{% endif %}{% unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless %}
13
+ </title>
14
+
15
+ {% if page_description %}
16
+ <meta name="description" content="{{ page_description | escape }}" />
17
+ {% endif %}
18
+
19
+ <link rel="canonical" href="{{ canonical_url }}" />
20
+
21
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
22
+
23
+ {% include 'open-graph-tags' %}
24
+ {% include 'twitter-card' %}
25
+
26
+ {{ content_for_header }}
27
+
28
+ {{ 'style.scss.css' | asset_url | stylesheet_tag }}
29
+ {{ 'social/social-icons.css' | global_asset_url | stylesheet_tag }}
30
+ {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css' | stylesheet_tag }}
31
+
32
+ {{ '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,400italic,600italic,700italic' | stylesheet_tag }}
33
+
34
+ <!--[if lt IE 9]>
35
+ {{ '//html5shiv.googlecode.com/svn/trunk/html5.js' | script_tag }}
36
+ <![endif]-->
37
+
38
+ {{ 'shopify_common.js' | shopify_asset_url | script_tag }}
39
+ {% if template contains 'customers' %}
40
+ {{ 'customer_area.js' | shopify_asset_url | script_tag }}
41
+ {% endif %}
42
+
43
+ <!-- Additional Shopify helpers that will likely be added to the global shopify_common.js some day soon. -->
44
+ {{ 'shopify_common.js' | asset_url | script_tag }}
45
+
46
+ {{ 'option_selection.js' | shopify_asset_url | script_tag }}
47
+
48
+ {{ '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | script_tag }}
49
+ <script>jQuery('html').removeClass('no-js').addClass('js');</script>
50
+
51
+ </head>
52
+
53
+ <body id="{{ page_title | handle }}" class="{% if customer %}customer-logged-in {% endif %}template-{{ template | replace: '.', ' ' | truncatewords: 1, '' | handle }}" >
54
+
55
+ <div class="container">
56
+
57
+ <header class="row">
58
+
59
+ <div class="social-links half column left-aligned">
60
+ {% include 'social-links' %}
61
+ </div>
62
+
63
+ {% comment %}
64
+ Note on checkout link: it is a good idea to avoid linking to /checkout directly because shops that use
65
+ Paypal Express Checkout and/or Google Checkout have special checkout buttons on the /cart page. Also,
66
+ special instructions for the seller are entered on the /cart page. Finally, the universal tracking code
67
+ of Google Analytics may not work if linking directly to the /checkout page.
68
+ {% endcomment %}
69
+
70
+ <div class="half column right-aligned">
71
+
72
+ <div class="cart-link">
73
+ <a href="/cart"><img src="{{ 'cart.svg' | asset_url }}" /> {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} ({{ cart.total_price | money }})</a>
74
+ </div>
75
+
76
+ {% if shop.customer_accounts_enabled %}
77
+ <div class="customer-links">
78
+ {% if customer %}
79
+ Logged in as <a href="/account">{{ customer.first_name }}</a> · {{ 'Log out' | customer_logout_link }}
80
+ {% else %}
81
+ {{ 'Log in' | customer_login_link }}
82
+ {% if shop.customer_accounts_optional %}
83
+ or {{ 'Create an account' | customer_register_link }}
84
+ {% endif %}
85
+ {% endif %}
86
+ </div>
87
+ {% endif %}
88
+
89
+ </div>
90
+
91
+ {% comment %}
92
+ It would be nice if the logo was a shop setting, rather than a theme setting.
93
+ But for now, it is a theme setting. The shop logo is uploaded on the theme settings page.
94
+ Link to the theme settings page of currently published theme will always be:
95
+ http://www.shopify.com/admin/themes/current/settings.
96
+ To add theme settings to a theme, see this: http://docs.shopify.com/themes/theme-templates/settings
97
+ Theme settings are added to http://www.shopify.com/admin/themes/current#config/settings.html
98
+ {% endcomment %}
99
+
100
+ <div class="masthead full column clear centered" role="banner">
101
+ {% if settings.use_logo %}
102
+ <a id="logo" href="/">
103
+ {{ 'logo.png' | asset_url | img_tag: shop.name }}
104
+ </a>
105
+ {% else %}
106
+ <a id="site-title" href="/">
107
+ {{ shop.name }}
108
+ </a>
109
+ {% endif %}
110
+ {% if template == 'index' %}
111
+ {% comment %}
112
+ Many SEO audit tools look for a h1 tag on the home page. Let's give 'em one.
113
+ Other pages should use the resource name as h1 tag. For example, on the product
114
+ page, the product title will use a h1 tag.
115
+ {% endcomment %}
116
+ <h1 class="hidden">{{ shop.name }}</h1>
117
+ {% endif %}
118
+ </div>
119
+
120
+ <div class="clear full column">
121
+
122
+ {% comment %}
123
+ Main Navigation
124
+ {% endcomment %}
125
+ {% include 'site-nav' %}
126
+
127
+ {% comment %}
128
+ IE8 and IE9 don't support the HTML5 placeholder attribute, so it's a good idea to use JavaScript
129
+ to show and hide the placeholder text.
130
+ Have a look in assets/shop.js.liquid to see sample JavaScript for this.
131
+ {% endcomment %}
132
+ <form action="/search" method="get" class="search-form right" role="search">
133
+ <input name="q" type="search" id="search-field" placeholder="Search store..." value="{{ search.terms | escape }}" />
134
+ <input type="submit" id="search-submit" value="Search" />
135
+ </form>
136
+
137
+ </div>
138
+
139
+ </header>
140
+
141
+ <div id="main" role="main">
142
+ {% comment %}}
143
+ We have a template file to render.
144
+ That's what content_for_layout is for.
145
+ {% endcomment %}
146
+ {{ content_for_layout }}
147
+ </div>
148
+
149
+ <footer>
150
+
151
+ {% if linklists.footer.links.size > 0 %}
152
+ <p role="navigation">
153
+ {% for link in linklists.footer.links %}
154
+ <a href="{{ link.url }}" title="{{ link.title }}"{% if link.active %} class="active"{% endif %}>{{ link.title }}</a>
155
+ {% endfor %}
156
+ </p>
157
+ {% endif %}
158
+
159
+ {% unless shop.enabled_payment_types == empty %}
160
+ <div class="payment-types">
161
+ {% for type in shop.enabled_payment_types %}
162
+ <img width="40" src="{{ type | payment_type_img_url }}" />
163
+ {% endfor %}
164
+ </div>
165
+ {% endunless %}
166
+
167
+ <p role="contentinfo" class="small-print">Copyright &copy; {{ "now" | date: "%Y" }} {{ shop.name }}. {{ powered_by_link }}.</p>
168
+
169
+ </footer>
170
+
171
+ {% comment %}Shopify does not support Internet Explorer 6 nor 7. It does encourage themes to support IE8 until the end of 2014.{% endcomment %}
172
+ <!--[if lt IE 8]>
173
+ <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
174
+ <![endif]-->
175
+
176
+ </div><!-- end of #container -->
177
+
178
+ {{ 'shop.js' | asset_url | script_tag }}
179
+
180
+ </body>
181
+ </html>
@@ -0,0 +1,73 @@
1
+ {% comment %}If no value is passed to the snippet, we will set the snippet variable to a sensible default.{% endcomment %}
2
+ {% if article-grid-item == '' %}{% assign article-grid-item = 'three-per-row' %}{% endif %}
3
+
4
+ {% assign article_has_image = false %}
5
+ {% assign img_tag = '<' | append: 'img' %}
6
+ {% if article.excerpt_or_content contains img_tag %}
7
+ {% assign src = article.excerpt_or_content | split: 'src="' %}
8
+ {% assign src = src[1] | split: '"' | first %}
9
+ {% if src %}
10
+ {% assign article_has_image = true %}
11
+ {% assign image_src = src | replace: '_small', '' | replace: '_compact', '' | replace: '_medium', '' | replace: '_large', '' | replace: '_grande', '' %}
12
+ {% endif %}
13
+ {% endif %}
14
+
15
+ <li class="{{ article-grid-item }}">
16
+
17
+ {% if article.tags.size > 0 %}
18
+ <h4><a href="/blogs/{{ blog.handle }}/tagged/{{ tag | handle }}">{{ article.tags.first }}</a></h4>
19
+ {% endif %}
20
+
21
+ {% if article_has_image %}
22
+ <div class="article-image-wrap">
23
+ <a href="{{ article.url }}">
24
+ <img src="{{ image_src }}" alt="{{ article.title | escape }}" />
25
+ </a>
26
+ </div><!-- .prod-image-wrap -->
27
+ {% endif %}
28
+
29
+ <div class="article-caption">
30
+ <h3>
31
+ <a href="{{ article.url }}">
32
+ {{ article.title }}
33
+ </a>
34
+ </h3>
35
+ <p class="article-summary">
36
+ {% if article.excerpt.size > 0 %}
37
+ {{ article.excerpt | strip_html }}
38
+ {% else %}
39
+ {{ article.content | strip_html | truncatewords: 50 }}
40
+ {% endif %}
41
+ </p>
42
+ </div><!-- .prod-caption -->
43
+
44
+ <p class="date left left-aligned">
45
+ <time pubdate datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: '%b %d, %Y' }}</time>
46
+ </p>
47
+
48
+ <p class="right right-aligned">
49
+ <a href="{{ article.url }}">Read more &#8594;</a>
50
+ </p>
51
+
52
+ </li>
53
+
54
+ {% comment %}
55
+ You don't need to use a clearing div. Use whatever it is you use to clear
56
+ floated elements. The code that follows just just shows you how to use a cycle element.
57
+ Notice that we named it ( 'clear' ). We need to name it because there's another cycle
58
+ element in this file ( we called that other one 'last' ). If you have more than one
59
+ cycle element in a rendered view, you'll need to name all of them.
60
+ The cycle element is documented here: http://docs.shopify.com/themes/liquid-basics/logic#cycle
61
+ {% endcomment %}
62
+
63
+ {% if article-grid-item == 'six-per-row' %}
64
+ {% cycle 'clear': '', '', '', '', '', '<div style="clear:both"></div>' %}
65
+ {% elsif article-grid-item == 'five-per-row' %}
66
+ {% cycle 'clear': '', '', '', '', '<div style="clear:both"></div>' %}
67
+ {% elsif article-grid-item == 'four-per-row' %}
68
+ {% cycle 'clear': '', '', '', '<div style="clear:both"></div>' %}
69
+ {% elsif article-grid-item == 'three-per-row' %}
70
+ {% cycle 'clear': '', '', '<div style="clear:both"></div>' %}
71
+ {% elsif article-grid-item == 'two-per-row' %}
72
+ {% cycle 'clear': '', '<div style="clear:both"></div>' %}
73
+ {% endif %}