mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 13:33:41 +00:00
adding donation page
This commit is contained in:
15
src/main.rs
15
src/main.rs
@@ -358,12 +358,21 @@ fn emission(dashboard: &State<Arc<Mutex<Dashboard>>>) -> 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.
|
// Rendering API Overview page.
|
||||||
#[get("/api_overview")]
|
#[get("/api_overview")]
|
||||||
fn api_overview() -> Template {
|
fn api_overview() -> Template {
|
||||||
Template::render("api_overview", context! {
|
Template::render("api_overview", context! {
|
||||||
route: "api_overview",
|
route: "api_overview",
|
||||||
public_api: CONFIG.public_api.clone(),
|
public_api: CONFIG.public_api.clone(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -948,7 +957,7 @@ async fn main() {
|
|||||||
soft_supply, production_cost, reward_ratio, breakeven_cost,
|
soft_supply, production_cost, reward_ratio, breakeven_cost,
|
||||||
last_block_age, block_list_by_height, block_list_index, search, kernel,
|
last_block_age, block_list_by_height, block_list_index, search, kernel,
|
||||||
output, api_owner, api_foreign, stats, unspent_outputs, kernels,
|
output, api_owner, api_foreign, stats, unspent_outputs, kernels,
|
||||||
emission, api_overview])
|
emission, api_overview, donate])
|
||||||
.mount("/static", FileServer::from("static"))
|
.mount("/static", FileServer::from("static"))
|
||||||
.attach(Template::custom(|engines| {engines.tera.register_filter("separate_with_commas", separate_with_commas)}))
|
.attach(Template::custom(|engines| {engines.tera.register_filter("separate_with_commas", separate_with_commas)}))
|
||||||
.launch()
|
.launch()
|
||||||
|
@@ -310,14 +310,17 @@
|
|||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col d-flex justify-content-center">
|
<div class="col d-flex justify-content-center">
|
||||||
<a class="text-decoration-none me-2" href="https://github.com/aglkm/grin-explorer">
|
<a class="text-decoration-none me-2" href="https://github.com/aglkm/grin-explorer">
|
||||||
<span style="color:grey"><i class="bi bi-github me-1"></i>v.0.1.8</span>
|
<span style="color:grey"><i class="bi bi-github me-1"></i>v0.1.8</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="text-decoration-none me-2" href="/search">
|
<a class="text-decoration-none me-2" href="/search">
|
||||||
<span style="color:grey"><i class="bi bi-search me-1"></i>Search</span>
|
<span style="color:grey"><i class="bi bi-search me-1"></i>Search</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="text-decoration-none" href="/api_overview">
|
<a class="text-decoration-none me-2" href="/api_overview">
|
||||||
<span style="color:grey"><i class="bi bi-robot me-1"></i>API</span>
|
<span style="color:grey"><i class="bi bi-robot me-1"></i>API</span>
|
||||||
</a>
|
</a>
|
||||||
|
<a class="text-decoration-none me-2" href="/donate">
|
||||||
|
<span style="color:grey"><i class="bi bi-heart me-1"></i>Donate</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
26
templates/donate.html.tera
Normal file
26
templates/donate.html.tera
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{% extends "base" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<code>
|
||||||
|
|
||||||
|
<div class="card border-start-0 border-end-0 rounded-0">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4><i class="bi bi-heart me-3"></i>Donation</h4>
|
||||||
|
<div>Slatepack address:</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
grin1flvd36m67w48zeannqyfmlqp23e2eqtp3x4mz4r5m9fuc3es5t0snufawz
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>By donating to Grincoin.org you are supporting its maintenance and development.</div>
|
||||||
|
<br>
|
||||||
|
<div>Thank you!</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</code>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
Reference in New Issue
Block a user