-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (46 loc) · 1.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Notes</title>
<link rel="stylesheet" href="index.css"></link>
<script src="https://unpkg.com/vue@next"></script>
<script src="index.js" defer></script>
</head>
<body>
<div id="app">
<div class="toolbar">
<button v-on:click="createNote()" class="toolbar-button toolbar-button-new">New</button>
<button v-on:click="deleteNote(selectedNote)" class="toolbar-button toolbar-button-delete">Delete</button>
<input
v-model="searchNoteText"
v-on:input="selectVisibleNote"
class="toolbar-search"
type="text"
placeholder="Search..."
/>
</div>
<div class="note-container">
<div class="note-selectors">
<div
v-for="note in transformedNotes"
v-on:click="selectNote(note)"
v-bind:class="{active: note === selectedNote}"
class="note-selector"
>
<p class="note-selector-title">{{ formatTitle(note.body) }}</p>
<p class="note-selector-timestamp">{{ formatTimestamp(note.timestamp) }}</p>
</div>
</div>
<div v-if="selectedNote.id" class="note-editor">
<p class="note-editor-info">{{ formatTimestamp(selectedNote.timestamp) }}</p>
<textarea
v-model="selectedNote.body"
v-on:input="updateNoteTimestamp(selectedNote)"
class="note-editor-input"
></textarea>
</div>
</div>
</div>
</body>
</html>