diff --git a/src/.DS_Store b/src/.DS_Store index 5c7711f..21e4b1b 100644 Binary files a/src/.DS_Store and b/src/.DS_Store differ diff --git a/src/components/Layout/footer/Footer.js b/src/components/Layout/footer/Footer.js index 4cec7df..1959cb8 100644 --- a/src/components/Layout/footer/Footer.js +++ b/src/components/Layout/footer/Footer.js @@ -252,7 +252,7 @@ const Footer = () => ( -

Site last updated on: 31 / 01 / 2019

+

Site last updated on: 1 / 02 / 2019

Designed and built using Sketch and Gatsby.

diff --git a/src/components/Shared/ListPostsSquareOffset.js b/src/components/Shared/ListPostsSquareOffset.js index 805fe24..39d81d9 100644 --- a/src/components/Shared/ListPostsSquareOffset.js +++ b/src/components/Shared/ListPostsSquareOffset.js @@ -109,26 +109,29 @@ const NoPosts = styled.p` const ListPostsSquare = (props) => { - const foundPosts = () => ( - <> - {props.notes.map( ({node: note }) => ( - - - - - - - -
- {note.frontmatter.title} -
-

{note.frontmatter.date}

-
-
- ))} - - ) - + const foundPosts = () => { + let filteredArray = [...props.notes].splice(1, 1); + return ( + <> + {filteredArray.map(({ node: note }) => ( + + + + + + + +
+ {note.frontmatter.title} +
+

{note.frontmatter.date}

+
+
+ ))} + + ) + } + const noPosts = () => No other posts have been made, yet. return ( @@ -136,7 +139,7 @@ const ListPostsSquare = (props) => {

Previously

- {props.total > 2 ? foundPosts() : noPosts()} + {props.total >= 2 ? foundPosts() : noPosts()}
diff --git a/src/components/Shared/PreviousPosts.js b/src/components/Shared/PreviousPosts.js new file mode 100644 index 0000000..a759731 --- /dev/null +++ b/src/components/Shared/PreviousPosts.js @@ -0,0 +1,45 @@ +import React from 'react' +import styled from 'styled-components' +import ListPosts from './ListPostsSquareOffset' +import AllCategories from './ListCategories' + +const Posts = styled.section` + grid-column: 3 / 15; + grid-row: 4 / 5; + + @media screen and (min-width: 48em) { + display: grid; + grid-template-columns: 2fr 8fr; + padding:6.250em 0; + } + @media screen and (min-width: 75em) { + padding:9.375em 0 6.250em 0; + } + + .heading { + font-size: var(--font-size); + font-weight: 200;; + text-transform: uppercase; + position: relative; + padding-left: 1.5em; + &:after { + border: 0; + @media screen and (min-width: 48em) { + border-bottom:1px solid var(--color-borders); + } + } + @media screen and (min-width: 48em) { + font-weight: 800; + padding-left:0; + } + } +` + +const PreviousNotes = (props) => ( + + + + +) + +export default PreviousNotes; \ No newline at end of file diff --git a/src/pages/.DS_Store b/src/pages/.DS_Store index 9bbf4a0..d3173c4 100644 Binary files a/src/pages/.DS_Store and b/src/pages/.DS_Store differ diff --git a/src/pages/about/index.md b/src/pages/about/index.md deleted file mode 100644 index be28894..0000000 --- a/src/pages/about/index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -templateKey: about-page -title: About this guy -date: 2016-12-17T15:04:10.000Z -description: The Coffee Taster’s Flavor Wheel, the official resource used by coffee tasters, has been revised for the first time this year. ---- - -Everything is awesome - when you're part of a team! Everything is awesome! \ No newline at end of file diff --git a/src/pages/notes.js b/src/pages/notes.js index 63ea705..3cf4c84 100644 --- a/src/pages/notes.js +++ b/src/pages/notes.js @@ -1,52 +1,20 @@ import React from 'react' import PropTypes from 'prop-types' import {graphql} from 'gatsby' -import styled from 'styled-components' +// import styled from 'styled-components' import TitleAndMetas from '../components/Layout/TitleAndMetas' import Layout from '../components/Layout' import SubMast from '../components/Shared/SubMast' import LatestBlock from '../components/Specifics/Notes/LatestBlock' -import ListPosts from '../components/Shared/ListPostsSquareOffset' -import AllCategories from '../components/Shared/ListCategories' - -const PreviousPosts = styled.section` - grid-column: 3 / 15; - grid-row: 4 / 5; - - @media screen and (min-width: 48em) { - display: grid; - grid-template-columns: 2fr 8fr; - padding:6.250em 0; - } - @media screen and (min-width: 75em) { - padding:9.375em 0 6.250em 0; - } - - .heading { - font-size: var(--font-size); - font-weight: 200;; - text-transform: uppercase; - position: relative; - padding-left: 1.5em; - &:after { - border: 0; - @media screen and (min-width: 48em) { - border-bottom:1px solid var(--color-borders); - } - } - @media screen and (min-width: 48em) { - font-weight: 800; - padding-left:0; - } - } -` +// import ListPosts from '../components/Shared/ListPostsSquareOffset' +// import AllCategories from '../components/Shared/ListCategories' +import PreviousPosts from '../components/Shared/PreviousPosts' const NotesIndexPage = ( {data}) => { const page = 'sub'; const {edges: notesLatest } = data.latest - const {edges: notesPrevious } = data.previous || 0 + const notesPrevious = data.allNotes const {group: getTags } = data.allTags - const { totalCount } = data.previous || 0 return ( <> { - - + + {/* - + */} ) @@ -107,8 +75,7 @@ export const query = graphql ` } }, - previous: allMarkdownRemark( - skip: 1, + allNotes: allMarkdownRemark( sort: { fields:[frontmatter___date], order: DESC }, filter: { frontmatter: { contentType: { eq: "notes" } }}) { diff --git a/src/templates/about-page.js b/src/templates/about-page.js deleted file mode 100644 index 712331c..0000000 --- a/src/templates/about-page.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react" -import { graphql } from "gatsby" -import Layout from "../components/Layout" -import TitleAndMetas from "../components/Layout/TitleAndMetas" - -export default ( { data }) => { - const post = data.markdownRemark; - return ( - - -

{ post.frontmatter.title }

-
- - ) -} - -export const query = graphql` - query($slug: String!) { - markdownRemark(fields: { slug: { eq: $slug } }) { - html - frontmatter { - title - } - } - } -` \ No newline at end of file diff --git a/src/templates/blog-post--news.js b/src/templates/blog-post--news.js deleted file mode 100644 index 585af1f..0000000 --- a/src/templates/blog-post--news.js +++ /dev/null @@ -1,161 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { graphql } from 'gatsby' -import styled from 'styled-components' -import BlogThumb from 'gatsby-image' -import Layout from '../components/Layout' -import TitleAndMetas from '../components/Layout/TitleAndMetas' -import HTMLContent from '../components/Shared/Content' - -const PageMain = styled.main` - font-size: 0.938em; - padding: 6em 0; - @media screen and (min-width: 48em) { - grid-column: 1 / 16; - } - @media screen and (min-width: 64em) { - grid-column: 2 / 15; - } - @media screen and (min-width: 93em) { - grid-column: 3 / 15; - font-size: 1.188em; - } -` -const ArticleEntry = styled.article` - @media screen and (min-width: 48em) { - display: grid; - grid-gap: 25px; - grid-template-columns: minmax(25px, 50px) minmax(2%, 25px) 8fr 1fr 4fr minmax(2%, 25px); - } - header { - @media screen and (min-width: 48em) { - grid-column: 3 / 6; - grid-row: 1 / 2; - } - } - ul, - ol { - margin:0 0 1.563em 0.938em; - } - p { - margin-bottom: 1.563em; - max-width: 45em; - } - .gatsby-image-wrapper { - margin-bottom:1.5em; - @media screen and (min-width: 48em) { margin-bottom: 0;} - } -` -const ArticleHeading = styled.h1` - max-width: 45rem; - @media screen and (min-width: 93em) { - max-width: 60rem; - } -` -const ArticleFooter = styled.footer` - font-weight: 200; - grid-column: 1 / 2; - grid-row: 2 / 3; - padding: 0.938em 0; - @media screen and (min-width: 48em) { - position: relative; - transform: rotate(-90deg); - white-space: nowrap; - height: 126px; - width: 176px; - padding: 0; - } - @media screen and (min-width: 90em) { - height: 190px; - width: 186px; - } -` -const NotesThumbnail = styled(BlogThumb)` - grid-column: 2 / 7; - grid-row: 2 / 3; -` -const ThumbnailCaption = styled.p` - grid-column: 5 / 6; - grid-row: 3 / 4; - color: #999; - font-size: 1rem; - font-style: italic; - font-weight: 200; -` -const ArticlePost = styled.div` - grid-column: 3 / 5; - grid-row: 3 / 4; - - img { max-width: 100%; } -` -const ArticleDescription = styled.p` - &:first-of-type { margin-bottom: 0!important; } - @media screen and (min-width: 48em) { - font-size: 1.267em; - } - @media screen and (min-width: 90em) { - font-size: 1.105em; - } -` - -const BlogPostNews = ( {data} ) => { - const page = 'notes' - const post = data.markdownRemark; - return ( - <> - - - - -
- { post.frontmatter.title } -
- - {post.frontmatter.date} - - - {post.frontmatter.imageCaption} - - -

- - - - - - - - ) -} - -BlogPostNews.propTypes = { - page: PropTypes.string, - data: PropTypes.object.isRequired -} - -export default BlogPostNews - -export const pageQuery = graphql` - query($id: String!) { - markdownRemark(id: { eq: $id }) { - html - frontmatter { - date(formatString: "Do MMMM, YYYY") - title - description - image { - childImageSharp{ - sizes(maxWidth: 800, maxHeight: 250) { - ...GatsbyImageSharpSizes - } - } - } - imageCaption - } - } - } -` \ No newline at end of file diff --git a/src/templates/blog-post--web.js b/src/templates/blog-post--web.js deleted file mode 100644 index 2691185..0000000 --- a/src/templates/blog-post--web.js +++ /dev/null @@ -1,139 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { graphql} from 'gatsby' -import styled from 'styled-components' -import BlogThumb from 'gatsby-image' -import Layout from '../components/Layout' -import TitleAndMetas from '../components/Layout/TitleAndMetas' -import HTMLContent from '../components/Shared/Content' - -const PageMain = styled.main` - grid-column: 2 / 14; - grid-row: 1 / 1; - font-size: 0.938em; - padding: 6em 0; - @media screen and (min-width: 64em) { - grid-column: 3 /-1; - } - @media screen and (min-width: 93em) { - font-size: 1.188em; - grid-column: 4 /-1; - } -` -const ArticleEntry = styled.article` - ul, - ol { - margin:0 0 1.563em 0.938em; - } - p { - margin-bottom: 1.563em; - max-width: 30em; - @media screen and (min-width: 93em) { - max-width: 45em; - } - } - .gatsby-image-wrapper { - margin-bottom:1.5em; - @media screen and (min-width: 64em) { - float:right; - margin: 0 0 1.5em 2.5em; - width: 60%; - * { - padding-bottom: 0!important; - position:relative!important; - height: auto!important; - width: auto!important; - } - img { display: none;} - picture { - img { - display: block; - float: right; - position:relative!important; - width: 100%!important; - } - } - } - } -` -const ArticleHeading = styled.h1` - max-width: 40rem; - margin-bottom: 0.625em; - @media screen and (min-width: 93em) { - max-width: 55rem; - } -` -const ArticleDescription = styled.p` - &:first-of-type { margin-bottom: 0!important; } - @media screen and (min-width: 48em) { - font-size: 1.267em; - } - @media screen and (min-width: 90em) { - font-size: 1.105em; - } -` -const ArticleFooter = styled.footer` - font-style: italic; - font-weight: 200; - margin-bottom:0.625em; -` -const ArticlePost = styled(HTMLContent)` - img { max-width: 100%; } -` - -const BlogPostWeb = ( {data} ) => { - const page = 'notes' - const post = data.markdownRemark; - return ( - <> - - - - -

- { post.frontmatter.title } -
- - {post.frontmatter.date} - - - {post.frontmatter.description} - {post.frontmatter.description} - -
-
-
- - ) -} - -BlogPostWeb.propTypes = { - page: PropTypes.string, - data: PropTypes.object.isRequired -} - -export default BlogPostWeb - -export const pageQuery = graphql` - query($id: String!) { - markdownRemark(id: { eq: $id }) { - html - frontmatter { - date(formatString: "Do MMMM, YYYY") - title - description - image { - childImageSharp{ - sizes(maxWidth: 630, maxHeight: 325) { - ...GatsbyImageSharpSizes - } - } - } - } - } - } -` \ No newline at end of file diff --git a/src/templates/blog-post-idea.js b/src/templates/blog-post-idea.js deleted file mode 100644 index d13069e..0000000 --- a/src/templates/blog-post-idea.js +++ /dev/null @@ -1,129 +0,0 @@ -import React from "react" -import { graphql } from "gatsby" -import styled from "styled-components" -import BlogThumb from "gatsby-image" -import Layout from "../components/Layout" -import TitleAndMetas from '../components/Layout/TitleAndMetas' - -const PageMain = styled.main` - grid-column: 1 / -1; - font-size: 0.938em; - padding: 6em 0; - @media screen and (min-width: 48em) { - font-size: 1em; - } - @media screen and (min-width: 90em) { - font-size: 1.188em; - } -` -const ArticleEntry = styled.article` - display: grid; - grid-gap: 25px; - grid-template-columns: repeat(13, 1fr); - header { - grid-column: 5 / 12; - grid-row: 1 / 2; - } - - ul, - ol { - margin:0 0 1.563em 0.938em; - } - p { - margin-bottom: 1.563em; - max-width: 45em; - } -` -const ArticleHeading = styled.h1` - max-width: 45rem; - @media screen and (min-width: 93em) { - max-width: 60rem; - } -` -const ArticleDate = styled.p` - -` -const ArticleDescription = styled.div` - grid-column: 8 / -1; - grid-row: 2 / 3; - display:flex; - justify-content: space-between; - p { - padding-right: 1.250em; - &:first-of-type { margin-bottom: 0!important; } - @media screen and (min-width: 48em) { - font-size: 1.267em; - } - @media screen and (min-width: 90em) { - font-size: 1.105em; - } - } -` -const ArticleMainPost = styled.div` - grid-column: 8 / -1; - grid-row: 3 / 4; -` -const ThumbnailCaption = styled.p` - /* grid-column: 3 / 8; - grid-row: 3 / 4; */ - color: #999; - font-size: 1rem; - font-style: italic; - font-weight: 200; - /* display:flex; - justify-content: flex-end; */ - margin: 0.938em 0 0 0.938em; -` -const Thumbnail = styled.div` - grid-column: 1 / 8; - grid-row: 2 / 4; -` - - -export default ( { data }) => { - const page = 'notes' - const post = data.markdownRemark; - return ( - - - - -
- { post.frontmatter.title } - {post.frontmatter.date} -
- - - {post.frontmatter.imageCaption} - - - -

- - - - - - - ) -} -export const query = graphql` - query($id: String!) { - markdownRemark(id: { eq: $id }) { - html - frontmatter { - date(formatString: "Do MMMM, YYYY") - title - description - image { - childImageSharp{ - sizes(maxWidth: 630, maxHeight: 325) { - ...GatsbyImageSharpSizes - } - } - } - imageCaption - } - } - } -` \ No newline at end of file diff --git a/src/templates/tags.js b/src/templates/tags.js index 2f03888..7f999b9 100644 --- a/src/templates/tags.js +++ b/src/templates/tags.js @@ -1,71 +1,37 @@ import React from "react" import { graphql } from "gatsby" -import styled from "styled-components" import TitleAndMetas from '../components/Layout/TitleAndMetas' import Layout from "../components/Layout" import SubMast from "../components/Shared/SubMast" import LatestBlock from "../components/Specifics/Notes/LatestBlock" -import AllCategories from "../components/Shared/ListCategories" -import ListPosts from "../components/Shared/ListPostsSquareOffset" +import PreviousPosts from '../components/Shared/PreviousPosts' -const PreviousPosts = styled.section` - grid-column: 3 / 15; - grid-row: 4 / 5; - - @media screen and (min-width: 48em) { - display: grid; - grid-template-columns: 2fr 8fr; - padding:6.250em 0; - } - @media screen and (min-width: 75em) { - padding:9.375em 0 6.250em 0; - } - - .heading { - font-size: var(--font-size); - font-weight: 200;; - text-transform: uppercase; - position: relative; - padding-left: 1.5em; - &:after { - border: 0; - @media screen and (min-width: 48em) { - border-bottom:1px solid var(--color-borders); - } - } - @media screen and (min-width: 48em) { - font-weight: 800; - padding-left:0; - } - } -` const Tags = ({ pageContext, data }) => { const page = "sub" const { tag } = pageContext const {group: getTags } = data.allTags - const { totalCount } = data.allPosts || 0 const {edges: notesLatest } = data.latest || 0 - const {edges: allPosts } = data.previous || 0 + const notesPrevious = data.previous const pageTitle = tag let pageDescription = "" switch(tag) { case 'Life': - pageDescription =`${totalCount} update${ totalCount === 1 ? "" : "s"} about what's going on in my life. ` + pageDescription =`What's going on in my world. ` break case 'tech': - pageDescription =`${totalCount} update${ totalCount === 1 ? "" : "s"} about all things related to the world of Technology. ` + pageDescription =`All notes related to the world of Technology. ` break case 'web': - pageDescription =`${totalCount} update${ totalCount === 1 ? "" : "s"} about all things related to the world wide web. ` + pageDescription =`All notes related to the world wide web. ` break case 'News': - pageDescription =`${totalCount} news update${ totalCount === 1 ? "" : "s"}, usually about the site or myself personally ` + pageDescription =`Updates about the site` break default: - pageDescription =`Found ${totalCount} update${ totalCount === 1 ? "" : "s"} for this tag` + pageDescription =`Posts found under this tag` } const pageMetaTitle = `All notes tagged under: ${tag}` @@ -85,13 +51,7 @@ const Tags = ({ pageContext, data }) => { description={pageDescription} /> - - - = 2 ? totalCount : 0 } - /> - + ) @@ -171,7 +131,6 @@ export const pageQuery = graphql` } previous: allMarkdownRemark( - skip:1 limit: 2000 sort: { fields: [frontmatter___date], order: DESC } filter: {