-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
151 lines (138 loc) · 9.89 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--VueJS-->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- CDNJS :: Sortable (https://cdnjs.com/) -->
<script src="//cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
<!-- CDNJS :: Vue.Draggable (https://cdnjs.com/) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/Vue.Draggable/2.20.0/vuedraggable.umd.min.js"></script>
<!--Bootstrap-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<!--Font Awesome-->
<script src="https://kit.fontawesome.com/86459ed88a.js"></script>
<!--Custom CSS-->
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<div id="app" v-cloak>
<nav class="navbar navbar-light bg-light">
<span class="navbar-brand mb-0 h1"><!-- <img src="zebra-logo-cropped.png" class="mini-logo"> --> Xebra Notes</span>
<span class="btn btn-primary new-note-btn" @click="newNote()">
New Note <i class="fas fa-plus-circle"></i>
</span>
<span class="navbar-text">
<div class="search-wrap">
<input type="text" v-model="state.searchQuery" @input="searchNotes()" placeholder="search query" class="custom-input-search">
<i v-if="state.searchQuery == '' || state.searchQuery == null " class="fas fa-search" style="color:var(--text-color)"></i>
<span v-if="state.searchQuery.length > 0" class="hover-icon" @click="clearSearch()">
<i class="fas fa-times" style="color:var(--text-color)"></i>
</span>
</div>
</span>
</nav>
<div class="mega-wrap">
<div class="wrap">
<div class="cat-title">
<span class="hover-icon" @click="newNote('misc')">
Misc <i class="fas fa-plus-circle"></i>
<span>
<i class="fas fa-cogs" style="float:left"></i>
</div>
<draggable v-model="notes.misc" group="people" @start="drag=true" @end="drag=false" class="drag-area" ghost-class="ghost" @change="saveNotes()">
<div v-for="element,index in notes.misc" :key="element.id" class="note" v-if="searchNote(element)">
<div class="note-title">
<span v-if="element.title">{{ element.title.length < 32 ? element.title : element.title.substring(0,32) + "..."}}</span>
<span v-else="element.title">...</span>
<span style="float:right" class="hover-icon" @click="deleteNote('misc',index)"><i class="far fa-trash-alt"></i></span>
<span style="float:right; width:1rem; height:1em;"> </span>
<span style="float:right" class="hover-icon" @click="editNote('misc',index)"><i class="fas fa-edit"></i></span>
<span v-if="element.link!=null && element.link!=''">
<span style="float:right; width:1rem; height:1em;"> </span>
<a :href="element.link" target="blank" style="float:right;" class="hover-icon"><i class="fas fa-link"></i></a>
</span>
</div>
<div class="content">{{element.content}}</div>
</div>
</draggable>
</div>
<div class="wrap">
<div class="cat-title">
<span class="hover-icon" @click="newNote('todo')">
Todo <i class="fas fa-plus-circle"></i>
<span>
<i class="fas fa-clipboard-check" style="float:left"></i>
</div>
<draggable v-model="notes.todo" group="people" @start="drag=true" @end="drag=false" class="drag-area" ghost-class="ghost" @change="saveNotes()">
<div v-for="element,index in notes.todo" :key="element.id" class="note" v-if="searchNote(element)">
<div class="note-title">
<span v-if="element.title">{{ element.title.length < 36 ? element.title : element.title.substring(0,36) + "..."}}</span>
<span v-else="element.title">...</span>
<span style="float:right" class="hover-icon" @click="deleteNote('todo',index)"><i class="far fa-trash-alt"></i></span>
<span style="float:right; width:1rem; height:1em;"> </span>
<span style="float:right" class="hover-icon" @click="editNote('todo',index)"><i class="fas fa-edit"></i></i></span>
<span v-if="element.link!=null && element.link!=''">
<span style="float:right; width:1rem; height:1em;"> </span>
<a :href="element.link" target="blank" style="float:right;" class="hover-icon"><i class="fas fa-link"></i></a>
</span>
</div>
<div class="content">{{element.content}}</div>
</div>
</draggable>
</div>
<div class="wrap">
<div class="cat-title">
<span class="hover-icon" @click="newNote('ideas')">
Ideas <i class="fas fa-plus-circle"></i>
<span>
<i class="fas fa-lightbulb" style="float:left"></i>
</div>
<draggable v-model="notes.ideas" group="people" @start="drag=true" @end="drag=false" class="drag-area" ghost-class="ghost" @change="saveNotes()">
<div v-for="element,index in notes.ideas" :key="element.id" class="note" v-if="searchNote(element)">
<div class="note-title">
<span v-if="element.title">{{ element.title.length < 36 ? element.title : element.title.substring(0,36) + "..."}}</span>
<span v-else="element.title">...</span>
<span style="float:right" class="hover-icon" @click="deleteNote('ideas',index)"><i class="far fa-trash-alt"></i></span>
<span style="float:right; width:1rem; height:1em;"> </span>
<span style="float:right" class="hover-icon" @click="editNote('ideas',index)"><i class="fas fa-edit"></i></i></span>
<span v-if="element.link!=null && element.link!=''">
<span style="float:right; width:1rem; height:1em;"> </span>
<a :href="element.link" target="blank" style="float:right;" class="hover-icon"><i class="fas fa-link"></i></a>
</span>
</div>
<div class="content">{{element.content}}</div>
</div>
</draggable>
</div>
</div>
<div class="custom-modal-shade" v-if="modal=='newNote'" @click=""></div>
<div class="custom-modal" v-if="modal=='newNote'">
<div class="modal-title">
<input type="text" v-model="notes[state.currentNote.category][state.currentNote.index].title" class="custom-input-title">
<span style="float:right; font-size:4rem;" class="hover-icon"><i class="fas fa-check-circle" @click="closeModal"></i></span>
</div>
<br>
<div class="btn-group" role="group" aria-label="Basic example">
<button v-if="state.currentNote.category == 'misc'" type="button" class="btn btn-primary" @click="switchNoteGroup('misc')">Misc</button>
<button v-if="state.currentNote.category != 'misc'" type="button" class="btn btn-secondary" @click="switchNoteGroup('misc')">Misc</button>
<button v-if="state.currentNote.category == 'todo'" type="button" class="btn btn-primary" @click="switchNoteGroup('todo')">Todo</button>
<button v-if="state.currentNote.category != 'todo'" type="button" class="btn btn-secondary" @click="switchNoteGroup('todo')">Todo</button>
<button v-if="state.currentNote.category == 'ideas'" type="button" class="btn btn-primary" @click="switchNoteGroup('ideas')">Ideas</button>
<button v-if="state.currentNote.category != 'ideas'" type="button" class="btn btn-secondary" @click="switchNoteGroup('ideas')">Ideas</button>
</div>
<br><br>
<textarea v-model="notes[state.currentNote.category][state.currentNote.index].content" class="custom-input-content"></textarea>
<br><br>
<span class="hover-icon" v-if="notes[state.currentNote.category][state.currentNote.index].link != null && notes[state.currentNote.category][state.currentNote.index].link != ''" @click="activateLink">
<i class="fas fa-link" style="font-size:2rem; padding-top:0.6rem; color:var(--highlight-color)">
</i>
</span>
<span class="hover-icon" v-else @click="activateLink">
<i class="fas fa-link" style="font-size:2rem; padding-top:0.6rem; ">
</i>
</span>
<input type="text" v-model="notes[state.currentNote.category][state.currentNote.index].link" class="custom-input-link" id="custom-input-link" style="float:right" placeholder="https://">
</div>
</div>
<!--Custom JS-->
<script src="assets/js/index.js"></script>