consensus/cmd/web/views/header.qtpl

46 lines
3.1 KiB
Plaintext

{% func Header(ctx *GlobalRequestContext) %}
<div>
<div class="center" style="text-align: center">
<h1 class="center"><a href="/">{% if ctx.SiteTitle == "" %}Monero P2Pool Observer{% else %}Monero {%s ctx.SiteTitle %}{% endif %}</a></h1>
<h4 style="font-size: 16px; margin: 0px">
<a href="https://gupax.io/" rel="nofollow">[Gupax] P2Pool plug and play Mining GUI, by <em>hinto-janai</em></a>
::
<a href="{%s ctx.GetUrl("p2pool.io") %}/#help" rel="nofollow">P2Pool Setup Help</a>
::
<a href="{%s ctx.GetUrl("p2pool.io") %}/#faq" rel="nofollow">P2Pool FAQ</a>
::
<a href="https://github.com/SChernykh/p2pool">What is P2Pool?</a>
::
<a href="/api">Observer API Documentation</a>
</h4>
{% if ctx.Socials.Irc.Link != "" %}
<h4 style="font-size: 16px; margin: 4px 0px 0px; font-weight: normal;">
Join chat to talk, send feedback, ask questions and be notified of changes on <a href="{%s ctx.Socials.Irc.Link %}" target="_blank"><strong>IRC on <code>{%s ctx.Socials.Irc.Title %}</code></strong></a>{% if ctx.Socials.Irc.WebChat != "" %}, on <a href="{%s ctx.Socials.Irc.WebChat %}" target="_blank"><strong>WebIRC</strong></a>{% endif %}{% if ctx.Socials.Matrix.Link != "" %}, on <a target="_blank" rel="nofollow" href="{%s ctx.Socials.Matrix.Link %}"><strong>Matrix</strong></a>{% endif %}
</h4>
{% endif %}
<h4 style="font-size: 13px; margin: 4px 0px 0px; font-weight: normal;">
<a href="https://github.com/SChernykh/p2pool#how-to-mine-on-p2pool">How to join P2Pool</a>
::
<a href="{%s ctx.GetUrl("sethforprivacy.com") %}/guides/run-a-p2pool-node/" rel="nofollow">Guide on how to run a Monero and P2Pool node by <em>Seth</em></a>
::
<a href="{%s ctx.GetUrl("xmrvsbeast.com") %}/p2pool/" rel="nofollow">P2Pool Bonus Hash Rate Raffle by <em>XMRvsBEAST</em></a>
</h4>
{% if pool := ctx.Pool; pool != nil %}
{% if uint64(pool.Versions.P2Pool.Timestamp+3600*24*30) > pool.SideChain.LastBlock.Timestamp || uint64(pool.Versions.Monero.Timestamp+3600*24*7) > pool.SideChain.LastBlock.Timestamp %}
<h4 style="font-size: 15px; margin: 4px 0px 0px; color:yellow;">
{% else %}
<h4 style="font-size: 13px; margin-top: 5px; ">
{% endif %}
Latest releases: <a href="{%s pool.Versions.P2Pool.Link %}" target="_blank">P2Pool {%s pool.Versions.P2Pool.Version %}</a> <em title="{%s utc_date(uint64(pool.Versions.P2Pool.Timestamp)) %}"><small>{%f.1 float64((pool.SideChain.LastBlock.Timestamp - uint64(pool.Versions.P2Pool.Timestamp))) / (3600*24) %} day(s) ago</small></em>
::
<a href="{%s pool.Versions.Monero.Link %}" target="_blank">Monero {%s pool.Versions.Monero.Version %}</a> <em title="{%s utc_date(uint64(pool.Versions.Monero.Timestamp)) %}"><small>{%f.1 float64((pool.SideChain.LastBlock.Timestamp - uint64(pool.Versions.Monero.Timestamp))) / (3600*24) %} day(s) ago</small></em>
</h4>
{% endif %}
</div>
</div>
{% endfunc %}