From 9f3825e863ae92596b7d664b8091639c170a61e5 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 11 Jul 2025 13:49:12 -0400 Subject: [PATCH] changed how bookmarks are edited --- startpage.html | 160 +++++++++++++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 64 deletions(-) diff --git a/startpage.html b/startpage.html index da525be..9702b8e 100644 --- a/startpage.html +++ b/startpage.html @@ -135,6 +135,41 @@ font-style: italic; } + .bookmarkListingContainer { + display: flex; + flex-direction: column; + } + + .sectionListingContainer { + display: flex; + flex-direction: row; + justify-content: space-between; + } + + .linkListingContainer { + display: flex; + flex-direction: row; + justify-content: space-between; + } + + .bookmarkListingButtons { + } + + .bookmarkButton { + } + .bookmarkButton:hover { + cursor: pointer; + background-color: rgba(173, 165, 165, 0.8); + } + + .bookmarkDeleteButton { + } + .bookmarkDeleteButton:hover { + background-color: rgba(173, 165, 165, 0.8); + color: red; + cursor: pointer; + } + hr { width: 75%; } @@ -336,6 +371,9 @@
+ +

for reference: cursors

+ @@ -544,7 +582,7 @@
-
+
` @@ -630,7 +668,7 @@
-
+
` @@ -684,43 +722,43 @@ loadBookmarkListings() { if (Object.keys(this.sections).length == 0) { + let bookmarkListings = document.getElementById(this.id + "-bookmark-menu--listings"); + bookmarkListings.innerHTML = "(no bookmarks)"; return; } let sectionData = Object.values(this.sections); let containerSettings = this.containerSettings; - let bookmarkListings = document.getElementById(this.id + "-bookmark-listings"); - - console.log(sectionData); - - // [re]render the section listings + let bookmarkListings = document.getElementById(this.id + "-bookmark-menu--listings"); bookmarkListings.innerHTML = ""; + + // [re]render the section listings for (let i = 0; i < sectionData.length; i++) { - console.log(i); bookmarkListings.insertAdjacentHTML( "beforeend", ` ${i == 0 ? "" : `
`} -
- - [X] +
+ + ${sectionData[i].label == "" ? "uncategorized links: " : "section: " + sectionData[i].label} - - ${sectionData[i].label} - - - ${i > 1 ? ` - - [up] - - ` : ``} - ${i > 0 ? ` - - [down] - - ` : ``} +
+ ${(i > 1) ? ` + + [up] + + ` : `` + } + ${(i > 0) && (i < sectionData.length - 1) ? ` + + [down] + + ` : `` + } + [delete section] +
` ); @@ -729,24 +767,34 @@ // [re]render the link listings for (let s = 0; s < sectionData.length; s++) { for (let l = 0; l < sectionData[s].links.length; l++) { - console.log('s: ' + s); let targetSection = document.getElementById( this.id + "-section-listing-" + s ); targetSection.insertAdjacentHTML( - "beforeend", + "afterend", ` -