-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (73 loc) · 2.53 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html>
<head>
<title>Notebook</title>
<!-- Icons & Stylesheets -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Include the library in the page -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="http://cdn.staticfile.org/moment.js/2.24.0/moment.js"></script>
<!-- Notebook app -->
<div id="notebook">
<!-- aside pane -->
<aside class="side-bar">
<!-- add note button -->
<div class="toolbar">
<button
@click="addNote"
:title="addButtonTitle"
><i class="material-icons">add</i>Add note</button>
</div>
<!-- note list -->
<div class="notes">
<div v-for="note of sortedNotes" class="note"
@click="selectNote(note)"
:key="note.id"
:class="{selected: note === selectedNote}"
>{{ note.title }}</div>
</div>
</aside>
<!-- Main pane -->
<template v-if="selectedId">
<!-- text pane -->
<section class="main">
<div class="toolbar">
<!-- new tools here -->
<input type="text" v-model="selectedNote.title" placeholder="Note Title">
<button @click="favoriteNote" title="Favorite note">
<i class="material-icons">{{ selectedNote.favorite ? 'star' : 'star_border' }}</i>
</button>
<button @click="removeNote" title="Remove note"><i class="material-icons">delete</i></button>
</div>
<textarea v-model="selectedNote.content"></textarea>
<div class="status-bar">
<span class="date">
<span class="label">Created</span>
<span class="value">{{ selectedNote.created | date}}</span>
</span>
<span class="lines">
<span class="label">Lines</span>
<span class="value">{{ linesCount }}</span>
</span>
<span class="words">
<span class="label">Words</span>
<span class="value">{{ wordsCount }}</span>
</span>
<span class="charactors">
<span class="label">Charactors</span>
<span class="value">{{ charactersCount }}</span>
</span>
</div>
</section>
<!-- Preview pane -->
<aside class="preview" v-html="notePreview">
</aside>
</template>
</div>
<!-- Some JavaScript -->
<script src="script.js" type="module"></script>
</body>
</html>