Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

Commit

Permalink
🔖 v1: Add CSS, edit script, pin versions
Browse files Browse the repository at this point in the history
  • Loading branch information
leeandher committed Apr 8, 2019
1 parent 6734ad5 commit e0d989e
Show file tree
Hide file tree
Showing 7 changed files with 3,849 additions and 2,135 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
/.pnp
.pnp.js

# styling
*.css

# testing
/coverage

Expand Down
5,801 changes: 3,693 additions & 2,108 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"name": "conway",
"version": "0.1.0",
"private": true,
"version": "1.0.0",
"dependencies": {
"antd": "^3.11.0",
"babel-plugin-import": "^1.11.0",
"node-sass": "^4.10.0",
"react": "^16.6.3",
"react-app-rewire-less": "^2.1.3",
"react-app-rewired": "^1.6.2",
"react-dom": "^16.6.3",
"react-redux": "^6.0.0",
"react-scripts": "2.1.1",
"redux": "^4.0.1"
"antd": "3.11.0",
"babel-plugin-import": "1.11.0",
"node-sass": "4.10.0",
"react": "16.6.3",
"react-app-rewire-less": "2.1.3",
"react-app-rewired": "1.6.2",
"react-dom": "16.6.3",
"react-redux": "6.0.0",
"react-scripts": "2.1.8",
"redux": "4.0.1"
},
"scripts": {
"sass": "node ./scripts/sass-reduce.js && node-sass --watch src/styles/scss -o src/styles/css",
Expand Down
25 changes: 13 additions & 12 deletions scripts/sass-reduce.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
const fs = require("fs");
const path = require("path");
const fs = require("fs")
const path = require("path")

const sassFolder = path.join(__dirname, "../src/styles/scss");
const sassOut = "index.scss";
const sassFolder = path.join(__dirname, "../src/styles/scss")
const sassOut = "index.scss"

if (fs.existsSync(`${sassFolder}/${sassOut}`)) {
fs.unlinkSync(`${sassFolder}/${sassOut}`);
fs.unlinkSync(`${sassFolder}/${sassOut}`)
}

const stream = fs.createWriteStream(`${sassFolder}/${sassOut}`);
const stream = fs.createWriteStream(`${sassFolder}/${sassOut}`)
fs.readdirSync(sassFolder).forEach(fileName => {
stream.write(`@import "${fileName.replace(".scss", "")}";${"\n"}`);
});
stream.end();
if (fileName !== sassOut)
stream.write(`@import "${fileName.replace(".scss", "")}";${"\n"}`)
})
stream.end()

console.log("Sass files have been compiled successfully!");
console.log("");
console.log("Now watching changes to existing files");
console.log(
"Sass files have been compiled successfully!\n\nNow watching changes to existing files",
)
Empty file removed src/styles/css/.gitkeep
Empty file.
66 changes: 66 additions & 0 deletions src/styles/css/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
body {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }

.dark-style {
filter: invert(1); }
.dark-style .override-style {
filter: invert(1); }

.logo {
max-width: 30px;
margin: 30px auto; }

.logo-wrapper {
text-align: center;
width: 90%; }

.app-header {
font-style: italic;
text-shadow: 2px 2px #ffadd2;
white-space: nowrap; }

.game-board {
background: transparent;
box-sizing: border-box;
padding: 10px;
margin: 0 auto; }

.game-board__generation {
text-align: center; }
.game-board__generation .number {
font-size: 200%;
font-weight: bold;
font-style: italic;
text-decoration: underline #eb2f96; }

.game-board__species {
text-align: center; }
.game-board__species input {
border: 0;
border-radius: 5px;
box-shadow: inset 0 0 5px #ffadd2;
font-style: italic;
padding: 3px 5px;
background: transparent;
text-align: center; }
.game-board__species input:focus {
box-shadow: inset 0 0 15px #eb2f96;
outline: 0; }

.game-board__row {
display: flex;
justify-content: center; }

.game-board__cell {
margin: 1px;
height: 13px;
width: 13px; }
.game-board__cell.game-board__cell--dead {
background: rgba(0, 0, 0, 0.025); }
.game-board__cell.game-board__cell--alive-new {
background: #ffadd2; }
.game-board__cell.game-board__cell--alive-old {
background: #eb2f96; }
66 changes: 66 additions & 0 deletions src/styles/css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
body {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }

.dark-style {
filter: invert(1); }
.dark-style .override-style {
filter: invert(1); }

.logo {
max-width: 30px;
margin: 30px auto; }

.logo-wrapper {
text-align: center;
width: 90%; }

.app-header {
font-style: italic;
text-shadow: 2px 2px #ffadd2;
white-space: nowrap; }

.game-board {
background: transparent;
box-sizing: border-box;
padding: 10px;
margin: 0 auto; }

.game-board__generation {
text-align: center; }
.game-board__generation .number {
font-size: 200%;
font-weight: bold;
font-style: italic;
text-decoration: underline #eb2f96; }

.game-board__species {
text-align: center; }
.game-board__species input {
border: 0;
border-radius: 5px;
box-shadow: inset 0 0 5px #ffadd2;
font-style: italic;
padding: 3px 5px;
background: transparent;
text-align: center; }
.game-board__species input:focus {
box-shadow: inset 0 0 15px #eb2f96;
outline: 0; }

.game-board__row {
display: flex;
justify-content: center; }

.game-board__cell {
margin: 1px;
height: 13px;
width: 13px; }
.game-board__cell.game-board__cell--dead {
background: rgba(0, 0, 0, 0.025); }
.game-board__cell.game-board__cell--alive-new {
background: #ffadd2; }
.game-board__cell.game-board__cell--alive-old {
background: #eb2f96; }

0 comments on commit e0d989e

Please sign in to comment.