Cybrkyd's Git Repositories

IndexedDB-notes - commit: 1c68186

commit 1c681863dbc9d8f18099c283c5e07d2bd54601e635bc0677bcc1b9418919b33c
author cybrkyd <git@cybrkyd.com> 2026-05-25 18:47:35 +0100
committer cybrkyd <git@cybrkyd.com> 2026-05-25 18:47:35 +0100

Commit Message

centre all text

📊 Diffstat

idb-notes.html 23
1 files changed, 14 insertions(+), 9 deletions(-)

Diff

diff --git a/idb-notes.html b/idb-notes.html
index ee06633..8a86e55 100644
--- a/idb-notes.html
+++ b/idb-notes.html
@@ -22,8 +22,9 @@ body {
}
h1 {
margin-bottom: 20px;
- font-size: 1.6rem;
+ font-size: 1.5rem;
color: #807973;
+ text-align: center;
}
#docStatus {
font-size: 13px;
@@ -31,6 +32,7 @@ h1 {
margin-bottom: 8px;
min-height: 18px;
font-style: italic;
+ text-align: center;
}
textarea {
width: 100%;
@@ -67,6 +69,9 @@ textarea {
justify-content: center;
gap: 10px;
}
+ #linkBtnContainer {
+ text-align: center;
+ }
.saved-column {
background: #fde8d0;
@@ -197,18 +202,20 @@ textarea {
<div id="wordCount">0 words</div> |
<div id="charCount">0 characters</div>
</div>
- <button class="link-btn" id="saveBtn">Save Doc</button>
- <button class="link-btn" id="newBtn">New Doc</button>
- <button class="link-btn" id="exportBtn">Export as TXT</button>
- <button class="link-btn" id="exportDbBtn">Export NotesDB</button>
- <button class="link-btn" id="importDbBtn">Import NotesDB</button>
+ <div id="linkBtnContainer">
+ <button class="link-btn" id="saveBtn">Save Doc</button>
+ <button class="link-btn" id="newBtn">New Doc</button>
+ <button class="link-btn" id="exportBtn">Export as TXT</button>
+ <button class="link-btn" id="exportDbBtn">Export NotesDB</button>
+ <button class="link-btn" id="importDbBtn">Import NotesDB</button>
+ </div>
<input type="file" id="importFile" accept=".json" style="display:none;">
</div>
</div>
<script>
let db;
- let currentDocId = null; // track loaded doc id
+ let currentDocId = null;
const request = indexedDB.open("NotesDB", 1);
@@ -245,7 +252,6 @@ function saveDocument(text) {
const store = tx.objectStore("documents");
if (currentDocId !== null) {
- // Overwrite existing doc
const doc = {
id: currentDocId,
content: text,
@@ -253,7 +259,6 @@ function saveDocument(text) {
};
store.put(doc);
} else {
- // Create new doc
const doc = {
content: text,
created: new Date().toLocaleString()