Skip to content

Commit 5b5f532

Browse files
authored
Merge pull request #31 from eyalroth/dev
Merge dev to master
2 parents 0d3e207 + 0eeb97d commit 5b5f532

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1033
-973
lines changed

gatsby-config.js

+15-19
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,19 @@ require("dotenv").config({
88

99
const lost = require('lost')
1010
const pxtorem = require('postcss-pxtorem')
11+
const path = require(`path`)
1112

1213
module.exports = {
1314
siteMetadata: {
1415
url: process.env.URL,
1516
siteUrl: process.env.URL,
16-
title: 'Blog by John Doe',
17-
subtitle: 'Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.',
17+
title: 'Eyal Roth',
18+
subtitle: 'Software Developer, Tel Aviv',
1819
description: '',
1920
copyright: '© All rights reserved.',
2021
utterances: 'eyalroth/blog-gatsby-comments',
21-
menu: [
22-
{
23-
label: 'Articles',
24-
path: '/',
25-
},
26-
{
27-
label: 'About me',
28-
path: '/about/',
29-
},
30-
{
31-
label: 'Contact me',
32-
path: '/contact/',
33-
},
34-
],
3522
author: {
36-
name: 'John Doe',
23+
name: 'Eyal Roth',
3724
linkedin: "#",
3825
github: '#',
3926
email: '#',
@@ -43,8 +30,15 @@ module.exports = {
4330
{
4431
resolve: 'gatsby-source-filesystem',
4532
options: {
46-
path: `${__dirname}/src/pages`,
4733
name: 'pages',
34+
path: path.join(__dirname, `src`, `pages`),
35+
},
36+
},
37+
{
38+
resolve: 'gatsby-source-filesystem',
39+
options: {
40+
name: `images`,
41+
path: path.join(__dirname, `src`, `images`),
4842
},
4943
},
5044
'gatsby-plugin-feed',
@@ -143,7 +137,9 @@ module.exports = {
143137
{
144138
resolve: 'gatsby-plugin-page-progress-fork',
145139
options: {
146-
includePaths: ['/', { regex: '^/blog' }],
140+
includePaths: [
141+
{ regex: '^/' },
142+
],
147143
}
148144
},
149145
],

gatsby-node.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ exports.createPages = ({ graphql, actions }) => {
88
const { createPage } = actions
99

1010
return new Promise((resolve, reject) => {
11-
const postTemplate = path.resolve('./src/templates/post-template.jsx')
12-
const pageTemplate = path.resolve('./src/templates/page-template.jsx')
13-
const tagTemplate = path.resolve('./src/templates/tag-template.jsx')
11+
const postTemplate = path.resolve('./src/templates/PostTemplate/index.jsx')
12+
const pageTemplate = path.resolve('./src/templates/PageTemplate/index.jsx')
13+
const tagTemplate = path.resolve('./src/templates/TagTemplate/index.jsx')
1414
const categoryTemplate = path.resolve(
15-
'./src/templates/category-template.jsx'
15+
'./src/templates/CategoryTemplate/index.jsx'
1616
)
1717

1818
graphql(`

package-lock.json

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"dependencies": {
2727
"bluebird": "^3.5.1",
2828
"gatsby": "^2.0.22",
29+
"gatsby-image": "^2.2.1",
2930
"gatsby-plugin-catch-links": "^2.0.4",
3031
"gatsby-plugin-feed": "^2.0.8",
3132
"gatsby-plugin-google-analytics": "^2.0.21",

src/assets/scss/_variables.scss

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $color-gray-border: lighten($color-base, 77%);
1313
$color-gray-bg: lighten($color-base, 79%);
1414

1515
// Typographic
16-
$typographic-font-family: "Roboto", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
16+
$typographic-font-family: Roboto, sans-serif;
1717

1818
$typographic-root-font-size: 100;
1919
$typographic-base-font-size: 16px;
@@ -27,11 +27,9 @@ $typographic-link-s-font-color: $color-secondary;
2727

2828
$typographic-leading: round(16 * ($typographic-root-font-size / 100) * $typographic-base-line-height);
2929

30-
// Layout
31-
$layout-post-single-max-width: 945px;
32-
$layout-post-single-width: $layout-post-single-max-width - 305px;
33-
34-
$layout-width: 1070px;
30+
$layout-width: 100%;
3531
$layout-breakpoint-sm: 685px;
3632
$layout-breakpoint-md: 960px;
3733
$layout-breakpoint-lg: 1100px;
34+
35+
$footer-padding: 2.5rem;

src/assets/scss/base/_generic.scss

+11-19
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ figcaption {
142142
text-align: center;
143143
}
144144

145-
.content {
146-
&__inner {
147-
padding: 25px 20px;
148-
}
149-
}
150-
151145
@include breakpoint-sm {
152146
figure.float-left,
153147
figure.float-right {
@@ -160,19 +154,17 @@ figcaption {
160154
.float-left {
161155
float: left;
162156
}
163-
.content {
164-
lost-column: 7/12;
165-
&__inner {
166-
padding: 30px 20px;
167-
}
168-
}
169-
}
170157

171-
@include breakpoint-md {
172-
.content {
173-
lost-column: 2/3;
174-
&__inner {
175-
padding: 40px 35px;
158+
&::-webkit-scrollbar {
159+
width: 5px;
160+
&-track {
161+
background: #f1f1f1;
162+
}
163+
&-thumb {
164+
background: #888;
165+
&:hover {
166+
background: #555;
167+
}
176168
}
177169
}
178-
}
170+
}

src/components/CategoryTemplateDetails/index.jsx

-26
This file was deleted.

src/components/Footer/index.jsx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react'
2+
import './style.scss'
3+
4+
class Footer extends React.Component {
5+
render() {
6+
return (
7+
<footer className="footer">
8+
{`Made with ❤️`}
9+
<br/>
10+
<div className="footer-links">
11+
<a href="https://www.gatsbyjs.org/" target="_blank" rel="noopener noreferrer">Gatsby</a>
12+
{` + `}
13+
<a href="https://github.com/" target="_blank" rel="noopener noreferrer">GitHub</a>
14+
{` + `}
15+
<a href="https://www.netlify.com/" target="_blank" rel="noopener noreferrer">Netlify</a>
16+
</div>
17+
</footer>
18+
)
19+
}
20+
}
21+
22+
export default Footer

src/components/Footer/style.scss

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import "../../assets/scss/variables";
2+
@import "../../assets/scss/mixins";
3+
4+
.footer {
5+
background-color: #F8F8F8;
6+
border-top: 1px solid #E7E7E7;
7+
text-align: center;
8+
padding-top: 10px;
9+
padding-bottom: 30px;
10+
left: 0;
11+
bottom: 0;
12+
height: 30px;
13+
width: 100%;
14+
position: absolute;
15+
.footer-links {
16+
font-size: 0.8rem;
17+
}
18+
}

src/components/Home/index.jsx

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import React from 'react'
2+
import { Link, StaticQuery, graphql } from 'gatsby'
3+
import Helmet from 'react-helmet'
4+
import Links from '../Links'
5+
import ProfileImg from '../ProfileImg'
6+
import Footer from '../Footer'
7+
import './style.scss'
8+
9+
class Home extends React.Component {
10+
render() {
11+
return (
12+
<div className="page-container">
13+
<Helmet>
14+
<title>Eyal Roth</title>
15+
</Helmet>
16+
{this.renderContent()}
17+
<Footer />
18+
</div>
19+
)
20+
}
21+
22+
renderContent() {
23+
return (
24+
<StaticQuery
25+
query={graphql`
26+
query HomeQuery {
27+
site {
28+
siteMetadata {
29+
subtitle
30+
copyright
31+
author {
32+
name
33+
email
34+
github
35+
linkedin
36+
}
37+
}
38+
}
39+
}
40+
`}
41+
render={data => this.renderContentFromQuery(data)}
42+
/>)
43+
}
44+
45+
renderContentFromQuery(queryData) {
46+
const { author, subtitle, copyright } = queryData.site.siteMetadata
47+
48+
const siteLinks = [
49+
{
50+
label: "Blog",
51+
path: "/blog"
52+
},
53+
{
54+
label: "About",
55+
path: "/about"
56+
},
57+
]
58+
59+
return (
60+
<div className="home">
61+
<ProfileImg className="home__author-img" author={author.name}/>
62+
<h1 className="home__author-title">
63+
{author.name}
64+
</h1>
65+
<p className="home__author-subtitle">
66+
{subtitle}
67+
</p>
68+
<div className="home__author-icons">
69+
<Links data={author} />
70+
</div>
71+
<nav className="home__site-links">
72+
<ul className="home__site-links-list">
73+
{siteLinks.map(item => (
74+
<li className="home__site-links-item" key={item.path}>
75+
<Link
76+
to={item.path}
77+
className="home__site-links-item-link"
78+
>
79+
{item.label}
80+
</Link>
81+
</li>
82+
))}
83+
</ul>
84+
</nav>
85+
</div>
86+
)
87+
}
88+
}
89+
90+
export default Home

0 commit comments

Comments
 (0)