shopifydev 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/.gitignore +17 -0
  2. data/.pryrc +3 -0
  3. data/.root.shopifydev.yaml.sample +21 -0
  4. data/.ruby-version +1 -0
  5. data/.shopifydev.yaml.sample +7 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +22 -0
  8. data/NEXTSTEPS.md +33 -0
  9. data/README.md +78 -0
  10. data/Rakefile +1 -0
  11. data/bin/shopify_console +15 -0
  12. data/bin/shopifydev +100 -0
  13. data/lib/rails/generators/shopifydev/shops_generator.rb +11 -0
  14. data/lib/rails/generators/shopifydev/templates/shops.rake +5 -0
  15. data/lib/rails/tasks/shops.rake +7 -0
  16. data/lib/shopifydev/asset.rb +58 -0
  17. data/lib/shopifydev/commands.rb +83 -0
  18. data/lib/shopifydev/config.rb +9 -0
  19. data/lib/shopifydev/generators/shop.rb +29 -0
  20. data/lib/shopifydev/generators/templates/Gemfile +10 -0
  21. data/lib/shopifydev/generators/templates/gitignore +1 -0
  22. data/lib/shopifydev/generators/templates/rvmrc +1 -0
  23. data/lib/shopifydev/generators/templates/shopify-tmbundle +21 -0
  24. data/lib/shopifydev/pry/commands.rb +194 -0
  25. data/lib/shopifydev/railtie.rb +11 -0
  26. data/lib/shopifydev/shop.rb +38 -0
  27. data/lib/shopifydev/template.rb +73 -0
  28. data/lib/shopifydev/version.rb +3 -0
  29. data/lib/shopifydev.rb +10 -0
  30. data/shopifydev.gemspec +35 -0
  31. data/spec/shopifydev/config_spec.rb +5 -0
  32. data/spec/shopifydev/generators/shopifydev/shopifydev_generator_spec.rb +5 -0
  33. data/spec/shopifydev/pry/commands_spec.rb +5 -0
  34. data/spec/shopifydev/railtie_spec.rb +5 -0
  35. data/templates/customers/order.liquid +109 -0
  36. data/templates/customers/register.liquid +42 -0
  37. data/templates/page.support.liquid +78 -0
  38. data/templates/page.verbose.liquid +18 -0
  39. data/templates/product.liquid +284 -0
  40. data/templates/search.liquid +63 -0
  41. data/test_driver.rb +31 -0
  42. metadata +275 -0
