-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
110 lines (110 loc) · 5.78 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Iota's Notepad</title>
<link rel="stylesheet" href="src/globals.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</head>
<body>
<div class="titlebar" style="app-region: drag;">
<h2 class="titlebar-h1" style="app-region: drag;">Iota's Notepad</h2>
<div class="titlebar-actions" style="app-region: no-drag;">
<button title="Exports a selected note from the modal list" class="button" onclick="openExportModal()">Export</button>
<input type="file" accept=".txt" id="importNotesInput" style="display:none" onchange="importNotes(event)">
<button title="Imports a note" class="button" onclick="document.getElementById('importNotesInput').click()">Import</button>
<button title="Open settings" class="button" onclick="openSettingsModal()">Settings</button>
</div>
</div>
<div class="main-content">
<div class="sidebar">
<div class="sidebar-header">
<h2 class="header-h2">Notes</h2>
<div class="sidebar-actions">
<select id="sort-options" class="dropdown">
<option value="dateModified">Date Modified</option>
<option value="dateCreated">Date Created</option>
<option value="alphabetical">Alphabetical</option>
<option value="index">Index</option>
</select>
<button class="button" onclick="addNote()"><i class="bi bi-plus-lg"></i></button>
</div>
</div>
<input type="text" class="search-bar" placeholder="Search notes..." oninput="searchNotes(this.value)">
<ul class="note-list">
</ul>
</div>
<div class="editor">
<p class="status">Save status:</p>
<textarea placeholder="Write your note here..."></textarea>
</div>
</div>
<div id="notification" class="hidden">
<p id="message"></p>
<div id="notification-buttons">
<a id="download-link" href="#" target="_blank">Download</a>
<button id="dismiss-button">Dismiss</button>
</div>
</div>
<div id="exportModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeExportModal()">×</span>
<div style="display: flex; justify-content: space-between; align-items: center;">
<h2 class="modal-h2">Click on an item to export</h2>
<button title="Export all notes as JSON" class="button" onclick="exportAllNotesAsJson()">Export All as JSON</button>
</div>
<ul class="export-note-list"></ul>
</div>
</div>
<div id="settingsModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeSettingsModal()">×</span>
<div style="display: flex; justify-content: space-between;">
<div class="settings-section">
<h2 class="modal-h2">Settings</h2>
<label for="timeFormat">Time Format:</label>
<select id="timeFormat" class="dropdown">
<option value="12">12-hour</option>
<option value="24">24-hour</option>
</select>
<label for="themeFlavor">Theme Flavor:</label>
<select id="themeFlavor" class="dropdown" onchange="loadTheme(this.value)">
<option value="mocha">Mocha</option>
<!-- <option value="latte">Latte</option> -->
<!-- Commented because i have no idea how to make the window controls symbol colors change based on contrast -->
<option value="frappe">Frappe</option>
<option value="macchiato">Macchiato</option>
</select>
<div class="settings-buttons">
<button class="settings-button" onclick="document.getElementById('importThemeInput').click()">Import theme</button>
<input type="file" accept=".json" id="importThemeInput" style="display:none" onchange="importTheme(event)">
<button class="settings-button" onclick="deleteSelectedTheme()">Delete theme</button>
<button class="settings-button" onclick="saveSettings()">Save settings</button>
</div>
</div>
<div class="divider"></div>
<div class="about-section">
<h2 class="modal-h2">About</h2>
<p id="appVersion">Version: </p>
<p id="electronVersion">Electron Version: </p>
<p id="nodeVersion">Node.js Version: </p>
<p id="chromeVersion">Chrome Version: </p>
<button class="about-button" onclick="checkForUpdates()">Check for Updates</button>
<button class="about-button" id="open-dev-tools" onclick="window.API.openDevTools()">Open DevTools</button>
</div>
</div>
</div>
</div>
<div id="noteContextMenu" class="context-menu">
<p id="contextMenuNoteId"></p>
<hr class="context-menu-divider">
<ul>
<li onclick="saveNote()"><i class="bi bi-floppy-fill"></i> Save</li>
<li onclick="editNoteTitle()"><i class="bi bi-pencil-fill"></i> Edit Title</li>
<li onclick="deleteNoteById()"><i class="bi bi-trash-fill"></i> Delete</li>
</ul>
</div>
<script src="src/script.js"></script>
</body>
</html>