diff --git a/README.md b/README.md index d248ce1..9c1a938 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ carries the full merchant surface: invoice automatically. - **Hosted checkout:** a zero-JS `/pay/` page (server-rendered Askama + one CSS file + a server-generated QR SVG at ECC level H with an - optional Goblin-mark center logo), live status via ``, + optional GoblinPay-mark center logo), live status via ``, and a manual slatepack fallback (paste S1 -> offline `receive_tx` -> copy the S2 back) on every page. The same renderer serves embedded and hosted use. - **Per-user endpubs:** an admin assigns one receiving identity per user @@ -75,7 +75,7 @@ Everything is environment variables, defaults are safe for local use. | `GP_ADMIN_TOKEN` | unset | Bearer token for the admin dashboard + endpub/webhook API | | `GP_WEBHOOK_URL` | unset | Webhook endpoint for payment events (requires `GP_WEBHOOK_SECRET`) | | `GP_WEBHOOK_SECRET` | unset | HMAC-SHA256 secret for signing webhooks | -| `GP_QR_LOGO` | Goblin mark | Checkout QR center logo: unset = Goblin mark, `off`/`none` = plain, else a URL/path | +| `GP_QR_LOGO` | GoblinPay mark | Checkout QR center logo: unset = GoblinPay mark, `off`/`none` = plain, else a URL/path | | `GP_MERCHANT_NPUB` | unset | Merchant npub for the NIP-17 confirmed-payment DM | | `GP_NOTIFY_MERCHANT_DM` | `off` | Send a NIP-17 DM to the merchant on a received payment | | `GP_NOTIFY_PAYER_RECEIPT` | `off` | Send a NIP-17 receipt DM to the payer | diff --git a/crates/gp-core/src/config.rs b/crates/gp-core/src/config.rs index ee228b4..35a0fb1 100644 --- a/crates/gp-core/src/config.rs +++ b/crates/gp-core/src/config.rs @@ -171,7 +171,7 @@ pub struct Config { #[serde(skip)] pub webhook_secret: Option, /// Center-logo source for checkout QR codes (`GP_QR_LOGO`): unset = the - /// bundled Goblin mark, `off`/`none` = no logo, else a URL or static path. + /// bundled GoblinPay mark, `off`/`none` = no logo, else a URL or static path. pub qr_logo: Option, /// Merchant npub for confirmed-payment DMs (`GP_MERCHANT_NPUB`). pub merchant_npub: Option, @@ -213,7 +213,7 @@ pub const DEFAULT_RATE_CACHE_TTL: i64 = 60; pub const DEFAULT_QUOTE_TTL: i64 = 900; /// Default center-logo path served by gp-server when `GP_QR_LOGO` is unset. -pub const DEFAULT_QR_LOGO: &str = "/static/goblin-mark.svg"; +pub const DEFAULT_QR_LOGO: &str = "/static/goblinpay-mark.svg"; impl Default for Config { fn default() -> Self { diff --git a/crates/gp-server/src/main.rs b/crates/gp-server/src/main.rs index 17759e2..3168330 100644 --- a/crates/gp-server/src/main.rs +++ b/crates/gp-server/src/main.rs @@ -44,19 +44,40 @@ async fn style() -> impl Responder { .body(include_str!("../../../static/style.css")) } -/// The bundled Goblin mark, the default QR center logo. +/// The bundled Goblin mark (legacy default QR center logo; still served so an +/// operator can keep `GP_QR_LOGO=/static/goblin-mark.svg`). async fn goblin_mark() -> impl Responder { HttpResponse::Ok() .content_type("image/svg+xml") .body(include_str!("../../../static/goblin-mark.svg")) } +/// The GoblinPay mark, the default QR center logo (dark "P" on the brand gold, +/// sized for contrast on the QR's white backing). +async fn goblinpay_mark() -> impl Responder { + HttpResponse::Ok() + .content_type("image/svg+xml") + .body(include_str!("../../../static/goblinpay-mark.svg")) +} + +/// The GoblinPay wordmark (white), shown as the checkout page header logo. +async fn goblinpay_wordmark() -> impl Responder { + HttpResponse::Ok() + .content_type("image/svg+xml") + .body(include_str!("../../../static/goblinpay-wordmark.svg")) +} + /// Route table, shared by `main` and the tests. fn routes(cfg: &mut web::ServiceConfig) { cfg.route("/", web::get().to(index)) .route("/health", web::get().to(health)) .route("/static/style.css", web::get().to(style)) - .route("/static/goblin-mark.svg", web::get().to(goblin_mark)); + .route("/static/goblin-mark.svg", web::get().to(goblin_mark)) + .route("/static/goblinpay-mark.svg", web::get().to(goblinpay_mark)) + .route( + "/static/goblinpay-wordmark.svg", + web::get().to(goblinpay_wordmark), + ); // Payment status + signed-receipt reads (public-by-token, M4). payments::configure(cfg); // Hosted checkout + manual slatepack (public-by-token, M5). diff --git a/static/goblinpay-mark.svg b/static/goblinpay-mark.svg new file mode 100644 index 0000000..34f5110 --- /dev/null +++ b/static/goblinpay-mark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/goblinpay-wordmark.svg b/static/goblinpay-wordmark.svg new file mode 100644 index 0000000..2248bf2 --- /dev/null +++ b/static/goblinpay-wordmark.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + diff --git a/static/style.css b/static/style.css index 8da3245..3cf2bd4 100644 --- a/static/style.css +++ b/static/style.css @@ -31,6 +31,9 @@ main { main.admin { max-width: 60rem; } +.brand { display: block; } +.brandmark { height: 30px; width: auto; display: block; margin: 0 0 1.25rem; } + h1 { font-size: 1.5rem; margin: 0 0 0.5rem; } h2 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; } diff --git a/templates/pay.html b/templates/pay.html index df86fc7..699f624 100644 --- a/templates/pay.html +++ b/templates/pay.html @@ -9,6 +9,7 @@
+ GoblinPay

Pay with Goblin

{{ info.amount_display }}