Skip to content

Commit 3238262

Browse files
Merge pull request #4330 from bitcoin-dot-org/improve-page
Make page simpler
2 parents d5bcbbc + d7fe689 commit 3238262

File tree

4 files changed

+17
-83
lines changed

4 files changed

+17
-83
lines changed

_sass/_donation-banner.scss

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,6 @@ $dark-green: #318f20;
1111
background-image: linear-gradient(top, $color1 14%, $color2 70%);
1212
}
1313

14-
.buy-sell-tabs iframe {
15-
border: 0;
16-
}
17-
18-
.tabs {
19-
display: flex;
20-
flex-wrap: wrap;
21-
}
22-
23-
.tabs label {
24-
order: 1;
25-
display: block;
26-
padding: 1rem 2rem;
27-
margin-right: 0.2rem;
28-
cursor: pointer;
29-
background: #fff;
30-
color: #ff7e00;
31-
border: 1px solid #ff7e00;
32-
font-weight: 600;
33-
transition: background ease 0.2s;
34-
}
35-
36-
.tabs .tab {
37-
order: 99;
38-
flex-grow: 1;
39-
width: 100%;
40-
display: none;
41-
padding: 1rem;
42-
background: #fff;
43-
}
44-
.tabs input[type="radio"] {
45-
display: none;
46-
}
47-
.tabs input[type="radio"]:checked + label {
48-
background: #ff9500;
49-
color: #fff;
50-
}
51-
.tabs input[type="radio"]:checked + label + .tab {
52-
display: block;
53-
}
54-
55-
@media (max-width: 45em) {
56-
.tabs .tab,
57-
.tabs label {
58-
order: initial;
59-
}
60-
.tabs label {
61-
width: 100%;
62-
margin-right: 0;
63-
margin-top: 0.2rem;
64-
}
65-
}
66-
6714
.donation-btn {
6815
border: none;
6916
border-radius: 1px;

_sass/screen.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,17 @@ h1 span.fa, h2 span.fa, h3 span.fa, h4 span.fa, h5 span.fa, h6 span.fa {
625625
top: 0;
626626
transform: translateY(-100%);
627627
}
628+
.buy-widget{
629+
width: 400px;
630+
height: 650px;
631+
}
632+
.buy-widget iframe {
633+
border: 0;
634+
}
635+
.buy-footer-notice {
636+
margin-top: 50px;
637+
text-align: center;
638+
}
628639
.statusmenu {
629640
color: inherit;
630641
}

_templates/buy.html

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

13-
<div class="hero">
13+
<div class="hero" style="padding:25px;">
1414
<div class="container hero-container">
1515
<h1>{% translate pagetitle %}</h1>
1616
</div>
@@ -19,22 +19,11 @@ <h1>{% translate pagetitle %}</h1>
1919
<div class="container">
2020
<div class="row card-row" style="justify-content: center;">
2121
<div class="card buy-card" style="width: 480px;margin-top: -30px;margin-bottom: 100px;">
22-
<div class="tabs buy-sell-tabs" style="">
23-
<input type="radio" name="tabs" id="selltab">
24-
<label for="selltab" style="margin-left: 25px;margin-right: 25px;">Sell Bitcoin</label>
25-
<div class="tab">
26-
<div id="sell-widget" style="width: 370px;height: 650px;"></div>
27-
</div>
28-
<input type="radio" name="tabs" id="buytab" checked="checked">
29-
<label for="buytab" style="margin-left: 25px;margin-right: 25px;">Buy Bitcoin</label>
30-
<div class="tab">
31-
<div id="buy-widget" style="width: 370px;height: 650px;"></div>
32-
</div>
22+
<div class="buy-widget"></div>
3323
</div>
34-
</div>
35-
<div style="margin-top: 50px;text-align: center;">
36-
<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>
37-
</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>
3827
</div>
3928
</div>
4029

js/main.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -732,23 +732,11 @@ function changeAccordionButtonText(button, text) {
732732
}
733733

734734
function showBuySellWidgets() {
735-
736-
var sellWidget = window.MoonPayWebSdk.init({
737-
flow: 'sell',
738-
environment: 'production',
739-
containerNodeSelector: '#sell-widget',
740-
variant: 'embedded',
741-
params: {
742-
theme: 'light',
743-
colorCode: '#FF9500',
744-
apiKey: 'pk_live_QWvwDl3WJAq7S8fDjsOUMfjn09DSw8R'
745-
}
746-
});
747735

748736
var buyWidget = window.MoonPayWebSdk.init({
749737
flow: 'buy',
750738
environment: 'production',
751-
containerNodeSelector: '#buy-widget',
739+
containerNodeSelector: '.buy-widget',
752740
variant: 'embedded',
753741
params: {
754742
apiKey: 'pk_live_QWvwDl3WJAq7S8fDjsOUMfjn09DSw8R',
@@ -757,7 +745,6 @@ function showBuySellWidgets() {
757745
}
758746
});
759747

760-
sellWidget.show();
761748
buyWidget.show();
762749
}
763750

0 commit comments

Comments
 (0)