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,11 +0,0 @@
1
- module WeightFilter
2
-
3
- def weight(grams)
4
- sprintf("%.2f", grams / 1000)
5
- end
6
-
7
- def weight_with_unit(grams)
8
- "#{weight(grams)} kg"
9
- end
10
-
11
- end
@@ -1,74 +0,0 @@
1
- <div class="article">
2
- <h2 class="article-title">{{ article.title }}</h2>
3
- <p class="article-details">posted <span class="article-time">{{ article.created_at | date: "%Y %h" }}</span> by <span class="article-author">{{ article.author }}</span></p>
4
-
5
- <div class="article-body textile">
6
- {{ article.content }}
7
- </div>
8
-
9
- </div>
10
-
11
- <!-- Comments -->
12
- {% if blog.comments_enabled? %}
13
- <div id="comments">
14
- <h3>Comments</h3>
15
-
16
- <!-- List all comments -->
17
- <ul id="comment-list">
18
- {% for comment in article.comments %}
19
- <li>
20
- <div class="comment-details">
21
- <span class="comment-author">{{ comment.author }}</span> said on <span class="comment-date">{{ comment.created_at | date: "%B %d, %Y" }}</span>:
22
- </div>
23
-
24
- <div class="comment">
25
- {{ comment.content }}
26
- </div>
27
- </li>
28
- {% endfor %}
29
- </ul>
30
-
31
- <!-- Comment Form -->
32
- <div id="comment-form">
33
- {% form article %}
34
- <h3>Leave a comment</h3>
35
-
36
- <!-- Check if a comment has been submitted in the last request, and if yes display an appropriate message -->
37
- {% if form.posted_successfully? %}
38
- {% if blog.moderated? %}
39
- <div class="notice">
40
- Successfully posted your comment.<br />
41
- It will have to be approved by the blog owner first before showing up.
42
- </div>
43
- {% else %}
44
- <div class="notice">Successfully posted your comment.</div>
45
- {% endif %}
46
- {% endif %}
47
-
48
- {% if form.errors %}
49
- <div class="notice error">Not all the fields have been filled out correctly!</div>
50
- {% endif %}
51
-
52
- <dl>
53
- <dt class="{% if form.errors contains 'author' %}error{% endif %}"><label for="comment_author">Your name</label></dt>
54
- <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>
55
-
56
- <dt class="{% if form.errors contains 'email' %}error{% endif %}"><label for="comment_email">Your email</label></dt>
57
- <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>
58
-
59
- <dt class="{% if form.errors contains 'body' %}error{% endif %}"><label for="comment_body">Your comment</label></dt>
60
- <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>
61
- </dl>
62
-
63
- {% if blog.moderated? %}
64
- <p class="hint">comments have to be approved before showing up</p>
65
- {% endif %}
66
-
67
- <input type="submit" value="Post comment" id="comment-submit" />
68
- {% endform %}
69
- </div>
70
- <!-- END Comment Form -->
71
-
72
- </div>
73
- {% endif %}
74
- <!-- END Comments -->
@@ -1,33 +0,0 @@
1
- <div id="page">
2
- <h2>{{page.title}}</h2>
3
-
4
- {% paginate blog.articles by 20 %}
5
-
6
- {% for article in blog.articles %}
7
-
8
- <div class="article">
9
- <div class="headline">
10
- <h3 class="title">
11
- <a href="{{article.url}}">{{ article.title }}</a>
12
- </h3>
13
- <h4 class="date">Posted on {{ article.created_at | date: "%B %d, '%y" }} by {{ article.author }}.</h4>
14
- </div>
15
-
16
- <div class="article-body textile">
17
- {{ article.content | strip_html | truncate: 250 }}
18
- </div>
19
-
20
- {% if blog.comments_enabled? %}
21
- <p style="text-align: right"><a href="{{article.url}}#comments">{{ article.comments_count }} comments</a></p>
22
- {% endif %}
23
- </div>
24
-
25
- {% endfor %}
26
-
27
- <div id="pagination">
28
- {{ paginate | default_pagination }}
29
- </div>
30
-
31
- {% endpaginate %}
32
-
33
- </div>
@@ -1,66 +0,0 @@
1
- <script type="text/javascript">
2
- function remove_item(id) {
3
- document.getElementById('updates_'+id).value = 0;
4
- document.getElementById('cartform').submit();
5
- }
6
- </script>
7
-
8
- <div>
9
-
10
- {% if cart.item_count == 0 %}
11
- <h4>Your shopping cart is looking rather empty...</h4>
12
- {% else %}
13
- <form action="/cart" method="post" id="cartform">
14
-
15
- <div id="cart">
16
-
17
- <h3>You have {{ cart.item_count }} {{ cart.item_count | pluralize: 'product', 'products' }} in here!</h3>
18
-
19
- <ul id="line-items">
20
- {% for item in cart.items %}
21
- <li id="item-{{item.id}}" class="clearfix">
22
- <div class="thumb">
23
- <div class="prodimage">
24
- <a href="{{item.product.url}}" title="View {{item.title}} Page"><img src="{{item.product.featured_image | product_img_url: 'thumb' }}" alt="{{item.title | escape }}" /></a>
25
- </div></div>
26
- <h3 style="padding-right: 150px">
27
- <a href="{{item.product.url}}" title="View {{item.title | escape }} Page">
28
- {{ item.title }}
29
- {% if item.variant.available == true %}
30
- ({{item.variant.title}})
31
- {% endif %}
32
- </a>
33
- </h3>
34
- <small class="itemcost">Costs {{ item.price | money }} each, <span class="money">{{item.line_price | money }}</span> total.</small>
35
- <p class="right">
36
- <label for="updates">How many? </label>
37
- <input type="text" size="4" name="updates[{{item.variant.id}}]" id="updates_{{item.variant.id}}" value="{{item.quantity}}" onfocus="this.select();"/><br />
38
- <a href="#" onclick="remove_item({{item.variant.id}}); return false;" class="remove"><img style="padding:15px 0 0 0;margin:0;" src="{{ 'delete.gif' | asset_url }}" /></a>
39
- </p>
40
- </li>
41
- {% endfor %}
42
- <li id="total">
43
- <input type="image" id="update-cart" name="update" value="Update My Cart" src="{{ 'update.gif' | asset_url }}" />
44
- Subtotal:
45
- <span class="money">{{ cart.total_price | money_with_currency }}</span>
46
- </li>
47
- </ul>
48
-
49
- </div>
50
-
51
- <div class="info">
52
- <input type="image" value="Checkout!" name="checkout" src="{{ 'checkout.gif' | asset_url }}" />
53
- </div>
54
-
55
- {% if additional_checkout_buttons %}
56
- <div class="additional-checkout-buttons">
57
- <p>- or -</p>
58
- {{ content_for_additional_checkout_buttons }}
59
- </div>
60
- {% endif %}
61
-
62
- </form>
63
-
64
- {% endif %}
65
-
66
- </div>
@@ -1,22 +0,0 @@
1
- {% paginate collection.products by 20 %}
2
-
3
- <ul id="product-collection">
4
- {% for product in collection.products %}
5
- <li class="singleproduct clearfix">
6
- <div class="small">
7
- <div class="prodimage"><a href="{{product.url}}"><img src="{{ product.featured_image | product_img_url: 'small' }}" /></a></div>
8
- </div>
9
- <div class="description">
10
- <h3><a href="{{product.url}}">{{product.title}}</a></h3>
11
- <p>{{ product.description | strip_html | truncatewords: 35 }}</p>
12
- <p class="money">{{ product.price_min | money }}{% if product.price_varies %} - {{ product.price_max | money }}{% endif %}</p>
13
- </div>
14
- </li>
15
- {% endfor %}
16
- </ul>
17
-
18
- <div id="pagination">
19
- {{ paginate | default_pagination }}
20
- </div>
21
-
22
- {% endpaginate %}
@@ -1,47 +0,0 @@
1
- <div id="frontproducts"><div id="frontproducts-top"><div id="frontproducts-bottom">
2
- <h2 style="display: none;">Featured Items</h2>
3
- {% for product in collections.frontpage.products limit:1 offset:0 %}
4
- <div class="productmain">
5
- <a href="{{ product.url }}"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}" /></a>
6
- <h3><a href="{{ product.url }}">{{ product.title }}</a></h3>
7
- <div class="description">{{ product.description | strip_html | truncatewords: 18 }}</div>
8
- <p class="money">{{ product.price_min | money }}</p>
9
- </div>
10
- {% endfor %}
11
- {% for product in collections.frontpage.products offset:1 %}
12
- <div class="product">
13
- <a href="{{ product.url }}"><img src="{{ product.featured_image | product_img_url: 'thumb' }}" alt="{{ product.title | escape }}" /></a>
14
- <h3><a href="{{ product.url }}">{{ product.title }}</a></h3>
15
- <p class="money">{{ product.price_min | money }}</p>
16
- </div>
17
- {% endfor %}
18
- </div></div></div>
19
-
20
- <div id="mainarticle">
21
- {% assign article = pages.frontpage %}
22
-
23
- {% if article.content != "" %}
24
- <h2>{{ article.title }}</h2>
25
- <div class="article-body textile">
26
- {{ article.content }}
27
- </div>
28
- {% else %}
29
- <div class="article-body textile">
30
- 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 />
31
- {{ "Learn more about handles" | link_to "http://wiki.shopify.com/Handle" }}
32
- </div>
33
- {% endif %}
34
-
35
- </div>
36
- <br style="clear: both;" />
37
- <div id="articles">
38
- {% for article in blogs.news.articles offset:1 %}
39
- <div class="article">
40
- <h2>{{ article.title }}</h2>
41
- <div class="article-body textile">
42
- {{ article.content }}
43
- </div>
44
- </div>
45
- {% endfor %}
46
- </div>
47
-
@@ -1,8 +0,0 @@
1
- <div id="page">
2
- <h2>{{page.title}}</h2>
3
-
4
- <div class="article textile">
5
- {{page.content}}
6
- </div>
7
-
8
- </div>
@@ -1,68 +0,0 @@
1
- <div id="productpage">
2
-
3
- <div id="productimages"><div id="productimages-top"><div id="productimages-bottom">
4
- {% for image in product.images %}
5
- {% if forloop.first %}
6
- <a href="{{ image | product_img_url: 'large' }}" class="productimage" rel="lightbox">
7
- <img src="{{ image | product_img_url: 'medium'}}" alt="{{product.title | escape }}" />
8
- </a>
9
- {% else %}
10
- <a href="{{ image | product_img_url: 'large' }}" class="productimage-small" rel="lightbox">
11
- <img src="{{ image | product_img_url: 'small'}}" alt="{{product.title | escape }}" />
12
- </a>
13
- {% endif %}
14
- {% endfor %}
15
- </div></div></div>
16
-
17
- <h2>{{ product.title }}</h2>
18
-
19
- <ul id="details" class="hlist">
20
- <li>Vendor: {{ product.vendor | link_to_vendor }}</li>
21
- <li>Type: {{ product.type | link_to_type }}</li>
22
- </ul>
23
-
24
- <small>{{ product.price_min | money }}{% if product.price_varies %} - {{ product.price_max | money }}{% endif %}</small>
25
-
26
- <div id="variant-add">
27
- <form action="/cart/add" method="post">
28
-
29
- <select id="variant-select" name="id" class="product-info-options">
30
- {% for variant in product.variants %}
31
- <option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
32
- {% endfor %}
33
- </select>
34
-
35
- <div id="price-field" class="price"></div>
36
-
37
- <div style="text-align:center;"><input type="image" name="add" value="Add to Cart" id="add" src="{{ 'addtocart.gif' | asset_url }}" /></div>
38
- </form>
39
- </div>
40
-
41
- <div class="description textile">
42
- {{ product.description }}
43
- </div>
44
- </div>
45
-
46
- <script type="text/javascript">
47
- <!--
48
- // prototype callback for multi variants dropdown selector
49
- var selectCallback = function(variant, selector) {
50
- if (variant && variant.available == true) {
51
- // selected a valid variant
52
- $('add').removeClassName('disabled'); // remove unavailable class from add-to-cart button
53
- $('add').disabled = false; // reenable add-to-cart button
54
- $('price-field').innerHTML = Shopify.formatMoney(variant.price, "{{shop.money_with_currency_format}}"); // update price field
55
- } else {
56
- // variant doesn't exist
57
- $('add').addClassName('disabled'); // set add-to-cart button to unavailable class
58
- $('add').disabled = true; // disable add-to-cart button
59
- $('price-field').innerHTML = (variant) ? "Sold Out" : "Unavailable"; // update price-field message
60
- }
61
- };
62
-
63
- // initialize multi selector for product
64
- Event.observe(document, 'dom:loaded', function() {
65
- new Shopify.OptionSelectors("variant-select", { product: {{ product | json }}, onVariantSelected: selectCallback });
66
- });
67
- -->
68
- </script>
@@ -1,105 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
- <title>{{shop.name}} - {{page_title}}</title>
8
-
9
- {{ 'textile.css' | global_asset_url | stylesheet_tag }}
10
- {{ 'lightbox/v204/lightbox.css' | global_asset_url | stylesheet_tag }}
11
-
12
- {{ 'prototype/1.6/prototype.js' | global_asset_url | script_tag }}
13
- {{ 'scriptaculous/1.8.2/scriptaculous.js' | global_asset_url | script_tag }}
14
- {{ 'lightbox/v204/lightbox.js' | global_asset_url | script_tag }}
15
- {{ 'option_selection.js' | shopify_asset_url | script_tag }}
16
-
17
- {{ 'layout.css' | asset_url | stylesheet_tag }}
18
- {{ 'shop.js' | asset_url | script_tag }}
19
-
20
- {{ content_for_header }}
21
- </head>
22
-
23
- <body id="page-{{template}}">
24
-
25
- <p class="hide"><a href="#rightsiders">Skip to navigation.</a></p>
26
- <!-- mini cart -->
27
- {% if cart.item_count > 0 %}
28
- <div id="minicart" style="display:none;"><div id="minicart-inner">
29
- <div id="minicart-items">
30
- <h2>There {{ cart.item_count | pluralize: 'is', 'are' }} {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} in <a href="/cart" title="View your cart">your cart</a>!</h2><h4 style="font-size: 16px; margin: 0 0 10px 0; padding: 0;">Your subtotal is {{ cart.total_price | money }}.</h4>
31
- {% for item in cart.items %}
32
- <div class="thumb">
33
- <div class="prodimage"><a href="{{item.product.url}}" onMouseover="tooltip('{{ item.quantity }} x {{ item.title }} ({{ item.variant.title }})', 200)"; onMouseout="hidetooltip()"><img src="{{ item.product.featured_image | product_img_url: 'thumb' }}" /></a></div>
34
- </div>
35
- {% endfor %}
36
- </div>
37
- <br style="clear:both;" />
38
- </div></div>
39
- {% endif %}
40
-
41
- <div id="container">
42
- <div id="header">
43
- <!-- Begin Header -->
44
- <h1 id="logo"><a href="/" title="Go Home">{{shop.name}}</a></h1>
45
- <div id="cartlinks">
46
- {% if cart.item_count > 0 %}
47
- <h2 id="cartcount"><a href="/cart" onMouseover="tooltip('There {{ cart.item_count | pluralize: 'is', 'are' }} {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} in your cart!', 200)"; onMouseout="hidetooltip()">{{ cart.item_count }} {{ cart.item_count | pluralize: 'thing', 'things' }}!</a></h2>
48
- <a href="/cart" id="minicartswitch" onclick="superSwitch(this, 'minicart', 'Close Mini Cart'); return false;" id="cartswitch">View Mini Cart ({{ cart.total_price | money }})</a>
49
- {% endif %}
50
- </div>
51
- <!-- End Header -->
52
-
53
- </div>
54
- <hr />
55
- <div id="main">
56
-
57
- <div id="content">
58
- <div id="innercontent">
59
- {{ content_for_layout }}
60
- </div>
61
- </div>
62
-
63
- <hr />
64
- <div id="rightsiders">
65
-
66
- <ul class="rightlinks">
67
- {% for link in linklists.main-menu.links %}
68
- <li>{{ link.title | link_to: link.url }}</li>
69
- {% endfor %}
70
- </ul>
71
-
72
- {% if tags %}
73
- <ul class="rightlinks">
74
- {% for tag in collection.tags %}
75
- <li><span class="add-link">{{ '+' | link_to_add_tag: tag }}</span>{{ tag | highlight_active_tag | link_to_tag: tag }}</li>
76
- {% endfor %}
77
- </ul>
78
- {% endif %}
79
-
80
- <ul class="rightlinks">
81
- {% for link in linklists.footer.links %}
82
- <li>{{ link.title | link_to: link.url }}</li>
83
- {% endfor %}
84
- </ul>
85
-
86
- </div>
87
-
88
- <hr /><br style="clear:both;" />
89
-
90
- <div id="footer">
91
- <div class="footerinner">
92
- All prices are in {{ shop.currency }}.
93
- Powered by <a href="http://www.shopify.com" title="Shopify, Hosted E-Commerce">Shopify</a>.
94
- </div>
95
- </div>
96
-
97
- </div>
98
- </div>
99
-
100
- <div id="tooltip"></div>
101
- <img id="pointer" src="{{ 'arrow2.gif' | asset_url }}" />
102
-
103
- </body>
104
- </html>
105
-
@@ -1,74 +0,0 @@
1
- <div class="article">
2
- <h2 class="article-title">{{ article.title }}</h2>
3
- <p class="article-details">posted <span class="article-time">{{ article.created_at | date: "%Y %h" }}</span> by <span class="article-author">{{ article.author }}</span></p>
4
-
5
- <div class="article-body textile">
6
- {{ article.content }}
7
- </div>
8
-
9
- </div>
10
-
11
- <!-- Comments -->
12
- {% if blog.comments_enabled? %}
13
- <div id="comments">
14
- <h3>Comments</h3>
15
-
16
- <!-- List all comments -->
17
- <ul id="comment-list">
18
- {% for comment in article.comments %}
19
- <li>
20
- <div class="comment">
21
- {{ comment.content }}
22
- </div>
23
-
24
- <div class="comment-details">
25
- Posted by {{ comment.author }} on {{ comment.created_at | date: "%B %d, %Y" }}
26
- </div>
27
- </li>
28
- {% endfor %}
29
- </ul>
30
-
31
- <!-- Comment Form -->
32
- <div id="comment-form">
33
- {% form article %}
34
- <h3>Leave a comment</h3>
35
-
36
- <!-- Check if a comment has been submitted in the last request, and if yes display an appropriate message -->
37
- {% if form.posted_successfully? %}
38
- {% if blog.moderated? %}
39
- <div class="notice">
40
- Successfully posted your comment.<br />
41
- It will have to be approved by the blog owner first before showing up.
42
- </div>
43
- {% else %}
44
- <div class="notice">Successfully posted your comment.</div>
45
- {% endif %}
46
- {% endif %}
47
-
48
- {% if form.errors %}
49
- <div class="notice error">Not all the fields have been filled out correctly!</div>
50
- {% endif %}
51
-
52
- <dl>
53
- <dt class="{% if form.errors contains 'author' %}error{% endif %}"><label for="comment_author">Your name</label></dt>
54
- <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>
55
-
56
- <dt class="{% if form.errors contains 'email' %}error{% endif %}"><label for="comment_email">Your email</label></dt>
57
- <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>
58
-
59
- <dt class="{% if form.errors contains 'body' %}error{% endif %}"><label for="comment_body">Your comment</label></dt>
60
- <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>
61
- </dl>
62
-
63
- {% if blog.moderated? %}
64
- <p class="hint">comments have to be approved before showing up</p>
65
- {% endif %}
66
-
67
- <input type="submit" value="Post comment" id="comment-submit" />
68
- {% endform %}
69
- </div>
70
- <!-- END Comment Form -->
71
-
72
- </div>
73
- {% endif %}
74
- <!-- END Comments -->