Skip to content

Commit 88bf3b6

Browse files
Merge pull request #4424 from bitcoin-dot-org/site-updates
Site updates
2 parents cd50d25 + 18d83c6 commit 88bf3b6

File tree

9 files changed

+75
-12
lines changed

9 files changed

+75
-12
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ collections:
652652
output: false
653653

654654
donation_banner:
655-
address: bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h
655+
address: bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8
656656
display: true
657657
amounts_in_usd:
658658
- 50

_contrib/bco-htmlproof

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ HTML::Proofer.new(
3131
/^$/, ## anchors with no href attribute set (for clickable javascript elements)
3232
/^\/bin/, ## /bin dir is not part of repository; holds Bitcoin Core binaries
3333
/^.*\.(pdf|PDF)$/, ## Bitcoin whitepaper links
34-
'bitcoin:bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h', ## bitcoin address handlers
34+
'bitcoin:bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8', ## bitcoin address handlers
3535
/^\/stats/ ## /stats dir is not part of repository; generated by separate stats script
3636
],
3737

_includes/layout/base/footer-js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
addAnchorLinks();
99
trackOutgoingLinks();
1010
toggleDarkMode();
11-
handlePageRedirect({% if page.id == 'buy' %} true {% else %} false {% endif %})
11+
handlePageRedirect({% if page.id == 'buy' %} true {% else %} false {% endif %}, {% if page.id == 'sell' %} true {% else %} false {% endif %});
1212
</script>
1313

1414
{% comment %}

_includes/layout/base/footer-menu.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<span class="footer-title">{% translate donate-community layout %}:</span>
1111
<a onclick="openDonationModal()" class="donate-btn btn-bright">{% translate donate layout %}</a>
1212
<p class="donate-text">{% translate donate-community-support layout %}
13-
<a class="donate-link" href="bitcoin:bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h" target="_blank">bc1qx3u4njquj0ux63030r4nat8awqrlm0x2zlt96h</a>
13+
<a class="donate-link" href="bitcoin:bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8" target="_blank">bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8</a>
1414
</p>
1515
{% if page.id == 'bitcoin-for-businesses' %}
1616
{% include animations/herecomesbitcoin/construction.html %}
@@ -102,11 +102,12 @@
102102
<ul class="footermenu-list">
103103
<li{% if page.id == 'support-bitcoin' %} class="active"{% endif %}>
104104
<a href="/{{ page.lang }}/{% translate support-bitcoin url %}">{% translate menu-support-bitcoin layout %}</a>
105-
{% if page.lang == 'en' %}
106105
<li id="buybitcoinfootermenulink" {% if page.id == 'buy' %} class="active"{% endif %}>
107106
<a href="/{{ page.lang }}/{% translate buy url %}">{% translate menu-buy layout %}</a>
108107
</li>
109-
{% endif %}
108+
<li id="sellbitcoinfootermenulink" {% if page.id == 'sell' %} class="active"{% endif %}>
109+
<a href="/en/{% translate sell url %}">{% translate menu-sell layout %}</a>
110+
</li>
110111
{% if page.lang == 'en' %}
111112
<li{% if page.id == 'full-node' %} class="active"{% endif %}>
112113
<a href="/en/full-node">{% translate menu-full-node layout %}</a>

_includes/layout/base/head-menu.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<ul>
6161
<li{% if page.id == 'support-bitcoin' %} class="active"{% endif %}><a href="/{{ page.lang }}/{% translate support-bitcoin url %}">{% translate menu-support-bitcoin layout %}</a>
6262
<li id="buybitcoinmenulink" {% if page.id == 'buy' %} class="active"{% endif %}><a href="/{{ page.lang }}/{% translate buy url %}">{% translate menu-buy layout %}</a></li>
63+
<li id="sellbitcoinmenulink" {% if page.id == 'sell' %} class="active"{% endif %}><a href="/en/{% translate sell url %}">{% translate menu-sell layout %}</a></li>
6364
{% if page.lang == 'en' %}<li{% if page.id == 'full-node' %} class="active"{% endif %}><a href="/en/full-node">Running a full node</a></li>{% endif %}
6465
<li{% if page.id == 'development' %} class="active"{% endif %}><a href="/{{ page.lang }}/{% translate development url %}">{% translate menu-development layout %}</a></li>
6566
</ul>

_templates/buy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
layout: base
66
id: buy
77
end_of_page: |
8-
<script>showBuySellWidgets();</script>
8+
<script>showBuyWidget();</script>
99
---
1010

1111
<!-- Note: this file exempt from check-for-subheading-anchors check -->

