From 5be93a4cf545a0d3a3ecb3d5b51bd746975520f7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 2 Dec 2025 15:06:56 +0000 Subject: repo landing page - include powered by --- src/http/landing.rs | 59 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/http/landing.rs b/src/http/landing.rs index f3f8201..df8b513 100644 --- a/src/http/landing.rs +++ b/src/http/landing.rs @@ -41,9 +41,56 @@ fn get_base_css() -> &'static str { text-align: center; color: var(--text-muted); font-size: 0.875rem; + } + .software-box { + display: flex; + align-items: flex-start; + gap: 16px; + text-align: left; + } + .software-logo { + width: 48px; + height: 48px; + flex-shrink: 0; + } + .software-content { + flex: 1; + } + .software-heading { + font-size: 1.125rem; + font-weight: 500; + margin-bottom: 8px; + color: var(--text-muted); + } + .software-heading a { + color: var(--brand-light); + } + .software-heading a:hover { + text-decoration: underline; + } + .software-desc { + color: var(--text-muted); + font-size: 0.9rem; + line-height: 1.5; }"# } +/// Generate the software-box HTML component +fn get_software_box_html() -> &'static str { + r##"
+
+ +
+

Grasp Server Powered by ngit-grasp

+

Git hosting distributed across relays using Nostr for authorization. Find out more...

+
+
+
"## +} + /// Generate the HTML landing page pub fn get_html(config: &Config) -> String { format!( @@ -111,7 +158,7 @@ pub fn get_generic_404_html(config: &Config, path: &str) -> String { {path} ← Back to {relay_name} - + "##, @@ -202,7 +249,7 @@ pub fn get_404_html(config: &Config, npub: &str, identifier: &str) -> String {
The repository may not have been announced to this server, or the URL may be incorrect.
← Back to {relay_name} - + "##, @@ -300,7 +347,7 @@ pub fn get_repo_html(config: &Config, npub: &str, identifier: &str) -> String {

{identifier}

by {npub}

-

Git repository hosted on {relay_name}

+

Git repository hosted on Grasp Server {relay_name}

Browse Repository @@ -312,11 +359,12 @@ pub fn get_repo_html(config: &Config, npub: &str, identifier: &str) -> String {
curl -Ls https://ngit.dev/install.sh | bash
-
git clone nostr://{npub}//{identifier}
+
git clone nostr://{{npub}}//{{identifier}}
- + {software_box} +