@@ -0,0 +1,194 @@
1
+ require 'term/ansicolor'
2
+ require 'oj'
3
+ class Color
4
+ if Pry.config.color
5
+ extend Term::ANSIColor
6
+ else
7
+ class << self
8
+ def method_missing
9
+ ''
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ class LocalShopifyApp
16
+ attr_accessor :path
17
+ def initialize(path)
18
+ @path = path
19
+ end
20
+
21
+ def shops
22
+ json = `/bin/bash -l -c "unset BUNDLE_GEMFILE; cd #{path}; bundle exec rake shops 2>/dev/null"`
23
+ json = json.split("----snip----\n").last
24
+ Oj.load json
25
+ end
26
+
27
+ end
28
+
29
+ class ConfigMenu
30
+
31
+ attr_accessor :cfg
32
+
33
+ def initialize(cfg)
34
+ @cfg = cfg
35
+ @menu_choices = [:do_nothing]
36
+ @menu_display = []
37
+ end
38
+ def build
39
+ header("Test Shops")
40
+ cfg[:test_shops].keys.each do |k|
41
+ choice([:test_shops, k], k)
42
+ end
43
+
44
+ header("Local Apps")
45
+ cfg[:apps][:development].each do |k, path|
46
+ choice([:apps, :development, k], path)
47
+ end
48
+
49
+ header("Heroku Apps")
50
+ cfg[:apps][:heroku].each do |k, name|
51
+ choice([:apps, :heroku, k], name)
52
+ end
53
+
54
+ self
55
+ end
56
+
57
+ def print(output)
58
+ output.puts @menu_display.join("\n")
59
+ end
60
+
61
+ def header(label)
62
+ @menu_display << ''
63
+ @menu_display << Color.blue { label }
64
+ end
65
+
66
+ def choice(path, value)
67
+ ix = @menu_choices.length
68
+ @menu_display << Color.yellow{ ix.to_s } + '. ' + value.to_s
69
+ @menu_choices[ix] = path
70
+ end
71
+
72
+ def pick(ix)
73
+ if ix >= @menu_choices.length
74
+ nil
75
+ else
76
+ @menu_choices[ix]
77
+ end
78
+ end
79
+
80
+ def pick_config(ix)
81
+ path = pick(ix)
82
+ return :no_such_config if path.nil?
83
+ result = cfg
84
+ path.each do |x|
85
+ result = result[x]
86
+ end
87
+
88
+ [path, result]
89
+ end
90
+ end
91
+
92
+ shopifydev_command_set = Pry::CommandSet.new do
93
+ create_command "switch" do
94
+ description "switch shops"
95
+
96
+
97
+ # opt is a Slop object, see https://github.com/injekt/slop/blob/master/README.md
98
+ def options(opt)
99
+ end
100
+
101
+ def process
102
+ print_current_shop
103
+
104
+ config_menu = ConfigMenu.new(Shopifydev::Config.config).build
105
+
106
+
107
+
108
+ case true
109
+ when args.empty?
110
+ config_menu.print(output)
111
+ when (args.length == 1)
112
+ ix = args.first.to_i
113
+ path, cfg = config_menu.pick_config(ix)
114
+ if path == :no_such_config
115
+ output.puts Color.red{ "I don't know about #{ix}" }
116
+ config_menu.print(output)
117
+ else
118
+ handle_choice(path, cfg)
119
+ end
120
+ end
121
+ end
122
+
123
+ def print_current_shop
124
+ current_shop = ShopifyAPI::Base.site || 'none'
125
+ output.puts Color.green{ "current shop:"} + " #{current_shop}"
126
+ end
127
+
128
+ def handle_choice(path, cfg)
129
+ case path.first.to_sym
130
+ when :test_shops
131
+ url = "https://#{cfg[:api_key]}:#{cfg[:password]}@#{cfg[:myshopify_domain]}/admin/"
132
+ ShopifyAPI::Base.site = url
133
+ print_current_shop
134
+ when :apps
135
+ case path[1].to_sym
136
+ when :development
137
+ output.puts "you picked #{path.join('.')}"
138
+ output.puts cfg.inspect
139
+ app = LocalShopifyApp.new(cfg)
140
+ output.puts Color.yellow{ app.shops.inspect }
141
+ when :heroku
142
+ output.puts "you picked #{path.join('.')}"
143
+ output.puts cfg.inspect
144
+
145
+ output.puts Color.yellow{ "but it's not ready yet!"}
146
+ else
147
+ output.puts "you picked #{path.join('.')}"
148
+ output.puts cfg.inspect
149
+ output.puts Color.red{ "AND I DON'T EVEN KNOW!"}
150
+ end
151
+ else
152
+ output.puts "you picked #{path.join('.')}"
153
+ output.puts cfg.inspect
154
+ output.puts Color.red{ "AND I DON'T EVEN KNOW!"}
155
+ end
156
+ end
157
+
158
+
159
+ def output_menu_choices(arr, ix=1)
160
+ my_ix = 0
161
+ arr.each do |item|
162
+ output.puts menu_choice(ix+my_ix, item.to_s)
163
+ my_ix +=1
164
+ end
165
+ my_ix
166
+ end
167
+
168
+ def menu_choice(ix, s)
169
+ Color.yellow{ ix.to_s } + '. ' + s.to_s
170
+ end
171
+
172
+ def menu_header(s)
173
+ Color.blue { s }
174
+ end
175
+
176
+ def write_menu(cfg)
177
+ ix = 1
178
+ # output.puts "Test Shops"
179
+ output.puts menu_header("Test Shops")
180
+ ix += output_menu_choices(cfg[:test_shops].keys.sort, ix)
181
+
182
+ output.puts
183
+ output.puts menu_header("Local Apps")
184
+ ix += output_menu_choices(cfg[:apps][:development].keys.sort, ix)
185
+
186
+ output.puts
187
+ output.puts menu_header("Heroku Apps")
188
+ ix += output_menu_choices(cfg[:apps][:heroku].keys.sort, ix)
189
+ end
190
+ end
191
+
192
+ end
193
+
194
+ Pry::Commands.import shopifydev_command_set
@@ -0,0 +1,11 @@
1
+ require 'rails/railtie'
2
+ require 'shopifydev'
3
+ module Shopifydev
4
+ class Railtie < Rails::Railtie
5
+ railtie_name :shopifydev
6
+
7
+ rake_tasks do
8
+ load "rails/tasks/shops.rake"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,38 @@
1
+ require "logger"
2
+ require "shopify_api"
3
+
4
+ module Shopifydev
5
+ class Shop
6
+ attr_accessor :credentials, :logger, :project_root
7
+
8
+ def initialize(credentials)
9
+ @credentials = credentials
10
+ @logger = Logger.new(STDOUT)
11
+
12
+ ShopifyAPI::Base.site = "https://" +
13
+ credentials['api_key'] + ':' +
14
+ credentials['password'] + '@' +
15
+ credentials['url'] + '/admin'
16
+ logger.debug("set shopify site to #{ShopifyAPI::Base.site}")
17
+ end
18
+
19
+ def project_root
20
+ @project_root ||= ENV['PATCHIFY_ROOT'] || begin
21
+ if credentials['project_root_variable']
22
+ ENV[credentials['project_root_variable']] || credentials['project_root']
23
+ else
24
+ credentials['project_root']
25
+ end
26
+ end
27
+ end
28
+
29
+ def template
30
+ @template ||= Template.new(self, project_root)
31
+ end
32
+
33
+ def asset(path)
34
+ Asset.new(self, path, project_root)
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,73 @@
1
+ require 'pathname'
2
+ require 'fileutils'
3
+
4
+ module Shopifydev
5
+ class Template
6
+
7
+ attr_accessor :shop, :project_root
8
+
9
+ def initialize(shop, project_root)
10
+ @shop = shop
11
+ @project_root = project_root
12
+ end
13
+
14
+ def download(root=nil)
15
+ root ||= FileUtils.pwd
16
+ shop.logger.info("Downloading all pages from #{shop.credentials['url']}")
17
+
18
+ begin
19
+ response = ShopifyAPI::Asset.find(:all) # get all them assets
20
+ get_list_of_assets(response).each {| key, file | write_local_copy(file) }
21
+ rescue SocketError => e
22
+ puts e.message
23
+ puts "Maybe check your internet connection?"
24
+ rescue NoMethodError => e
25
+ puts e.message
26
+ rescue ActiveResource::UnauthorizedAccess => e
27
+ puts e.message
28
+ puts "Make sure you have the right password set in .shopifydev.yaml"
29
+ rescue Exception => e
30
+ puts e.message
31
+ end
32
+ end
33
+
34
+ def write_local_copy(file)
35
+
36
+ directory_path = Pathname.new(@project_root +
37
+ File::Separator +
38
+ file.dirname.to_path)
39
+
40
+ directory_path.mkpath unless (directory_path.exist?)
41
+
42
+ begin
43
+ puts "downloading #{file.basename}"
44
+ asset = get_asset(file.to_path)
45
+ rescue SocketError => e
46
+ puts e.message
47
+ puts "The connection was interupted while downloading #{file.to_path}."
48
+ end
49
+
50
+ # TODO maybe this should compare timestamps?
51
+ File.open((directory_path.realdirpath + file.basename).to_path, 'w') do |f|
52
+ puts "writing #{directory_path.to_path + File::Separator + file.basename.to_path}"
53
+ f.write(asset.value)
54
+ puts "---"
55
+ end
56
+ end
57
+
58
+ def get_list_of_assets(response)
59
+ response.reverse.inject({}) do | list, asset_info |
60
+ pathname = Pathname.new(asset_info.attributes["key"])
61
+ path = pathname.to_path
62
+
63
+ list[path] = pathname unless list.keys.include?(path + '.liquid')
64
+ list
65
+ end
66
+ end
67
+
68
+ def get_asset(key)
69
+ ShopifyAPI::Asset.find(key)
70
+ end
71
+
72
+ end
73
+ end
@@ -0,0 +1,3 @@
1
+ module Shopifydev
2
+ VERSION = "0.0.1"
3
+ end
data/lib/shopifydev.rb ADDED
@@ -0,0 +1,10 @@
1
+ require_relative "shopifydev/version"
2
+ require_relative "shopifydev/config"
3
+ require_relative "shopifydev/shop"
4
+ require_relative "shopifydev/template"
5
+ require_relative "shopifydev/asset"
6
+ require_relative "shopifydev/commands"
7
+ require_relative "shopifydev/railtie" if defined?(Rails)
8
+
9
+ module Shopifydev
10
+ end
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'shopifydev/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "shopifydev"
8
+ gem.version = Shopifydev::VERSION
9
+ gem.authors = ["Michael Johnston"]
10
+ gem.email = ["lastobelus@mac.com"]
11
+ gem.description = %q{Tools for using SCM with shopify.}
12
+ gem.summary = %q{Abstract out and port to ruby the functionality of the shopify textmate bundle for use in other editors.}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency "shopify_api", ">= 3.0.0"
21
+ gem.add_dependency "ruby-filemagic", ">= 0.4.2"
22
+ gem.add_dependency "gli", ">= 2.5.2"
23
+
24
+ # for console
25
+ gem.add_dependency 'oj'
26
+ gem.add_dependency 'dalli'
27
+ gem.add_dependency 'shydra'
28
+ gem.add_dependency 'pry'
29
+ gem.add_dependency 'activesupport'
30
+ gem.add_dependency 'term-ansicolor'
31
+
32
+ # for generators
33
+ gem.add_dependency 'railties'
34
+ gem.add_development_dependency "rake"
35
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Config" do
4
+ it "needs to have tests written"
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "ShopifydevGenerator" do
4
+ it "needs to have tests written"
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Commands" do
4
+ it "needs to have tests written"
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Railtie" do
4
+ it "needs to have tests written"
5
+ end
@@ -0,0 +1,109 @@
1
+ {% layout settings.customer_layout %}
2
+
3
+ <div id="admin_header">
4
+ <h2 class="title">Order {{ order.name }}</h2>
5
+ </div>
6
+
7
+ {% if order.cancelled %}
8
+ <div id="order_cancelled" class="flash notice">
9
+ <h5 id="order_cancelled_title">Order Cancelled <span class="note">on {{ order.cancelled_at | date: "%B %d, %Y %I:%M%p" }}</span></h5>
10
+ <span class="note">{{ order.cancel_reason }}</span>
11
+ </div>
12
+ {% endif %}
13
+
14
+ <div class="note order_date">Placed on {{ order.created_at | date: "%B %d, %Y %I:%M%p" }}</div>
15
+
16
+ <div id="order_address" class="group">
17
+ <div id="order_payment">
18
+ <h3>Billing Address</h3>
19
+ <p><span class="note">Payment Status:</span> <span class="status_{{ order.financial_status }}">{{ order.financial_status }}</span></p>
20
+ <div class="address note">
21
+ <p>{{ order.billing_address.name }}</p>
22
+ <p>{{ order.billing_address.company }}</p>
23
+ <p>{{ order.billing_address.street }}</p>
24
+ <p>{{ order.billing_address.city }}, {{ order.billing_address.province }}</p>
25
+ <p>{{ order.billing_address.country }} {{ order.billing_address.zip }}</p>
26
+ <p>{{ order.billing_address.phone }}</p>
27
+ </div>
28
+ </div>
29
+ {% if order.shipping_address %}
30
+ <div id="order_shipping">
31
+ <h3>Shipping Address</h3>
32
+ <p><span class="note">Fulfillment Status:</span> <span class="status_{{ order.fulfillment_status }}">{{ order.fulfillment_status }}</span></p>
33
+ <div class="address note">
34
+ <p>{{ order.shipping_address.name }}</p>
35
+ <p>{{ order.shipping_address.company }}</p>
36
+ <p>{{ order.shipping_address.street }}</p>
37
+ <p>{{ order.shipping_address.city }}, {{ order.shipping_address.province }}</p>
38
+ <p>{{ order.shipping_address.country }} {{ order.shipping_address.zip }}</p>
39
+ <p>{{ order.shipping_address.phone }}</p>
40
+ </div>
41
+ </div>
42
+ {% endif %}
43
+ </div>
44
+
45
+ <table id="order_details">
46
+ <thead>
47
+ <tr id="cart-heading">
48
+ <th class="cart-header first" id="product"><h3>Product</h3></th>
49
+ <th class="cart-header first" id="sku"><h3>SKU</h3></th>
50
+ <th class="cart-header first" id="price"><h3>Price</h3></th>
51
+ <th class="cart-header first" id="quantity"><h3>Quantity</h3></th>
52
+ <th class="cart-header first" id="total"><h3>Total</h3></th>
53
+ </tr>
54
+ </thead>
55
+ <tbody>
56
+ {% for line_item in order.line_items %}
57
+ <tr id="{{ line_item.id }}" class="order cart-item {% cycle 'odd', 'even' %}">
58
+ <td class="product">
59
+ {{ line_item.title | link_to: line_item.product.url }}
60
+ {% if line_item.fulfillment %}
61
+ <div class="note">
62
+ Fulfilled {{ line_item.fulfillment.created_at | date: "%b %d" }}
63
+ {% if line_item.fulfillment.tracking_number %}
64
+ <a href="{{ line_item.fulfillment.tracking_url }}">{{ line_item.fulfillment.tracking_company }} #{{ line_item.fulfillment.tracking_number}}</a>
65
+ {% endif %}
66
+ </div>
67
+ {% endif %}
68
+ </td>
69
+ <td class="sku note">{{ line_item.sku }}</td>
70
+ <td class="money">{{ line_item.price | money }}</td>
71
+ <td class="quantity cente">{{ line_item.quantity }}</td>
72
+ <td class="total money">{{ line_item.quantity | times: line_item.price | money }}</td>
73
+ </tr>
74
+ {% endfor %}
75
+ </tbody>
76
+ <tfoot>
77
+ <tr class="order_summary note">
78
+ <td class="label" colspan="4">Subtotal:</td>
79
+ <td class="total money">{{ order.subtotal_price | money }}</td>
80
+ </tr>
81
+
82
+ {% for discount in order.discounts %}
83
+ <tr class="order_summary discount">
84
+ <td class="label" colspan="4">{{ discount.code }} Discount:</td>
85
+ <td class="total money">{{ discount.savings | money }}</td>
86
+ </tr>
87
+ {% endfor %}
88
+
89
+ {% for shipping_method in order.shipping_methods %}
90
+ <tr class="order_summary note">
91
+ <td class="label" colspan="4">Shipping ({{ shipping_method.title }}):</td>
92
+ <td class="total money">{{ shipping_method.price | money }}</td>
93
+ </tr>
94
+ {% endfor %}
95
+
96
+ {% for tax_line in order.tax_lines %}
97
+ <tr class="order_summary note">
98
+ <td class="label" colspan="4">Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%):</td>
99
+ <td class="total money">{{ tax_line.price | money }}</td>
100
+ </tr>
101
+ {% endfor %}
102
+
103
+ <tr class="order_summary order_total">
104
+ <td class="label" colspan="4">Total:</td>
105
+ <td class="total money">{{ order.total_price | money }} {{ order.currency }}</td>
106
+ </tr>
107
+ </tfoot>
108
+ </table>
109
+
@@ -0,0 +1,42 @@
1
+ {% layout settings.customer_layout %}
2
+
3
+ <div id="template">
4
+ <div id="customer">
5
+ <!-- Create Customer -->
6
+ <div id="create-customer">
7
+ <div class="template_header">
8
+ <h2 class="title">Create Account</h2>
9
+ </div>
10
+
11
+ {% form 'create_customer' %}
12
+ {{ form.errors | default_errors }}
13
+
14
+ <div id="first_name" class="clearfix large_form">
15
+ <label for="first_name" class="login">First Name</label>
16
+ <input type="text" value="" name="customer[first_name]" id="first_name" class="large" size="30" />
17
+ </div>
18
+
19
+ <div id="last_name" class="clearfix large_form">
20
+ <label for="last_name" class="login">Last Name</label>
21
+ <input type="text" value="" name="customer[last_name]" id="last_name" class="large" size="30" />
22
+ </div>
23
+
24
+ <div id="email" class="clearfix large_form">
25
+ <label for="email" class="login">Email Address</label>
26
+ <input type="email" value="" name="customer[email]" id="email" class="large" size="30" />
27
+ </div>
28
+
29
+ <div id="password" class="clearfix large_form">
30
+ <label for="password" class="login">Password</label>
31
+ <input type="password" value="" name="customer[password]" id="password" class="large password" size="30" />
32
+ </div>
33
+
34
+ <div class="action_bottom">
35
+ <input class="btn" type="submit" value="Create" />
36
+ <span class="note"> {{ 'Login' | customer_login_link }}</span>
37
+ <span class="note">or <a href="{{ shop.url }}">Return to Store</a></span>
38
+ </div>
39
+ {% endform %}
40
+ </div><!-- /#create-customer -->
41
+ </div>
42
+ </div>
@@ -0,0 +1,78 @@
1
+
2
+
3
+
4
+
5
+ <div id="page" class="clearfix">
6
+
7
+ <div id="header">
8
+ <div class="wrapper">
9
+ <p><h1>{{ page.title }}</h1></p>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="content">
14
+ <div class="wrapper">
15
+
16
+ <div id="contact-menu">
17
+ {% for link in linklists['footer-support'].links %}
18
+ {% if link.title == page.title %}
19
+ <p><a href="{{ link.url }}" id="active"><h4>{{ link.title }}</h4></a></p>
20
+ {% else %}
21
+ <p><a href="{{ link.url }}"><h4>{{ link.title }}</h4></a></p>
22
+ {% endif %}
23
+ {% endfor %}
24
+ </div>
25
+
26
+ <div id="contact-form">
27
+
28
+ {% if page.title == "Contact" %}
29
+
30
+ {% form 'contact' %}
31
+
32
+ {% if form.posted_successfully? %}
33
+ Thanks for contacting us! We'll get back to you as soon as possible.
34
+ {% endif %}
35
+
36
+ {% if form.errors %}
37
+ {% for field in form.errors %}
38
+ <div>
39
+ <p id="error_message">{{ field }} - {{ form.errors.messages[field] }}</p>
40
+ </div>
41
+ {% endfor %}
42
+ {% endif %}
43
+
44
+ <div id="getintouch" style="float:left">
45
+ <h3>Get In Touch</h3>
46
+ <hr>
47
+ <small>* indicates a required field</small><br>
48
+ <input type="text" value="Full Name" name="contact[name]"> <br>
49
+ <input type="text" value="Email Address" name="contact[email]"> <span class="required">&nbsp;*</span> <br>
50
+ <textarea cols="38" rows="5" type="text" name="contact[message]">your message</textarea>
51
+ <input type="image" src="{{ 'getintouch.png' | asset_url }}" class="submit">
52
+ </div>
53
+ {% endform %}
54
+
55
+
56
+ <div id="contact-info">
57
+ <h3>Visit Our Store</h3>
58
+ <hr>
59
+ <p>Suite A - 123 Something Street <br>
60
+ Vancouver, BC Postal Code <br>
61
+ Canada</p>
62
+ </div>
63
+
64
+ <div id="contact-info">
65
+ <h3>Customer Support</h3>
66
+ <hr>
67
+ <p>(800)123-1234 <br>
68
+ support@elroy.com</p>
69
+ </div>
70
+ {% else %}
71
+ {{ page.content }}
72
+ {% endif %}
73
+
74
+ </div>
75
+
76
+ </div>
77
+ </div>
78
+ </div> <!-- /#page -->
@@ -0,0 +1,18 @@
1
+ <div id="page" class="clearfix">
2
+
3
+ <div id="header">
4
+ <div class="wrapper">
5
+ <p><h1>{{ page.title }}</h1></p>
6
+ </div>
7
+ </div>
8
+
9
+ <div class="content">
10
+ <div class="wrapper">
11
+
12
+ <div id="contact-form">
13
+ {{ page.content }}
14
+ </div>
15
+
16
+ </div>
17
+ </div>
18
+ </div> <!-- /#page -->