/
theme.liquid
145 lines (143 loc) · 8.27 KB
/
theme.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>{{ shop.name | escape }} — {% if template == "404" %}Page Not Found{% else %}{{ page_title | escape }}{% endif %}</title>
<meta name="google-site-verification" content="_-FcVNJRa1bsV0ct-KcoetMXJ8zebBi24wyflpQRDOs" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="copyright" content="{{ shop.name | escape }}" />
{{ content_for_header }}
{{ "theme.css" | asset_url | stylesheet_tag }}
{{ "product-image-rollover.css" | asset_url | stylesheet_tag }}
<!--[if lte IE 6]>{{ "ie6.css" | asset_url | stylesheet_tag }}<![endif]-->{% if template == "product" %}{% if product.available %}{% if product.variants.size > 1 %}
{{ "option_selection.js" | shopify_asset_url | script_tag }}{% endif %}{% endif %}{% endif %}
{{ "jquery-1.4.2.min.js" | asset_url | script_tag }}
{{ "jquery-ui-1-7-1.js" | asset_url | script_tag }}{% if template == "product" %}
{{ "jquery-slimbox-2-02.js" | asset_url | script_tag }}{% endif %}
{{ "jquery-theme-1-0.js" | asset_url | script_tag }}
</head>
<body>
<!-- START CONTAINER -->
<div id="container">
<!-- START HEADER -->
<div id="header" class="clear">
<!-- START LOGO -->{% if settings.logo == "enabled" %}
<div id="logo">
<a href="/"><img src="{{ "logo.png" | asset_url }}" alt="{{ shop.name | escape }}" /></a>
</div>{% else %}
<h2><a href="/">{{ shop.name | escape }}</a></h2>{% endif %}
<!-- END LOGO -->{% if settings.phone.size > 0 or settings.email.size > 0 %}
<!-- START HELLO -->
<div id="hello">
<div>{% if settings.phone.size > 0 %}
<p><strong>t:</strong> {{ settings.phone | escape }}</p>{% endif %}{% if settings.email.size > 0 %}
<p><strong>e:</strong> <a href="mailto:{{ settings.email }}">{{ settings.email | escape }}</a></p>{% endif %}
</div>
</div>
<!-- END HELLO -->{% endif %}
</div>
<!-- END HEADER -->
<!-- START NAVIGATE -->
<div id="navigate">
<!-- START NAV -->
<div id="nav"> </div>
<!-- START LINKS -->{% capture active_url %}{% if template == "index" %}/{% elsif template == "collection" %}/collections/{{ collection.handle }}{% elsif template == "product" %}{% if collection %}/collections/{{ collection.handle }}{% endif %}/products/{{ product.handle }}{% elsif template == "page" %}/pages/{{ page.handle }}{% elsif template == "blog" %}/blogs/{{ blog.handle }}{% elsif template == "cart" %}/cart{% elsif template == "search" %}/search{% endif %}{% endcapture %}
<ul id="links">{% for link in linklists.main-menu.links limit: 6 %}
<li class="link-{{ forloop.index }}"><a href="{{ link.url }}"{% if link.url == active_url %} class="active"{% endif %}>{{ link.title | escape }}</a></li>{% endfor %}
</ul>
<!-- END LINKS -->
<!-- START GOCART -->
<div id="gocart">
<p><a href="/cart"{% if template == "cart" %} class="active"{% endif %}>
<span class="cart-total-items"><span class="count">{{ cart.item_count }}</span> {{ cart.item_count | pluralize: "Item", "Items" }}</span>
<span class="cart-total-price">{{ cart.total_price | money }}</span>
</a></p>
</div>
<!-- END GOCART -->
<!-- END NAV -->
</div>
<!-- END NAVIGATE -->
<!-- START CONTENT -->
<div id="shadow"> </div>
<div id="{% if template == "404" %}missing{% else %}{{ template }}{% endif %}" class="content">
<!-- START BG -->
<div id="bg" class="clear">{% if template == "page" or template == "blog" or template == "article" %}
<h1 class="title">{{ page.title | escape }}{{ blog.title | escape }}</h1>
<!-- START MAIN -->
<div id="main">
{{ content_for_layout }}
</div>
<!-- END MAIN -->
<!-- START SIDEBAR -->
<div id="sidebar">
<h3>Recent Articles</h3>{% capture blog_handle %}{% if template == "page" %}news{% else %}{{ blog.handle }}{% endif %}{% endcapture %}{% if blogs.[blog_handle].articles.size > 0 %}{% for article in blogs.[blog_handle].articles limit: 4 %}
<!-- START POST {{ forloop.index }} -->
<div class="post{% if forloop.last %} end{% endif %}">
<h5><a href="{{ article.url }}">{{ article.title | escape }}</a></h5>
<p>{{ article.content | strip_html | strip_newlines | truncate: 80 }}</p>
</div>
<!-- END POST {{ forloop.index }} -->{% endfor %}{% else %}
<p>No articles.</p>{% endif %}
<p id="feed"><a href="{{ shop.url }}/blogs/{{ blog_handle }}.atom">{{ blog.title | escape }} Feed Subscription</a></p>
</div>
<!-- END SIDEBAR -->{% else %}
{{ content_for_layout }}{% endif %}
</div>
<!-- END BG -->
</div>
<div id="roundup"> </div>
<!-- END CONTENT -->
<!-- START OVERVIEW -->
<div id="overview">
<ul class="clear">
<li>
<h3>{{ pages.frontpage.title | escape }}</h3>
<p>{{ pages.frontpage.content | strip_html | strip_newlines | truncate: 200 }}</p>
<p><a href="/pages/frontpage">Read More</a></p>
</li>
<li>
<h3>From Our Blog</h3>{% for article in blogs.news.articles limit: 1 %}
<h5>{{ article.title | escape }}</h5>
<p>{{ article.content | strip_html | strip_newlines | truncate: 150 }}</p>
<p><a href="{{ article.url }}">Read More</a></p>{% endfor %}
</li>
<li>
<h3>{{ pages.about-us.title | escape }}</h3>
<p>{{ pages.about-us.content | strip_html | strip_newlines | truncate: 200 }}</p>
<p><a href="/pages/about-us">Read More</a></p>
</li>
</ul>
</div>
<!-- END OVERVIEW -->
<!-- START FOOTER -->
<div id="footer" class="clear">
<p>© {{ "now" | date: "%Y" }} {{ shop.name | escape }}. Powered by <a href="http://www.shopify.com">Shopify</a>.</p>{% if linklists.footer.links.size > 0 %}
<p class="links">{% for link in linklists.footer.links %}<a href="{{ link.url }}">{{ link.title | escape }}</a>{% unless forloop.last %} <span>|</span> {% endunless %}{% endfor %}</p>{% endif %}
</div>
<!-- END FOOTER -->
</div>
<!-- END CONTAINER -->{% if template == "product" %}{% if product.available %}{% if product.variants.size > 1 %}
<script type="text/javascript">
// <![CDATA[
var selectCallback = function(variant, selector) {
if (variant && variant.available == true) {
$("input#add").removeClass("disabled").removeAttr("disabled");
$("h2#price span").html(Shopify.formatMoney(variant.price, "{{ shop.money_format }}"));
if ($("h2#price del").length > 0) {
$("h2#price del").html(Shopify.formatMoney(variant.compare_at_price, "{{ shop.money_format }}"));
};
} else {
$("input#add").addClass("disabled").attr("disabled", "disabled");
var message = variant ? "Sold Out" : "Unavailable";
$("h2#price span").text(message);
if ($("h2#price del").length > 0) { $("h2#price del").text(""); };
}
};
$(function() {
new Shopify.OptionSelectors("id", { product: {{ product | json }}, onVariantSelected: selectCallback });
});
// ]]>
</script>{% endif %}{% endif %}{% endif %}
</body>
{{ 'api.jquery.js' | asset_url | script_tag }}
{{ 'ajaxify-shop.js' | asset_url | script_tag }}
</html>