diff --git a/gatsby-node.js b/gatsby-node.js index d69da8a..28dadb7 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -3,6 +3,8 @@ const reviews = require("./src/data/reviews.json"); const caseStudies = require("./src/data/case-studies.json"); const team = require("./src/data/team.json"); +const padZero = n => (n < 10 ? `0${n}` : n); + exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => { team.team.forEach(person => { const { name, email, phone, altPhone, title } = person; @@ -50,6 +52,7 @@ exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => { content } = cs; const node = { + index: i, path: `/services/${key}/case-study-${i + 1}`, type: key, title, @@ -83,7 +86,7 @@ exports.createPages = async ({ actions }) => { component: template, context: { pagePath: path, - images: `/${key}-cs${i + 1}(.*).jpg$/` + images: `/${key}-cs${padZero(i + 1)}(.*).jpg$/` } }); }); diff --git a/src/case-study.js b/src/case-study.js index 2b56f0d..31a84a1 100644 --- a/src/case-study.js +++ b/src/case-study.js @@ -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 - } - } - } - } - } -`;*/ diff --git a/src/data/case-studies.json b/src/data/case-studies.json index 7392bdc..08f05a7 100644 --- a/src/data/case-studies.json +++ b/src/data/case-studies.json @@ -134,6 +134,41 @@ "Total price for labour and materials: £4,400.", "(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": [ diff --git a/src/images/bathrooms-cs1a.jpg b/src/images/bathrooms-cs01a.jpg similarity index 100% rename from src/images/bathrooms-cs1a.jpg rename to src/images/bathrooms-cs01a.jpg diff --git a/src/images/bathrooms-cs1b.jpg b/src/images/bathrooms-cs01b.jpg similarity index 100% rename from src/images/bathrooms-cs1b.jpg rename to src/images/bathrooms-cs01b.jpg diff --git a/src/images/bathrooms-cs1c.jpg b/src/images/bathrooms-cs01c.jpg similarity index 100% rename from src/images/bathrooms-cs1c.jpg rename to src/images/bathrooms-cs01c.jpg diff --git a/src/images/bathrooms-cs1d.jpg b/src/images/bathrooms-cs01d.jpg similarity index 100% rename from src/images/bathrooms-cs1d.jpg rename to src/images/bathrooms-cs01d.jpg diff --git a/src/images/bathrooms-cs1e.jpg b/src/images/bathrooms-cs01e.jpg similarity index 100% rename from src/images/bathrooms-cs1e.jpg rename to src/images/bathrooms-cs01e.jpg diff --git a/src/images/bathrooms-cs2a.jpg b/src/images/bathrooms-cs02a.jpg similarity index 100% rename from src/images/bathrooms-cs2a.jpg rename to src/images/bathrooms-cs02a.jpg diff --git a/src/images/bathrooms-cs2b.jpg b/src/images/bathrooms-cs02b.jpg similarity index 100% rename from src/images/bathrooms-cs2b.jpg rename to src/images/bathrooms-cs02b.jpg diff --git a/src/images/bathrooms-cs2c.jpg b/src/images/bathrooms-cs02c.jpg similarity index 100% rename from src/images/bathrooms-cs2c.jpg rename to src/images/bathrooms-cs02c.jpg diff --git a/src/images/bathrooms-cs3a.jpg b/src/images/bathrooms-cs03a.jpg similarity index 100% rename from src/images/bathrooms-cs3a.jpg rename to src/images/bathrooms-cs03a.jpg diff --git a/src/images/bathrooms-cs3b.jpg b/src/images/bathrooms-cs03b.jpg similarity index 100% rename from src/images/bathrooms-cs3b.jpg rename to src/images/bathrooms-cs03b.jpg diff --git a/src/images/bathrooms-cs3c.jpg b/src/images/bathrooms-cs03c.jpg similarity index 100% rename from src/images/bathrooms-cs3c.jpg rename to src/images/bathrooms-cs03c.jpg diff --git a/src/images/bathrooms-cs4a.jpg b/src/images/bathrooms-cs04a.jpg similarity index 100% rename from src/images/bathrooms-cs4a.jpg rename to src/images/bathrooms-cs04a.jpg diff --git a/src/images/bathrooms-cs4b.jpg b/src/images/bathrooms-cs04b.jpg similarity index 100% rename from src/images/bathrooms-cs4b.jpg rename to src/images/bathrooms-cs04b.jpg diff --git a/src/images/bathrooms-cs4c.jpg b/src/images/bathrooms-cs04c.jpg similarity index 100% rename from src/images/bathrooms-cs4c.jpg rename to src/images/bathrooms-cs04c.jpg diff --git a/src/images/bathrooms-cs5a.jpg b/src/images/bathrooms-cs05a.jpg similarity index 100% rename from src/images/bathrooms-cs5a.jpg rename to src/images/bathrooms-cs05a.jpg diff --git a/src/images/bathrooms-cs5b.jpg b/src/images/bathrooms-cs05b.jpg similarity index 100% rename from src/images/bathrooms-cs5b.jpg rename to src/images/bathrooms-cs05b.jpg diff --git a/src/images/bathrooms-cs6a.jpg b/src/images/bathrooms-cs06a.jpg similarity index 100% rename from src/images/bathrooms-cs6a.jpg rename to src/images/bathrooms-cs06a.jpg diff --git a/src/images/bathrooms-cs6b.jpg b/src/images/bathrooms-cs06b.jpg similarity index 100% rename from src/images/bathrooms-cs6b.jpg rename to src/images/bathrooms-cs06b.jpg diff --git a/src/images/bathrooms-cs6c.jpg b/src/images/bathrooms-cs06c.jpg similarity index 100% rename from src/images/bathrooms-cs6c.jpg rename to src/images/bathrooms-cs06c.jpg diff --git a/src/images/bathrooms-cs7a.jpg b/src/images/bathrooms-cs07a.jpg similarity index 100% rename from src/images/bathrooms-cs7a.jpg rename to src/images/bathrooms-cs07a.jpg diff --git a/src/images/bathrooms-cs7b.jpg b/src/images/bathrooms-cs07b.jpg similarity index 100% rename from src/images/bathrooms-cs7b.jpg rename to src/images/bathrooms-cs07b.jpg diff --git a/src/images/bathrooms-cs7c.jpg b/src/images/bathrooms-cs07c.jpg similarity index 100% rename from src/images/bathrooms-cs7c.jpg rename to src/images/bathrooms-cs07c.jpg diff --git a/src/images/bathrooms-cs7d.jpg b/src/images/bathrooms-cs07d.jpg similarity index 100% rename from src/images/bathrooms-cs7d.jpg rename to src/images/bathrooms-cs07d.jpg diff --git a/src/images/bathrooms-cs7e.jpg b/src/images/bathrooms-cs07e.jpg similarity index 100% rename from src/images/bathrooms-cs7e.jpg rename to src/images/bathrooms-cs07e.jpg diff --git a/src/images/bathrooms-cs8a.jpg b/src/images/bathrooms-cs08a.jpg similarity index 100% rename from src/images/bathrooms-cs8a.jpg rename to src/images/bathrooms-cs08a.jpg diff --git a/src/images/bathrooms-cs8b.jpg b/src/images/bathrooms-cs08b.jpg similarity index 100% rename from src/images/bathrooms-cs8b.jpg rename to src/images/bathrooms-cs08b.jpg diff --git a/src/images/bathrooms-cs8c.jpg b/src/images/bathrooms-cs08c.jpg similarity index 100% rename from src/images/bathrooms-cs8c.jpg rename to src/images/bathrooms-cs08c.jpg diff --git a/src/images/bathrooms-cs8d.jpg b/src/images/bathrooms-cs08d.jpg similarity index 100% rename from src/images/bathrooms-cs8d.jpg rename to src/images/bathrooms-cs08d.jpg diff --git a/src/images/bathrooms-cs8e.jpg b/src/images/bathrooms-cs08e.jpg similarity index 100% rename from src/images/bathrooms-cs8e.jpg rename to src/images/bathrooms-cs08e.jpg diff --git a/src/images/bathrooms-cs8f.jpg b/src/images/bathrooms-cs08f.jpg similarity index 100% rename from src/images/bathrooms-cs8f.jpg rename to src/images/bathrooms-cs08f.jpg diff --git a/src/images/bathrooms-cs8g.jpg b/src/images/bathrooms-cs08g.jpg similarity index 100% rename from src/images/bathrooms-cs8g.jpg rename to src/images/bathrooms-cs08g.jpg diff --git a/src/images/bathrooms-cs8h.jpg b/src/images/bathrooms-cs08h.jpg similarity index 100% rename from src/images/bathrooms-cs8h.jpg rename to src/images/bathrooms-cs08h.jpg diff --git a/src/images/bathrooms-cs8i.jpg b/src/images/bathrooms-cs08i.jpg similarity index 100% rename from src/images/bathrooms-cs8i.jpg rename to src/images/bathrooms-cs08i.jpg diff --git a/src/images/bathrooms-cs8j.jpg b/src/images/bathrooms-cs08j.jpg similarity index 100% rename from src/images/bathrooms-cs8j.jpg rename to src/images/bathrooms-cs08j.jpg diff --git a/src/images/bathrooms-cs09a.jpg b/src/images/bathrooms-cs09a.jpg new file mode 100644 index 0000000..c30349e Binary files /dev/null and b/src/images/bathrooms-cs09a.jpg differ diff --git a/src/images/bathrooms-cs09b.jpg b/src/images/bathrooms-cs09b.jpg new file mode 100644 index 0000000..a73c36a Binary files /dev/null and b/src/images/bathrooms-cs09b.jpg differ diff --git a/src/images/bathrooms-cs09c.jpg b/src/images/bathrooms-cs09c.jpg new file mode 100644 index 0000000..9f9ad49 Binary files /dev/null and b/src/images/bathrooms-cs09c.jpg differ diff --git a/src/images/bathrooms-cs09d.jpg b/src/images/bathrooms-cs09d.jpg new file mode 100644 index 0000000..0c44362 Binary files /dev/null and b/src/images/bathrooms-cs09d.jpg differ diff --git a/src/images/bathrooms-cs09e.jpg b/src/images/bathrooms-cs09e.jpg new file mode 100644 index 0000000..b8135eb Binary files /dev/null and b/src/images/bathrooms-cs09e.jpg differ diff --git a/src/images/bathrooms-cs09f.jpg b/src/images/bathrooms-cs09f.jpg new file mode 100644 index 0000000..ff030af Binary files /dev/null and b/src/images/bathrooms-cs09f.jpg differ diff --git a/src/images/bathrooms-cs09g.jpg b/src/images/bathrooms-cs09g.jpg new file mode 100644 index 0000000..a8b8f63 Binary files /dev/null and b/src/images/bathrooms-cs09g.jpg differ diff --git a/src/images/bathrooms-cs09h.jpg b/src/images/bathrooms-cs09h.jpg new file mode 100644 index 0000000..9e955ed Binary files /dev/null and b/src/images/bathrooms-cs09h.jpg differ diff --git a/src/images/bathrooms-cs09i.jpg b/src/images/bathrooms-cs09i.jpg new file mode 100644 index 0000000..afe484d Binary files /dev/null and b/src/images/bathrooms-cs09i.jpg differ diff --git a/src/images/bathrooms-cs09j.jpg b/src/images/bathrooms-cs09j.jpg new file mode 100644 index 0000000..463675e Binary files /dev/null and b/src/images/bathrooms-cs09j.jpg differ diff --git a/src/images/bathrooms-cs09k.jpg b/src/images/bathrooms-cs09k.jpg new file mode 100644 index 0000000..4e310a5 Binary files /dev/null and b/src/images/bathrooms-cs09k.jpg differ diff --git a/src/images/bathrooms-cs09l.jpg b/src/images/bathrooms-cs09l.jpg new file mode 100644 index 0000000..4fbd8ae Binary files /dev/null and b/src/images/bathrooms-cs09l.jpg differ diff --git a/src/images/bathrooms-cs09m.jpg b/src/images/bathrooms-cs09m.jpg new file mode 100644 index 0000000..4c22900 Binary files /dev/null and b/src/images/bathrooms-cs09m.jpg differ diff --git a/src/images/bathrooms-cs10a.jpg b/src/images/bathrooms-cs10a.jpg new file mode 100644 index 0000000..f31ebcc Binary files /dev/null and b/src/images/bathrooms-cs10a.jpg differ diff --git a/src/images/bathrooms-cs10b.jpg b/src/images/bathrooms-cs10b.jpg new file mode 100644 index 0000000..e5cd96e Binary files /dev/null and b/src/images/bathrooms-cs10b.jpg differ diff --git a/src/images/bathrooms-cs10c.jpg b/src/images/bathrooms-cs10c.jpg new file mode 100644 index 0000000..7a4a2eb Binary files /dev/null and b/src/images/bathrooms-cs10c.jpg differ diff --git a/src/images/bathrooms-cs10d.jpg b/src/images/bathrooms-cs10d.jpg new file mode 100644 index 0000000..ed3ec9a Binary files /dev/null and b/src/images/bathrooms-cs10d.jpg differ diff --git a/src/images/bathrooms-cs10e.jpg b/src/images/bathrooms-cs10e.jpg new file mode 100644 index 0000000..277191c Binary files /dev/null and b/src/images/bathrooms-cs10e.jpg differ diff --git a/src/images/bathrooms-cs10f.jpg b/src/images/bathrooms-cs10f.jpg new file mode 100644 index 0000000..283e49b Binary files /dev/null and b/src/images/bathrooms-cs10f.jpg differ diff --git a/src/images/tiling-cs1a.jpg b/src/images/tiling-cs01a.jpg similarity index 100% rename from src/images/tiling-cs1a.jpg rename to src/images/tiling-cs01a.jpg diff --git a/src/images/tiling-cs1b.jpg b/src/images/tiling-cs01b.jpg similarity index 100% rename from src/images/tiling-cs1b.jpg rename to src/images/tiling-cs01b.jpg diff --git a/src/images/tiling-cs1c.jpg b/src/images/tiling-cs01c.jpg similarity index 100% rename from src/images/tiling-cs1c.jpg rename to src/images/tiling-cs01c.jpg diff --git a/src/images/tiling-cs1d.jpg b/src/images/tiling-cs01d.jpg similarity index 100% rename from src/images/tiling-cs1d.jpg rename to src/images/tiling-cs01d.jpg diff --git a/src/images/tiling-cs2a.jpg b/src/images/tiling-cs02a.jpg similarity index 100% rename from src/images/tiling-cs2a.jpg rename to src/images/tiling-cs02a.jpg diff --git a/src/images/tiling-cs2b.jpg b/src/images/tiling-cs02b.jpg similarity index 100% rename from src/images/tiling-cs2b.jpg rename to src/images/tiling-cs02b.jpg diff --git a/src/images/tiling-cs2c.jpg b/src/images/tiling-cs02c.jpg similarity index 100% rename from src/images/tiling-cs2c.jpg rename to src/images/tiling-cs02c.jpg diff --git a/src/images/tiling-cs2d.jpg b/src/images/tiling-cs02d.jpg similarity index 100% rename from src/images/tiling-cs2d.jpg rename to src/images/tiling-cs02d.jpg diff --git a/src/images/tiling-cs2e.jpg b/src/images/tiling-cs02e.jpg similarity index 100% rename from src/images/tiling-cs2e.jpg rename to src/images/tiling-cs02e.jpg diff --git a/src/images/tiling-cs3a.jpg b/src/images/tiling-cs03a.jpg similarity index 100% rename from src/images/tiling-cs3a.jpg rename to src/images/tiling-cs03a.jpg diff --git a/src/images/tiling-cs4a.jpg b/src/images/tiling-cs04a.jpg similarity index 100% rename from src/images/tiling-cs4a.jpg rename to src/images/tiling-cs04a.jpg diff --git a/src/images/tiling-cs5a.jpg b/src/images/tiling-cs05a.jpg similarity index 100% rename from src/images/tiling-cs5a.jpg rename to src/images/tiling-cs05a.jpg diff --git a/src/images/tiling-cs6a.jpg b/src/images/tiling-cs06a.jpg similarity index 100% rename from src/images/tiling-cs6a.jpg rename to src/images/tiling-cs06a.jpg diff --git a/src/pages/services/bathrooms.js b/src/pages/services/bathrooms.js index 4c02b9c..7594daf 100644 --- a/src/pages/services/bathrooms.js +++ b/src/pages/services/bathrooms.js @@ -65,7 +65,7 @@ export const query = graphql` } caseStudies: allCaseStudy( filter: { type: { eq: "bathrooms" } } - sort: { fields: path } + sort: { fields: index } ) { nodes { title @@ -75,7 +75,9 @@ export const query = graphql` } images: allFile( 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 } ) { diff --git a/src/pages/services/tiling.js b/src/pages/services/tiling.js index cfe9d74..54ff4c2 100644 --- a/src/pages/services/tiling.js +++ b/src/pages/services/tiling.js @@ -50,7 +50,7 @@ export const query = graphql` } caseStudies: allCaseStudy( filter: { type: { eq: "tiling" } } - sort: { fields: path } + sort: { fields: index } ) { nodes { title @@ -59,7 +59,9 @@ export const query = graphql` } } 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 } ) { nodes {