liquor 0.1.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +3 -9
  5. data/Gemfile +7 -0
  6. data/Guardfile +11 -0
  7. data/MIT-LICENSE +6 -2
  8. data/README.md +4 -122
  9. data/Rakefile +20 -23
  10. data/doc/language-spec.html +768 -0
  11. data/doc/language-spec.md +698 -0
  12. data/lib/liquor.rb +39 -68
  13. data/lib/liquor/ast_tools.rb +28 -0
  14. data/lib/liquor/compiler.rb +110 -0
  15. data/lib/liquor/context.rb +76 -254
  16. data/lib/liquor/diagnostics.rb +151 -0
  17. data/lib/liquor/drop/drop.rb +168 -0
  18. data/lib/liquor/drop/drop_delegation.rb +24 -0
  19. data/lib/liquor/drop/drop_scope.rb +118 -0
  20. data/lib/liquor/drop/dropable.rb +17 -0
  21. data/lib/liquor/emitter.rb +313 -0
  22. data/lib/liquor/extensions/kaminari.rb +14 -0
  23. data/lib/liquor/extensions/pagination.rb +235 -0
  24. data/lib/liquor/extensions/rails.rb +97 -0
  25. data/lib/liquor/extensions/thinking_sphinx.rb +14 -0
  26. data/lib/liquor/extensions/tire.rb +30 -0
  27. data/lib/liquor/external.rb +79 -0
  28. data/lib/liquor/function.rb +94 -0
  29. data/lib/liquor/grammar/lexer.rb +1223 -0
  30. data/lib/liquor/grammar/lexer.rl +297 -0
  31. data/lib/liquor/grammar/parser.racc +288 -0
  32. data/lib/liquor/grammar/parser.rb +885 -0
  33. data/lib/liquor/library.rb +41 -0
  34. data/lib/liquor/manager.rb +146 -0
  35. data/lib/liquor/runtime.rb +167 -0
  36. data/lib/liquor/stdlib/builtin_functions.rb +315 -0
  37. data/lib/liquor/stdlib/builtin_tags.rb +228 -0
  38. data/lib/liquor/stdlib/html_truncater.rb +162 -0
  39. data/lib/liquor/stdlib/partial_tags.rb +76 -0
  40. data/lib/liquor/tag.rb +83 -14
  41. data/lib/liquor/version.rb +1 -1
  42. data/liquor.gemspec +29 -6
  43. data/spec/builtins_spec.rb +264 -0
  44. data/spec/compiler_spec.rb +136 -0
  45. data/spec/context_spec.rb +49 -0
  46. data/spec/drop_delegation_spec.rb +21 -0
  47. data/spec/drop_spec.rb +222 -0
  48. data/spec/errors_spec.rb +40 -0
  49. data/spec/external_spec.rb +207 -0
  50. data/spec/function_spec.rb +80 -0
  51. data/spec/lexer_spec.rb +173 -0
  52. data/spec/library_spec.rb +18 -0
  53. data/spec/manager_spec.rb +84 -0
  54. data/spec/parser_spec.rb +381 -0
  55. data/spec/partials_spec.rb +74 -0
  56. data/spec/runtime_spec.rb +97 -0
  57. data/spec/spec_helper.rb +94 -0
  58. data/spec/tag_spec.rb +7 -0
  59. metadata +216 -173
  60. data/AUTHORS +0 -2
  61. data/CHANGELOG +0 -48
  62. data/Gemfile.lock +0 -91
  63. data/History.txt +0 -44
  64. data/LICENSE +0 -23
  65. data/example/server/example_servlet.rb +0 -37
  66. data/example/server/liquid_servlet.rb +0 -28
  67. data/example/server/liquor_servlet.rb +0 -28
  68. data/example/server/server.rb +0 -12
  69. data/example/server/templates/index.liquid +0 -6
  70. data/example/server/templates/index.liquor +0 -6
  71. data/example/server/templates/products.liquid +0 -45
  72. data/example/server/templates/products.liquor +0 -45
  73. data/init.rb +0 -8
  74. data/lib/extras/liquid_view.rb +0 -51
  75. data/lib/extras/liquor_view.rb +0 -51
  76. data/lib/liquor/block.rb +0 -101
  77. data/lib/liquor/condition.rb +0 -120
  78. data/lib/liquor/document.rb +0 -17
  79. data/lib/liquor/drop.rb +0 -256
  80. data/lib/liquor/errors.rb +0 -11
  81. data/lib/liquor/extensions.rb +0 -72
  82. data/lib/liquor/file_system.rb +0 -62
  83. data/lib/liquor/htmltags.rb +0 -74
  84. data/lib/liquor/module_ex.rb +0 -60
  85. data/lib/liquor/standardfilters.rb +0 -315
  86. data/lib/liquor/strainer.rb +0 -58
  87. data/lib/liquor/tags/assign.rb +0 -33
  88. data/lib/liquor/tags/capture.rb +0 -35
  89. data/lib/liquor/tags/case.rb +0 -83
  90. data/lib/liquor/tags/comment.rb +0 -9
  91. data/lib/liquor/tags/content_for.rb +0 -54
  92. data/lib/liquor/tags/cycle.rb +0 -59
  93. data/lib/liquor/tags/for.rb +0 -136
  94. data/lib/liquor/tags/if.rb +0 -80
  95. data/lib/liquor/tags/ifchanged.rb +0 -20
  96. data/lib/liquor/tags/include.rb +0 -56
  97. data/lib/liquor/tags/unless.rb +0 -33
  98. data/lib/liquor/tags/yield.rb +0 -49
  99. data/lib/liquor/template.rb +0 -181
  100. data/lib/liquor/variable.rb +0 -52
  101. data/performance/shopify.rb +0 -92
  102. data/performance/shopify/comment_form.rb +0 -33
  103. data/performance/shopify/database.rb +0 -45
  104. data/performance/shopify/json_filter.rb +0 -7
  105. data/performance/shopify/liquid.rb +0 -18
  106. data/performance/shopify/liquor.rb +0 -18
  107. data/performance/shopify/money_filter.rb +0 -18
  108. data/performance/shopify/paginate.rb +0 -93
  109. data/performance/shopify/shop_filter.rb +0 -98
  110. data/performance/shopify/tag_filter.rb +0 -25
  111. data/performance/shopify/vision.database.yml +0 -945
  112. data/performance/shopify/weight_filter.rb +0 -11
  113. data/performance/tests/dropify/article.liquid +0 -74
  114. data/performance/tests/dropify/blog.liquid +0 -33
  115. data/performance/tests/dropify/cart.liquid +0 -66
  116. data/performance/tests/dropify/collection.liquid +0 -22
  117. data/performance/tests/dropify/index.liquid +0 -47
  118. data/performance/tests/dropify/page.liquid +0 -8
  119. data/performance/tests/dropify/product.liquid +0 -68
  120. data/performance/tests/dropify/theme.liquid +0 -105
  121. data/performance/tests/ripen/article.liquid +0 -74
  122. data/performance/tests/ripen/blog.liquid +0 -13
  123. data/performance/tests/ripen/cart.liquid +0 -54
  124. data/performance/tests/ripen/collection.liquid +0 -29
  125. data/performance/tests/ripen/index.liquid +0 -32
  126. data/performance/tests/ripen/page.liquid +0 -4
  127. data/performance/tests/ripen/product.liquid +0 -75
  128. data/performance/tests/ripen/theme.liquid +0 -85
  129. data/performance/tests/tribble/404.liquid +0 -56
  130. data/performance/tests/tribble/article.liquid +0 -98
  131. data/performance/tests/tribble/blog.liquid +0 -41
  132. data/performance/tests/tribble/cart.liquid +0 -134
  133. data/performance/tests/tribble/collection.liquid +0 -70
  134. data/performance/tests/tribble/index.liquid +0 -94
  135. data/performance/tests/tribble/page.liquid +0 -56
  136. data/performance/tests/tribble/product.liquid +0 -116
  137. data/performance/tests/tribble/search.liquid +0 -51
  138. data/performance/tests/tribble/theme.liquid +0 -90
  139. data/performance/tests/vogue/article.liquid +0 -66
  140. data/performance/tests/vogue/blog.liquid +0 -32
  141. data/performance/tests/vogue/cart.liquid +0 -58
  142. data/performance/tests/vogue/collection.liquid +0 -19
  143. data/performance/tests/vogue/index.liquid +0 -22
  144. data/performance/tests/vogue/page.liquid +0 -3
  145. data/performance/tests/vogue/product.liquid +0 -62
  146. data/performance/tests/vogue/theme.liquid +0 -122
  147. data/test/assign_test.rb +0 -11
  148. data/test/block_test.rb +0 -58
  149. data/test/capture_test.rb +0 -41
  150. data/test/condition_test.rb +0 -115
  151. data/test/content_for_test.rb +0 -15
  152. data/test/context_test.rb +0 -479
  153. data/test/drop_test.rb +0 -162
  154. data/test/error_handling_test.rb +0 -89
  155. data/test/extra/breakpoint.rb +0 -547
  156. data/test/extra/caller.rb +0 -80
  157. data/test/file_system_test.rb +0 -30
  158. data/test/filter_test.rb +0 -147
  159. data/test/helper.rb +0 -24
  160. data/test/html_tag_test.rb +0 -31
  161. data/test/if_else_test.rb +0 -139
  162. data/test/include_tag_test.rb +0 -129
  163. data/test/module_ex_test.rb +0 -89
  164. data/test/output_test.rb +0 -121
  165. data/test/parsing_quirks_test.rb +0 -54
  166. data/test/regexp_test.rb +0 -45
  167. data/test/security_test.rb +0 -41
  168. data/test/standard_filter_test.rb +0 -170
  169. data/test/standard_tag_test.rb +0 -405
  170. data/test/statements_test.rb +0 -137
  171. data/test/strainer_test.rb +0 -27
  172. data/test/template_test.rb +0 -82
  173. data/test/test_helper.rb +0 -28
  174. data/test/unless_else_test.rb +0 -27
  175. data/test/variable_test.rb +0 -173
  176. data/test/yield_test.rb +0 -24
