diff --git a/app/static/css/default.css b/app/static/css/default.css index f67da11..6930d98 100644 --- a/app/static/css/default.css +++ b/app/static/css/default.css @@ -68,10 +68,16 @@ h3.footer-title{ .dropdown-submenu { position: relative; + list-style: none; } .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -0.5rem; +} + +.navbar-nav { + padding: 0; + margin: 0; } \ No newline at end of file diff --git a/app/static/js/dynamic-modal.js b/app/static/js/dynamic-modal.js new file mode 100644 index 0000000..0294f71 --- /dev/null +++ b/app/static/js/dynamic-modal.js @@ -0,0 +1,18 @@ +function openDynamicPopup(subitem) { + // Set modal title and content + document.getElementById('dynamicModalLabel').innerText = subitem.description; + const modalContent = document.getElementById('dynamicModalContent'); + modalContent.value = subitem.address; + + // Add copy functionality + document.getElementById('dynamicCopyButton').addEventListener('click', function () { + modalContent.select(); + navigator.clipboard.writeText(modalContent.value) + .then(() => alert('Content copied to clipboard!')) + .catch(() => alert('Failed to copy content.')); + }); + + // Show the modal + const modal = new bootstrap.Modal(document.getElementById('dynamicModal')); + modal.show(); + } \ No newline at end of file diff --git a/app/templates/base.html b/app/templates/base.html index 389994b..cb94675 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -20,18 +20,23 @@