diff options
Diffstat (limited to 'src/http/landing.rs')
| -rw-r--r-- | src/http/landing.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/landing.rs b/src/http/landing.rs index 5fc1e6e..042be5e 100644 --- a/src/http/landing.rs +++ b/src/http/landing.rs | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | /// | 2 | /// |
| 3 | /// Generates HTML landing page for the Nostr relay. | 3 | /// Generates HTML landing page for the Nostr relay. |
| 4 | use crate::config::Config; | 4 | use crate::config::Config; |
| 5 | use crate::git::percent_encode; | ||
| 5 | use crate::http::nip11::RelayInformationDocument; | 6 | use crate::http::nip11::RelayInformationDocument; |
| 6 | use std::collections::HashMap; | 7 | use std::collections::HashMap; |
| 7 | 8 | ||
| @@ -847,7 +848,7 @@ pub fn get_repo_html(config: &Config, npub: &str, identifier: &str) -> String { | |||
| 847 | <div class="card"> | 848 | <div class="card"> |
| 848 | <div class="clone-box"> | 849 | <div class="clone-box"> |
| 849 | <div class="clone-line"><span class="cmd">curl -Ls https://ngit.dev/install.sh | bash</span></div> | 850 | <div class="clone-line"><span class="cmd">curl -Ls https://ngit.dev/install.sh | bash</span></div> |
| 850 | <div class="clone-line"><span class="cmd">git clone</span> <span class="url" id="nostr-clone-url">nostr://{{npub}}/<span id="relayref"></span>/{{identifier}}</span></div> | 851 | <div class="clone-line"><span class="cmd">git clone</span> <span class="url" id="nostr-clone-url">nostr://{npub}/<span id="relayref"></span>/{encoded_identifier}</span></div> |
| 851 | </div> | 852 | </div> |
| 852 | </div> | 853 | </div> |
| 853 | </div> | 854 | </div> |
| @@ -867,7 +868,7 @@ pub fn get_repo_html(config: &Config, npub: &str, identifier: &str) -> String { | |||
| 867 | 868 | ||
| 868 | // Construct gitworkshop link: gitworkshop.dev/npub/relayref/identifier | 869 | // Construct gitworkshop link: gitworkshop.dev/npub/relayref/identifier |
| 869 | const gitworkshopLink = document.getElementById('gitworkshop-link'); | 870 | const gitworkshopLink = document.getElementById('gitworkshop-link'); |
| 870 | gitworkshopLink.setAttribute('href', 'https://gitworkshop.dev/{npub}/' + relayref + '/{identifier}'); | 871 | gitworkshopLink.setAttribute('href', 'https://gitworkshop.dev/{npub}/' + relayref + '/{encoded_identifier}'); |
| 871 | 872 | ||
| 872 | // Set footer domain | 873 | // Set footer domain |
| 873 | var footerDomain = document.getElementById('footer-domain'); | 874 | var footerDomain = document.getElementById('footer-domain'); |
| @@ -882,6 +883,7 @@ pub fn get_repo_html(config: &Config, npub: &str, identifier: &str) -> String { | |||
| 882 | relay_name = config.relay_name(), | 883 | relay_name = config.relay_name(), |
| 883 | npub = npub, | 884 | npub = npub, |
| 884 | identifier = identifier, | 885 | identifier = identifier, |
| 886 | encoded_identifier = percent_encode(identifier), | ||
| 885 | version = get_version(), | 887 | version = get_version(), |
| 886 | theme_toggle = get_theme_toggle_html(), | 888 | theme_toggle = get_theme_toggle_html(), |
| 887 | theme_script = get_theme_script(), | 889 | theme_script = get_theme_script(), |