File: theme.liquid

package info (click to toggle)
ruby-liquid 5.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,444 kB
  • sloc: ruby: 14,571; makefile: 6
file content (122 lines) | stat: -rw-r--r-- 4,876 bytes parent folder | download | duplicates (3)
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
<!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">

<head>
<title>{{ shop.name }} &mdash; {{ page_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

{{ 'stylesheet.css' | asset_url | stylesheet_tag }}

<!-- Additional colour schemes for this theme. If you want to use them, just replace the above line with one of these
{{ 'caramel.css' | asset_url | stylesheet_tag }}
{{ 'sea.css' | asset_url | stylesheet_tag }}
-->

{{ 'mootools.js'        | global_asset_url  | script_tag }}
{{ 'slimbox.js'         | global_asset_url  | script_tag }}
{{ 'option_selection.js' | shopify_asset_url | script_tag }}

{{ content_for_header }}
</head>

<body id="page-{{ template }}">

<div id="header">
  <div class="container">
    <div id="logo">
      <h1><a href="/" title="{{ shop.name }}">{{ shop.name }}</a></h1>
    </div>
    <div id="navigation">
      <ul id="navigate">
        <li><a href="/cart">View Cart</a></li>
        {% for link in linklists.main-menu.links reversed %}
          <li><a href="{{ link.url }}">{{ link.title }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
</div>

<div id="mini-header">
  <div class="container">
    <div id="shopping-cart">
      <a href="/cart">Your shopping cart contains {{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}</a>
    </div>
    <div id="search-box">
      <form action="/search" method="get">
        <input type="text" name="q" id="q" />
        <input type="image" src="{{ 'seek.png' | asset_url }}" value="Seek" onclick="this.parentNode.submit(); return false;" id="seek" />
      </form>
    </div>
  </div>
</div>

<div id="layout">
  <div class="container">
    <div id="layout-left" {% if template != "cart" %}{% if template != "product" %}style="width:619px"{% endif %}{% endif %}>{% if template == "search" %}
      <h1>Search Results</h1>{% endif %}
      {{ content_for_layout }}
    </div>{% if template != "cart" %}{% if template != "product" %}

    <div id="layout-right">
      {% if template == "index" %}
      {% if blogs.news.articles.size > 1 %}
      <a href="{{ shop.url }}/blogs/news.xml"><img src="{{ 'feed.png' | asset_url }}" alt="Subscribe" class="feed" /></a>
      <h3><a href="/blogs/news">More news</a></h3>
      <ul id="blogs">{% for article in blogs.news.articles limit: 6 offset: 1 %}
        <li><a href="{{ article.url }}">{{ article.title | strip_html | truncate: 30 }}</a><br />
          <small>{{ article.content | strip_html | truncatewords: 12 }}</small>
        </li>{% endfor %}
      </ul>
      {% endif %}
      {% endif %}

      {% if template == "collection" %}
      <h3>Collection Tags</h3>
      <div id="tags">{% if collection.tags.size == 0 %}
        No tags found.{% else %}
        <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 }}{% endif %}{% unless forloop.last %}, {% endunless %}{% endfor %}</span>{% endif %}
      </div>
      {% endif %}

      <h3>Navigation</h3>
      <ul id="links">
      {% for link in linklists.main-menu.links %}
        <li><a href="{{ link.url }}">{{ link.title }}</a></li>
      {% endfor %}
      </ul>

      {% if template != "page" %}
      <h3>Featured Products</h3>
      <ul id="featuring">{% for product in collections.frontpage.products limit: 6 %}
        <li class="featuring-list">
          <div class="featuring-image">
            <a href="{{ product.url | within: collections.frontpage }}" title="{{ product.title | escape }} &mdash; {{ product.description | strip_html | truncate: 50 }}"><img src="{{ product.images.first | product_img_url: 'icon' }}" alt="{{ product.title | escape }}" /></a>
          </div>
          <div class="featuring-info">
            <a href="{{ product.url | within: collections.frontpage }}">{{ product.title | strip_html | truncate: 28 }}</a><br />
            <small><span class="light">from</span> {{ product.price | money }}</small>
          </div>
        </li>{% endfor %}
      </ul>
      {% endif %}
    </div>{% endif %}{% endif %}
  </div>
</div>

<div id="footer">
  <div id="footer-fader">
    <div class="container">
      <div id="footer-right">{% for link in linklists.footer.links %}
        {{ link.title | link_to: link.url }} {% unless forloop.last %}&#124;{% endunless %}{% endfor %}
      </div>
      <span id="footer-left">
        Copyright &copy; {{ "now" | date: "%Y" }} <a href="/">{{ shop.name }}</a>. All Rights Reserved. All prices {{ shop.currency }}.<br />
        This website is powered by <a href="http://www.shopify.com">Shopify</a>.
      </span>
    </div>
  </div>
</div>

</body>
</html>