-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (46 loc) · 2.03 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
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<title>Notebook</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<script src="https://unpkg.com/marked"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/moment"></script>
<div id="notebook">
<aside class="side-bar">
<div class="toolbar">
<button v-on:click="addNote" v-bind:title="addButtonTitle">
<i class="material-icons">add</i>
Add note
</button>
<div class="notes">
<div class="note" v-for="note of sortedNotes" v-on:click="selectNote(note)"
v-bind:class="{selected: note === selectedNote}">{{ note.title }}
<i class="icon material-icons" v-if="note.favorite">star</i>
</div>
</div>
</div>
</aside>
<template v-if="selectedNote">
<section class="main">
<div class="toolbar">
<input v-model="selectedNote.title" placeholder="Note title" />
<button @click="removeNote" title="Remove note"><i class="material-icons">delete</i></button>
<button @click="favoriteNote" title="Favorite note"><i
class="material-icons">{{ selectedNote.favorite ? 'star' : 'star_border' }}</i></button>
</div>
<textarea v-model="selectedNote.content"></textarea>
<div class="toolbar status-bar">
<span class="date">
<span class="label">Created</span>
<span class="value">{{ selectedNote.created | date }}</span> </span>
</div>
</section>
<aside class="preview" v-html="notePreview"></aside>
</template>
</div>
<script src="script.js"></script>
</body>
</html>