notepad

Check-in [6d380513b9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use the screen better, using flexbox
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | master | trunk
Files: files | file ages | folders
SHA3-256: 6d380513b96fa2507e6baa6a94130b3f9da9dbac814c91f2d87c89fcd0e40c3f
User & Date: vandys 2020-01-28 14:59:36
Context
2020-01-28
14:59
Use the screen better, using flexbox Leaf check-in: 6d380513b9 user: vandys tags: master, trunk
2019-10-29
22:08
Some more work on smart sync timing check-in: a6fc6661c6 user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to css/main.css.

15
16
17
18
19
20
21











22
23
24
25
26
27
#entries>button {
    background-color: pink;
    border-radius: 25px;
}
button {
    font-size: 16px;
}











#editor>textarea, #editor>input {
    font-size: 14px;
}
textarea {
    white-space: pre;
}







>
>
>
>
>
>
>
>
>
>
>






15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#entries>button {
    background-color: pink;
    border-radius: 25px;
}
button {
    font-size: 16px;
}
#editor {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}
#entryTitle, #entryBtns {
    flex: 0;
}
#entryContent {
    flex: 1;
}
#editor>textarea, #editor>input {
    font-size: 14px;
}
textarea {
    white-space: pre;
}

Changes to index.html.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    </div>
</div>

<div id="editor">
    <input type="text" id="entryTitle" placeholder="Note Name">
    <textarea name="entry-content" id="entryContent"
     placeholder="Content"></textarea>
    <div>
	<button onclick="edit_keep()">Save</button>
	<button onclick="edit_cancel()">Cancel</button>
	<button onclick="edit_delete()">Delete This</button>
    </div>
</div>

<div id="login">







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    </div>
</div>

<div id="editor">
    <input type="text" id="entryTitle" placeholder="Note Name">
    <textarea name="entry-content" id="entryContent"
     placeholder="Content"></textarea>
    <div id="entryBtns">
	<button onclick="edit_keep()">Save</button>
	<button onclick="edit_cancel()">Cancel</button>
	<button onclick="edit_delete()">Delete This</button>
    </div>
</div>

<div id="login">

Changes to js/main.js.

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
	}
    }
}

// Transition to displaying an item
function to_item() {
    mainmenu.style.display = "none";
    editor.style.display = "block";
    mainmen = false;
}

// Transition back to main menu
function to_menu() {
    editor.style.display = "none";
    mainmenu.style.display = "block";
................................................................................
    const req = new XMLHttpRequest();
    req.open("POST", "sync.py");
    req.onreadystatechange = () => {
	if (req.readyState != 4) {
	    return;
	}
	if (req.status != 200) {
	    alert("Sync error");
	    return;
	}

	// Here's a refreshed notion of note content
	const deltas = JSON.parse(req.responseText);
	update_notes(deltas);
	update_entries();







|







 







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
	}
    }
}

// Transition to displaying an item
function to_item() {
    mainmenu.style.display = "none";
    editor.style.display = "flex";
    mainmen = false;
}

// Transition back to main menu
function to_menu() {
    editor.style.display = "none";
    mainmenu.style.display = "block";
................................................................................
    const req = new XMLHttpRequest();
    req.open("POST", "sync.py");
    req.onreadystatechange = () => {
	if (req.readyState != 4) {
	    return;
	}
	if (req.status != 200) {
	    alert("Sync error: " + req.responseText);
	    return;
	}

	// Here's a refreshed notion of note content
	const deltas = JSON.parse(req.responseText);
	update_notes(deltas);
	update_entries();