Skip to content

Commit

Permalink
#30 integrate sass, bulma.css
Browse files Browse the repository at this point in the history
* sass integrated just as stated in tutorial (README.md)
* bulma is loaded from node_modules
  • Loading branch information
fxnn committed Jan 4, 2018
1 parent 2e870f5 commit fe4df8a
Show file tree
Hide file tree
Showing 7 changed files with 6,528 additions and 41 deletions.
2 changes: 2 additions & 0 deletions webapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# css files (we're using sass, css is always auto generated)
src/**/*.css
13 changes: 10 additions & 3 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"bulma": "^0.6.1",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.1.2",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.0.17"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build-js": "react-scripts build",
"build": "npm-run-all build-css build-js",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
}
35 changes: 6 additions & 29 deletions webapp/src/App.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
.App {
text-align: center;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
}

.App-header {
background-color: #222;
height: 150px;
padding: 20px;
color: white;
}

.App-title {
font-size: 1.5em;
}

.App-intro {
font-size: large;
}
animation: App-logo-spin infinite 20s linear;
height: 80px; }

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
from {
transform: rotate(0deg); }
to {
transform: rotate(360deg); } }
26 changes: 20 additions & 6 deletions webapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo"/>
<h1 className="App-title">Welcome to React</h1>
<header className="hero is-primary is-bold">
<div className="hero-body">
<div className="container">
<div className="columns">
<div className="column">
<h1 className="title">my app</h1>
<h2 className="subtitle">built with react</h2>
</div>
<div className="column is-narrow">
<img src={logo} className="App-logo" alt="logo"/>
</div>
</div>
</div>
</div>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
<section className="section">
<div className="container">
<h1 className="title">Section</h1>
To get started, edit <code>src/App.js</code> and save to reload.
</div>
</section>
</div>
);
}
Expand Down
13 changes: 13 additions & 0 deletions webapp/src/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Loading

0 comments on commit fe4df8a

Please sign in to comment.