liquor 0.1.1 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -9
- data/Gemfile +7 -0
- data/Guardfile +11 -0
- data/MIT-LICENSE +6 -2
- data/README.md +4 -122
- data/Rakefile +20 -23
- data/doc/language-spec.html +768 -0
- data/doc/language-spec.md +698 -0
- data/lib/liquor.rb +39 -68
- data/lib/liquor/ast_tools.rb +28 -0
- data/lib/liquor/compiler.rb +110 -0
- data/lib/liquor/context.rb +76 -254
- data/lib/liquor/diagnostics.rb +151 -0
- data/lib/liquor/drop/drop.rb +168 -0
- data/lib/liquor/drop/drop_delegation.rb +24 -0
- data/lib/liquor/drop/drop_scope.rb +118 -0
- data/lib/liquor/drop/dropable.rb +17 -0
- data/lib/liquor/emitter.rb +313 -0
- data/lib/liquor/extensions/kaminari.rb +14 -0
- data/lib/liquor/extensions/pagination.rb +235 -0
- data/lib/liquor/extensions/rails.rb +97 -0
- data/lib/liquor/extensions/thinking_sphinx.rb +14 -0
- data/lib/liquor/extensions/tire.rb +30 -0
- data/lib/liquor/external.rb +79 -0
- data/lib/liquor/function.rb +94 -0
- data/lib/liquor/grammar/lexer.rb +1223 -0
- data/lib/liquor/grammar/lexer.rl +297 -0
- data/lib/liquor/grammar/parser.racc +288 -0
- data/lib/liquor/grammar/parser.rb +885 -0
- data/lib/liquor/library.rb +41 -0
- data/lib/liquor/manager.rb +146 -0
- data/lib/liquor/runtime.rb +167 -0
- data/lib/liquor/stdlib/builtin_functions.rb +315 -0
- data/lib/liquor/stdlib/builtin_tags.rb +228 -0
- data/lib/liquor/stdlib/html_truncater.rb +162 -0
- data/lib/liquor/stdlib/partial_tags.rb +76 -0
- data/lib/liquor/tag.rb +83 -14
- data/lib/liquor/version.rb +1 -1
- data/liquor.gemspec +29 -6
- data/spec/builtins_spec.rb +264 -0
- data/spec/compiler_spec.rb +136 -0
- data/spec/context_spec.rb +49 -0
- data/spec/drop_delegation_spec.rb +21 -0
- data/spec/drop_spec.rb +222 -0
- data/spec/errors_spec.rb +40 -0
- data/spec/external_spec.rb +207 -0
- data/spec/function_spec.rb +80 -0
- data/spec/lexer_spec.rb +173 -0
- data/spec/library_spec.rb +18 -0
- data/spec/manager_spec.rb +84 -0
- data/spec/parser_spec.rb +381 -0
- data/spec/partials_spec.rb +74 -0
- data/spec/runtime_spec.rb +97 -0
- data/spec/spec_helper.rb +94 -0
- data/spec/tag_spec.rb +7 -0
- metadata +216 -173
- data/AUTHORS +0 -2
- data/CHANGELOG +0 -48
- data/Gemfile.lock +0 -91
- data/History.txt +0 -44
- data/LICENSE +0 -23
- data/example/server/example_servlet.rb +0 -37
- data/example/server/liquid_servlet.rb +0 -28
- data/example/server/liquor_servlet.rb +0 -28
- data/example/server/server.rb +0 -12
- data/example/server/templates/index.liquid +0 -6
- data/example/server/templates/index.liquor +0 -6
- data/example/server/templates/products.liquid +0 -45
- data/example/server/templates/products.liquor +0 -45
- data/init.rb +0 -8
- data/lib/extras/liquid_view.rb +0 -51
- data/lib/extras/liquor_view.rb +0 -51
- data/lib/liquor/block.rb +0 -101
- data/lib/liquor/condition.rb +0 -120
- data/lib/liquor/document.rb +0 -17
- data/lib/liquor/drop.rb +0 -256
- data/lib/liquor/errors.rb +0 -11
- data/lib/liquor/extensions.rb +0 -72
- data/lib/liquor/file_system.rb +0 -62
- data/lib/liquor/htmltags.rb +0 -74
- data/lib/liquor/module_ex.rb +0 -60
- data/lib/liquor/standardfilters.rb +0 -315
- data/lib/liquor/strainer.rb +0 -58
- data/lib/liquor/tags/assign.rb +0 -33
- data/lib/liquor/tags/capture.rb +0 -35
- data/lib/liquor/tags/case.rb +0 -83
- data/lib/liquor/tags/comment.rb +0 -9
- data/lib/liquor/tags/content_for.rb +0 -54
- data/lib/liquor/tags/cycle.rb +0 -59
- data/lib/liquor/tags/for.rb +0 -136
- data/lib/liquor/tags/if.rb +0 -80
- data/lib/liquor/tags/ifchanged.rb +0 -20
- data/lib/liquor/tags/include.rb +0 -56
- data/lib/liquor/tags/unless.rb +0 -33
- data/lib/liquor/tags/yield.rb +0 -49
- data/lib/liquor/template.rb +0 -181
- data/lib/liquor/variable.rb +0 -52
- data/performance/shopify.rb +0 -92
- data/performance/shopify/comment_form.rb +0 -33
- data/performance/shopify/database.rb +0 -45
- data/performance/shopify/json_filter.rb +0 -7
- data/performance/shopify/liquid.rb +0 -18
- data/performance/shopify/liquor.rb +0 -18
- data/performance/shopify/money_filter.rb +0 -18
- data/performance/shopify/paginate.rb +0 -93
- data/performance/shopify/shop_filter.rb +0 -98
- data/performance/shopify/tag_filter.rb +0 -25
- data/performance/shopify/vision.database.yml +0 -945
- data/performance/shopify/weight_filter.rb +0 -11
- data/performance/tests/dropify/article.liquid +0 -74
- data/performance/tests/dropify/blog.liquid +0 -33
- data/performance/tests/dropify/cart.liquid +0 -66
- data/performance/tests/dropify/collection.liquid +0 -22
- data/performance/tests/dropify/index.liquid +0 -47
- data/performance/tests/dropify/page.liquid +0 -8
- data/performance/tests/dropify/product.liquid +0 -68
- data/performance/tests/dropify/theme.liquid +0 -105
- data/performance/tests/ripen/article.liquid +0 -74
- data/performance/tests/ripen/blog.liquid +0 -13
- data/performance/tests/ripen/cart.liquid +0 -54
- data/performance/tests/ripen/collection.liquid +0 -29
- data/performance/tests/ripen/index.liquid +0 -32
- data/performance/tests/ripen/page.liquid +0 -4
- data/performance/tests/ripen/product.liquid +0 -75
- data/performance/tests/ripen/theme.liquid +0 -85
- data/performance/tests/tribble/404.liquid +0 -56
- data/performance/tests/tribble/article.liquid +0 -98
- data/performance/tests/tribble/blog.liquid +0 -41
- data/performance/tests/tribble/cart.liquid +0 -134
- data/performance/tests/tribble/collection.liquid +0 -70
- data/performance/tests/tribble/index.liquid +0 -94
- data/performance/tests/tribble/page.liquid +0 -56
- data/performance/tests/tribble/product.liquid +0 -116
- data/performance/tests/tribble/search.liquid +0 -51
- data/performance/tests/tribble/theme.liquid +0 -90
- data/performance/tests/vogue/article.liquid +0 -66
- data/performance/tests/vogue/blog.liquid +0 -32
- data/performance/tests/vogue/cart.liquid +0 -58
- data/performance/tests/vogue/collection.liquid +0 -19
- data/performance/tests/vogue/index.liquid +0 -22
- data/performance/tests/vogue/page.liquid +0 -3
- data/performance/tests/vogue/product.liquid +0 -62
- data/performance/tests/vogue/theme.liquid +0 -122
- data/test/assign_test.rb +0 -11
- data/test/block_test.rb +0 -58
- data/test/capture_test.rb +0 -41
- data/test/condition_test.rb +0 -115
- data/test/content_for_test.rb +0 -15
- data/test/context_test.rb +0 -479
- data/test/drop_test.rb +0 -162
- data/test/error_handling_test.rb +0 -89
- data/test/extra/breakpoint.rb +0 -547
- data/test/extra/caller.rb +0 -80
- data/test/file_system_test.rb +0 -30
- data/test/filter_test.rb +0 -147
- data/test/helper.rb +0 -24
- data/test/html_tag_test.rb +0 -31
- data/test/if_else_test.rb +0 -139
- data/test/include_tag_test.rb +0 -129
- data/test/module_ex_test.rb +0 -89
- data/test/output_test.rb +0 -121
- data/test/parsing_quirks_test.rb +0 -54
- data/test/regexp_test.rb +0 -45
- data/test/security_test.rb +0 -41
- data/test/standard_filter_test.rb +0 -170
- data/test/standard_tag_test.rb +0 -405
- data/test/statements_test.rb +0 -137
- data/test/strainer_test.rb +0 -27
- data/test/template_test.rb +0 -82
- data/test/test_helper.rb +0 -28
- data/test/unless_else_test.rb +0 -27
- data/test/variable_test.rb +0 -173
- data/test/yield_test.rb +0 -24
@@ -1,41 +0,0 @@
|
|
1
|
-
<div id="page" class="innerpage clearfix">
|
2
|
-
<div id="text-page">
|
3
|
-
<h1>Post from our blog...</h1>
|
4
|
-
{% paginate blog.articles by 20 %}
|
5
|
-
{% for article in blog.articles %}
|
6
|
-
|
7
|
-
<div class="entry">
|
8
|
-
<h1><span><a href="{{ article.url }}">{{ article.title }}</a></span></h1>
|
9
|
-
<div class="entry-post">
|
10
|
-
<div class="meta">{{ article.created_at | date: "%b %d" }}</div>
|
11
|
-
{{ article.content }}
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
{% endfor %}
|
16
|
-
|
17
|
-
<div class="paginate clearfix">
|
18
|
-
{{ paginate | default_pagination }}
|
19
|
-
</div>
|
20
|
-
|
21
|
-
{% endpaginate %}
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div id="three-reasons" class="clearfix">
|
25
|
-
<h3>Why Shop With Us?</h3>
|
26
|
-
<ul>
|
27
|
-
<li class="two-a">
|
28
|
-
<h4>24 Hours</h4>
|
29
|
-
<p>We're always here to help.</p>
|
30
|
-
</li>
|
31
|
-
<li class="two-c">
|
32
|
-
<h4>No Spam</h4>
|
33
|
-
<p>We'll never share your info.</p>
|
34
|
-
</li>
|
35
|
-
<li class="two-d">
|
36
|
-
<h4>Secure Servers</h4>
|
37
|
-
<p>Checkout is 256bit encrypted.</p>
|
38
|
-
</li>
|
39
|
-
</ul>
|
40
|
-
</div>
|
41
|
-
</div>
|
@@ -1,134 +0,0 @@
|
|
1
|
-
<script type="text/javascript">
|
2
|
-
function remove_item(id) {
|
3
|
-
document.getElementById('updates_'+id).value = 0;
|
4
|
-
document.getElementById('cart').submit();
|
5
|
-
}
|
6
|
-
</script>
|
7
|
-
|
8
|
-
<div id="page" class="innerpage clearfix">.
|
9
|
-
{% if cart.item_count == 0 %}
|
10
|
-
<h1>Your cart is currently empty.</h1>
|
11
|
-
{% else %}
|
12
|
-
|
13
|
-
<h1>Your Cart <span>({{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}, {{cart.total_price | money_with_currency }} total)</span></h1>
|
14
|
-
|
15
|
-
<form action="/cart" method="post" id="cart-form">
|
16
|
-
|
17
|
-
<div id="cart-wrap">
|
18
|
-
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
19
|
-
<tr>
|
20
|
-
<th scope="col" class="td-image"><label>Image</label></th>
|
21
|
-
<th scope="col" class="td-title"><label>Product Title</label></th>
|
22
|
-
<th scope="col" class="td-count"><label>Count</label></th>
|
23
|
-
<th scope="col" class="td-price"><label>Cost</label></th>
|
24
|
-
<th scope="col" class="td-delete"><label>Remove</label></th>
|
25
|
-
</tr>
|
26
|
-
|
27
|
-
{% for item in cart.items %}
|
28
|
-
<tr class="{% cycle 'reg', 'alt' %}">
|
29
|
-
<td colspan="5">
|
30
|
-
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
31
|
-
<tr>
|
32
|
-
<td class="td-image"><a href="{{item.product.url}}">{{ item.product.featured_image | product_img_url: 'thumb' | img_tag }}</a></td>
|
33
|
-
<td class="td-title"><p>{{ item.title }}</p></td>
|
34
|
-
<td class="td-count"><label>Count:</label> <input type="text" class="quantity item-count" name="updates[{{item.variant.id}}]" id="updates_{{item.variant.id}}" value="{{item.quantity}}" onfocus="this.select();"/></td>
|
35
|
-
<td class="td-price">{{item.line_price | money }}</td>
|
36
|
-
<td class="td-delete"><a href="#" onclick="remove_item({{item.variant.id}}); return false;">Remove</a></td>
|
37
|
-
</tr>
|
38
|
-
</table>
|
39
|
-
</td>
|
40
|
-
</tr>
|
41
|
-
{% endfor %}
|
42
|
-
</table>
|
43
|
-
|
44
|
-
<div id="finish-up">
|
45
|
-
|
46
|
-
<div class="latest-news-box">
|
47
|
-
{{ pages.shopping-cart.content }}
|
48
|
-
</div>
|
49
|
-
|
50
|
-
<p class="order-total">
|
51
|
-
<span><strong>Order Total:</strong> {{cart.total_price | money_with_currency }}</span>
|
52
|
-
</p>
|
53
|
-
|
54
|
-
<p class="update-cart"><input type="submit" value="Refresh Cart" name="update" /></p>
|
55
|
-
|
56
|
-
<p class="go-checkout"><input type="submit" value="Proceed to Checkout" name="checkout" /></p>
|
57
|
-
|
58
|
-
{% if additional_checkout_buttons %}
|
59
|
-
<div class="additional-checkout-buttons">
|
60
|
-
<p>- or -</p>
|
61
|
-
{{ content_for_additional_checkout_buttons }}
|
62
|
-
</div>
|
63
|
-
{% endif %}
|
64
|
-
|
65
|
-
</div>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
|
69
|
-
</form>
|
70
|
-
|
71
|
-
{% endif %}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
<h1 class="other-products"><span>Other Products You Might Enjoy</span></h1>
|
76
|
-
<ul class="item-list clearfix">
|
77
|
-
|
78
|
-
{% for product in collections.frontpage.products limit:2 %}
|
79
|
-
<li>
|
80
|
-
<form action="/cart/add" method="post">
|
81
|
-
<div class="item-list-item">
|
82
|
-
<div class="ili-top clearfix">
|
83
|
-
<div class="ili-top-content">
|
84
|
-
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
85
|
-
<p>{{ product.description | truncatewords: 15 }}</p>
|
86
|
-
</div>
|
87
|
-
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div class="ili-bottom clearfix">
|
91
|
-
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% endfor %}</p>
|
92
|
-
<input type="submit" class="" value="Add to Basket" />
|
93
|
-
<p>
|
94
|
-
<a href="{{product.url}}">View Details</a>
|
95
|
-
|
96
|
-
<span>
|
97
|
-
{% if product.compare_at_price %}
|
98
|
-
{% if product.price_min != product.compare_at_price %}
|
99
|
-
{{product.compare_at_price | money}} -
|
100
|
-
{% endif %}
|
101
|
-
{% endif %}
|
102
|
-
<strong>
|
103
|
-
{{product.price_min | money}}
|
104
|
-
</strong>
|
105
|
-
</span>
|
106
|
-
</p>
|
107
|
-
</div>
|
108
|
-
</div>
|
109
|
-
</form>
|
110
|
-
</li>
|
111
|
-
{% endfor %}
|
112
|
-
|
113
|
-
</ul>
|
114
|
-
|
115
|
-
<div id="three-reasons" class="clearfix">
|
116
|
-
<h3>Why Shop With Us?</h3>
|
117
|
-
<ul>
|
118
|
-
<li class="two-a">
|
119
|
-
<h4>24 Hours</h4>
|
120
|
-
<p>We're always here to help.</p>
|
121
|
-
</li>
|
122
|
-
<li class="two-c">
|
123
|
-
<h4>No Spam</h4>
|
124
|
-
<p>We'll never share your info.</p>
|
125
|
-
</li>
|
126
|
-
<li class="two-d">
|
127
|
-
<h4>Secure Servers</h4>
|
128
|
-
<p>Checkout is 256bit encrypted.</p>
|
129
|
-
</li>
|
130
|
-
</ul>
|
131
|
-
</div>
|
132
|
-
|
133
|
-
</div>
|
134
|
-
<!-- end page -->
|
@@ -1,70 +0,0 @@
|
|
1
|
-
<div id="page" class="innerpage clearfix">
|
2
|
-
<h1>{{ collection.title }}</h1>
|
3
|
-
{% if collection.description.size > 0 %}
|
4
|
-
<div class="latest-news">{{ collection.description }}</div>
|
5
|
-
{% endif %}
|
6
|
-
|
7
|
-
{% paginate collection.products by 8 %}
|
8
|
-
|
9
|
-
<ul class="item-list clearfix">
|
10
|
-
{% for product in collection.products %}
|
11
|
-
<li>
|
12
|
-
<form action="/cart/add" method="post">
|
13
|
-
<div class="item-list-item">
|
14
|
-
<div class="ili-top clearfix">
|
15
|
-
<div class="ili-top-content">
|
16
|
-
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
17
|
-
<p>{{ product.description | truncatewords: 15 }}</p>
|
18
|
-
</div>
|
19
|
-
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="ili-bottom clearfix">
|
23
|
-
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% endfor %}</p>
|
24
|
-
<input type="submit" class="" value="Add to Basket" />
|
25
|
-
<p>
|
26
|
-
<a href="{{product.url}}">View Details</a>
|
27
|
-
|
28
|
-
<span>
|
29
|
-
{% if product.compare_at_price %}
|
30
|
-
{% if product.price_min != product.compare_at_price %}
|
31
|
-
{{product.compare_at_price | money}} -
|
32
|
-
{% endif %}
|
33
|
-
{% endif %}
|
34
|
-
<strong>
|
35
|
-
{{product.price_min | money}}
|
36
|
-
</strong>
|
37
|
-
</span>
|
38
|
-
</p>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</form>
|
42
|
-
</li>
|
43
|
-
{% endfor %}
|
44
|
-
</ul>
|
45
|
-
|
46
|
-
<div class="paginate clearfix">
|
47
|
-
{{ paginate | default_pagination }}
|
48
|
-
</div>
|
49
|
-
|
50
|
-
|
51
|
-
<div id="three-reasons" class="clearfix">
|
52
|
-
<h3>Why Shop With Us?</h3>
|
53
|
-
<ul>
|
54
|
-
<li class="two-a">
|
55
|
-
<h4>24 Hours</h4>
|
56
|
-
<p>We're always here to help.</p>
|
57
|
-
</li>
|
58
|
-
<li class="two-c">
|
59
|
-
<h4>No Spam</h4>
|
60
|
-
<p>We'll never share your info.</p>
|
61
|
-
</li>
|
62
|
-
<li class="two-d">
|
63
|
-
<h4>Secure Servers</h4>
|
64
|
-
<p>Checkout is 256bit encrypted.</p>
|
65
|
-
</li>
|
66
|
-
</ul>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
|
70
|
-
{% endpaginate %}
|
@@ -1,94 +0,0 @@
|
|
1
|
-
<div id="gwrap">
|
2
|
-
<div id="gbox">
|
3
|
-
<h1>Three Great Reasons You Should Shop With Us...</h1>
|
4
|
-
<ul>
|
5
|
-
<li class="gbox1">
|
6
|
-
<h2>Free Shipping</h2>
|
7
|
-
<p>On all orders over $25</p>
|
8
|
-
</li>
|
9
|
-
<li class="gbox2">
|
10
|
-
<h2>Top Quality</h2>
|
11
|
-
<p>Hand made in our shop</p>
|
12
|
-
</li>
|
13
|
-
<li class="gbox3">
|
14
|
-
<h2>100% Guarantee</h2>
|
15
|
-
<p>Any time, any reason</p>
|
16
|
-
</li>
|
17
|
-
</ul>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
|
21
|
-
<div id="page" class="clearfix">
|
22
|
-
|
23
|
-
<div class="latest-news">{{pages.alert.content}}</div>
|
24
|
-
|
25
|
-
<ul class="item-list clearfix">
|
26
|
-
|
27
|
-
{% for product in collections.frontpage.products %}
|
28
|
-
<li>
|
29
|
-
<form action="/cart/add" method="post">
|
30
|
-
<div class="item-list-item">
|
31
|
-
<div class="ili-top clearfix">
|
32
|
-
<div class="ili-top-content">
|
33
|
-
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
34
|
-
{{ product.description | truncatewords: 15 }}</p> <!-- extra cloding <p> tag for truncation -->
|
35
|
-
</div>
|
36
|
-
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div class="ili-bottom clearfix">
|
40
|
-
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% endfor %}</p>
|
41
|
-
<input type="submit" class="" value="Add to Basket" />
|
42
|
-
<p>
|
43
|
-
<a href="{{product.url}}">View Details</a>
|
44
|
-
|
45
|
-
<span>
|
46
|
-
{% if product.compare_at_price %}
|
47
|
-
{% if product.price_min != product.compare_at_price %}
|
48
|
-
{{product.compare_at_price | money}} -
|
49
|
-
{% endif %}
|
50
|
-
{% endif %}
|
51
|
-
<strong>
|
52
|
-
{{product.price_min | money}}
|
53
|
-
</strong>
|
54
|
-
</span>
|
55
|
-
</p>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</form>
|
59
|
-
</li>
|
60
|
-
{% endfor %}
|
61
|
-
|
62
|
-
</ul>
|
63
|
-
|
64
|
-
<div id="one-two">
|
65
|
-
<div id="two">
|
66
|
-
<h3>Why Shop With Us?</h3>
|
67
|
-
<ul>
|
68
|
-
<li class="two-a">
|
69
|
-
<h4>24 Hours</h4>
|
70
|
-
<p>We're always here to help.</p>
|
71
|
-
</li>
|
72
|
-
<li class="two-c">
|
73
|
-
<h4>No Spam</h4>
|
74
|
-
<p>We'll never share your info.</p>
|
75
|
-
</li>
|
76
|
-
<li class="two-b">
|
77
|
-
<h4>Save Energy</h4>
|
78
|
-
<p>We're green, all the way.</p>
|
79
|
-
</li>
|
80
|
-
<li class="two-d">
|
81
|
-
<h4>Secure Servers</h4>
|
82
|
-
<p>Checkout is 256bits encrypted.</p>
|
83
|
-
</li>
|
84
|
-
</ul>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="one">
|
88
|
-
<h3>Our Company</h3>
|
89
|
-
{{pages.about-us.content | truncatewords: 49}} <a href="/pages/about-us">read more</a></p>
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
|
93
|
-
</div>
|
94
|
-
<!-- end page -->
|
@@ -1,56 +0,0 @@
|
|
1
|
-
<div id="page" class="innerpage clearfix">
|
2
|
-
|
3
|
-
<div id="text-page">
|
4
|
-
<div class="entry">
|
5
|
-
<h1>{{page.title}}</h1>
|
6
|
-
<div class="entry-post">
|
7
|
-
{{page.content}}
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
|
13
|
-
<h1>Featured Products</h1>
|
14
|
-
<ul class="item-list clearfix">
|
15
|
-
|
16
|
-
{% for product in collections.frontpage.products %}
|
17
|
-
<li>
|
18
|
-
<form action="/cart/add" method="post">
|
19
|
-
<div class="item-list-item">
|
20
|
-
<div class="ili-top clearfix">
|
21
|
-
<div class="ili-top-content">
|
22
|
-
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
23
|
-
<p>{{ product.description | truncatewords: 15 }}</p>
|
24
|
-
</div>
|
25
|
-
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="ili-bottom clearfix">
|
29
|
-
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% endfor %}</p>
|
30
|
-
<input type="submit" class="" value="Add to Basket" />
|
31
|
-
<p>
|
32
|
-
<a href="{{product.url}}">View Details</a>
|
33
|
-
|
34
|
-
<span>
|
35
|
-
{% if product.compare_at_price %}
|
36
|
-
{% if product.price_min != product.compare_at_price %}
|
37
|
-
{{product.compare_at_price | money}} -
|
38
|
-
{% endif %}
|
39
|
-
{% endif %}
|
40
|
-
<strong>
|
41
|
-
{{product.price_min | money}}
|
42
|
-
</strong>
|
43
|
-
</span>
|
44
|
-
</p>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
</form>
|
48
|
-
</li>
|
49
|
-
{% endfor %}
|
50
|
-
|
51
|
-
</ul>
|
52
|
-
</div>
|
53
|
-
<!-- end page -->
|
54
|
-
|
55
|
-
|
56
|
-
|
@@ -1,116 +0,0 @@
|
|
1
|
-
<div id="page" class="innerpage clearfix">
|
2
|
-
<h1>{{ collection.title }} {{ product.title }}</h1>
|
3
|
-
|
4
|
-
|
5
|
-
<p class="latest-news"><strong>Product Tags: </strong>
|
6
|
-
{% for tag in product.tags %}
|
7
|
-
<a href="/collections/all/{{ tag }}">{{ tag }}</a> |
|
8
|
-
{% endfor %}
|
9
|
-
</p>
|
10
|
-
|
11
|
-
<div class="product clearfix">
|
12
|
-
<div class="product-info">
|
13
|
-
<h1>{{ product.title }}</h1>
|
14
|
-
<div class="product-info-description">
|
15
|
-
<p>{{ product.description }} </p>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
{% if product.available %}
|
19
|
-
<form action="/cart/add" method="post">
|
20
|
-
|
21
|
-
<h2>Product Options:</h2>
|
22
|
-
|
23
|
-
<select id="product-info-options" name="id" class="product-info-options">
|
24
|
-
{% for variant in product.variants %}
|
25
|
-
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
|
26
|
-
{% endfor %}
|
27
|
-
</select>
|
28
|
-
|
29
|
-
<div id="price-field"></div>
|
30
|
-
|
31
|
-
<div class="product-purchase-btn">
|
32
|
-
<input type="submit" class="add-this-to-cart" id="add-this-to-cart" value="Add to Basket" />
|
33
|
-
</div>
|
34
|
-
|
35
|
-
</form>
|
36
|
-
{% else %}
|
37
|
-
<h2>Sold out!</h2>
|
38
|
-
<p>Sorry, we're all out of this product. Check back often and order when it returns</p>
|
39
|
-
{% endif %}
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<div class="product-images clearfix">
|
43
|
-
{% for image in product.images %}
|
44
|
-
|
45
|
-
{% if forloop.first %}
|
46
|
-
<div class="product-image-large">
|
47
|
-
<img src="{{ image | product_img_url: 'medium'}}" alt="{{product.title | escape }}" />
|
48
|
-
</div>
|
49
|
-
{% else %}
|
50
|
-
{% endif %}
|
51
|
-
{% endfor %}
|
52
|
-
|
53
|
-
<ul class="product-thumbs clearfix">
|
54
|
-
{% for image in product.images %}
|
55
|
-
{% if forloop.first %}
|
56
|
-
{% else %}
|
57
|
-
|
58
|
-
<li>
|
59
|
-
<a href="{{ image | product_img_url: 'large' }}" class="product-thumbs" rel="lightbox[product]" title="">
|
60
|
-
<img src="{{ image | product_img_url: 'small'}}" alt="{{product.title | escape }}" />
|
61
|
-
</a>
|
62
|
-
</li>
|
63
|
-
{% endif %}
|
64
|
-
{% endfor %}
|
65
|
-
</ul>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
<div id="three-reasons" class="clearfix">
|
72
|
-
<h3>Why Shop With Us?</h3>
|
73
|
-
<ul>
|
74
|
-
<li class="two-a">
|
75
|
-
<h4>24 Hours</h4>
|
76
|
-
<p>We're always here to help.</p>
|
77
|
-
</li>
|
78
|
-
<li class="two-c">
|
79
|
-
<h4>No Spam</h4>
|
80
|
-
<p>We'll never share your info.</p>
|
81
|
-
</li>
|
82
|
-
<li class="two-d">
|
83
|
-
<h4>Secure Servers</h4>
|
84
|
-
<p>Checkout is 256bit encrypted.</p>
|
85
|
-
</li>
|
86
|
-
</ul>
|
87
|
-
</div>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
<!-- end page -->
|
91
|
-
|
92
|
-
<script type="text/javascript">
|
93
|
-
<!--
|
94
|
-
// prototype callback for multi variants dropdown selector
|
95
|
-
var selectCallback = function(variant, selector) {
|
96
|
-
if (variant && variant.available == true) {
|
97
|
-
// selected a valid variant
|
98
|
-
$('add-this-to-cart').removeClassName('disabled'); // remove unavailable class from add-to-cart button
|
99
|
-
$('add-this-to-cart').disabled = false; // reenable add-to-cart button
|
100
|
-
$('price-field').innerHTML = Shopify.formatMoney(variant.price, "{{shop.money_with_currency_format}}"); // update price field
|
101
|
-
} else {
|
102
|
-
// variant doesn't exist
|
103
|
-
$('add-this-to-cart').addClassName('disabled'); // set add-to-cart button to unavailable class
|
104
|
-
$('add-this-to-cart').disabled = true; // disable add-to-cart button
|
105
|
-
$('price-field').innerHTML = (variant) ? "Sold Out" : "Unavailable"; // update price-field message
|
106
|
-
}
|
107
|
-
};
|
108
|
-
|
109
|
-
// initialize multi selector for product
|
110
|
-
Event.observe(document, 'dom:loaded', function() {
|
111
|
-
new Shopify.OptionSelectors("product-info-options", { product: {{ product | json }}, onVariantSelected: selectCallback });
|
112
|
-
});
|
113
|
-
-->
|
114
|
-
</script>
|
115
|
-
|
116
|
-
|