drnic-liquid 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +44 -0
- data/History.txt +44 -0
- data/MIT-LICENSE +20 -0
- data/Manifest.txt +34 -0
- data/README.rdoc +44 -0
- data/Rakefile +30 -0
- data/example/server/example_servlet.rb +37 -0
- data/example/server/liquid_servlet.rb +28 -0
- data/example/server/server.rb +12 -0
- data/example/server/templates/index.liquid +6 -0
- data/example/server/templates/products.liquid +45 -0
- data/init.rb +8 -0
- data/lib/extras/liquid_view.rb +51 -0
- data/lib/liquid.rb +70 -0
- data/lib/liquid/block.rb +102 -0
- data/lib/liquid/condition.rb +120 -0
- data/lib/liquid/context.rb +221 -0
- data/lib/liquid/document.rb +17 -0
- data/lib/liquid/drop.rb +51 -0
- data/lib/liquid/errors.rb +11 -0
- data/lib/liquid/extensions.rb +56 -0
- data/lib/liquid/file_system.rb +62 -0
- data/lib/liquid/htmltags.rb +74 -0
- data/lib/liquid/module_ex.rb +62 -0
- data/lib/liquid/standardfilters.rb +209 -0
- data/lib/liquid/strainer.rb +51 -0
- data/lib/liquid/tag.rb +26 -0
- data/lib/liquid/tags/assign.rb +33 -0
- data/lib/liquid/tags/capture.rb +35 -0
- data/lib/liquid/tags/case.rb +83 -0
- data/lib/liquid/tags/comment.rb +9 -0
- data/lib/liquid/tags/cycle.rb +59 -0
- data/lib/liquid/tags/for.rb +136 -0
- data/lib/liquid/tags/if.rb +79 -0
- data/lib/liquid/tags/ifchanged.rb +20 -0
- data/lib/liquid/tags/include.rb +55 -0
- data/lib/liquid/tags/unless.rb +33 -0
- data/lib/liquid/template.rb +147 -0
- data/lib/liquid/variable.rb +49 -0
- data/liquid.gemspec +40 -0
- data/performance/shopify.rb +92 -0
- data/performance/shopify/comment_form.rb +33 -0
- data/performance/shopify/database.rb +45 -0
- data/performance/shopify/json_filter.rb +7 -0
- data/performance/shopify/liquid.rb +18 -0
- data/performance/shopify/money_filter.rb +18 -0
- data/performance/shopify/paginate.rb +93 -0
- data/performance/shopify/shop_filter.rb +98 -0
- data/performance/shopify/tag_filter.rb +25 -0
- data/performance/shopify/vision.database.yml +945 -0
- data/performance/shopify/weight_filter.rb +11 -0
- data/performance/tests/dropify/article.liquid +74 -0
- data/performance/tests/dropify/blog.liquid +33 -0
- data/performance/tests/dropify/cart.liquid +66 -0
- data/performance/tests/dropify/collection.liquid +22 -0
- data/performance/tests/dropify/index.liquid +47 -0
- data/performance/tests/dropify/page.liquid +8 -0
- data/performance/tests/dropify/product.liquid +68 -0
- data/performance/tests/dropify/theme.liquid +105 -0
- data/performance/tests/ripen/article.liquid +74 -0
- data/performance/tests/ripen/blog.liquid +13 -0
- data/performance/tests/ripen/cart.liquid +54 -0
- data/performance/tests/ripen/collection.liquid +29 -0
- data/performance/tests/ripen/index.liquid +32 -0
- data/performance/tests/ripen/page.liquid +4 -0
- data/performance/tests/ripen/product.liquid +75 -0
- data/performance/tests/ripen/theme.liquid +85 -0
- data/performance/tests/tribble/404.liquid +56 -0
- data/performance/tests/tribble/article.liquid +98 -0
- data/performance/tests/tribble/blog.liquid +41 -0
- data/performance/tests/tribble/cart.liquid +134 -0
- data/performance/tests/tribble/collection.liquid +70 -0
- data/performance/tests/tribble/index.liquid +94 -0
- data/performance/tests/tribble/page.liquid +56 -0
- data/performance/tests/tribble/product.liquid +116 -0
- data/performance/tests/tribble/search.liquid +51 -0
- data/performance/tests/tribble/theme.liquid +90 -0
- data/performance/tests/vogue/article.liquid +66 -0
- data/performance/tests/vogue/blog.liquid +32 -0
- data/performance/tests/vogue/cart.liquid +58 -0
- data/performance/tests/vogue/collection.liquid +19 -0
- data/performance/tests/vogue/index.liquid +22 -0
- data/performance/tests/vogue/page.liquid +3 -0
- data/performance/tests/vogue/product.liquid +62 -0
- data/performance/tests/vogue/theme.liquid +122 -0
- data/test/assign_test.rb +11 -0
- data/test/block_test.rb +58 -0
- data/test/condition_test.rb +109 -0
- data/test/context_test.rb +482 -0
- data/test/drop_test.rb +162 -0
- data/test/error_handling_test.rb +89 -0
- data/test/extra/breakpoint.rb +547 -0
- data/test/extra/caller.rb +80 -0
- data/test/file_system_test.rb +30 -0
- data/test/filter_test.rb +95 -0
- data/test/helper.rb +20 -0
- data/test/html_tag_test.rb +31 -0
- data/test/if_else_test.rb +131 -0
- data/test/include_tag_test.rb +115 -0
- data/test/module_ex_test.rb +89 -0
- data/test/output_test.rb +121 -0
- data/test/parsing_quirks_test.rb +41 -0
- data/test/regexp_test.rb +45 -0
- data/test/security_test.rb +41 -0
- data/test/standard_filter_test.rb +161 -0
- data/test/standard_tag_test.rb +400 -0
- data/test/statements_test.rb +137 -0
- data/test/strainer_test.rb +21 -0
- data/test/template_test.rb +26 -0
- data/test/test_helper.rb +20 -0
- data/test/unless_else_test.rb +27 -0
- data/test/variable_test.rb +172 -0
- metadata +187 -0
@@ -0,0 +1,51 @@
|
|
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
|
+
{% end %}
|
23
|
+
</ul>
|
24
|
+
{% end %}
|
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
|
+
{% end %}
|
51
|
+
{% end %}
|
@@ -0,0 +1,90 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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> © 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>
|
@@ -0,0 +1,66 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
42
|
+
{% end %}
|
43
|
+
|
44
|
+
{% if form.errors %}
|
45
|
+
<div class="notice error">Not all the fields have been filled out correctly!</div>
|
46
|
+
{% end %}
|
47
|
+
|
48
|
+
<dl>
|
49
|
+
<dt class="{% if form.errors contains 'author' %}error{% end %}"><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{% end %}" /></dd>
|
51
|
+
|
52
|
+
<dt class="{% if form.errors contains 'email' %}error{% end %}"><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{% end %}" /></dd>
|
54
|
+
|
55
|
+
<dt class="{% if form.errors contains 'body' %}error{% end %}"><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{% end %}">{{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
|
+
{% end %}
|
62
|
+
|
63
|
+
<input type="submit" value="Post comment" />
|
64
|
+
{% end %}
|
65
|
+
</div>
|
66
|
+
{% end %}
|
@@ -0,0 +1,32 @@
|
|
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
|
+
—
|
16
|
+
{% end %}
|
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
|
+
{% end %}
|
23
|
+
|
24
|
+
<div id="pagination">
|
25
|
+
{{ paginate | default_pagination }}
|
26
|
+
</div>
|
27
|
+
|
28
|
+
{% end %}
|
29
|
+
|
30
|
+
|
31
|
+
</div>
|
32
|
+
<div class="clear-me"></div>
|
@@ -0,0 +1,58 @@
|
|
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 }} — {{ 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>{% end %}</small>
|
12
|
+
</div>
|
13
|
+
{% end %}
|
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 }} — {{ 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>{% end %}</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>{% end %}
|
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
|
+
{% end %}
|
57
|
+
</div>
|
58
|
+
</form>{% end %}
|
@@ -0,0 +1,19 @@
|
|
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 }} — {{ 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>{% end %}</small>
|
13
|
+
</div>
|
14
|
+
{% end %}
|
15
|
+
</table>{% if paginate.pages > 1 %}
|
16
|
+
<div id="paginate">
|
17
|
+
{{ paginate | default_pagination }}
|
18
|
+
</div>{% end %}{% end %}
|
19
|
+
{% end %}
|
@@ -0,0 +1,22 @@
|
|
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 > Blogs & 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
|
+
{% end %}
|
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 }} — {{ 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>{% end %}</small>
|
20
|
+
</div>
|
21
|
+
{% end %}
|
22
|
+
</table>
|
@@ -0,0 +1,62 @@
|
|
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>{% end %}{% end %}
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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
|
+
|
@@ -0,0 +1,122 @@
|
|
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 }} — {{ 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
|
+
{% end %}
|
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"{% end %}{% end %}>{% if template == "search" %}
|
57
|
+
<h1>Search Results</h1>{% end %}
|
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>{% end %}
|
70
|
+
</ul>
|
71
|
+
{% end %}
|
72
|
+
{% end %}
|
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 }}{% end %}{% unless forloop.last %}, {% end %}{% end %}</span>{% end %}
|
79
|
+
</div>
|
80
|
+
{% end %}
|
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
|
+
{% end %}
|
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 }} — {{ 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>{% end %}
|
101
|
+
</ul>
|
102
|
+
{% end %}
|
103
|
+
</div>{% end %}{% end %}
|
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 %}|{% end %}{% end %}
|
112
|
+
</div>
|
113
|
+
<span id="footer-left">
|
114
|
+
Copyright © {{ "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>
|