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.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +41 -0
  7. data/Rakefile +11 -0
  8. data/bin/limitedrun-themekit +7 -0
  9. data/lib/limitedrun-themekit.rb +10 -0
  10. data/lib/limitedrun-themekit/config.rb +23 -0
  11. data/lib/limitedrun-themekit/renderer.rb +88 -0
  12. data/lib/limitedrun-themekit/server.rb +70 -0
  13. data/lib/limitedrun-themekit/version.rb +5 -0
  14. data/lib/liquid/filters.rb +57 -0
  15. data/lib/liquid/tags/captcha.rb +20 -0
  16. data/lib/liquid/tags/contact_form.rb +16 -0
  17. data/lib/liquid/tags/lr_include.rb +143 -0
  18. data/lib/liquid/tags/paginate.rb +16 -0
  19. data/limitedrun-themekit.gemspec +29 -0
  20. data/spec/assets/skeleton-theme/README.md +11 -0
  21. data/spec/assets/skeleton-theme/configs/default.json +314 -0
  22. data/spec/assets/skeleton-theme/javascripts/default.js +0 -0
  23. data/spec/assets/skeleton-theme/layouts/default.html +150 -0
  24. data/spec/assets/skeleton-theme/store.json +101 -0
  25. data/spec/assets/skeleton-theme/stylesheets/default.css +888 -0
  26. data/spec/assets/skeleton-theme/templates/404.html +3 -0
  27. data/spec/assets/skeleton-theme/templates/category.html +37 -0
  28. data/spec/assets/skeleton-theme/templates/contact.html +62 -0
  29. data/spec/assets/skeleton-theme/templates/event.html +121 -0
  30. data/spec/assets/skeleton-theme/templates/events.html +43 -0
  31. data/spec/assets/skeleton-theme/templates/gallery.html +13 -0
  32. data/spec/assets/skeleton-theme/templates/history.html +58 -0
  33. data/spec/assets/skeleton-theme/templates/index.html +37 -0
  34. data/spec/assets/skeleton-theme/templates/maintenance.html +31 -0
  35. data/spec/assets/skeleton-theme/templates/news-item.html +27 -0
  36. data/spec/assets/skeleton-theme/templates/news.html +37 -0
  37. data/spec/assets/skeleton-theme/templates/order.html +119 -0
  38. data/spec/assets/skeleton-theme/templates/product.html +105 -0
  39. data/spec/assets/skeleton-theme/templates/roster-item.html +136 -0
  40. data/spec/assets/skeleton-theme/templates/roster.html +41 -0
  41. data/spec/assets/skeleton-theme/templates/search.html +33 -0
  42. data/spec/features/themekit_spec.rb +22 -0
  43. data/spec/spec_helper.rb +25 -0
  44. metadata +211 -0
