Saved: 2017-11-20 02:30

Torey Heinz committed Nov 20, 2017
commit 9123f4aaa2f722ccef7d5576fdf440e7801d4a54
Showing 15 changed files with 85 additions and 114 deletions
app/views/pages/index.liquid +0 -1
@@ @@ -93,7 +93,6 @@ is_layout: false
<img src="{{ product.image.url | resize: '200x200#' }}">
<div class="title card-divider" data-equalizer-watch>
<p class="lead">{{ product.title }}</p>
- {% path_to product %}
</div>
</div>
</div>
app/views/pages/layouts/application.liquid +2 -1
@@ @@ -47,6 +47,7 @@ is_layout: true
</li>
{% endif %}
{% endfor %}
+ {% include 'header-products-menu' %}
</ul>
</div>
</div>
@@ @@ -87,7 +88,7 @@ is_layout: true
{% include 'footer-menu-block' with slug: 'materials' %}
</div>
<div class="column medium-3">
- {% include 'footer-menu-block' with slug: 'products' %}
+ {% include 'footer-products-menu' %}
</div>
</div>
<p class="text-center">Copyright © 2012, Choice Castings Inc. All rights reserved.</p>
app/views/pages/products.liquid +32 -10
@@ @@ -1,16 +1,38 @@
---
- title: Products
+ title: InStock Items
slug: products
- position: 5
- listed: true
+ position: 10
+ listed: false
published: true
is_layout: false
- seo_title: Products
+ seo_title: InStock Items
editable_elements:
- main/content: '<h4>Stock Items</h4><div><strong><ul><li><strong><a href="http://choicecastings.com">NEST
- CAPS</a></strong></li></ul><p></p><ul><li><strong><a href="http://choicecastings.com">WING
- NUTS</a></strong></li></ul><p></p><ul><li><strong><a href="http://choicecastings.com"
- title="Link: http://choicecastings.com">HAND WHEELS</a></strong></li></ul><p></p><ul><li><strong><a
- href="http://choicecastings.com">SPIKE GRIDS</a></strong><br></li></ul></strong></div>'
+ main/content: "<h1>InStock Items</h1>"
---
- {% extends "layouts/application" %}
\ No newline at end of file
+ {% extends "layouts/application" %}
+ {% block main %}
+ <div class="row">
+ <div class="column content page">
+ <h1>{% editable_text "heading", line_break: false, format: 'raw', rows: 1 %}{% endeditable_text %}</h1>
+ {% editable_text content %}Lorem ipsum{% endeditable_text %}
+ <div class="rowexpanded">
+ <div class="row wide small-up-2 large-up-4 text-center gutter-small">
+ {% editable_model products %}
+ {% for product in contents.products %}
+ <div class="column">
+ <div class="card clickable" data-url="{% path_to product %}">
+ <img src="{{ product.image.url | resize: '200x200#' }}">
+ <div class="title card-divider" data-equalizer-watch>
+ <p class="lead">{{ product.title }}</p>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ {% endeditable_model %}
+ </div>
+ </div>
+ </div>
+ </div>
+ {% endblock %}
+
+
app/views/pages/products/content_type_template.liquid +14 -0
@@ @@ -0,0 +1,14 @@
+ ---
+ title: Product template page
+ content_type: products
+ ---
+ {% extends 'layouts/application' %}
+ {% block main %}
+ <div class="row">
+ <div class="column content page">
+ <h1>{{ product.title }}</h1>
+ <img src="{{ product.image.url | resize: '200x200#' }}" alt="{{ product.title }}" class="shadow float-left">
+ {{ product.description }}
+ </div>
+ </div>
+ {% endblock %}
app/views/pages/products/hand-wheels.liquid +0 -19
@@ @@ -1,19 +0,0 @@
- ---
- title: Hand Wheels
- slug: hand-wheels
- position: 2
- listed: true
- published: true
- is_layout: false
- seo_title: Hand Wheels
- editable_elements:
- main/content: "<h4>Hand Wheels</h4>\r\n<p>We produce a number of different size
- Handwheels. 50 piece minimum. Zinc plated (yellow or silver) or powder coated.
- \ Click on the requested type for available sizes.<br></p><p>&nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp;<img title=\"16045412-18847765-thumbna...\" alt=\"undefined\"
- src=\"/samples/assets/16045412-18847765-thumbnail.jpg\">&nbsp; &nbsp;&nbsp;<img
- title=\"16045412-18847775-thumbna...\" alt=\"undefined\" src=\"/samples/assets/16045412-18847775-thumbnail.jpg\">&nbsp;
- &nbsp;&nbsp;<img title=\"16045412-18847783-thumbna...\" alt=\"undefined\" src=\"/samples/assets/16045412-18847783-thumbnail.jpg\"><br></p>"
- ---
- {% extends "layouts/application" %}
\ No newline at end of file
app/views/pages/products/nest-caps.liquid +0 -16
@@ @@ -1,16 +0,0 @@
- ---
- title: Nest Caps
- slug: nest-caps
- position: 0
- listed: true
- published: true
- is_layout: false
- seo_title: Nest Caps
- editable_elements:
- main/content: <h4>Nest Caps</h4><p><img class="wysiwyg-float-right" title="stock-items-nested-caps3.jpg"
- alt="undefined" src="/samples/assets/stock-items-nested-caps3.jpg"></p><p>Nest
- Caps / Stacking Caps in Inventory&nbsp; &nbsp;<br><br>Forging equivalents - Cast
- Steel.<br><br>2" or 2½" square tubing.<br><br>Wholesale or samples. <a href="http://choicecastings.com">Available
- locally in Michigan.</a><br></p>
- ---
- {% extends "layouts/application" %}
\ No newline at end of file
app/views/pages/products/spike-grids.liquid +0 -29
@@ @@ -1,29 +0,0 @@
- ---
- title: Spike Grids
- slug: spike-grids
- position: 3
- listed: true
- published: true
- is_layout: false
- seo_title: Spike Grids
- editable_elements:
- main/content: <h4>Toothed Connectors Grids for Timber Constructions</h4><p>We produce
- and stock spiked connectors commonly used in timber construction, also known as
- timber connectors, spike grids, toothed connectors. Zinc plated or unplated.<br><br>Due
- to our precision and fine sand in our sand casting process, our malleable iron
- parts weigh far less than those from our competitors - while meeting the same
- standards!<br><br>Available Sizes are 50mm, 65mm, 80mm, 95mm and 115 mm, one-sided
- and both sided, small and large holes, details can be seen <a href="http://choicecastings.com">here</a>.<br><br>&nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img
- title="16045412-18847463-thumbna..." alt="undefined" src="/samples/assets/16045412-18847463-thumbnail.jpg">&nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img
- title="16045412-18847480-thumbna..." alt="undefined" src="/samples/assets/16045412-18847480-thumbnail.jpg">&nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp;One-Sided Wood Connector&nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- &nbsp; &nbsp; Two-Sided Wood Connector<br></p>
- ---
- {% extends "layouts/application" %}
\ No newline at end of file
app/views/pages/products/wing-nuts.liquid +0 -22
@@ @@ -1,22 +0,0 @@
- ---
- title: Wing Nuts
- slug: wing-nuts
- position: 1
- listed: true
- published: true
- is_layout: false
- seo_title: Wing Nuts
- editable_elements:
- main/content: "<h4>Wing Nuts</h4>\r\n<p class=\"wysiwyg-text-align-right\"><img
- class=\"wysiwyg-float-right\" title=\"IMG_0782.jpg\" alt=\"undefined\" src=\"/samples/assets/IMG_0782.jpg\"></p><p
- class=\"wysiwyg-text-align-center\">NEW!!! We now also carry wing screws to match
- the larger brass wing nuts (see picture below). 1\" wing span and thread length
- of 5/8\". Thread type 832.<br><br> <br><br>We continue to carry a variety of
- wing nuts, wing screws and custom hardware for your purchase. We stock 832 threaded
- wing nuts in malleable (without zinc plating) and in brass with a wing span of
- 3/4\".<br><br><br><br> <br><br><br><br> <br><br>&nbsp; &nbsp; &nbsp;<img title=\"16045412-18847650-thumbna...\"
- alt=\"undefined\" src=\"/samples/assets/16045412-18847650-thumbnail.jpg\">&nbsp;Zinc
- Plated Cast Iron Wing Nut and Wing Screw&nbsp;<img title=\"16045412-18847569-thumbna...\"
- alt=\"undefined\" src=\"/samples/assets/16045412-18847569-thumbnail.jpg\"><br></p>"
- ---
- {% extends "layouts/application" %}
\ No newline at end of file
app/views/products/content_type_template.liquid +0 -10
@@ @@ -1,10 +0,0 @@
- ---
- title: Product template page
- content_type: products
- ---
- {% extends 'layouts/application' %}
- {% block main %}
- <h1>{{ product.title }}</h1>
- <img src="{{ product.image.url | resize: '200x200#' }}" alt="{{ product.title }}" class="float-left">
- <p>{{ event.description }}</p>
- {% endblock %}
app/views/snippets/footer-products-menu.liquid +10 -0
@@ @@ -0,0 +1,10 @@
+ <ul class="menu vertical">
+ <li>
+ <a href="/products">Products</a>
+ <ul class="nested vertical menu">
+ {% for product in contents.products %}
+ <li>{% link_to product %}</li>
+ {% endfor %}
+ </ul>
+ </li>
+ </ul>
app/views/snippets/header-products-menu.liquid +8 -0
@@ @@ -0,0 +1,8 @@
+ <li>
+ <a href="/products">Products</a>
+ <ul class="menu">
+ {% for product in contents.products %}
+ <li>{% link_to product %}</li>
+ {% endfor %}
+ </ul>
+ </li>
log/server.log +4 -0
@@ @@ -60,3 +60,7 @@ I, [2017-11-19T21:24:49.939205 #28682] INFO -- : Listening on 0.0.0.0:3000, CTR
I, [2017-11-20T02:30:13.204235 #30005] INFO -- : Thin web server (v1.6.4 codename Gob Bluth)
I, [2017-11-20T02:30:13.204324 #30005] INFO -- : Maximum connections set to 1024
I, [2017-11-20T02:30:13.204352 #30005] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop
+ I, [2017-11-20T02:40:25.651006 #30005] INFO -- : Waiting for 1 connection(s) to finish, can take up to 30 sec, CTRL+C to stop now
+ I, [2017-11-20T02:40:27.904300 #30332] INFO -- : Thin web server (v1.6.4 codename Gob Bluth)
+ I, [2017-11-20T02:40:27.904379 #30332] INFO -- : Maximum connections set to 1024
+ I, [2017-11-20T02:40:27.904397 #30332] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop
public/javascripts/app.js +6 -0
@@ @@ -1,4 +1,5 @@
// require clickable
+
$(document).foundation();
// $(".top-bar").sticky({zIndex:10});
@@ @@ -16,3 +17,8 @@ function nextSlide() {
currentSlide = (currentSlide+1)%slides.length;
slides[currentSlide].className = 'slide showing';
}
+
+ $(document).on('click', '.clickable', function() {
+ window.location.href = $(this).data('url');
+ return false;
+ });
public/javascripts/clickable.coffee +0 -6
@@ @@ -1,6 +0,0 @@
- ready = ->
- $(document).on 'click', '.clickable', ->
- window.location.href = $(this).data('url')
- return false
-
- $(document).on('ready', ready);
public/stylesheets/app.scss +9 -0
@@ @@ -180,6 +180,15 @@ body.index {
cursor: pointer;
}
+ img.shadow {
+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
+ }
+
+ img.float-left {
+ margin-right: rem-calc(10);
+ margin-bottom: rem-calc(10);
+ }
+
footer {
padding-top: rem-calc(10);
background: $topbar-background;