Adds Featured Image and Updates layout
Torey Heinz
committed Jun 15, 2018
commit 1b21d84f16a9f709a6b30f21a477885d95536a76
Showing 6
changed files with
42 additions
and 14 deletions
app/views/pages/layouts/default.liquid
+11
-5
| @@ | @@ -6,6 +6,7 @@ listed: false |
| published: false | |
| is_layout: true | |
| --- | |
| + | {% capture 'featured_image' %}{% editable_file 'featured_image', block: 'main' %}{% endeditable_file %}{% endcapture %} |
| <!doctype html> | |
| <html class="no-js" lang="en"> | |
| <head> | |
| @@ | @@ -52,13 +53,13 @@ is_layout: true |
| </div> | |
| </div> | |
| <div id="main" class="row"> | |
| - | <div class="large-3 column sidebar"> |
| - | <div class="show-for-large"> |
| - | {% link_to site.index %} |
| - | </div> |
| + | <div class="column sidebar"> |
| + | <ul class="vertical menu show-for-large"> |
| + | <li>{% link_to site.index %}</li> |
| + | </ul> |
| {% nav 'site', depth: 2, active_class: 'is-active', id: 'sidebar-nav' %} | |
| </div> | |
| - | <div class="large-9 column"> |
| + | <div class="column content"> |
| <ul class="breadcrumbs"> | |
| {% for item in page.breadcrumbs %} | |
| <li>{% link_to item %}</li> | |
| @@ | @@ -66,6 +67,11 @@ is_layout: true |
| </ul> | |
| <h1>{{ page.title }}</h1> | |
| {% block 'main' %} | |
| + | {% if featured_image != blank %} |
| + | <div class="featured_image"> |
| + | <img class="thumbnail" title="{{ page.title }}" alt="{{ page.title }}" src="{{ featured_image | resize: '400x', optimize: 80 }}"> |
| + | </div> |
| + | {% endif %} |
| {% editable_text "content" %}Hola!{% endeditable_text %} | |
| {% endblock %} | |
| </div> | |
app/views/pages/why-castings.liquid
+2
-1
| @@ | @@ -14,5 +14,6 @@ editable_elements: |
| the technical support resulting in the most effective solution.<br><br>We encourage | |
| you to read up on creative casting developments at Modern Casting, a publication | |
| of the American Foundry Society. | |
| + | main/featured_image: samples/assets/13-70-schlauch.jpg |
| --- | |
| - | {% extends "layouts/default" %} |
| \ No newline at end of file | |
| + | {% extends "layouts/default" %} |
log/server.log
+3
-0
| @@ | @@ -31,3 +31,6 @@ I, [2018-06-12T16:38:12.150389 #5845] INFO -- : Waiting for 3 connection(s) to |
| I, [2018-06-12T16:50:29.542516 #6273] INFO -- : Thin web server (v1.6.4 codename Gob Bluth) | |
| I, [2018-06-12T16:50:29.542908 #6273] INFO -- : Maximum connections set to 1024 | |
| I, [2018-06-12T16:50:29.542974 #6273] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop | |
| + | I, [2018-06-14T22:22:48.056918 #31981] INFO -- : Thin web server (v1.7.2 codename Bachmanity) |
| + | I, [2018-06-14T22:22:48.057070 #31981] INFO -- : Maximum connections set to 1024 |
| + | I, [2018-06-14T22:22:48.057100 #31981] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop |
public/javascripts/app.js
+2
-2
| @@ | @@ -7,5 +7,5 @@ $('nav#sidebar-subnav > ul').addClass('vertical menu') |
| $('nav#top-menu > ul').addClass('menu') | |
| - | var menu = new Foundation.AccordionMenu($('nav#sidebar-nav > ul'), {submenuToggle: true}); |
| - | menu.down($('nav#sidebar-nav li.is-active ul')) |
| + | // var menu = new Foundation.AccordionMenu($('nav#sidebar-nav > ul'), {submenuToggle: true}); |
| + | // menu.down($('nav#sidebar-nav li.is-active ul')) |
public/stylesheets/_settings.scss
+1
-1
| @@ | @@ -365,7 +365,7 @@ $mediaobject-image-width-stacked: 100%; |
| $menu-margin: 0; | |
| $menu-margin-nested: 1rem; | |
| - | $menu-item-padding: 0.7rem 1rem; |
| + | $menu-item-padding: 0.5rem 0.75rem; |
| $menu-icon-spacing: 0.25rem; | |
| $menu-expand-max: 6; | |
public/stylesheets/app.scss
+23
-5
| @@ | @@ -153,6 +153,7 @@ header { |
| .page-wrapper { | |
| max-width: 62.5rem; | |
| margin: auto; | |
| + | margin-bottom: rem-calc(15); |
| box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
| } | |
| @@ | @@ -160,14 +161,31 @@ header { |
| padding-top: rem-calc(5); | |
| padding-bottom: rem-calc(5); | |
| background: #fff; | |
| - | } |
| - | .sidebar { |
| - | // box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); |
| - | box-shadow: 3px 1px 3px -2px rgba(0,0,0,0.12); |
| - | // border-right: 2px solid $primary-color; |
| + | .featured_image { |
| + | float: left; |
| + | margin: 0 rem-calc(8) rem-calc(8) 0; |
| + | |
| + | img { |
| + | border: solid 4px #fefefe; |
| + | box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.2); |
| + | } |
| + | } |
| + | |
| + | .sidebar { |
| + | width: 28%; |
| + | padding: 0; |
| + | box-shadow: 3px 1px 3px -2px rgba(0,0,0,0.12); |
| + | |
| + | } |
| + | |
| + | .content { |
| + | width: 70%; |
| + | |
| + | } |
| } | |
| + | |
| footer { | |
| text-align: center; | |
| background-color: #ECEEEE; | |