diff --git a/pkg/web/static/url-switcher.js b/pkg/web/static/url-switcher.js new file mode 100644 index 0000000000000000000000000000000000000000..270c2846ef2a278e730b180431d79816a0fc5cfb --- /dev/null +++ b/pkg/web/static/url-switcher.js @@ -0,0 +1,17 @@ +document.addEventListener('DOMContentLoaded', function() { + const urlTypeSwitch = document.querySelector('input[name="url-type"]'); + if (!urlTypeSwitch) return; + + urlTypeSwitch.addEventListener('change', function() { + const sshUrl = document.getElementById('ssh-url'); + const httpUrl = document.getElementById('http-url'); + + if (this.checked) { + sshUrl.style.display = 'none'; + httpUrl.style.display = 'block'; + } else { + sshUrl.style.display = 'block'; + httpUrl.style.display = 'none'; + } + }); +}); diff --git a/pkg/web/templates/overview.html b/pkg/web/templates/overview.html index 78cfaa1b5232694411660af49cce60e5787b1ec9..39f113103bbbf589d69464d72998534e9a92e5f6 100644 --- a/pkg/web/templates/overview.html +++ b/pkg/web/templates/overview.html @@ -21,20 +21,7 @@ git push -u origin main
- + {{if .ReadmeHTML}}