Skip to content

Commit

Permalink
Merge pull request ZeroNetX#176 from zeronet-conservancy/ada_donate
Browse files Browse the repository at this point in the history
add support for ada/cardano donation addresses in sidebar
  • Loading branch information
caryoscelus authored Nov 16, 2022
2 parents cf6338f + bdd63b4 commit 3301135
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion plugins/Sidebar/SidebarPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ def sidebarRenderControls(self, body, site):
donate_generic = site.content_manager.contents.get("content.json", {}).get("donate", None) or site.content_manager.contents.get("content.json", {}).get("donate-generic", None)
donate_btc = site.content_manager.contents.get("content.json", {}).get("donate-btc", None)
donate_xmr = site.content_manager.contents.get("content.json", {}).get("donate-xmr", None)
donate_enabled = bool(donate_generic or donate_btc or donate_xmr)
donate_ada = site.content_manager.contents.get("content.json", {}).get("donate-ada", None)
donate_enabled = bool(donate_generic or donate_btc or donate_xmr or donate_ada)
if donate_enabled:
body.append(_("""
<li>
Expand Down Expand Up @@ -483,6 +484,15 @@ def sidebarRenderControls(self, body, site):
<a href='monero:{donate_xmr}' class='button'>{_[Donate Monero]}</a>
</div>
"""))
if donate_ada:
body.append(_("""
<div class='flex'>
<span style="font-size:90%">{donate_ada}</span><br/>
</div>
<div class='flex'>
<a href='web+cardano:{donate_ada}' class='button'>{_[Donate Ada/Cardano]}</a>
</div>
"""))
if donate_enabled:
body.append(_("""
</li>
Expand Down

0 comments on commit 3301135

Please sign in to comment.