Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions README.md

This file was deleted.

3 changes: 3 additions & 0 deletions lab-eddie/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets" : ["es2015", "react"]
}
5 changes: 5 additions & 0 deletions lab-eddie/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules/*
**/vendor/*
**/*.min.js
**/coverage/*
**/build/*
21 changes: 21 additions & 0 deletions lab-eddie/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"quotes": [ "error", "single" ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ]
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
136 changes: 136 additions & 0 deletions lab-eddie/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Created by https://www.gitignore.io/api/osx,vim,node,macos,windows

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### OSX ###

# Icon must end with two \r

# Thumbnails

# Files that might appear in the root of a volume

# Directories potentially created on remote AFP share

### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/osx,vim,node,macos,windows
8 changes: 8 additions & 0 deletions lab-eddie/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This is my note pad app :D

I tweaked it a little bit to add some more features :o

It allows you to create a category to file the notes in.
Whenever you add a category, it gets added to the dropdown selector. When you add a note, it might not show up. That's because there's some animations thrown in there. Hover over the added category and it should show up. If you click the list item, it'll change to an update form. :D

Thanks for reading
30 changes: 30 additions & 0 deletions lab-eddie/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "lab-eddie",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"build": "webpack",
"watch": "webpack-dev-server --inline --hot"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.5",
"extract-text-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^2.30.1",
"node-sass": "^4.5.3",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router-dom": "^4.1.2",
"sass-loader": "^6.0.6",
"uuid": "^3.1.0",
"webpack": "^3.5.5",
"webpack-dev-server": "^2.7.1"
}
}
25 changes: 25 additions & 0 deletions lab-eddie/src/components/NoteBody/_NoteBody.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.note-body {
width: 100%;
height: 15vh;
float: left;
}

.note-body {
h4, p {
margin: 0;
padding: 0;
float: left;
margin-left: 5%;
margin-right: 15%;
width: 80%;
font-size: 4vh;
height: 5vh;
}

button {
float: left;
margin-left: 5%;
width: 10%;
border: 40px;
}
}
32 changes: 32 additions & 0 deletions lab-eddie/src/components/NoteBody/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
require('./_NoteBody.scss');

class NoteBody extends React.Component {
constructor(props) {
super(props);

this.deleteNote.bind(this)
}

deleteNote(cat, ind) {
let appState = this.props.appState();
appState.state.lists[cat].splice(ind, 1);
return appState.setState(appState.state);
}

render() {
let note = this.props.note;
return (
<span onClick={this.props.update} className='note-body'>
<h4>{`Title: ${note.title}`}</h4>
<p>{`Content: ${note.content}`}</p>
<button
onClick={() => this.deleteNote(note.category, this.props.ind)}>
Delete
</button>
</span>
)
}
}

export default NoteBody;
Empty file.
44 changes: 44 additions & 0 deletions lab-eddie/src/components/NoteCat/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';

class NoteCat extends React.Component {
constructor(props) {
super(props);
this.state ={
category: ''
}
this.onChange = this.onChange.bind(this);
this.addCat = this.addCat.bind(this);
}

onChange(e) {
this.setState({
[e.target.name]: e.target.value
})
}

addCat(e) {
e.preventDefault();
let appState = this.props.appState()
let tempState = appState.state;
if(!tempState.lists[this.state.category]) tempState.lists[this.state.category] = [];
appState.setState(tempState);
}

render() {
return (
<form onSubmit={this.addCat}>
<input
type='text'
name='category'
value={this.state.category}
placeholder='Enter Category'
onChange={this.onChange}
required={true}
/>
<button type='submit'>{'Add Category'}</button>
</form>
)
}
}

export default NoteCat;
Empty file.
Loading