diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index 9b16174e7..eb4ab677b 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -34,13 +34,15 @@ function rate_stars(e) { function tabChange(e) { var target = e.target.closest('li') var identifier = target.getAttribute('data-id'); + var parent_element = target.parentElement.closest('li').parentElement; - var tabs = target.parentElement.children; + var tabs = parent_element.getElementsByTagName('label'); for (i = 0; i < tabs.length; i++) { - if (tabs[i].getAttribute('data-id') == identifier) { - tabs[i].className += ' is-active'; + var tab = tabs[i].parentElement; + if (tab.getAttribute('data-id') == identifier) { + tab.className += ' is-active'; } else { - tabs[i].className = tabs[i].className.replace('is-active', ''); + tab.className = tab.className.replace('is-active', ''); } } diff --git a/bookwyrm/templates/feed.html b/bookwyrm/templates/feed.html index 3003f5187..ea62a6772 100644 --- a/bookwyrm/templates/feed.html +++ b/bookwyrm/templates/feed.html @@ -4,22 +4,37 @@
There are no books here right now! Try searching for a book to get started
{% else %} -{{ shelf.name }}
+