Skip to content

Commit

Permalink
Switch to scss
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejmatu committed Apr 22, 2018
1 parent c3fb26d commit 1e8286b
Show file tree
Hide file tree
Showing 17 changed files with 303 additions and 95 deletions.
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
},
plugins: [
'gatsby-plugin-react-helmet',
'gatsby-plugin-sass',
{
resolve: 'gatsby-source-filesystem',
options: {
Expand Down
11 changes: 0 additions & 11 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ const { createFilePath } = require('gatsby-source-filesystem')
const cssnext = require('postcss-cssnext');
const cssimport = require('postcss-import');

exports.modifyWebpackConfig = ({ config }) => {
config.merge({
postcss: [
cssimport(),
cssnext(),
],
});

return config;
};

exports.createPages = ({ boundActionCreators, graphql }) => {
const { createPage } = boundActionCreators

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"gatsby-link": "^1.6.40",
"gatsby-plugin-netlify-cms": "^2.0.1",
"gatsby-plugin-react-helmet": "^2.0.10",
"gatsby-plugin-sass": "^1.0.26",
"gatsby-plugin-sharp": "^1.6.42",
"gatsby-remark-images": "^1.5.61",
"gatsby-source-filesystem": "^1.5.33",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import Navbar from '../Navbar'
import Box from '../Box'
import bananaBg from '../../img/bananaBg.png'
import './style.css'
import './style.scss'

function Header({ imageSrc }) {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../style/colors.css';
@import '../../style/colors';

.header {
background-size: cover;
background-position: center center;
color: var(--color-white);
color: $color-white;
}

.header:after {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import Link from 'gatsby-link'
import './style.css'
import './style.scss'

function Navbar() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../style/colors.css';
@import '../../style/colors';

.nav__item {
text-transform: uppercase;
text-decoration: none;
color: var(--color-white);
color: $color-white;
}

.nav__item:hover,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import '../style/main.css'
import '../style/main.scss'

const TemplateWrapper = ({ children, data }) => (
<div>
Expand Down
2 changes: 2 additions & 0 deletions src/style/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$color-white: #fff;
$color-black: #000;
2 changes: 2 additions & 0 deletions src/style/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$font-primary: 'Lato', sans-serif;
$font-secondary: 'Gaegu', cursive;
4 changes: 0 additions & 4 deletions src/style/colors.css

This file was deleted.

19 changes: 0 additions & 19 deletions src/style/main.css

This file was deleted.

15 changes: 15 additions & 0 deletions src/style/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import 'colors';
@import 'variables';

@import url('https://fonts.googleapis.com/css?family=Gaegu:700|Lato');
@import '~normalize.css/normalize.css';
@import '~basscss/css/basscss.css';

*,
.font-primary {
font-family: $font-primary;
}

.font-secondary {
font-family: $font-secondary;
}
9 changes: 0 additions & 9 deletions src/style/variables.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/templates/about-page.template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import Box from '../../components/Box'
import blueOrangeImg from '../../img/orangeBg.png'
import Header from '../../components/Header'
import './style.css'
import './style.scss'

function AboutPage({ data }) {
return (
Expand Down
File renamed without changes.
Loading

0 comments on commit 1e8286b

Please sign in to comment.