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,74 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
46
|
+
{% end %}
|
47
|
+
|
48
|
+
{% if form.errors %}
|
49
|
+
<div class="notice error">Not all the fields have been filled out correctly!</div>
|
50
|
+
{% end %}
|
51
|
+
|
52
|
+
<dl>
|
53
|
+
<dt class="{% if form.errors contains 'author' %}error{% end %}"><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{% end %}" /></dd>
|
55
|
+
|
56
|
+
<dt class="{% if form.errors contains 'email' %}error{% end %}"><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{% end %}" /></dd>
|
58
|
+
|
59
|
+
<dt class="{% if form.errors contains 'body' %}error{% end %}"><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{% end %}">{{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
|
+
{% end %}
|
66
|
+
|
67
|
+
<input type="submit" value="Post comment" id="comment-submit" />
|
68
|
+
{% end %}
|
69
|
+
</div>
|
70
|
+
<!-- END Comment Form -->
|
71
|
+
|
72
|
+
</div>
|
73
|
+
{% end %}
|
74
|
+
<!-- END Comments -->
|
@@ -0,0 +1,33 @@
|
|
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
|
+
{% end %}
|
23
|
+
</div>
|
24
|
+
|
25
|
+
{% end %}
|
26
|
+
|
27
|
+
<div id="pagination">
|
28
|
+
{{ paginate | default_pagination }}
|
29
|
+
</div>
|
30
|
+
|
31
|
+
{% end %}
|
32
|
+
|
33
|
+
</div>
|
@@ -0,0 +1,66 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
61
|
+
|
62
|
+
</form>
|
63
|
+
|
64
|
+
{% end %}
|
65
|
+
|
66
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
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 }}{% end %}</p>
|
13
|
+
</div>
|
14
|
+
</li>
|
15
|
+
{% end %}
|
16
|
+
</ul>
|
17
|
+
|
18
|
+
<div id="pagination">
|
19
|
+
{{ paginate | default_pagination }}
|
20
|
+
</div>
|
21
|
+
|
22
|
+
{% end %}
|
@@ -0,0 +1,47 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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 > Blogs & 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
|
+
{% end %}
|
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
|
+
{% end %}
|
46
|
+
</div>
|
47
|
+
|
@@ -0,0 +1,68 @@
|
|
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
|
+
{% end %}
|
14
|
+
{% end %}
|
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 }}{% end %}</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
|
+
{% end %}
|
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>
|
@@ -0,0 +1,105 @@
|
|
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
|
+
{% end %}
|
36
|
+
</div>
|
37
|
+
<br style="clear:both;" />
|
38
|
+
</div></div>
|
39
|
+
{% end %}
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
77
|
+
</ul>
|
78
|
+
{% end %}
|
79
|
+
|
80
|
+
<ul class="rightlinks">
|
81
|
+
{% for link in linklists.footer.links %}
|
82
|
+
<li>{{ link.title | link_to: link.url }}</li>
|
83
|
+
{% end %}
|
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
|
+
|
@@ -0,0 +1,74 @@
|
|
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
|
+
{% end %}
|
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
|
+
{% end %}
|
46
|
+
{% end %}
|
47
|
+
|
48
|
+
{% if form.errors %}
|
49
|
+
<div class="notice error">Not all the fields have been filled out correctly!</div>
|
50
|
+
{% end %}
|
51
|
+
|
52
|
+
<dl>
|
53
|
+
<dt class="{% if form.errors contains 'author' %}error{% end %}"><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{% end %}" /></dd>
|
55
|
+
|
56
|
+
<dt class="{% if form.errors contains 'email' %}error{% end %}"><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{% end %}" /></dd>
|
58
|
+
|
59
|
+
<dt class="{% if form.errors contains 'body' %}error{% end %}"><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{% end %}">{{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
|
+
{% end %}
|
66
|
+
|
67
|
+
<input type="submit" value="Post comment" id="comment-submit" />
|
68
|
+
{% end %}
|
69
|
+
</div>
|
70
|
+
<!-- END Comment Form -->
|
71
|
+
|
72
|
+
</div>
|
73
|
+
{% end %}
|
74
|
+
<!-- END Comments -->
|