From 94b30fb96914b52046dfbaec2fa8d03563882fb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 31 Dec 2025 19:50:38 +0000 Subject: [PATCH 1/6] Initial plan From 040a14e0b72b8fdc330cb6b6eb2137fa42d76783 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 31 Dec 2025 20:01:08 +0000 Subject: [PATCH 2/6] Fix homepage rendering by using local static assets Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com> --- bemo/static/bootstrap-components.css | 59 +++++++++++++++++++++++++ bemo/static/bootstrap-icons-minimal.css | 18 ++++++++ bemo/static/bootstrap-minimal.js | 48 ++++++++++++++++++++ bemo/templates/layout.html | 16 +++---- 4 files changed, 133 insertions(+), 8 deletions(-) create mode 100644 bemo/static/bootstrap-components.css create mode 100644 bemo/static/bootstrap-icons-minimal.css create mode 100644 bemo/static/bootstrap-minimal.js diff --git a/bemo/static/bootstrap-components.css b/bemo/static/bootstrap-components.css new file mode 100644 index 00000000..4bed8000 --- /dev/null +++ b/bemo/static/bootstrap-components.css @@ -0,0 +1,59 @@ +/* Additional styles for Bootstrap components that need JS */ + +/* Navbar collapse */ +.navbar-collapse { + display: none; +} + +.navbar-collapse.show { + display: block !important; +} + +@media (min-width: 992px) { + .navbar-collapse { + display: flex !important; + flex-basis: auto; + } +} + +/* Dropdown menu positioning */ +.dropdown-menu { + display: none; + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + min-width: 10rem; + padding: 0.5rem 0; + margin: 0; + font-size: 1rem; + color: #212529; + text-align: left; + list-style: none; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0,0,0,.15); + border-radius: 0.25rem; +} + +.dropdown-menu.show { + display: block !important; +} + +.dropdown-menu-end { + right: 0; + left: auto; +} + +/* Alert dismissible */ +.alert-dismissible { + padding-right: 3rem; +} + +.alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 0.75rem 1rem; +} diff --git a/bemo/static/bootstrap-icons-minimal.css b/bemo/static/bootstrap-icons-minimal.css new file mode 100644 index 00000000..16914824 --- /dev/null +++ b/bemo/static/bootstrap-icons-minimal.css @@ -0,0 +1,18 @@ +/* Minimal Bootstrap Icons replacement using Unicode/Emoji */ +.bi::before { + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} + +.bi-trophy-fill::before { content: "🏆"; } +.bi-star-fill::before { content: "⭐"; } +.bi-code-square::before { content: "💻"; } +.bi-person-circle::before { content: "👤"; } +.bi-credit-card::before { content: "💳"; } +.bi-gear-fill::before { content: "⚙️"; } +.bi-moon-fill::before { content: "🌙"; } +.bi-box-arrow-right::before { content: "➡️"; } +.bi-box-arrow-in-right::before { content: "🔑"; } diff --git a/bemo/static/bootstrap-minimal.js b/bemo/static/bootstrap-minimal.js new file mode 100644 index 00000000..0126a3b1 --- /dev/null +++ b/bemo/static/bootstrap-minimal.js @@ -0,0 +1,48 @@ +// Minimal Bootstrap JS replacement for dropdowns and collapsible navbar +document.addEventListener('DOMContentLoaded', function() { + // Handle navbar toggle + const navbarToggler = document.querySelector('.navbar-toggler'); + const navbarCollapse = document.querySelector('.navbar-collapse'); + + if (navbarToggler && navbarCollapse) { + navbarToggler.addEventListener('click', function() { + navbarCollapse.classList.toggle('show'); + }); + } + + // Handle dropdown toggles + const dropdownToggles = document.querySelectorAll('[data-bs-toggle="dropdown"]'); + dropdownToggles.forEach(function(toggle) { + toggle.addEventListener('click', function(e) { + e.preventDefault(); + const menu = this.nextElementSibling; + if (menu && menu.classList.contains('dropdown-menu')) { + // Close other dropdowns + document.querySelectorAll('.dropdown-menu.show').forEach(function(m) { + if (m !== menu) m.classList.remove('show'); + }); + menu.classList.toggle('show'); + } + }); + }); + + // Close dropdowns when clicking outside + document.addEventListener('click', function(e) { + if (!e.target.closest('[data-bs-toggle="dropdown"]')) { + document.querySelectorAll('.dropdown-menu.show').forEach(function(menu) { + menu.classList.remove('show'); + }); + } + }); + + // Handle alert dismissals + const alertCloses = document.querySelectorAll('[data-bs-dismiss="alert"]'); + alertCloses.forEach(function(btn) { + btn.addEventListener('click', function() { + const alert = this.closest('.alert'); + if (alert) { + alert.style.display = 'none'; + } + }); + }); +}); diff --git a/bemo/templates/layout.html b/bemo/templates/layout.html index 82e4d543..a5e37ace 100644 --- a/bemo/templates/layout.html +++ b/bemo/templates/layout.html @@ -6,11 +6,11 @@ Bemo 🐄 {{title}} - - - - - + + + + +