_templates/sell.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
# This file is licensed under the MIT License (MIT) available on
3+
# http://opensource.org/licenses/MIT.
4+
5+
layout: base
6+
id: sell
7+
end_of_page: |
8+
<script>showSellWidget();</script>
9+
---
10+
11+
<!-- Note: this file exempt from check-for-subheading-anchors check -->
12+
13+
<div class="hero" style="padding:25px;">
14+
<div class="container hero-container">
15+
<h1>{% translate pagetitle %}</h1>
16+
</div>
17+
</div>
18+
19+
<div class="container">
20+
<div class="row card-row" style="justify-content: center;">
21+
<div class="card buy-card" style="width: 480px;margin-top: -30px;margin-bottom: 100px;">
22+
<div class="sell-widget"></div>
23+
</div>
24+
<div class="buy-footer-notice">
25+
<b>The above widget is provided by a third party provider (<a href="https://www.moonpay.com/">MoonPay</a>) and is not associated with bitcoin.org.</b>
26+
</div>
27+
</div>
28+
</div>
29+

_translations/en.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ en:
144144
whitepaper-mirrors:
145145
title: "Bitcoin: A Peer-to-Peer Electronic Cash System"
146146
summary: "Mirrors of the Bitcoin whitepaper"
147+
sell:
148+
title: "Sell Bitcoin"
149+
pagetitle: "Sell Bitcoin"
147150
buy:
148151
title: "Buy Bitcoin"
149152
pagetitle: "Buy Bitcoin"
@@ -1165,6 +1168,7 @@ en:
11651168
menu-scams: "Avoid Scams"
11661169
menu-support-bitcoin: "Support Bitcoin"
11671170
menu-buy: "Buy Bitcoin"
1171+
menu-sell: "Sell Bitcoin"
11681172
menu-full-node: "Running a full node"
11691173
menu-other: "Other"
11701174
menu-vocabulary: Vocabulary
@@ -1198,6 +1202,7 @@ en:
11981202
bitcoin-for-individuals: bitcoin-for-individuals
11991203
bitcoin-for-businesses: bitcoin-for-businesses
12001204
buy: buy
1205+
sell: sell
12011206
choose-your-wallet: choose-your-wallet
12021207
community: community
12031208
developer-documentation: developer-documentation

js/main.js

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ function changeAccordionButtonText(button, text) {
731731
button.textContent = text;
732732
}
733733

734-
function showBuySellWidgets() {
734+
function showBuyWidget() {
735735

736736
var buyWidget = window.MoonPayWebSdk.init({
737737
flow: 'buy',
@@ -748,10 +748,30 @@ function showBuySellWidgets() {
748748
buyWidget.show();
749749
}
750750

751-
function handlePageRedirect(isBuyPage) {
751+
function showSellWidget() {
752+
753+
var sellWidget = window.MoonPayWebSdk.init({
754+
flow: 'sell',
755+
environment: 'production',
756+
containerNodeSelector: '.sell-widget',
757+
variant: 'embedded',
758+
params: {
759+
apiKey: 'pk_live_QWvwDl3WJAq7S8fDjsOUMfjn09DSw8R',
760+
theme: 'light',
761+
colorCode: '#FF9500'
762+
}
763+
});
764+
765+
sellWidget.show();
766+
}
767+
768+
function handlePageRedirect(isBuyPage, isSellPage) {
752769
if (isBuyPage === undefined) {
753770
isBuyPage = false;
754771
}
772+
if (isSellPage === undefined) {
773+
isSellPage = false;
774+
}
755775

756776
$.get('/cdn-cgi/trace')
757777
.done(function(response) {
@@ -771,20 +791,27 @@ function handlePageRedirect(isBuyPage) {
771791
if (data.loc === 'GB') {
772792
window.location.href = '/';
773793
} else {
774-
showBuySellWidgets();
794+
showBuyWidget();
795+
}
796+
} else if (isSellPage) {
797+
if (data.loc === 'GB') {
798+
window.location.href = '/';
799+
} else {
800+
showSellWidget();
775801
}
776802
} else {
777-
if (data.loc === 'GB') {
803+
if (data.loc === 'GB') {
778804
$('#buybitcoinbutton').hide();
779805
$('#buybitcoinmenulink').hide();
780806
$('#buybitcoinfootermenulink').hide();
781807
$('#getstartedbuybutton').hide();
808+
$('#sellbitcoinmenulink').hide();
809+
$('#sellbitcoinfootermenulink').hide();
782810
}
783811
}
784812
});
785813
}
786814

787-
788815
function sortTableColumn(selectedOption) {
789816
var tableAccordion = document.getElementById('tableAccordion');
790817
var tableAccordionButton = document.getElementById('tableAccordionButton');

0 commit comments

Comments
 (0)