Adds Services dropdown to menu

Torey Heinz committed Mar 29, 2018
commit c7041b84cbd8e72d9b3050ef0f1ea6cfedce6dae
Showing 4 changed files with 30 additions and 27 deletions
app/views/pages/services.liquid +17 -23
@@ @@ -1,32 +1,26 @@
---
title: Services
+ handle: services
+ slug: services
+ listed: false
+ published: true
+ is_layout: false
+ editable_elements:
+ "main/heading": "We can wait to get started on your project!"
+ "main/content": "When you're ready move forward with you project, this is the place to start. The more information you can give use here, the sooner we can get you an estimate. <p class='lead'>Complete the form below to get a free Estimate.</p>"
---
{% extends 'layouts/application' %}
{% block 'main' %}
- {{ 'foundation6/motion.min.css' | stylesheet_tag }}
- <div class="orbit" role="region" aria-label="Favorite Space Pictures" data-orbit data-box-of-bullets="orbit-nav">
- <div class="orbit-wrapper">
- <div class="orbit-controls">
- <button class="orbit-previous"><span class="show-for-sr">Previous Slide</span>&#9664;&#xFE0E;</button>
- <button class="orbit-next"><span class="show-for-sr">Next Slide</span>&#9654;&#xFE0E;</button>
+ {% include 'page_header' %}
+ <section class="row page {{ page.slug }}">
+ <div class="column medium-8 small-centered">
+ <div class="callout">
+ <h2 class="text-center">{% editable_text "heading", line_break: false, format: 'raw', rows: 1 %}Heading{% endeditable_text %}</h2>
+ {% editable_text content %}Lorem ipsum{% endeditable_text %}
</div>
- <ul class="orbit-container">
- {% for service in contents.services %}
- <li class="orbit-slide">
- <figure class="orbit-figure">
- <img class="orbit-image" src="https://placehold.it/1200x600/999?text={{ service.title }}" alt="{{ service.title }}">
- <figcaption class="orbit-caption">{{ service.brief }}</figcaption>
- </figure>
- </li>
- {% endfor %}
- </ul>
</div>
- <nav class="orbit-nav" >
- {% for service in contents.services %}
- <img data-slide="{{ forloop.index0 }}" class="thumbnail" src="{{ service.featured_image.url | resize: '400x225#', optimize: 80 }}">
- {% endfor %}
- </nav>
- </div>
-
+ </section>
+ {% include 'featured-services' %}
+ {% include 'standard-services' %}
{% endblock %}
app/views/pages/services/content_type_template.liquid +1 -1
@@ @@ -31,7 +31,7 @@ content_type: services
{% for image in service.images %}
<div class="column column-block">
<a href="{{ image.file.url | resize: '1200x', optimize: 80 }}">
- <img class="thumbnail" height="400" width="300" src="{{ 'CanvasInnovations-logo.jpg' | theme_image_url | resize: '400x300', optimize: 50 }}" data-src="{{ image.file.url | resize: '400x300#', optimize: 50 }}">
+ <img class="thumbnail" height="400" width="300" src="{{ 'CanvasInnovations-logo.jpg' | theme_image_url | resize: '400x300#', optimize: 50 }}" data-src="{{ image.file.url | resize: '400x300#', optimize: 50 }}">
</a>
</div>
{% endfor %}
app/views/snippets/dropdown-menu.liquid +10 -1
@@ @@ -1,5 +1,14 @@
- <ul class="dropdown menu vertical medium-horizontal" data-dropdown-menu data-alignment="left">
+ <ul id="top-nav" class="menu vertical medium-horizontal" data-responsive-menu="accordion medium-dropdown" data-alignment="left" data-click-open=false>
<li><a href="/">Home</a></li>
+ <li>
+ {% link_to 'services' %}
+ <ul class="menu">
+ {% for service in contents.services %}
+ <li>{% link_to service %}</li>
+ {% endfor %}
+ </ul>
+ </li>
+
{% for page in site.pages %}
{% if page.depth == 1 and page.listed? %}
<li>
public/javascripts/app.js +2 -2
@@ @@ -6,8 +6,8 @@
$(document).foundation();
// $(".top-bar").sticky({zIndex:10});
- $('nav#top-nav > ul').addClass('dropdown menu')
- $('nav#top-nav > ul ul').addClass('menu')
+ // $('nav#top-nav > ul').addClass('dropdown menu')
+ // $('nav#top-nav > ul ul').addClass('menu')
$('header[data-background-url]').each(function() {
$(this).css('background-image', 'url("' + $(this).data('background-url') + '")')