From 8daa640f61a4db65ee3d5dc84b7bfe3897f2b556 Mon Sep 17 00:00:00 2001 From: aglkm <39521015+aglkm@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:21:45 +0300 Subject: [PATCH] adding donation page --- src/main.rs | 15 ++++++++++++--- templates/base.html.tera | 7 +++++-- templates/donate.html.tera | 26 ++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 templates/donate.html.tera diff --git a/src/main.rs b/src/main.rs index 0f3a1a7..c8eb548 100644 --- a/src/main.rs +++ b/src/main.rs @@ -358,12 +358,21 @@ fn emission(dashboard: &State>>) -> Template { } +// Rendering Donate page. +#[get("/donate")] +fn donate() -> Template { + Template::render("donate", context! { + route: "donate", + public_api: CONFIG.public_api.clone(), + }) +} + // Rendering API Overview page. #[get("/api_overview")] fn api_overview() -> Template { Template::render("api_overview", context! { - route: "api_overview", - public_api: CONFIG.public_api.clone(), + route: "api_overview", + public_api: CONFIG.public_api.clone(), }) } @@ -948,7 +957,7 @@ async fn main() { soft_supply, production_cost, reward_ratio, breakeven_cost, last_block_age, block_list_by_height, block_list_index, search, kernel, output, api_owner, api_foreign, stats, unspent_outputs, kernels, - emission, api_overview]) + emission, api_overview, donate]) .mount("/static", FileServer::from("static")) .attach(Template::custom(|engines| {engines.tera.register_filter("separate_with_commas", separate_with_commas)})) .launch() diff --git a/templates/base.html.tera b/templates/base.html.tera index bb1cae6..f27da02 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -310,14 +310,17 @@
diff --git a/templates/donate.html.tera b/templates/donate.html.tera new file mode 100644 index 0000000..8007c50 --- /dev/null +++ b/templates/donate.html.tera @@ -0,0 +1,26 @@ +{% extends "base" %} + +{% block content %} + + + +
+
+

Donation

+
Slatepack address:
+
+
+ grin1flvd36m67w48zeannqyfmlqp23e2eqtp3x4mz4r5m9fuc3es5t0snufawz +
+
+
+
By donating to Grincoin.org you are supporting its maintenance and development.
+
+
Thank you!
+
+
+ +
+ +{% endblock %} +