diff --git a/client/assets/scss/Content.scss b/client/assets/scss/Content.scss
index 55c9552..fdd6a11 100644
--- a/client/assets/scss/Content.scss
+++ b/client/assets/scss/Content.scss
@@ -29,4 +29,7 @@
pre {
white-space: pre-wrap;
}
+ .btn{
+ width: 100%;
+ }
}
diff --git a/client/assets/scss/main.scss b/client/assets/scss/main.scss
index 9e9b508..0c58bf9 100644
--- a/client/assets/scss/main.scss
+++ b/client/assets/scss/main.scss
@@ -1,6 +1,7 @@
@import './utils.scss';
$linkColor: #3598db;
+$backgroundColor: #FFFFFF;
html {
font-family: 'Roboto Slab', serif;
@@ -9,6 +10,7 @@ html {
overflow-y: scroll;
}
body {
+ background-color: $backgroundColor;
max-width: 100%;
overflow-x: hidden;
position: relative;
@@ -79,3 +81,14 @@ hr {
flex: 1;
justify-content: center;
}
+.btn{
+ background-color: $backgroundColor;
+ border: 1px solid #DADADA;
+ border-radius: .2em;
+ cursor: pointer;
+ padding: .5em;
+
+ &:hover{
+ background-color: #F3F3F3;
+ }
+}
\ No newline at end of file
diff --git a/client/js/components/Preview.js b/client/js/components/Preview.js
index db6f688..8c38a30 100644
--- a/client/js/components/Preview.js
+++ b/client/js/components/Preview.js
@@ -7,7 +7,7 @@ export default class Preview extends React.Component{
insertPosts(posts){
let elements = [];
- for (let i in posts){
+ for (let i = 0; i < this.props.postLimit && i < posts.length; i++){
elements.push(
@@ -22,8 +22,6 @@ export default class Preview extends React.Component{
);
-
- if(i >= this.props.postLimit) break;
}
return elements;
@@ -31,10 +29,13 @@ export default class Preview extends React.Component{
render(){
const posts = this.props.posts;
-
+
return (
{posts.length > 0 ? this.insertPosts(posts): null}
+ {posts.length > this.props.postLimit ?
+
+ : null}
);
}
diff --git a/client/js/components/sensors/SensorList.js b/client/js/components/sensors/SensorList.js
index f13a7fc..5e2983f 100644
--- a/client/js/components/sensors/SensorList.js
+++ b/client/js/components/sensors/SensorList.js
@@ -50,7 +50,6 @@ export default class SensorList extends React.Component {
);
}
render(){
- console.log(this.state);
return (
{this.state.fetched ? this.state.sensors.map(this.insertSensorData) : null}
diff --git a/client/js/pages/Index.js b/client/js/pages/Index.js
index 3c21c8d..4b6468e 100644
--- a/client/js/pages/Index.js
+++ b/client/js/pages/Index.js
@@ -43,7 +43,11 @@ export default class Index extends React.Component {
- {typeof this.page === 'undefined' && !fetching ?
: null}
+ {typeof this.page === 'undefined' && !fetching
+ ?
+ : null}
{this.page === 'post' && !fetching ? : null}
{fetching ? loadingElement : null}
diff --git a/package.json b/package.json
index 2221191..2ad0b69 100644
--- a/package.json
+++ b/package.json
@@ -6,10 +6,12 @@
"scripts": {
"build": "webpack && babel-node metadata.js",
"c9": "webpack-dev-server --port $PORT --host $IP --hot --content-base dist --history-api-fallback",
+ "check_gzip_size": "gzip -9 -c ./public/client.min.js | wc -c | numfmt --to=iec-i --suffix=B --padding=10",
+ "deploy" : "npm run get_dependencies && npm run prod && ./mywebsite",
"dev": "webpack-dev-server --content-base public --inline --hot --history-api-fallback",
+ "get_dependencies": "npm install & go get ./server",
"prod": "export NODE_ENV=production && webpack -p && babel-node metadata.js && go build ./server/mywebsite.go",
- "prod-win": "set NODE_ENV=production && webpack -p && babel-node metadata.js && go build ./server/mywebsite.go",
- "deploy" : "npm run prod && ./mywebsite"
+ "prod-win": "set NODE_ENV=production && webpack -p && babel-node metadata.js && go build ./server/mywebsite.go"
},
"repository": {
"type": "git",
diff --git a/readme.md b/readme.md
index 0e7b72b..7f0b8fc 100644
--- a/readme.md
+++ b/readme.md
@@ -4,20 +4,17 @@
- Go App Engine
`npm run build` - builds the application using webpack and runs metadata.js
-
+`npm run
- metadata.js recursivly scans the posts folder for markdown files and then parses each into into a json object
- the posts folder is then copied into the dist folder
## TODO
-- fix font sizing
+- sticky footer
- clean up css
- adjust animations
-- fix goapp serve and webpack-dev-server so paths work correctly
-- posts page
+- fix go and webpack-dev-server so paths work correctly
- add sensor page
-- finally do writeups on my projects
-- clean go code up
-- host on app engine (run mongodb on compute engine???)
-- pull everything off digital ocean
- add paging
+
+- finally do writeups on my projects
\ No newline at end of file
diff --git a/server/utils/config.go b/server/utils/config.go
index e6b45b8..5085ad6 100644
--- a/server/utils/config.go
+++ b/server/utils/config.go
@@ -31,8 +31,6 @@ func ReadConfig() Config {
log.Printf("%s\n", string(file))
- //m := new(Dispatch)
- //var m interface{}
var result Config
err := json.Unmarshal(file, &result)