Skip to content

Commit 4bd4c90

Browse files
committed
Use prettier on scss files, use semantic html, pull styles to classNames
1 parent 31c92dc commit 4bd4c90

File tree

9 files changed

+149
-223
lines changed

9 files changed

+149
-223
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"deploy": "gatsby build --prefix-links && gh-pages -a -d public -b master",
3737
"develop": "gatsby develop",
3838
"start": "npm run develop",
39-
"format": "prettier --write \"src/**/*.{js,json,css}\""
39+
"format": "prettier --write \"src/**/*.{js,json,scss,css}\""
4040
},
4141
"devDependencies": {
4242
"gh-pages": "^2.0.1",
@@ -54,7 +54,7 @@
5454
}
5555
},
5656
"lint-staged": {
57-
"{src}/**/*.{js,json,css}": [
57+
"{src}/**/*.{js,json,scss,css}": [
5858
"prettier --write",
5959
"git add"
6060
]

src/components/Meetup.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const MeetupDescription = ({ name, time, venue }) => (
1111
<strong>Next Event:</strong>
1212
<div className="event-name">{name}</div>
1313
{time &&
14-
venue &&
15-
venue.name && (
16-
<span className="next-event-timestamp">
17-
{format(new Date(time), 'dddd, MMMM Do, YYYY')} at{' '}
18-
<strong>{venue.name}</strong>
19-
</span>
20-
)}
14+
venue &&
15+
venue.name && (
16+
<span className="next-event-timestamp">
17+
{format(new Date(time), 'dddd, MMMM Do, YYYY')} at{' '}
18+
<strong>{venue.name}</strong>
19+
</span>
20+
)}
2121
</div>
2222
</div>
2323
)
@@ -46,7 +46,7 @@ class Meetup extends Component {
4646
venue,
4747
loading: false,
4848
error: false,
49-
}),
49+
})
5050
)
5151
.catch(() => this.setState({ loading: false, error: true }))
5252
}
@@ -65,7 +65,7 @@ class Meetup extends Component {
6565
// },
6666
// }
6767

68-
if (this.state.loading) return <MeetupDescription name={'Loading...'}/>
68+
if (this.state.loading) return <MeetupDescription name={'Loading...'} />
6969

7070
if (this.state.error)
7171
return (

src/components/footer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import { Link, withPrefix } from 'gatsby'
33

44
const Footer = () => (
5-
<div style={{ maxWidth: '100vw' }} className="footer">
5+
<footer className="footer">
66
<div className="footer-content">
77
<div className="footer-column footer-sitemap">
88
<h6>Meetup</h6>
@@ -23,9 +23,7 @@ const Footer = () => (
2323
</div>
2424
</div>
2525
</div>
26-
</div>
26+
</footer>
2727
)
2828

29-
Footer.propTypes = {}
30-
3129
export default Footer

src/components/header.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import jsmnImg from '../images/JSMN-opaque-js.png'
66

77
const Header = () => (
88
<Headroom style={{ background: '#fff' }}>
9-
<div className="primary-navigation" style={{
10-
maxWidth: 960,
11-
marginLeft: 'auto',
12-
marginRight: 'auto',
13-
}}>
9+
<nav className="primary-navigation">
1410
<div className="logo-container">
1511
<Link to={withPrefix('/')}>
1612
<img className="logo" src={jsmnImg} alt="Logo for JavaScriptMN" />
@@ -23,7 +19,7 @@ const Header = () => (
2319
Speak
2420
</Link>
2521
</div>
26-
</div>
22+
</nav>
2723
</Headroom>
2824
)
2925

src/components/image.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/components/layout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const Layout = ({ children }) => (
3535
<GoogleFont typography={typography} />
3636
</Helmet>
3737
<Header />
38-
<div className="content-body" style={{ maxWidth: '100vw' }}>
38+
<min role="main" className="content-body">
3939
{children}
40-
</div>
40+
</min>
4141
<Footer />
4242
</div>
4343
)}

0 commit comments

Comments
 (0)