Saved: 2018-03-06 18:51

Torey Heinz committed Mar 07, 2018
commit 51320e770a7f32f11b29e31812308be1968bcbc9
Showing 11 changed files with 77 additions and 55 deletions
app/content_types/images.yml +2 -8
@@ @@ -43,12 +43,6 @@ fields:
hint: Explanatory text displayed in the back office
localized: false
- - project:
- label: Project
- type: belongs_to
- class_name: projects
- inverse_of: images
-
- service:
label: Service
type: belongs_to
@@ @@ -65,8 +59,8 @@ fields:
- category:
label: Category
type: select
- required: true
- select_options: ['Before', 'After']
+ required: false
+ select_options: ['Before', 'After', 'Service']
app/content_types/services.yml +0 -12
@@ @@ -56,18 +56,6 @@ fields:
localized: false
# text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor)
- - projects: # The lowercase, underscored name of the field
- label: Projects # Human readable name of the field
- type: many_to_many
- required: false
- hint: What projects included this Service
- localized: false # Define the slug of the target content type (eg. comments)
- class_name: projects
- # Define the name of the field referring to Offering types in the target content type (eg. post)
- inverse_of: services
- # If you want to manage the entries of the relationship directly from the source entry
- ui_enabled: true
-
- images:
label: Images
type: has_many
app/views/pages/about.liquid +1 -4
@@ @@ -5,7 +5,4 @@ listed: true
published: true
is_layout: false
---
- {% extends 'layouts/application' %}
- {% block 'main' %}
-
- {% endblock %}
+ {% extends 'layouts/page' %}
app/views/pages/index.liquid +1 -1
@@ @@ -38,7 +38,7 @@ is_layout: false
</div>
<section class="services standard">
<div class="row small-up-2 medium-up-3 large-up-4">
- {% with_scope featured: nil %} {% for service in contents.services %}
+ {% with_scope featured: false %} {% for service in contents.services %}
<div class="columns medium-4">
<div class="card text-center">
<div class="card-divider">
app/views/pages/layouts/application.liquid +12 -12
@@ @@ -50,8 +50,8 @@ is_layout: true
<footer>
<div class="top row expanded text-center">
- <div class="row text-left">
- <div class="column medium-3">
+ <div class="row">
+ <div class="column medium-4 large-3">
<p class="lead">
Contact us
</p>
@@ @@ -71,30 +71,30 @@ Monday through Friday, <br>
Saturdays by Appointment<br>
</p>
</div>
- <div class="column medium-3">
+ <div class="column medium-4 large-3 hide-for-small-only">
<p class="lead">
Services
</p>
- <ul>
+ <p>
{% for service in contents.services limit:8 %}
- <li><a href="{% path_to service %}">{{ service.title }}</a></li>
+ <a href="{% path_to service %}">{{ service.title }}</a><br>
{% endfor %}
- </ul>
+ </p>
</div>
- <div class="column medium-3">
+ <div class="column medium-4 large-3 hide-for-medium-only hide-for-small-only">
<p class="lead">
Projects
</p>
- <ul>
+ <p>
{% for project in contents.projects limit:8 %}
- <li><a href="{% path_to project %}">{{ project.title }}</a></li>
+ <a href="{% path_to project %}">{{ project.title }}</a><br>
{% endfor %}
- </ul>
+ </p>
</div>
- <div class="column medium-3">
+ <div class="column medium-4 large-3">
<p class="lead">
- Testimonial
+ <a href="/testimonials"><u>Testimonials</u></a>
</p>
{% assign testimonial_number = contents.testimonials.size | random %}
<p>
app/views/pages/layouts/page.liquid +10 -3
@@ @@ -8,10 +8,17 @@ is_layout: true
---
{% extends 'layouts/application' %}
{% block 'main' %}
- <header class="service" data-background-url="{{ service.featured_image.url | resize: '1200x400#' }}">
+ <header class="service" data-background-url="{% editable_file 'banner', resize: '1200x400#' %}/images/header-bg.jpg{% endeditable_file %}">
<div class="content row column text-center">
- <h1>{{ service.title }}</h1>
+ &nbsp;
</div>
</header>
+ <section class="row page {{ page.slug }}">
+ <div class="column medium-8 small-centered">
+ <div class="callout">
+ <h1 class="text-center">{% editable_text "heading", line_break: false, format: 'raw', rows: 1 %}Heading{% endeditable_text %}</h1>
+ {% editable_text content %}Lorem ipsum{% endeditable_text %}
+ </div>
+ </div>
+ </section>
{% endblock %}
-
app/views/pages/testimonials.liquid +31 -0
@@ @@ -0,0 +1,31 @@
+ ---
+ title: Testimonials
+ slug: testimonials
+ listed: true
+ published: true
+ is_layout: false
+ ---
+ {% extends 'layouts/page' %}
+ {% block 'main' %}
+ <header class="service" data-background-url="{% editable_file 'banner', resize: '1200x400#' %}/images/header-bg.jpg{% endeditable_file %}">
+ <div class="content row column text-center">
+ &nbsp;
+ </div>
+ </header>
+ <section class="row page {{ page.slug }}">
+ <div class="column medium-8 small-centered">
+ <div class="callout">
+ <h1 class="text-center">{% editable_text "heading", line_break: false, format: 'raw', rows: 1 %}Heading{% endeditable_text %}</h1>
+ {% editable_text content %}Lorem ipsum{% endeditable_text %}
+ <hr>
+ {% assign testimonials = contents.testimonials.all | shuffle %}
+ {% for testimonial in testimonials %}
+ <p>
+ {{ testimonial.content }}<br>
+ -- <strong>{{ testimonial.who }}</strong>
+ </p>
+ {% endfor %}
+ </div>
+ </div>
+ </section>
+ {% endblock %}
data/images.yml +10 -14
@@ @@ -1,65 +1,61 @@
- "Image 1":
category: Before
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0018.jpg
- "Image 2":
category: Before
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0019.jpg
- "Image 3":
category: After
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0026.jpg
- "Image 4":
category: After
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0028.jpg
- "Image 5":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0045.jpg
- "Image 6":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0039.jpg
- "Image 7":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0018.jpg
- "Image 8":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0034.jpg
- "Image 9":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0030.jpg
- "Image 10":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0028.jpg
- "Image 11":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0019.jpg
- "Image 12":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0026.jpg
- "Image 13":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/100_1304.jpg
- "Image 14":
+ category: Service
service: 'boat-enclosures'
- project: 'project-1'
file: /samples/000_0045.jpg
data/services.yml +1 -0
@@ @@ -20,6 +20,7 @@
- "Sample 4":
brief: "Id vel expedita asperiores. Explicabo doloremque aliquid."
featured_image: /samples/000_0034.jpg # Path to a file in the public/samples folder or to a remote and external file.
+ featured: false
description: "Suscipit ab sed commodi. Ducimus impedit unde quia alias. Aperiam hic est laudantium cumque accusamus. Qui rerum doloremque aut quas enim laborum."
- "Sample 4":
public/stylesheets/_settings.scss +1 -1
@@ @@ -178,7 +178,7 @@ $hr-border: 1px solid $medium-gray;
$hr-margin: rem-calc(20) auto;
$list-lineheight: $paragraph-lineheight;
$list-margin-bottom: $paragraph-margin-bottom;
- $list-style-type: disc;
+ $list-style-type: none;
$list-style-position: outside;
$list-side-margin: 1.25rem;
$list-nested-side-margin: 1.25rem;
public/stylesheets/app.scss +8 -0
@@ @@ -98,6 +98,14 @@ header {
}
}
+ section.page {
+ padding-top: 1rem;
+
+ h1 {
+ font-size: rem-calc(20);
+ font-weight: bold;
+ }
+ }
.lead {