diff --git a/app/views/browse/tag.html.erb b/app/views/browse/tag.html.erb index 01e771b9..380db8a1 100644 --- a/app/views/browse/tag.html.erb +++ b/app/views/browse/tag.html.erb @@ -25,6 +25,13 @@
+ +
+ + help_outline + +
+
@@ -328,11 +335,69 @@ // Initialize with "All" selected filterLinks[0].style.backgroundColor = '<%= @accent_color == "grey" ? "#9e9e9e" : "var(--#{@accent_color}-lighten-4)" %>'; filterLinks[0].style.fontWeight = '500'; + + // How to join modal + document.getElementById('how-to-join-btn').addEventListener('click', function() { + // Show modal + var modalHtml = ` + + `; + + // Add modal to DOM if it doesn't exist + if (!document.getElementById('how-to-join-modal')) { + document.body.insertAdjacentHTML('beforeend', modalHtml); + } + + // Initialize and open modal + var modalElement = document.getElementById('how-to-join-modal'); + var modalInstance = M.Modal.init(modalElement, {opacity: 0.6}); + modalInstance.open(); + }); }); <% end %>