feat: new case studies

This commit is contained in:
2021-02-18 11:36:30 +00:00
parent fc30fc015f
commit a16ae8cd4c
71 changed files with 47 additions and 23 deletions

View File

@@ -3,6 +3,8 @@ const reviews = require("./src/data/reviews.json");
const caseStudies = require("./src/data/case-studies.json"); const caseStudies = require("./src/data/case-studies.json");
const team = require("./src/data/team.json"); const team = require("./src/data/team.json");
const padZero = n => (n < 10 ? `0${n}` : n);
exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => { exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {
team.team.forEach(person => { team.team.forEach(person => {
const { name, email, phone, altPhone, title } = person; const { name, email, phone, altPhone, title } = person;
@@ -50,6 +52,7 @@ exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {
content content
} = cs; } = cs;
const node = { const node = {
index: i,
path: `/services/${key}/case-study-${i + 1}`, path: `/services/${key}/case-study-${i + 1}`,
type: key, type: key,
title, title,
@@ -83,7 +86,7 @@ exports.createPages = async ({ actions }) => {
component: template, component: template,
context: { context: {
pagePath: path, pagePath: path,
images: `/${key}-cs${i + 1}(.*).jpg$/` images: `/${key}-cs${padZero(i + 1)}(.*).jpg$/`
} }
}); });
}); });

View File

@@ -102,21 +102,3 @@ export const query = graphql`
} }
} }
`; `;
/*
images: allFile
filter: { relativePath: { regex: $images } }
sort: { fields: relativePath }
) {
nodes {
childImageSharp {
thumb: fluid(maxWidth: 256, maxHeight: 256, quality: 80) {
...GatsbyImageSharpFluid_withWebp
}
full: fluid(maxWidth: 1280, quality: 90) {
...GatsbyImageSharpFluid_withWebp
}
}
}
}
}
`;*/

View File

@@ -134,6 +134,41 @@
"Total price for labour and materials: £4,400.", "Total price for labour and materials: £4,400.",
"(This does not include bathroom suite or tiles)" "(This does not include bathroom suite or tiles)"
] ]
},
{
"title": "Mosaic Tiling",
"titleColor": "white",
"location": "Brentwood, Essex",
"image": 12,
"key_features": "Electric alcove, Mosaic tiling, Under floor heating",
"price": "£5,500",
"time_taken": "12 days",
"date": "November 2020",
"content": [
"Completely strip out old bathroom and dispose of all rubbish.",
"Relocate soil pipe to install toilet in new location.",
"Fitted electric under floor heating.",
"Installed mosaic wall tiles.",
"Total price for labour and materials: £5,500.",
"(This does not include bathroom suite or tiles)"
]
},
{
"title": "Victorian Look",
"titleColor": "dark-grey",
"location": "Fulham, London",
"image": 3,
"key_features": "Walk in shower, Victorian style tiling",
"price": "£4,500",
"time_taken": "10 days",
"date": "February 2021",
"content": [
"Stripped out old bathroom and disposed of all rubbish.",
"Tiled wall and floor with Victorian style tiling",
"Recessed plumbing for wall mounted shower unit",
"Total price for labour and materials: £5,500.",
"(This does not include bathroom suite or tiles)"
]
} }
], ],
"tiling": [ "tiling": [

View File

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

View File

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View File

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 919 KiB

After

Width:  |  Height:  |  Size: 919 KiB

View File

Before

Width:  |  Height:  |  Size: 843 KiB

After

Width:  |  Height:  |  Size: 843 KiB

View File

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

View File

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

Before

Width:  |  Height:  |  Size: 953 KiB

After

Width:  |  Height:  |  Size: 953 KiB

View File

Before

Width:  |  Height:  |  Size: 960 KiB

After

Width:  |  Height:  |  Size: 960 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 657 KiB

After

Width:  |  Height:  |  Size: 657 KiB

View File

Before

Width:  |  Height:  |  Size: 900 KiB

After

Width:  |  Height:  |  Size: 900 KiB

View File

Before

Width:  |  Height:  |  Size: 736 KiB

After

Width:  |  Height:  |  Size: 736 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 868 KiB

After

Width:  |  Height:  |  Size: 868 KiB

View File

Before

Width:  |  Height:  |  Size: 879 KiB

After

Width:  |  Height:  |  Size: 879 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

Before

Width:  |  Height:  |  Size: 583 KiB

After

Width:  |  Height:  |  Size: 583 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 547 KiB

After

Width:  |  Height:  |  Size: 547 KiB

View File

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 266 KiB

View File

@@ -65,7 +65,7 @@ export const query = graphql`
} }
caseStudies: allCaseStudy( caseStudies: allCaseStudy(
filter: { type: { eq: "bathrooms" } } filter: { type: { eq: "bathrooms" } }
sort: { fields: path } sort: { fields: index }
) { ) {
nodes { nodes {
title title
@@ -75,7 +75,9 @@ export const query = graphql`
} }
images: allFile( images: allFile(
filter: { filter: {
relativePath: { regex: "/bathrooms-cs(1a|2a|3a|4a|5a|6a|7a|8j).jpg$/" } relativePath: {
regex: "/bathrooms-cs(01a|02a|03a|04a|05a|06a|07a|08j|09m|10d).jpg$/"
}
} }
sort: { fields: relativePath } sort: { fields: relativePath }
) { ) {

View File

@@ -50,7 +50,7 @@ export const query = graphql`
} }
caseStudies: allCaseStudy( caseStudies: allCaseStudy(
filter: { type: { eq: "tiling" } } filter: { type: { eq: "tiling" } }
sort: { fields: path } sort: { fields: index }
) { ) {
nodes { nodes {
title title
@@ -59,7 +59,9 @@ export const query = graphql`
} }
} }
images: allFile( images: allFile(
filter: { relativePath: { regex: "/tiling-cs(1d|2e|3a|4a|5a|6a).jpg$/" } } filter: {
relativePath: { regex: "/tiling-cs(01d|02e|03a|04a|05a|06a).jpg$/" }
}
sort: { fields: relativePath } sort: { fields: relativePath }
) { ) {
nodes { nodes {