@@ -1,51 +0,0 @@
1
-
2
-
3
-
4
-
5
- <div id="page" class="innerpage clearfix">
6
- <h1>Search Results</h1>
7
- {% if search.performed %}
8
-
9
- {% paginate search.results by 10 %}
10
-
11
- {% if search.results == empty %}
12
- <div class="latest-news">Your search for "{{search.terms | escape}}" did not yield any results</div>
13
- {% else %}
14
-
15
-
16
- <ul class="search-list clearfix">
17
- {% for item in search.results %}
18
- <li>
19
- <h3 class="stitle">{{ item.title | link_to: item.url }}</h3>
20
- <p class="sinfo">{{ item.content | strip_html | truncatewords: 65 | highlight: search.terms }} ... <a href="{{item.url}}" title="">view this item</a></p>
21
- </li>
22
- {% endfor %}
23
- </ul>
24
- {% endif %}
25
-
26
- <div class="paginate clearfix">
27
- {{ paginate | default_pagination }}
28
- </div>
29
-
30
-
31
- <div id="three-reasons" class="clearfix">
32
- <h3>Why Shop With Us?</h3>
33
- <ul>
34
- <li class="two-a">
35
- <h4>24 Hours</h4>
36
- <p>We're always here to help.</p>
37
- </li>
38
- <li class="two-c">
39
- <h4>No Spam</h4>
40
- <p>We'll never share your info.</p>
41
- </li>
42
- <li class="two-d">
43
- <h4>Secure Servers</h4>
44
- <p>Checkout is 256bit encrypted.</p>
45
- </li>
46
- </ul>
47
- </div>
48
- </div>
49
-
50
- {% endpaginate %}
51
- {% endif %}
@@ -1,90 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{{shop.name}} - {{page_title}}</title>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
-
7
- {{ 'reset.css' | asset_url | stylesheet_tag }}
8
- {{ 'style.css' | asset_url | stylesheet_tag }}
9
-
10
- {{ 'lightbox.css' | asset_url | stylesheet_tag }}
11
- {{ 'prototype/1.6/prototype.js' | global_asset_url | script_tag }}
12
- {{ 'scriptaculous/1.8.2/scriptaculous.js' | global_asset_url | script_tag }}
13
- {{ 'lightbox.js' | asset_url | script_tag }}
14
- {{ 'option_selection.js' | shopify_asset_url | script_tag }}
15
-
16
- {{ content_for_header }}
17
- </head>
18
- <body id="page-{{template}}">
19
-
20
- <div id="wrap">
21
-
22
- <div id="top">
23
- <div id="cart">
24
- <h3>Shopping Cart</h3>
25
- <p class="cart-count">
26
- {% if cart.item_count == 0 %}
27
- Your cart is currently empty
28
- {% else %}
29
- {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} <span>-</span> Total: {{cart.total_price | money_with_currency }} <span>-</span> <a href="/cart">View Cart</a>
30
- {% endif %}
31
- </p>
32
- </div>
33
-
34
- <div id="site-title">
35
- <h3><a href="/">{{shop.name}}</a></h3>
36
- <h4><span>Tribble: A Shopify Theme</span></h4>
37
-
38
- </div>
39
- </div>
40
-
41
- <ul id="nav">
42
- {% for link in linklists.main-menu.links %}
43
- <li>{{ link.title | link_to: link.url }}</li>
44
- {% endfor %}
45
- </ul>
46
-
47
- {{ content_for_layout }}
48
-
49
- <div id="foot" class="clearfix">
50
- <div class="quick-links">
51
- <h4>Quick Navigation</h4>
52
- <ul class="clearfix">
53
- <li><a href="/">Home</a></li>
54
- <li><a href="#top">Back to top</a></li>
55
- {% for link in linklists.main-menu.links %}
56
- <li>{{ link.title | link_to: link.url }}</li>
57
- {% endfor %}
58
- </ul>
59
- </div>
60
-
61
- <div class="quick-contact">
62
- <h4>Quick Contact</h4>
63
- <div class="vcard">
64
-
65
- <div class="org fn">
66
- <div class="organization-name">Really Great Widget Co.</div>
67
- </div>
68
- <div class="adr">
69
- <span class="street-address">2531 Barrington Court</span>
70
- <span class="locality">Hayward</span>,
71
- <abbr title="California" class="region">CA</abbr>
72
- <span class="postal-code">94545</span>
73
- </div>
74
- <a class="email" href="mailto:email@myshopifysite.com">
75
- email@myshopifysite.com
76
- </a>
77
- <div class="tel">
78
- <span class="type">Support:</span> <span class="value">800-555-9954</span>
79
- </div>
80
- </div>
81
-
82
- </div>
83
-
84
- <p><a href="http://shopify.com" class="we-made">Powered by Shopify</a> &copy; Copyright {{ "now" | date: "%Y" }} {{ shop.name }}, All Rights Reserved. <a href="/blogs/news.xml" id="foot-rss">RSS Feed</a></p>
85
- </div>
86
-
87
- </div>
88
-
89
- </body>
90
- </html>
@@ -1,66 +0,0 @@
1
- <div class="article">
2
- <h3 class="article-head-title">{{ article.title }}</h3>
3
- <p> posted {{ article.created_at | date: "%Y %h" }} by {{ article.author }}</p>
4
- <div class="article-body textile">
5
- {{ article.content }}
6
- </div>
7
- </div>
8
-
9
- {% if blog.comments_enabled? %}
10
- <div id="comments">
11
- <h3>Comments</h3>
12
- <!-- List all comments -->
13
-
14
- <ul>
15
- {% for comment in article.comments %}
16
- <li>
17
- <div class="comment">
18
- {{ comment.content }}
19
- </div>
20
-
21
- <div class="comment-details">
22
- Posted by {{ comment.author }} on {{ comment.created_at | date: "%B %d, %Y" }}
23
- </div>
24
- </li>
25
- {% endfor %}
26
- </ul>
27
-
28
- <!-- Comment Form -->
29
- {% form article %}
30
- <h3>Leave a comment</h3>
31
-
32
- <!-- Check if a comment has been submitted in the last request, and if yes display an appropriate message -->
33
- {% if form.posted_successfully? %}
34
- {% if blog.moderated? %}
35
- <div class="notice">
36
- Successfully posted your comment.<br />
37
- It will have to be approved by the blog owner first before showing up.
38
- </div>
39
- {% else %}
40
- <div class="notice">Successfully posted your comment.</div>
41
- {% endif %}
42
- {% endif %}
43
-
44
- {% if form.errors %}
45
- <div class="notice error">Not all the fields have been filled out correctly!</div>
46
- {% endif %}
47
-
48
- <dl>
49
- <dt class="{% if form.errors contains 'author' %}error{% endif %}"><label for="comment_author">Your name</label></dt>
50
- <dd><input type="text" id="comment_author" name="comment[author]" size="40" value="{{form.author}}" class="{% if form.errors contains 'author' %}input-error{% endif %}" /></dd>
51
-
52
- <dt class="{% if form.errors contains 'email' %}error{% endif %}"><label for="comment_email">Your email</label></dt>
53
- <dd><input type="text" id="comment_email" name="comment[email]" size="40" value="{{form.email}}" class="{% if form.errors contains 'email' %}input-error{% endif %}" /></dd>
54
-
55
- <dt class="{% if form.errors contains 'body' %}error{% endif %}"><label for="comment_body">Your comment</label></dt>
56
- <dd><textarea id="comment_body" name="comment[body]" cols="40" rows="5" class="{% if form.errors contains 'body' %}input-error{% endif %}">{{form.body}}</textarea></dd>
57
- </dl>
58
-
59
- {% if blog.moderated? %}
60
- <p class="hint">comments have to be approved before showing up</p>
61
- {% endif %}
62
-
63
- <input type="submit" value="Post comment" />
64
- {% endform %}
65
- </div>
66
- {% endif %}
@@ -1,32 +0,0 @@
1
- <div id="shop-id-label_about">
2
- <h3 class="article-head-title">{{page.title}}</h3>
3
-
4
- {% paginate blog.articles by 20 %}
5
-
6
- {% for article in blog.articles %}
7
- <div class="article">
8
- <h3 class="article-head-title">
9
- <a href="{{article.url}}">{{ article.title }}</a>
10
- </h3>
11
-
12
- <p>
13
- {% if blog.comments_enabled? %}
14
- <a href="{{article.url}}#comments">{{ article.comments_count }} comments</a>
15
- &mdash;
16
- {% endif %}
17
- posted {{ article.created_at | date: "%Y %h" }} by {{ article.author }}</p>
18
- <div class="article-body textile">
19
- {{ article.content }}
20
- </div>
21
- </div>
22
- {% endfor %}
23
-
24
- <div id="pagination">
25
- {{ paginate | default_pagination }}
26
- </div>
27
-
28
- {% endpaginate %}
29
-
30
-
31
- </div>
32
- <div class="clear-me"></div>
@@ -1,58 +0,0 @@
1
- <h1>Shopping Cart</h1>
2
- {% if cart.item_count == 0 %}
3
- <p><strong>Your shopping basket is empty.</strong> Perhaps a featured item below is of interest...</p>
4
- <table id="gallery">
5
- {% tablerow product in collections.frontpage.products cols: 3 limit: 12 %}
6
- <div class="gallery-image">
7
- <a href="{{ product.url | within: collections.frontpage }}" title="{{ product.title | escape }} &mdash; {{ product.description | strip_html | truncate: 50 | escape }}"><img src="{{ product.images.first | product_img_url: 'medium' }}" alt="{{ product.title | escape }}" /></a>
8
- </div>
9
- <div class="gallery-info">
10
- <a href="{{ product.url | within: collections.frontpage }}">{{ product.title | truncate: 30 }}</a><br />
11
- <small>{{ product.price | money }}{% if product.compare_at_price_max > product.price %} <del>{{ product.compare_at_price_max | money }}</del>{% endif %}</small>
12
- </div>
13
- {% endtablerow %}
14
- </table>
15
- {% else %}
16
- <script type="text/javascript">
17
- function remove_item(id) {
18
- document.getElementById('updates_'+id).value = 0;
19
- document.getElementById('cartform').submit();
20
- }
21
- </script>
22
- <form action="/cart" method="post" id="cartform">
23
- <table id="basket">
24
- <tr>
25
- <th>Item Description</th>
26
- <th>Price</th>
27
- <th>Qty</th>
28
- <th>Delete</th>
29
- <th>Total</th>
30
- </tr>{% for item in cart.items %}
31
- <tr class="basket-{% cycle 'odd', 'even' %}">
32
- <td class="basket-column-one">
33
- <div class="basket-images">
34
- <a href="{{ item.product.url }}" title="{{ item.title | escape }} &mdash; {{ item.product.description | strip_html | truncate: 50 | escape }}"><img src="{{ item.product.images.first | product_img_url: 'thumb' }}" alt="{{ item.title | escape }}" /></a>
35
- </div>
36
- <div class="basket-desc">
37
- <p><a href="{{ item.product.url }}">{{ item.title }}</a></p>
38
- {{ item.product.description | strip_html | truncate: 120 }}
39
- </div>
40
- </td>
41
- <td class="basket-column">{{ item.price | money }}{% if item.variant.compare_at_price > item.price %}<br /><del>{{ item.variant.compare_at_price | money }}</del>{% endif %}</td>
42
- <td class="basket-column"><input type="text" size="4" name="updates[{{item.variant.id}}]" id="updates_{{ item.variant.id }}" value="{{ item.quantity }}" onfocus="this.select();"/></td>
43
- <td class="basket-column"><a href="#" onclick="remove_item({{ item.variant.id }}); return false;">Remove</a></td>
44
- <td class="basket-column">{{ item.line_price | money }}</td>
45
- </tr>{% endfor %}
46
- </table>
47
- <div id="basket-right">
48
- <h3>Subtotal {{ cart.total_price | money }}</h3>
49
- <input type="image" src="{{ 'update.png' | asset_url }}" id="update-cart" name="update" value="Update" />
50
- <input type="image" src="{{ 'checkout.png' | asset_url }}" name="checkout" value="Checkout" />
51
- {% if additional_checkout_buttons %}
52
- <div class="additional-checkout-buttons">
53
- <p>- or -</p>
54
- {{ content_for_additional_checkout_buttons }}
55
- </div>
56
- {% endif %}
57
- </div>
58
- </form>{% endif %}
@@ -1,19 +0,0 @@
1
- {% paginate collection.products by 12 %}{% if collection.products.size == 0 %}
2
- <strong>No products found in this collection.</strong>{% else %}
3
- <h1>{{ collection.title }}</h1>
4
- {{ collection.description }}
5
- <table id="gallery">
6
- {% tablerow product in collection.products cols: 3 %}
7
- <div class="gallery-image">
8
- <a href="{{ product.url | within: collection }}" title="{{ product.title | escape }} &mdash; {{ product.description | strip_html | truncate: 50 | escape }}"><img src="{{ product.images.first | product_img_url: 'small' }}" alt="{{ product.title | escape }}" /></a>
9
- </div>
10
- <div class="gallery-info">
11
- <a href="{{ product.url | within: collection }}">{{ product.title | truncate: 30 }}</a><br />
12
- <small>{{ product.price | money }}{% if product.compare_at_price_max > product.price %} <del>{{ product.compare_at_price_max | money }}</del>{% endif %}</small>
13
- </div>
14
- {% endtablerow %}
15
- </table>{% if paginate.pages > 1 %}
16
- <div id="paginate">
17
- {{ paginate | default_pagination }}
18
- </div>{% endif %}{% endif %}
19
- {% endpaginate %}
@@ -1,22 +0,0 @@
1
- <div id="about-excerpt">
2
- {% assign article = pages.frontpage %}
3
- {% if article.content != "" %}
4
- <h2>{{ article.title }}</h2>
5
- {{ article.content }}
6
- {% else %}
7
- In <em>Admin &gt; Blogs &amp; Pages</em>, create a page with the handle <strong><code>frontpage</code></strong> and it will show up here.<br />
8
- {{ "Learn more about handles" | link_to "http://wiki.shopify.com/Handle" }}
9
- {% endif %}
10
- </div>
11
-
12
- <table id="gallery">
13
- {% tablerow product in collections.frontpage.products cols: 3 limit: 12 %}
14
- <div class="gallery-image">
15
- <a href="{{ product.url | within: collections.frontpage }}" title="{{ product.title | escape }} &mdash; {{ product.description | strip_html | truncate: 50 | escape }}"><img src="{{ product.images.first | product_img_url: 'small' }}" alt="{{ product.title | escape }}" /></a>
16
- </div>
17
- <div class="gallery-info">
18
- <a href="{{ product.url | within: collections.frontpage }}">{{ product.title | truncate: 30 }}</a><br />
19
- <small>{{ product.price | money }}{% if product.compare_at_price_max > product.price %} <del>{{ product.compare_at_price_max | money }}</del>{% endif %}</small>
20
- </div>
21
- {% endtablerow %}
22
- </table>
@@ -1,3 +0,0 @@
1
- <h1>{{ page.title }}</h1>
2
- {{ page.content }}
3
-
@@ -1,62 +0,0 @@
1
- <div id="product-left">
2
- {% for image in product.images %}{% if forloop.first %}<div id="product-image">
3
- <a href="{{ image | product_img_url: 'large' }}" rel="lightbox[images]" title="{{ product.title | escape }}"><img src="{{ image | product_img_url: 'medium' }}" alt="{{ product.title | escape }}" /></a>
4
- </div>{% else %}
5
- <div class="product-images">
6
- <a href="{{ image | product_img_url: 'large' }}" rel="lightbox[images]" title="{{ product.title | escape }}"><img src="{{ image | product_img_url: 'small' }}" alt="{{ product.title | escape }}" /></a>
7
- </div>{% endif %}{% endfor %}
8
- </div>
9
- <div id="product-right">
10
- <h1>{{ product.title }}</h1>
11
- {{ product.description }}
12
-
13
- {% if product.available %}
14
- <form action="/cart/add" method="post">
15
-
16
- <div id="product-variants">
17
- <div id="price-field"></div>
18
-
19
- <select id="product-select" name='id'>
20
- {% for variant in product.variants %}
21
- <option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
22
- {% endfor %}
23
- </select>
24
- </div>
25
-
26
- <input type="image" src="{{ 'purchase.png' | asset_url }}" name="add" value="Purchase" id="purchase" />
27
- </form>
28
- {% else %}
29
- <p class="bold-red">This product is temporarily unavailable</p>
30
- {% endif %}
31
-
32
- <div id="product-details">
33
- <strong>Continue Shopping</strong><br />
34
- Browse more {{ product.type | link_to_type }} or additional {{ product.vendor | link_to_vendor }} products.
35
- </div>
36
- </div>
37
-
38
-
39
- <script type="text/javascript">
40
- <!--
41
- // mootools callback for multi variants dropdown selector
42
- var selectCallback = function(variant, selector) {
43
- if (variant && variant.available == true) {
44
- // selected a valid variant
45
- $('purchase').removeClass('disabled'); // remove unavailable class from add-to-cart button
46
- $('purchase').disabled = false; // reenable add-to-cart button
47
- $('price-field').innerHTML = Shopify.formatMoney(variant.price, "{{shop.money_with_currency_format}}"); // update price field
48
- } else {
49
- // variant doesn't exist
50
- $('purchase').addClass('disabled'); // set add-to-cart button to unavailable class
51
- $('purchase').disabled = true; // disable add-to-cart button
52
- $('price-field').innerHTML = (variant) ? "Sold Out" : "Unavailable"; // update price-field message
53
- }
54
- };
55
-
56
- // initialize multi selector for product
57
- window.addEvent('domready', function() {
58
- new Shopify.OptionSelectors("product-select", { product: {{ product | json }}, onVariantSelected: selectCallback });
59
- });
60
- -->
61
- </script>
62
-
@@ -1,122 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
-
4
- <head>
5
- <title>{{ shop.name }} &mdash; {{ page_title }}</title>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
-
8
- {{ 'stylesheet.css' | asset_url | stylesheet_tag }}
9
-
10
- <!-- Additional colour schemes for this theme. If you want to use them, just replace the above line with one of these
11
- {{ 'caramel.css' | asset_url | stylesheet_tag }}
12
- {{ 'sea.css' | asset_url | stylesheet_tag }}
13
- -->
14
-
15
- {{ 'mootools.js' | global_asset_url | script_tag }}
16
- {{ 'slimbox.js' | global_asset_url | script_tag }}
17
- {{ 'option_selection.js' | shopify_asset_url | script_tag }}
18
-
19
- {{ content_for_header }}
20
- </head>
21
-
22
- <body id="page-{{ template }}">
23
-
24
- <div id="header">
25
- <div class="container">
26
- <div id="logo">
27
- <h1><a href="/" title="{{ shop.name }}">{{ shop.name }}</a></h1>
28
- </div>
29
- <div id="navigation">
30
- <ul id="navigate">
31
- <li><a href="/cart">View Cart</a></li>
32
- {% for link in linklists.main-menu.links reversed %}
33
- <li><a href="{{ link.url }}">{{ link.title }}</a></li>
34
- {% endfor %}
35
- </ul>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <div id="mini-header">
41
- <div class="container">
42
- <div id="shopping-cart">
43
- <a href="/cart">Your shopping cart contains {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}</a>
44
- </div>
45
- <div id="search-box">
46
- <form action="/search" method="get">
47
- <input type="text" name="q" id="q" />
48
- <input type="image" src="{{ 'seek.png' | asset_url }}" value="Seek" onclick="this.parentNode.submit(); return false;" id="seek" />
49
- </form>
50
- </div>
51
- </div>
52
- </div>
53
-
54
- <div id="layout">
55
- <div class="container">
56
- <div id="layout-left" {% if template != "cart" %}{% if template != "product" %}style="width:619px"{% endif %}{% endif %}>{% if template == "search" %}
57
- <h1>Search Results</h1>{% endif %}
58
- {{ content_for_layout }}
59
- </div>{% if template != "cart" %}{% if template != "product" %}
60
-
61
- <div id="layout-right">
62
- {% if template == "index" %}
63
- {% if blogs.news.articles.size > 1 %}
64
- <a href="{{ shop.url }}/blogs/news.xml"><img src="{{ 'feed.png' | asset_url }}" alt="Subscribe" class="feed" /></a>
65
- <h3><a href="/blogs/news">More news</a></h3>
66
- <ul id="blogs">{% for article in blogs.news.articles limit: 6 offset: 1 %}
67
- <li><a href="{{ article.url }}">{{ article.title | strip_html | truncate: 30 }}</a><br />
68
- <small>{{ article.content | strip_html | truncatewords: 12 }}</small>
69
- </li>{% endfor %}
70
- </ul>
71
- {% endif %}
72
- {% endif %}
73
-
74
- {% if template == "collection" %}
75
- <h3>Collection Tags</h3>
76
- <div id="tags">{% if collection.tags.size == 0 %}
77
- No tags found.{% else %}
78
- <span class="tags">{% for tag in collection.tags %}{% if current_tags contains tag %} {{ tag | highlight_active_tag | link_to_remove_tag: tag }}{% else %} {{ tag | highlight_active_tag | link_to_add_tag: tag }}{% endif %}{% unless forloop.last %}, {% endunless %}{% endfor %}</span>{% endif %}
79
- </div>
80
- {% endif %}
81
-
82
- <h3>Navigation</h3>
83
- <ul id="links">
84
- {% for link in linklists.main-menu.links %}
85
- <li><a href="{{ link.url }}">{{ link.title }}</a></li>
86
- {% endfor %}
87
- </ul>
88
-
89
- {% if template != "page" %}
90
- <h3>Featured Products</h3>
91
- <ul id="featuring">{% for product in collections.frontpage.products limit: 6 %}
92
- <li class="featuring-list">
93
- <div class="featuring-image">
94
- <a href="{{ product.url | within: collections.frontpage }}" title="{{ product.title | escape }} &mdash; {{ product.description | strip_html | truncate: 50 }}"><img src="{{ product.images.first | product_img_url: 'icon' }}" alt="{{ product.title | escape }}" /></a>
95
- </div>
96
- <div class="featuring-info">
97
- <a href="{{ product.url | within: collections.frontpage }}">{{ product.title | strip_html | truncate: 28 }}</a><br />
98
- <small><span class="light">from</span> {{ product.price | money }}</small>
99
- </div>
100
- </li>{% endfor %}
101
- </ul>
102
- {% endif %}
103
- </div>{% endif %}{% endif %}
104
- </div>
105
- </div>
106
-
107
- <div id="footer">
108
- <div id="footer-fader">
109
- <div class="container">
110
- <div id="footer-right">{% for link in linklists.footer.links %}
111
- {{ link.title | link_to: link.url }} {% unless forloop.last %}&#124;{% endunless %}{% endfor %}
112
- </div>
113
- <span id="footer-left">
114
- Copyright &copy; {{ "now" | date: "%Y" }} <a href="/">{{ shop.name }}</a>. All Rights Reserved. All prices {{ shop.currency }}.<br />
115
- This website is powered by <a href="http://www.shopify.com">Shopify</a>.
116
- </span>
117
- </div>
118
- </div>
119
- </div>
120
-
121
- </body>
122
- </html>