Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
739ce37
Added editor title field and some basic buttons
whimsicaldreamer May 6, 2018
f1487d6
Changing editor to notepad
May 6, 2018
801c00c
uncommenting offlinejs
May 6, 2018
05becc4
Merge branch 'master' into editor-screen
whimsicaldreamer May 7, 2018
cab59ba
Merge branch 'master' into editor-screen
whimsicaldreamer May 7, 2018
9f23d98
Merge branch 'master' into editor-screen
whimsicaldreamer May 7, 2018
570ea72
changed hover color on tools in desktop view
whimsicaldreamer May 7, 2018
0b6915b
fixing editor screen
May 7, 2018
ec8729c
Bordered version for debugging issues
whimsicaldreamer May 7, 2018
92349b8
Fix editor leaking out on smaller viewports
whimsicaldreamer May 8, 2018
efd5056
Merge branch 'master' into editor-screen
whimsicaldreamer May 8, 2018
35720b2
Added slatejs, its peer dependencies, and added a basic editor field
whimsicaldreamer May 8, 2018
4203ec5
added basic method for updating notepad text via click on card
sid7 May 10, 2018
3f38d69
Adding minimal editor with keyboard fix
whimsicaldreamer May 11, 2018
41fe760
Adding preview editor without buttons
whimsicaldreamer May 12, 2018
f7c5f3f
Preview editor buttons
whimsicaldreamer May 12, 2018
cdf6385
Small update to the title field
whimsicaldreamer May 12, 2018
aedb6a4
hide cards on selection
sid7 May 12, 2018
b5b3a24
toggle cards and notepad
sid7 May 12, 2018
bcab9ca
Minor fixes
whimsicaldreamer May 12, 2018
5e213e9
handle resize
sid7 May 12, 2018
34fd8dd
Fixed chrome issue
whimsicaldreamer May 12, 2018
545335c
added utils function and active state for cards
sid7 May 12, 2018
4bf8689
fix card state on pad close
sid7 May 12, 2018
68ea28c
Enabling and disabling editor on edit click
whimsicaldreamer May 12, 2018
932b207
focus on textarea when click on pencil
sid7 May 12, 2018
1d5c6f6
set ff cursor postion at end on focus
sid7 May 12, 2018
867f676
Fixing lint issues
whimsicaldreamer May 13, 2018
ed3cf41
inetgration for get all notes
May 14, 2018
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
174 changes: 171 additions & 3 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
"dependencies": {
"axios": "^0.18.0",
"bootstrap-css-only": "^4.1.0",
"immutable": "^3.8.2",
"prop-types": "^15.5.10",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-redux": "^5.0.7",
"react-router-dom": "^4.2.2",
"redux": "^3.7.2"
"redux": "^3.7.2",
"slate": "^0.33.5",
"slate-react": "^0.12.5"
},
"devDependencies": {
"eslint": "^4.19.1",
Expand Down
12 changes: 8 additions & 4 deletions client/src/components/NoteCard/noteCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,24 @@
color: var(--white-70);
}

.noteContainer:hover {
.noteContainer:hover, .noteContainer.sel {
box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
background-color: var(--primary-color);

}
.noteContainer:hover h2,
.noteContainer:hover p {
.noteContainer.sel h2,
.noteContainer:hover p,
.noteContainer.sel p {
color: var(--white-100);
}

.noteContainer:hover .noteContentTop>span{
.noteContainer:hover .noteContentTop>span,
.noteContainer.sel .noteContentTop>span{
color:var(--white-70);
}
.noteContainer:hover .noteContentTop>div{
.noteContainer:hover .noteContentTop>div,
.noteContainer.sel .noteContentTop>div{
visibility:visible;
}

Expand Down
36 changes: 28 additions & 8 deletions client/src/components/NoteCard/noteCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,47 @@ import React, { Component } from "react";
import "./noteCard.css";

class NoteCard extends Component {
handleClick = ({ target, currentTarget }) => {
if (target.title === "") {
const ol = document.querySelector(".noteContainer.sel");
if (ol) {
ol.classList.remove("sel");
}
currentTarget.classList.add("sel");
this.props.onClick(currentTarget.getAttribute("data-note-slug"));
}
};
render() {
const { updated_at, title, notes } = this.props.data;
debugger;
var day = new Date(Date.parse(updated_at));
day = day.getDate()+'/'+day.getMonth()+'/'+day.getFullYear();
console.log("fff", day);
return (
<div className="noteContainer">
<div
className="noteContainer"
data-note-slug="note-1fn12"
onClick={this.handleClick}
>
<div className="noteContentTop">
<div>
<a href="" title="Share this note">
<a href="#share" title="Share this note">
<i className="fas fa-share-square" />
</a>
<a href="" title="Download this note">
<a href="#download" title="Download this note">
<i className="fas fa-download" />
</a>
<a href="" title="Delete this note">
<a href="#del" title="Delete this note">
<i className="fas fa-trash-alt" />
</a>
</div>
<span>Date</span>
<span className="timestamp" title="date">
{day}
</span>
</div>
<h2>Title</h2>
<h2>{title}</h2>
<p>
I am some paragraph<br />
I am line two of the paragraph
{notes}
</p>
</div>
);
Expand Down
Loading