@@ -0,0 +1,3 @@
1
+ <h3>Page Not Found (404)</h3>
2
+
3
+ <p>Sorry, we can't find the page you requested. Why not try our <a href="/">homepage</a> instead?</p>
@@ -0,0 +1,37 @@
1
+ <div id="product-grid">
2
+ {% paginate category.products by 30 %}
3
+ {% for product in category.products %}
4
+ <div class="product">
5
+ <a class="image" href="{{ product.url }}" style="{% if product.images.size > 0 %}background-image:url({{ product.images.first.v200_url }});{% endif %}">
6
+ &nbsp;
7
+ </a>
8
+ <a class="info" href="{{ product.url }}">
9
+ {{ product.name }} -
10
+
11
+ {% assign out_of_stock = true %}
12
+
13
+ {% if product.available? %}
14
+ {% for variation in product.variations %}
15
+ {% if variation.available? %}
16
+ {% assign out_of_stock = false %}
17
+ {% endif %}
18
+ {% endfor %}
19
+
20
+ {% if out_of_stock %}
21
+ Out of Stock
22
+ {% else %}
23
+ {{ product.price_range | money | join: ' - ' }}
24
+ {% endif %}
25
+
26
+ {% elsif product.announced? %}
27
+ Coming Soon
28
+ {% elsif product.unavailable? %}
29
+ Unavailable
30
+ {% endif %}
31
+ </a>
32
+ </div>
33
+ {% endfor %}
34
+
35
+ {{ category.products_pagination }}
36
+ {% endpaginate %}
37
+ </div>
@@ -0,0 +1,62 @@
1
+ <div id="contact">
2
+ <h2>{{ store.mailbox.title }}</h2>
3
+
4
+ {% comment %}
5
+ The below if / elsif is important to show the user whether their
6
+ message was successfully received or if there were any errors.
7
+ {% endcomment %}
8
+
9
+ {% if message.received %}
10
+ <p>Thanks, we've received your message!</p>
11
+ {% elsif message.errors %}
12
+ <p>There was a problem sending that message.</p>
13
+
14
+ <ul>
15
+ {% for error in message.errors %}
16
+ <li>{{ error }}.</li>
17
+ {% endfor %}
18
+ </ul>
19
+ {% endif %}
20
+
21
+ {% contact_form %}
22
+ {% comment %}
23
+ The contact_form tag has three required fields:
24
+ * message[name]
25
+ * message[email]
26
+ * message[body]
27
+
28
+ There is also an option field that you can add:
29
+ * message[subject]
30
+ {% endcomment %}
31
+
32
+ <p>
33
+ <label>What's your name?</label><br/>
34
+ <input type="text" name="message[name]" value="{{ message.name }}"/>
35
+ </p>
36
+
37
+ <p>
38
+ <label>What's your email address?</label><br/>
39
+ <input type="text" name="message[email]" value="{{ message.email }}"/>
40
+ </p>
41
+
42
+ <p>
43
+ <textarea name="message[body]">{{ message.body }}</textarea>
44
+ </p>
45
+
46
+ {% comment %}
47
+ The below captcha tag is required for this contact form.
48
+
49
+ The follow themes are available:
50
+ * red
51
+ * white
52
+ * blackglass
53
+ * clean
54
+ {% endcomment %}
55
+
56
+ {% captcha clean %}
57
+
58
+ <p>
59
+ <button type="submit">Send Message</button>
60
+ </p>
61
+ {% endcontact_form %}
62
+ </div>
@@ -0,0 +1,121 @@
1
+ <div id="product">
2
+ <h2>
3
+ {{ event.name }}
4
+
5
+ {% if event.starts_at %}
6
+ <br/>
7
+ <small>
8
+ {{ event.starts_at | date: "%b" }} {{ event.starts_at | date: "%d" | ordinalize }}, {{ event.starts_at | date: "%Y" }}
9
+ @ {{ event.starts_at | date: "%I:%M %p" }}
10
+ </small>
11
+ {% endif %}
12
+ </h2>
13
+
14
+ <ul id="images">
15
+ {% for image in event.images %}
16
+ <li>
17
+ <a href="{{ image.url }}" target="_blank">
18
+ {% if forloop.first %}
19
+ {{ event.images.first.v200_url | img_tag: 'thumbnail' }}
20
+ {% else %}
21
+ {{ image.v075_url | img_tag: 'thumbnail' }}
22
+ {% endif %}
23
+ </a>
24
+ </li>
25
+ {% endfor %}
26
+ </ul>
27
+
28
+ <div id="body">
29
+ {% if event.venue %}
30
+ {% if config['embed_google_maps_on_event_pages'] %}
31
+ <iframe width="100%" height="200" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="{{ event.venue.maps_url }}&iwloc=near&output=embed"></iframe>
32
+
33
+ <br/><br/>
34
+ {% endif %}
35
+
36
+ <p>
37
+ <strong>{{ event.venue.name }}</strong> (<a href="{{ event.venue.maps_url }}" target="_blank">Map</a>)<br/>
38
+ {{ event.venue.street_address_1 }}<br/>
39
+ {% if event.venue.street_address_2 != '' %}
40
+ {{ event.venue.street_address_2 }}<br/>
41
+ {% endif %}
42
+ {{ event.venue.city }},
43
+ {{ event.venue.state }}
44
+ {{ event.venue.postal_code }}<br/>
45
+ {{ event.venue.country }}
46
+ </p>
47
+
48
+ {% endif %}
49
+
50
+ {% if event.soundcloud_playlist_id %}
51
+ <div id="soundcloud">
52
+ <iframe width="100%" height="300" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F{{ event.soundcloud_playlist_id }}&show_artwork=false&show_play_count=false&color={{ config['soundcloud_player_color'] | replace:'#','' }}"></iframe>
53
+ </div>
54
+ {% endif %}
55
+
56
+ <div id="description">
57
+ {{ event.description | simple_format }}
58
+ </div>
59
+
60
+ <div id="variations">
61
+ {% if event.available? %}
62
+ <p>
63
+ <select id="cart_variation_id">
64
+ {% unless config['supress_select_option'] and event.variations.size == 1 %}
65
+ <option>Select...</option>
66
+ {% endunless %}
67
+ {% for variation in event.variations %}
68
+ {% if variation.available? %}
69
+ <option value="{{ variation.id }}">{{ variation.name }} - {{ variation.price | money }}</option>
70
+ {% else %}
71
+ <option disabled="disabled">{{ variation.name }} - {{ variation.price | money }} (Out of Stock)</option>
72
+ {% endif %}
73
+ {% endfor %}
74
+ </select>
75
+
76
+ <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>
77
+ </p>
78
+ {% elsif event.announced? %}
79
+ <p>Tickets are coming soon.<p>
80
+ {% elsif event.unavailable? %}
81
+ <p>Tickets aren't currently available.<p>
82
+ {% elsif event.unlisted? %}
83
+ <p>This show isn't listed. That means it isn't visible to your customers.<p>
84
+ {% endif %}
85
+ </div>
86
+
87
+ {% if config['display_tweet_button'] or config['display_like_button'] %}
88
+ <ul id="social">
89
+ {% if config['display_tweet_button'] %}
90
+ <li>
91
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ event.name | escape }} at {{ store.name | escape }}" data-count="none">Tweet</a>
92
+ <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>
93
+ </li>
94
+ {% endif %}
95
+ {% if config['display_like_button'] %}
96
+ <li>
97
+ <iframe src="//www.facebook.com/plugins/like.php?href={{ store.url }}{{ event.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>
98
+ </li>
99
+ {% endif %}
100
+ </ul>
101
+ {% endif %}
102
+ </div>
103
+
104
+ <div class="clearfix"></div>
105
+ </div>
106
+
107
+ {% if event.eligible_for_availability_notices? %}
108
+ <div id="availability-request" onclick="javascript:Store.requestNotification('Event', {{ event.id }});">
109
+ {% if event.announced? %}
110
+ Want an email when this<br/>
111
+ becomes available?
112
+ {% else %}
113
+ Looking for something<br/>
114
+ that's out of stock?
115
+ {% endif %}
116
+ </div>
117
+
118
+ <script type="text/javascript">
119
+ window.setTimeout(function() {document.getElementById('availability-request').setAttribute('class', 'reveal');}, 1000);
120
+ </script>
121
+ {% endif %}
@@ -0,0 +1,43 @@
1
+ <div id="product-grid">
2
+ {% paginate store.events by 30 %}
3
+ {% for event in store.events %}
4
+ <div class="product">
5
+ <a class="image" href="{{ event.url }}" style="{% if event.images.size > 0 %}background-image:url({{ event.images.first.v200_url }});{% endif %}">
6
+ &nbsp;
7
+ </a>
8
+ <a class="info" href="{{ event.url }}">
9
+ {% if event.starts_at %}
10
+ {{ event.starts_at | date: "%b" }} {{ event.starts_at | date: "%d" | ordinalize }} -
11
+ {% else %}
12
+ TBA -
13
+ {% endif %}
14
+
15
+ {{ event.name }} -
16
+
17
+ {% assign out_of_stock = true %}
18
+
19
+ {% if event.available? %}
20
+ {% for variation in event.variations %}
21
+ {% if variation.available? %}
22
+ {% assign out_of_stock = false %}
23
+ {% endif %}
24
+ {% endfor %}
25
+
26
+ {% if out_of_stock %}
27
+ Sold Out
28
+ {% else %}
29
+ {{ event.price_range | money | join: ' - ' }}
30
+ {% endif %}
31
+
32
+ {% elsif event.announced? %}
33
+ Coming Soon
34
+ {% elsif event.unavailable? %}
35
+ Unavailable
36
+ {% endif %}
37
+ </a>
38
+ </div>
39
+ {% endfor %}
40
+
41
+ {{ store.events_pagination }}
42
+ {% endpaginate %}
43
+ </div>
@@ -0,0 +1,13 @@
1
+ {% paginate gallery.items by 30 %}
2
+ <div id="gallery">
3
+ {% for item in gallery.items %}
4
+ <div class="gallery-item">
5
+ <a href="{{ item.url }}" style="background-image:url({{ item.v200_url }});">
6
+ &nbsp;
7
+ </a>
8
+ </div>
9
+ {% endfor %}
10
+ </div>
11
+
12
+ {{ gallery.items_pagination }}
13
+ {% endpaginate %}
@@ -0,0 +1,58 @@
1
+ <div id="history">
2
+ {% paginate history.items by 25 %}
3
+ {% for item in history.items %}
4
+ <div class="history-item">
5
+ <ul id="images">
6
+ {% for image in item.images %}
7
+ <li>
8
+ <a href="{{ image.url }}" target="_blank">
9
+ {% if forloop.first %}
10
+ {{ item.images.first.v200_url | img_tag: 'thumbnail' }}
11
+ {% else %}
12
+ {{ image.v075_url | img_tag: 'thumbnail' }}
13
+ {% endif %}
14
+ </a>
15
+ </li>
16
+ {% endfor %}
17
+ </ul>
18
+
19
+ <div id="body">
20
+ <h2>{{ item.name }}</h2>
21
+
22
+ <div id="release-information">
23
+ {% comment %}
24
+ The item.release_information attribute combines three attributes
25
+ into an array that can be passed to the join filter:
26
+ * item.released_on
27
+ * item.released_by
28
+ * item.catalog_number
29
+
30
+ You can use each of the above three separate attributes rather
31
+ than the single release_information attribute.
32
+ {% endcomment %}
33
+
34
+ {{ item.release_information | join: ' &middot; ' }}
35
+ </div>
36
+
37
+ <div id="description">
38
+ {{ item.description | simple_format }}
39
+ </div>
40
+
41
+ <ul>
42
+ {% for link in item.links %}
43
+ <li><a href="{{ link.url }}">{{ link.name }}</a></li>
44
+ {% endfor %}
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="clearfix"></div>
49
+ </div>
50
+ {% endfor %}
51
+
52
+ <div class="clearfix"></div>
53
+
54
+ {{ history.items_pagination }}
55
+
56
+ <div class="clearfix"></div>
57
+ {% endpaginate %}
58
+ </div>
@@ -0,0 +1,37 @@
1
+ <div id="product-grid">
2
+ {% paginate store.products by 30 %}
3
+ {% for product in store.products %}
4
+ <div class="product">
5
+ <a class="image" href="{{ product.url }}" style="{% if product.images.size > 0 %}background-image:url({{ product.images.first.v200_url }});{% endif %}">
6
+ &nbsp;
7
+ </a>
8
+ <a class="info" href="{{ product.url }}">
9
+ {{ product.name }} -
10
+
11
+ {% assign out_of_stock = true %}
12
+
13
+ {% if product.available? %}
14
+ {% for variation in product.variations %}
15
+ {% if variation.available? %}
16
+ {% assign out_of_stock = false %}
17
+ {% endif %}
18
+ {% endfor %}
19
+
20
+ {% if out_of_stock %}
21
+ Out of Stock
22
+ {% else %}
23
+ {{ product.price_range | money | join: ' - ' }}
24
+ {% endif %}
25
+
26
+ {% elsif product.announced? %}
27
+ Coming Soon
28
+ {% elsif product.unavailable? %}
29
+ Unavailable
30
+ {% endif %}
31
+ </a>
32
+ </div>
33
+ {% endfor %}
34
+
35
+ {{ store.products_pagination }}
36
+ {% endpaginate %}
37
+ </div>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Maintenance</title>
6
+
7
+ <style type="text/css" media="screen">
8
+ body {
9
+ background-color: {{ config['background_color'] }};
10
+ color: {{ config['background_font_color'] }};
11
+ padding: 25px;
12
+ }
13
+
14
+ div {
15
+ margin: 115px 0;
16
+ }
17
+
18
+ h1, h2 {
19
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
20
+ font-weight: 200;
21
+ text-align: center;
22
+ }
23
+ </style>
24
+ </head>
25
+ <body>
26
+ <div>
27
+ <h1>Sorry, we aren't open for business.</h1>
28
+ <h2>Please come back soon.</h2>
29
+ </div>
30
+ </body>
31
+ </html>
@@ -0,0 +1,27 @@
1
+ <div id="news">
2
+ <article>
3
+ <header>{{ item | link_to_news_item }}</header>
4
+ <section>
5
+ {{ item.body }}
6
+ </section>
7
+ <footer>
8
+ Posted on {{ item.published_at | date: "%B" }} {{ item.published_at | date: "%d" | ordinalize }}, {{ item.published_at | date: "%Y" }}
9
+
10
+ {% if config['display_news_tweet_button'] or config['display_news_like_button'] %}
11
+ <ul class="social">
12
+ {% if config['display_news_tweet_button'] %}
13
+ <li>
14
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ item.title | escape }} at {{ store.name | escape }}" data-url="{{ store.url }}{{ item.url }}" data-count="none">Tweet</a>
15
+ <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>
16
+ </li>
17
+ {% endif %}
18
+ {% if config['display_news_like_button'] %}
19
+ <li>
20
+ <iframe src="//www.facebook.com/plugins/like.php?href={{ store.url }}{{ item.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>
21
+ </li>
22
+ {% endif %}
23
+ </ul>
24
+ {% endif %}
25
+ </footer>
26
+ </article>
27
+ </div>
@@ -0,0 +1,37 @@
1
+ <div id="news">
2
+ {% paginate news.items by 5 %}
3
+ {% for item in news.items %}
4
+ <article>
5
+ <header>{{ item | link_to_news_item }}</header>
6
+ <section>
7
+ {{ item.body }}
8
+ </section>
9
+ <footer>
10
+ Posted on {{ item.published_at | date: "%B" }} {{ item.published_at | date: "%d" | ordinalize }}, {{ item.published_at | date: "%Y" }}
11
+
12
+ {% if config['display_news_tweet_button'] or config['display_news_like_button'] %}
13
+ <ul class="social">
14
+ {% if config['display_news_tweet_button'] %}
15
+ <li>
16
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="{{ item.title | escape }} at {{ store.name | escape }}" data-url="{{ store.url }}{{ item.url }}" data-count="none">Tweet</a>
17
+ <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>
18
+ </li>
19
+ {% endif %}
20
+ {% if config['display_news_like_button'] %}
21
+ <li>
22
+ <iframe src="//www.facebook.com/plugins/like.php?href={{ store.url }}{{ item.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>
23
+ </li>
24
+ {% endif %}
25
+ </ul>
26
+ {% endif %}
27
+ </footer>
28
+ </article>
29
+ {% endfor %}
30
+
31
+ <div class="clearfix"></div>
32
+
33
+ {{ news.items_pagination }}
34
+
35
+ <div class="clearfix"></div>
36
+ {% endpaginate %}
37
+ </div>