limitedrun-themekit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +11 -0
- data/bin/limitedrun-themekit +7 -0
- data/lib/limitedrun-themekit.rb +10 -0
- data/lib/limitedrun-themekit/config.rb +23 -0
- data/lib/limitedrun-themekit/renderer.rb +88 -0
- data/lib/limitedrun-themekit/server.rb +70 -0
- data/lib/limitedrun-themekit/version.rb +5 -0
- data/lib/liquid/filters.rb +57 -0
- data/lib/liquid/tags/captcha.rb +20 -0
- data/lib/liquid/tags/contact_form.rb +16 -0
- data/lib/liquid/tags/lr_include.rb +143 -0
- data/lib/liquid/tags/paginate.rb +16 -0
- data/limitedrun-themekit.gemspec +29 -0
- data/spec/assets/skeleton-theme/README.md +11 -0
- data/spec/assets/skeleton-theme/configs/default.json +314 -0
- data/spec/assets/skeleton-theme/javascripts/default.js +0 -0
- data/spec/assets/skeleton-theme/layouts/default.html +150 -0
- data/spec/assets/skeleton-theme/store.json +101 -0
- data/spec/assets/skeleton-theme/stylesheets/default.css +888 -0
- data/spec/assets/skeleton-theme/templates/404.html +3 -0
- data/spec/assets/skeleton-theme/templates/category.html +37 -0
- data/spec/assets/skeleton-theme/templates/contact.html +62 -0
- data/spec/assets/skeleton-theme/templates/event.html +121 -0
- data/spec/assets/skeleton-theme/templates/events.html +43 -0
- data/spec/assets/skeleton-theme/templates/gallery.html +13 -0
- data/spec/assets/skeleton-theme/templates/history.html +58 -0
- data/spec/assets/skeleton-theme/templates/index.html +37 -0
- data/spec/assets/skeleton-theme/templates/maintenance.html +31 -0
- data/spec/assets/skeleton-theme/templates/news-item.html +27 -0
- data/spec/assets/skeleton-theme/templates/news.html +37 -0
- data/spec/assets/skeleton-theme/templates/order.html +119 -0
- data/spec/assets/skeleton-theme/templates/product.html +105 -0
- data/spec/assets/skeleton-theme/templates/roster-item.html +136 -0
- data/spec/assets/skeleton-theme/templates/roster.html +41 -0
- data/spec/assets/skeleton-theme/templates/search.html +33 -0
- data/spec/features/themekit_spec.rb +22 -0
- data/spec/spec_helper.rb +25 -0
- metadata +211 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
<div id="order">
|
2
|
+
<h2>Order {{ order.number }}</h2>
|
3
|
+
|
4
|
+
{% if order.attempted? %}
|
5
|
+
<table id="metadata">
|
6
|
+
<tr>
|
7
|
+
<td>
|
8
|
+
<p><strong>State</strong><br/>{{ order.state }}</p>
|
9
|
+
<p><strong>Transaction</strong><br/>{{ order.transaction_id }}</p>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
{% if order.customer %}
|
13
|
+
<ul>
|
14
|
+
<li><strong>Customer:</strong></li>
|
15
|
+
{% if order.customer.first_name or order.customer.last_name %}
|
16
|
+
<li>{{ order.customer.first_name }} {{ order.customer.last_name }}</li>
|
17
|
+
{% endif %}
|
18
|
+
<li>{{ order.customer.email }}</li>
|
19
|
+
</ul>
|
20
|
+
{% endif %}
|
21
|
+
|
22
|
+
<br class="clearfix"/>
|
23
|
+
|
24
|
+
{% if order.shipping_address %}
|
25
|
+
<ul>
|
26
|
+
<li><strong>Ship to:</strong></li>
|
27
|
+
<li>{{ order.shipping_address.first_name }} {{ order.shipping_address.last_name }}</li>
|
28
|
+
<li>
|
29
|
+
{{ order.shipping_address.street_address_1 }}<br/>
|
30
|
+
{% if order.shipping_address.street_address_2 %}
|
31
|
+
{{ order.shipping_address.street_address_2 }}<br/>
|
32
|
+
{% endif %}
|
33
|
+
{{ order.shipping_address.city }},
|
34
|
+
{{ order.shipping_address.state }}
|
35
|
+
{{ order.shipping_address.postal_code }}
|
36
|
+
{{ order.shipping_address.country }}
|
37
|
+
</li>
|
38
|
+
</ul>
|
39
|
+
{% endif %}
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
</table>
|
43
|
+
{% endif %}
|
44
|
+
|
45
|
+
<table>
|
46
|
+
<thead>
|
47
|
+
<tr>
|
48
|
+
<th colspan="4">Items</th>
|
49
|
+
</tr>
|
50
|
+
</thead>
|
51
|
+
<tbody>
|
52
|
+
{% for item in order.items %}
|
53
|
+
<tr>
|
54
|
+
<td>{{ item.name }}</td>
|
55
|
+
<td>{{ item.unit_price | money }}</td>
|
56
|
+
<td>{{ item.quantity }}</td>
|
57
|
+
<td>{{ item.total_price | money }}</td>
|
58
|
+
</tr>
|
59
|
+
{% endfor %}
|
60
|
+
|
61
|
+
{% unless order.digital %}
|
62
|
+
<tr>
|
63
|
+
<td></td>
|
64
|
+
<td colspan="2">Subtotal:</td>
|
65
|
+
<td>{{ order.subtotal | money }}</td>
|
66
|
+
</tr>
|
67
|
+
|
68
|
+
<tr>
|
69
|
+
<td></td>
|
70
|
+
<td colspan="2">Shipping:</td>
|
71
|
+
<td>{{ order.shipping | money }}</td>
|
72
|
+
</tr>
|
73
|
+
{% endunless %}
|
74
|
+
|
75
|
+
{% if order.discount? %}
|
76
|
+
<tr>
|
77
|
+
<td></td>
|
78
|
+
<td colspan="2">Discount:</td>
|
79
|
+
<td>{{ order.discount_amount | money }}</td>
|
80
|
+
</tr>
|
81
|
+
{% endif %}
|
82
|
+
|
83
|
+
<tr>
|
84
|
+
<td></td>
|
85
|
+
<td colspan="2">Total:</td>
|
86
|
+
<td>{{ order.total_price | money_with_currency }}</td>
|
87
|
+
</tr>
|
88
|
+
|
89
|
+
{% unless order.attempted? %}
|
90
|
+
<tr>
|
91
|
+
<td></td>
|
92
|
+
<td colspan="3">
|
93
|
+
<form onsubmit="javascript:Store.pay('{{ order.key }}', '{{ order.paypal_pay_key }}');return false;">
|
94
|
+
<button class="btn" type="submit">Pay Now</button>
|
95
|
+
</form>
|
96
|
+
</td>
|
97
|
+
{% endunless %}
|
98
|
+
</tbody>
|
99
|
+
</table>
|
100
|
+
|
101
|
+
{% if order.attempted? and order.downloads.size > 0 %}
|
102
|
+
<table>
|
103
|
+
<thead>
|
104
|
+
<tr>
|
105
|
+
<th>Instant Downloads</th>
|
106
|
+
</tr>
|
107
|
+
</thead>
|
108
|
+
<tbody>
|
109
|
+
{% for download in order.downloads %}
|
110
|
+
<tr>
|
111
|
+
<td>{{ download | link_to_download }}</td>
|
112
|
+
</tr>
|
113
|
+
{% endfor %}
|
114
|
+
</tbody>
|
115
|
+
</table>
|
116
|
+
{% endif %}
|
117
|
+
|
118
|
+
<p id="question">Have a question or problem about this order? Please reply to your confirmation email.</p>
|
119
|
+
</div>
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<div id="product">
|
2
|
+
<h2>{{ product.name }}{% if product.music_catalog_number %} <small>{{ product.music_catalog_number }}</small>{% endif %}</h2>
|
3
|
+
|
4
|
+
<ul id="images">
|
5
|
+
{% for image in product.images %}
|
6
|
+
<li>
|
7
|
+
<a href="{{ image.url }}" target="_blank">
|
8
|
+
{% if forloop.first %}
|
9
|
+
{{ product.images.first.v200_url | img_tag: 'thumbnail' }}
|
10
|
+
{% else %}
|
11
|
+
{{ image.v075_url | img_tag: 'thumbnail' }}
|
12
|
+
{% endif %}
|
13
|
+
</a>
|
14
|
+
</li>
|
15
|
+
{% endfor %}
|
16
|
+
</ul>
|
17
|
+
|
18
|
+
<div id="body">
|
19
|
+
{% if product.soundcloud_playlist_id %}
|
20
|
+
<div id="soundcloud">
|
21
|
+
<iframe width="100%" height="300" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F{{ product.soundcloud_playlist_id }}&show_artwork=false&show_play_count=false&color={{ config['soundcloud_player_color'] | replace:'#','' }}"></iframe>
|
22
|
+
</div>
|
23
|
+
{% endif %}
|
24
|
+
|
25
|
+
<div id="description">
|
26
|
+
{{ product.description | simple_format }}
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div id="variations">
|
30
|
+
{% if product.available? %}
|
31
|
+
<p>
|
32
|
+
<select id="cart_variation_id">
|
33
|
+
{% unless config['supress_select_option'] and product.variations.size == 1 %}
|
34
|
+
<option>Select...</option>
|
35
|
+
{% endunless %}
|
36
|
+
{% for variation in product.variations %}
|
37
|
+
{% if variation.available? %}
|
38
|
+
<option value="{{ variation.id }}">{{ variation.name }} - {{ variation.price | money }}</option>
|
39
|
+
{% else %}
|
40
|
+
<option disabled="disabled">{{ variation.name }} - {{ variation.price | money }} (Out of Stock)</option>
|
41
|
+
{% endif %}
|
42
|
+
{% endfor %}
|
43
|
+
</select>
|
44
|
+
|
45
|
+
<button class="btn" onclick="javascript:Store.cart.add(document.getElementById('cart_variation_id').options[document.getElementById('cart_variation_id').selectedIndex].value);return false;">Add to Cart</button>
|
46
|
+
</p>
|
47
|
+
{% elsif product.announced? %}
|
48
|
+
<p>This item is coming soon.<p>
|
49
|
+
{% elsif product.unavailable? %}
|
50
|
+
<p>This item isn't currently available.<p>
|
51
|
+
{% elsif product.unlisted? %}
|
52
|
+
<p>This item isn't listed. That means it isn't visible to your customers.<p>
|
53
|
+
{% endif %}
|
54
|
+
</div>
|
55
|
+
|
56
|
+
{% if product.music_pressing_information %}
|
57
|
+
<h3>Pressing Information</h3>
|
58
|
+
{{ product.music_pressing_information | simple_format }}
|
59
|
+
{% endif %}
|
60
|
+
|
61
|
+
{% if product.music_track_listings %}
|
62
|
+
<h3>Tracks</h3>
|
63
|
+
|
64
|
+
<ol>
|
65
|
+
{% for track in product.music_track_listings %}
|
66
|
+
<li>{{ track.id3_track_name }}</li>
|
67
|
+
{% endfor %}
|
68
|
+
</ol>
|
69
|
+
{% endif %}
|
70
|
+
|
71
|
+
{% if config['display_tweet_button'] or config['display_like_button'] %}
|
72
|
+
<ul id="social">
|
73
|
+
{% if config['display_tweet_button'] %}
|
74
|
+
<li>
|
75
|
+
<a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ product.name | escape }} at {{ store.name | escape }}" data-count="none">Tweet</a>
|
76
|
+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
77
|
+
</li>
|
78
|
+
{% endif %}
|
79
|
+
{% if config['display_like_button'] %}
|
80
|
+
<li>
|
81
|
+
<iframe src="//www.facebook.com/plugins/like.php?href={{ store.url }}{{ product.url }}&send=false&layout=button_count&width=52&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:52px; height:35px;" allowTransparency="true"></iframe>
|
82
|
+
</li>
|
83
|
+
{% endif %}
|
84
|
+
</ul>
|
85
|
+
{% endif %}
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div class="clearfix"></div>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
{% if product.eligible_for_availability_notices? %}
|
92
|
+
<div id="availability-request" onclick="javascript:Store.requestNotification('Product', {{ product.id }});">
|
93
|
+
{% if product.announced? %}
|
94
|
+
Want an email when this<br/>
|
95
|
+
becomes available?
|
96
|
+
{% else %}
|
97
|
+
Looking for something<br/>
|
98
|
+
that's out of stock?
|
99
|
+
{% endif %}
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<script type="text/javascript">
|
103
|
+
window.setTimeout(function() {document.getElementById('availability-request').setAttribute('class', 'reveal');}, 1000);
|
104
|
+
</script>
|
105
|
+
{% endif %}
|
@@ -0,0 +1,136 @@
|
|
1
|
+
{% if section == 'products' %}
|
2
|
+
<div id="product-grid">
|
3
|
+
{% paginate item.products by 30 %}
|
4
|
+
{% for product in item.products %}
|
5
|
+
<div class="product">
|
6
|
+
<a class="image" href="{{ product.url }}" style="{% if product.images.size > 0 %}background-image:url({{ product.images.first.v200_url }});{% endif %}">
|
7
|
+
|
8
|
+
</a>
|
9
|
+
<a class="info" href="{{ product.url }}">
|
10
|
+
{{ product.name }} - {{ product.price_range | money | join: ' - ' }}
|
11
|
+
</a>
|
12
|
+
</div>
|
13
|
+
{% endfor %}
|
14
|
+
|
15
|
+
{{ item.products_pagination }}
|
16
|
+
{% endpaginate %}
|
17
|
+
</div>
|
18
|
+
{% else %}
|
19
|
+
<div class="roster-item">
|
20
|
+
<h2>{{ item.name }}</h2>
|
21
|
+
|
22
|
+
<ul id="images">
|
23
|
+
{% for image in item.images %}
|
24
|
+
<li>
|
25
|
+
<a href="{{ image.url }}" target="_blank">
|
26
|
+
{% if forloop.first %}
|
27
|
+
{{ item.images.first.v200_url | img_tag: 'thumbnail' }}
|
28
|
+
{% else %}
|
29
|
+
{{ image.v075_url | img_tag: 'thumbnail' }}
|
30
|
+
{% endif %}
|
31
|
+
</a>
|
32
|
+
</li>
|
33
|
+
{% endfor %}
|
34
|
+
</ul>
|
35
|
+
|
36
|
+
<div id="body">
|
37
|
+
{% if item.soundcloud_playlist_id %}
|
38
|
+
<div id="soundcloud">
|
39
|
+
<iframe width="100%" height="300" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F{{ item.soundcloud_playlist_id }}&show_artwork=false&show_play_count=false&color={{ config['soundcloud_player_color'] | replace:'#','' }}"></iframe>
|
40
|
+
</div>
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
<div id="description">
|
44
|
+
{{ item.description | simple_format }}
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<ul>
|
48
|
+
{% for link in item.links %}
|
49
|
+
<li><a href="{{ link.url }}">{{ link.name }}</a></li>
|
50
|
+
{% endfor %}
|
51
|
+
</ul>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class="clearfix"></div>
|
55
|
+
|
56
|
+
{% if item.history_items.size > 0 %}
|
57
|
+
<div id="history">
|
58
|
+
{% for history_item in item.history_items %}
|
59
|
+
<div class="history-item">
|
60
|
+
<ul id="images">
|
61
|
+
{% for image in history_item.images %}
|
62
|
+
<li>
|
63
|
+
<a href="{{ image.url }}" target="_blank">
|
64
|
+
{% if forloop.first %}
|
65
|
+
{{ history_item.images.first.v200_url | img_tag: 'thumbnail' }}
|
66
|
+
{% else %}
|
67
|
+
{{ image.v075_url | img_tag: 'thumbnail' }}
|
68
|
+
{% endif %}
|
69
|
+
</a>
|
70
|
+
</li>
|
71
|
+
{% endfor %}
|
72
|
+
</ul>
|
73
|
+
|
74
|
+
<div id="body">
|
75
|
+
<h2>{{ history_item.name }}</h2>
|
76
|
+
|
77
|
+
<div id="release-information">
|
78
|
+
{% comment %}
|
79
|
+
The history_item.release_information attribute combines three attributes
|
80
|
+
into an array that can be passed to the join filter:
|
81
|
+
* history_item.released_on
|
82
|
+
* history_item.released_by
|
83
|
+
* history_item.catalog_number
|
84
|
+
|
85
|
+
You can use each of the above three separate attributes rather
|
86
|
+
than the single release_information attribute.
|
87
|
+
{% endcomment %}
|
88
|
+
|
89
|
+
{{ history_item.release_information | join: ' · ' }}
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="description">
|
93
|
+
{{ history_item.description | simple_format }}
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<ul>
|
97
|
+
{% for link in history_item.links %}
|
98
|
+
<li><a href="{{ link.url }}">{{ link.name }}</a></li>
|
99
|
+
{% endfor %}
|
100
|
+
</ul>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div class="clearfix"></div>
|
104
|
+
</div>
|
105
|
+
{% endfor %}
|
106
|
+
|
107
|
+
<div class="clearfix"></div>
|
108
|
+
</div>
|
109
|
+
{% endif %}
|
110
|
+
|
111
|
+
{% if item.products.size > 0 %}
|
112
|
+
<div id="product-grid">
|
113
|
+
{% for product in item.products limit:5 %}
|
114
|
+
<div class="product">
|
115
|
+
<a class="image" href="{{ product.url }}" style="{% if product.images.size > 0 %}background-image:url({{ product.images.first.v200_url }});{% endif %}">
|
116
|
+
|
117
|
+
</a>
|
118
|
+
<a class="info" href="{{ product.url }}">
|
119
|
+
{{ product.name }} - {{ product.price_range | money | join: ' - ' }}
|
120
|
+
</a>
|
121
|
+
</div>
|
122
|
+
{% endfor %}
|
123
|
+
|
124
|
+
{% if item.products.size > 5 %}
|
125
|
+
<div class="product more-products">
|
126
|
+
<a class="info" href="{{ item.url }}/products">
|
127
|
+
View All Products »
|
128
|
+
</a>
|
129
|
+
</div>
|
130
|
+
{% endif %}
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div class="clearfix"></div>
|
134
|
+
{% endif %}
|
135
|
+
</div>
|
136
|
+
{% endif %}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<div id="roster">
|
2
|
+
{% paginate roster.items by 25 %}
|
3
|
+
{% for item in roster.items %}
|
4
|
+
<div class="roster-item">
|
5
|
+
<ul id="images">
|
6
|
+
{% if item.images.size > 0 %}
|
7
|
+
<li>
|
8
|
+
<a href="{{ item.url }}">
|
9
|
+
{{ item.images.first.v200_url | img_tag: 'thumbnail' }}
|
10
|
+
</a>
|
11
|
+
</li>
|
12
|
+
{% endif %}
|
13
|
+
</ul>
|
14
|
+
|
15
|
+
<div id="body">
|
16
|
+
<h2>{{ item | link_to_roster_item }}</h2>
|
17
|
+
|
18
|
+
{% unless config['hide_roster_item_descriptions_on_roster_page'] %}
|
19
|
+
<div id="description">
|
20
|
+
{{ item.description | simple_format }}
|
21
|
+
</div>
|
22
|
+
{% endunless %}
|
23
|
+
|
24
|
+
<p class="read-more">
|
25
|
+
<a href="{{ item.url }}">
|
26
|
+
Read more »
|
27
|
+
</a>
|
28
|
+
</p>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="clearfix"></div>
|
32
|
+
</div>
|
33
|
+
{% endfor %}
|
34
|
+
|
35
|
+
<div class="clearfix"></div>
|
36
|
+
|
37
|
+
{{ roster.items_pagination }}
|
38
|
+
|
39
|
+
<div class="clearfix"></div>
|
40
|
+
{% endpaginate %}
|
41
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div id="product-grid">
|
2
|
+
{% for product in products %}
|
3
|
+
<div class="product">
|
4
|
+
<a class="image" href="{{ product.url }}" style="{% if product.images.size > 0 %}background-image:url({{ product.images.first.v200_url }});{% endif %}">
|
5
|
+
|
6
|
+
</a>
|
7
|
+
<a class="info" href="{{ product.url }}">
|
8
|
+
{{ product.name }} -
|
9
|
+
|
10
|
+
{% assign out_of_stock = true %}
|
11
|
+
|
12
|
+
{% if product.available? %}
|
13
|
+
{% for variation in product.variations %}
|
14
|
+
{% if variation.available? %}
|
15
|
+
{% assign out_of_stock = false %}
|
16
|
+
{% endif %}
|
17
|
+
{% endfor %}
|
18
|
+
|
19
|
+
{% if out_of_stock %}
|
20
|
+
Out of Stock
|
21
|
+
{% else %}
|
22
|
+
{{ product.price_range | money | join: ' - ' }}
|
23
|
+
{% endif %}
|
24
|
+
|
25
|
+
{% elsif product.announced? %}
|
26
|
+
Coming Soon
|
27
|
+
{% elsif product.unavailable? %}
|
28
|
+
Unavailable
|
29
|
+
{% endif %}
|
30
|
+
</a>
|
31
|
+
</div>
|
32
|
+
{% endfor %}
|
33
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
feature 'Limited Run theme kit site preview' do
|
4
|
+
it 'renders a CSS file' do
|
5
|
+
visit '/stylesheets/default.css'
|
6
|
+
|
7
|
+
expect(page.status_code).to eq(200)
|
8
|
+
expect(page).to have_content "#container #main #content .roster-item #product-grid, #container #main #content .roster-item #history"
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'renders the home page with correct title' do
|
12
|
+
visit '/'
|
13
|
+
expect(page).to have_title 'Pinna Records'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'renders products on the home page' do
|
17
|
+
visit '/'
|
18
|
+
|
19
|
+
expect(page).to have_css('#product-grid .product', count: 1)
|
20
|
+
expect(page).to have_selector('#product-grid .product .info', :text => "Eliane Lust - Entangoed")
|
21
|
+
end
|
22
|
+
end
|