Fix bookmark card being created without the h2.

This commit is contained in:
voussoir 2021-12-21 16:56:49 -08:00
parent 77cd0e871c
commit 16688f95e7
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -78,11 +78,13 @@ function create(bookmark, add_author, add_delete_button, add_url_element)
bookmark_card.className = "bookmark_card"
bookmark_card.dataset.id = bookmark.id;
const h2 = document.createElement("h2");
const bookmark_title = document.createElement("a");
bookmark_title.className = "bookmark_title";
bookmark_title.href = bookmark.url;
bookmark_title.innerText = bookmark.display_name;
bookmark_card.appendChild(bookmark_title);
h2.appendChild(bookmark_title);
bookmark_card.appendChild(h2);
// The URL element is always display:none, but its presence is useful in
// facilitating the Editor object. If this bookmark will not be editable,