[gnome-web-www: 43/68] fog: Update donation pages design based on the mockup v4
- From: Tom Tryfonidis <tomtryf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www: 43/68] fog: Update donation pages design based on the mockup v4
- Date: Tue, 24 Jan 2017 15:50:50 +0000 (UTC)
commit 4928a23feedf6f4e40096ab1edea81dfdcf9bc6a
Author: Tom Tryfonidis <tomtryf gnome org>
Date: Mon Jan 9 18:51:39 2017 +0200
fog: Update donation pages design based on the mockup v4
theme/css/responsive.css | 13 +
theme/js/friends.js | 162 +++++------
theme/page-donate.php | 327 +++++++++++------------
theme/page-friends.php | 654 +++++++++++----------------------------------
theme/page-support-us.php | 152 ++++++-----
theme/page-thank-you.php | 109 ++++----
theme/style.css | 18 ++
7 files changed, 543 insertions(+), 892 deletions(-)
---
diff --git a/theme/css/responsive.css b/theme/css/responsive.css
index d8afc7f..42412ca 100644
--- a/theme/css/responsive.css
+++ b/theme/css/responsive.css
@@ -55,6 +55,16 @@
padding-bottom: 0;
margin: 0;
}
+ .alert-validation-container {
+ margin-bottom: 50px;
+ }
+ .alert-validation {
+ position: absolute;
+ left: 0;
+ top: 0;
+ margin-top: -2px;
+ margin-left: 270px;
+ }
}
@media screen and (max-width: 767px) {
@@ -106,4 +116,7 @@
#searchform {
width: 70px;
}
+ .alert-validation-container {
+ margin-bottom: 80px;
+ }
}
diff --git a/theme/js/friends.js b/theme/js/friends.js
index 552230f..ad39daa 100644
--- a/theme/js/friends.js
+++ b/theme/js/friends.js
@@ -1,117 +1,103 @@
(function($) {$(function(){
- $('.boxes').click(function(){
- $(".boxes").removeClass("active");
- $(this).addClass('active');
- $('.boxes-content').hide();
- $('#box'+$(this).attr('target')).show();
- });
+ $('.boxes').click(function(){
+ $(".boxes").removeClass("active");
+ $(this).addClass('active');
+ $('.boxes-content').hide();
+ $('#box'+$(this).attr('data-target')).show();
+ });
});
-// (Paypal and Bitcoin donations) Regex for donation amount, allow only whole numbers
-$(function() {
- $("#amount-paypal, #amount-bitcoin").on('keyup', function(e) {
- var value = $( this ).val()
- val = this.value;
- var valid = /^\d{0,9}?$/.test(this.value);
-
- if(!valid){
- this.value = val.substring(0, val.length - 1)};
-
- }).keyup();
+$('.collapse').on('shown.bs.collapse', function(){
+ $(this).parent().find(".fa-chevron-right").removeClass("fa-chevron-right").addClass("fa-chevron-down");
+}).on('hidden.bs.collapse', function(){
+ $(this).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-right");
});
-
/*
* Bitcoin donations
*/
// Make checkbox active if an email is provided
$(function() {
- $('#orderIDD input').on('keyup input', function(e){
- if ( $(this).val() != '' ) {
- $("input:checkbox[name='os2']").removeAttr('disabled', 'disabled');
- } else {
- $("input:checkbox[name='os2']").attr('disabled', 'disabled');
- }
- });
+ $('#email-bitcoin input').on('keyup input', function(e){
+ if ( $(this).val() != '' ) {
+ $("input:checkbox[name='os2']").removeAttr('disabled', 'disabled');
+ } else {
+ $("input:checkbox[name='os2']").attr('disabled', 'disabled');
+ }
+ });
});
// Change the currency symbol
// FIXME: Add generic case when there's no currency symbol
$(function() {
- var currency_symbols = {
- 'USD': '$',
- 'BTC': '฿',
- 'EUR': '€',
- 'GBP': '£',
- 'BGN': 'лв',
- 'BRL': 'R$',
- 'CHF': 'CHF',
- 'CNY': '¥',
- 'CZK': 'Kč',
- 'DKK': 'kr',
- 'HRK': 'kn',
- 'HUF': 'Ft',
- 'IDR': 'Rp',
- 'ILS': '₪',
- 'INR': '₹',
- 'JPY': '¥',
- 'KRW': '₩',
- 'MYR': 'RM',
- };
-
- $("select[name='currency']").on('click touchend', function(e){
- var currency_name = $('#bitcoin_currency').val();
-
- if(currency_symbols[currency_name]!== undefined) {
- $(".currency-bitcoin").val(currency_symbols[currency_name]);
-
- }});
+ var currency_symbols = {
+ 'USD': '$',
+ 'BTC': '฿',
+ 'EUR': '€',
+ 'GBP': '£',
+ 'BGN': 'лв',
+ 'BRL': 'R$',
+ 'CHF': 'CHF',
+ 'CNY': '¥',
+ 'CZK': 'Kč',
+ 'DKK': 'kr',
+ 'HRK': 'kn',
+ 'HUF': 'Ft',
+ 'IDR': 'Rp',
+ 'ILS': '₪',
+ 'INR': '₹',
+ 'JPY': '¥',
+ 'KRW': '₩',
+ 'MYR': 'RM',
+ };
+
+ $("select[name='currency']").on('change', function(e){
+ var currency_name = $('#bitcoin_currency').val();
+
+ if(currency_symbols[currency_name]!== undefined) {
+ $(".currency-bitcoin").text(currency_symbols[currency_name]);
+
+ }});
});
-
-
-// (PayPal and Friends of GNOME donations) Changes the currency symbol
$(function() {
- var format = function(num){
- var cur = $('#cur-usd').is(":checked") ? "$" : "€", str = num.toString().replace("$",
"").replace("€", ""), parts = false, output = [], i = 1, formatted = null;
- return(cur);
- };
- //currency
- $(".currency").keyup(function(e) {
- $(this).val(format($(this).val()));
- });
- $("input[name='os0']").on('click', function(e){
- $(".currency").keyup();
- });
+ $('#donate_form input').on('change', function() {
+ /*
+ * Get the value from the selected radio button.
+ */
+ var currency_value = $('input[name=os0]:checked', '#donate_form').val();
+
+ if (currency_value === 'USD') {
+ $('#donate_form span.input-group-addon').text('$');
+ $('input[name=currency_code]:hidden', '#donate_form').val(currency_value);
+ } else if (currency_value === 'EUR') {
+ $('#donate_form span.input-group-addon').text('€');
+ $('input[name=currency_code]:hidden', '#donate_form').val(currency_value);
+ }
+ });
});
// (Friends of GNOME donations) Statements for donation amounts and regex for input
$(function() {
- $("#amount").on('keyup input', function(e) {
- var value = $(this).val()
- val = this.value;
- var valid = /^\d{0,9}?$/.test(this.value);
-
- if(!valid){
- this.value = val.substring(0, val.length - 1)};
-
-
- if (value >= 5 && value < 30){
- $("#validation-msg").addClass("validation-msg").text("Make it over $30 and get a free
LWN.net subscription!");
- $("#subscription-btn").removeAttr('disabled', 'disabled');
- } else if (value >= 30){
- $("#validation-msg").addClass("validation-msg").html("<label class='checkbox'
style='margin-left: 20px;'><input type='hidden' name='os4' id='lwn_subscription' value='No' /><input
name='os4' id='lwn_subscription' type='checkbox' value='Yes' /> Sign me up for a free LWN.net subscription
</label> <span style='color: gray;'>You will receive an email with instructions on how to claim after
donating for two months.</span> <input type='hidden' name='on4' value='LWN.net subscription' />");
- $("#subscription-btn").removeAttr('disabled', 'disabled');
- } else {
- $("#validation-msg").addClass("validation-msg").text("Subscriptions must be over $5");
- $("#subscription-btn").attr('disabled', 'disabled');
- }
- }).keyup();
+ $("#amount").on('keyup input', function(e) {
+ var value = $(this).val()
+ val = this.value;
+
+ if (value >= 5 && value < 30){
+ $("#validation-msg").addClass("alert-validation").text('Make it over $30 and get a free LWN.net
subscription!');
+ $("#subscription-btn").removeAttr('disabled', 'disabled');
+ } else if (value >= 30){
+ $("#validation-msg").addClass("alert-validation").html("<div class='checkbox'><label><input
type='hidden' name='os4' id='lwn_subscription' value='No' /><input class='checkbox' name='os4'
id='lwn_subscription' type='checkbox' value='Yes' /> Sign me up for a free LWN.net subscription
</label></div> <span style='color: gray;'>You will receive an email with instructions on how to claim after
donating for two months.</span> <input type='hidden' name='on4' value='LWN.net subscription' />");
+ $("#subscription-btn").removeAttr('disabled', 'disabled');
+ } else {
+ $("#validation-msg").addClass("alert-validation").text("Subscriptions must be over $5");
+ $("#subscription-btn").attr('disabled', 'disabled');
+ }
+ }).keyup();
});
$(function() {
-
new Clipboard('#badgecode-container .btn');
$("#badges").on('click','img',function(){
diff --git a/theme/page-donate.php b/theme/page-donate.php
index a5f2bd3..4a07880 100644
--- a/theme/page-donate.php
+++ b/theme/page-donate.php
@@ -1,202 +1,199 @@
-<?php
+<?php get_header(); ?>
-require_once("header.php"); ?>
+ <!-- container -->
+ <div class="container">
+ <div class="row content">
+ <div class="col-xs-12">
+ <div class="page_title">
+ <h1><?php esc_html_e('Donate to GNOME', 'grass');?></h1>
+ </div>
-<?php
-function matching_donation_text() {
- echo __('<p>Employees of some companies can have their donation to GNOME matched by their employer. This
is great way to increase your donation. Companies that offer donation matching include ... , ... and
...</p>', 'grass');
-} ?>
+ <p><?php esc_html_e( 'Thank you for donating to GNOME! Please choose a payment option that
best suits you.', 'grass' ); ?></p>
- <!-- container -->
- <div id="container">
- <div class="container">
- <div class="page_title">
- <h1><?php echo __('Donate to GNOME', 'grass');?></h1>
- </div>
-
- <div class="content">
- <p><?php _e( 'Thank you for choosing to donate to GNOME! Please choose a
payment option that best suits you.', 'grass' ); ?></p>
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+ <?php endwhile; // End the loop. Whew. ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; // End the loop. Whew. ?>
-
- <div class="clearfix"></div>
+ <div class="clearfix"></div>
- <div class="boxes-container row equalizer">
+ <!-- Donation Boxes -->
+ <div class="boxes-selection-container row equalizer">
<div class="col-sm-3">
- <div class="boxes active col-sm-12" target="1">
+ <div class="boxes active col-sm-12" data-target="1">
<p class="main_feature">PayPal</p>
- <p><?php _e( 'Tax deductible in the United States', 'grass' ); ?></p>
+ <p><?php esc_html_e( 'Tax deductible in the United States', 'grass' ); ?></p>
</div>
</div>
<div class="col-sm-3">
- <div class="boxes col-sm-12" target="2">
- <p class="main_feature"><?php _e( 'Bank Transfer', 'grass' ); ?></p>
- <p><?php _e( 'For EU bank account holders only; tax deductible', 'grass' );
?></p>
+ <div class="boxes col-sm-12" data-target="2">
+ <p class="main_feature"><?php esc_html_e( 'Bank Transfer', 'grass' ); ?></p>
+ <p><?php esc_html_e( 'For EU bank account holders only; tax deductible', 'grass'
); ?></p>
</div>
</div>
<div class="col-sm-3">
- <div class="boxes col-sm-12" target="3">
- <p class="main_feature"><?php _e( 'Check', 'grass' ); ?></p>
- <p><?php _e( 'Available to United States bank account holders; tax deductible',
'grass' ); ?></p>
+ <div class="boxes col-sm-12" data-target="3">
+ <p class="main_feature"><?php /* translators: This is a payment option */
esc_html_e( 'Check', 'grass' ); ?></p>
+ <p><?php esc_html_e( 'Available to United States bank account holders; tax
deductible', 'grass' ); ?></p>
</div>
</div>
<div class="col-sm-3">
- <div class="boxes col-sm-12" target="4">
+ <div class="boxes col-sm-12" data-target="4">
<p class="main_feature">Bitcoin</p>
</div>
</div>
- </div>
+ </div>
- <div id="boxes-content" class="col-sm-12 no-padding">
- <!-- PayPal -->
- <div id="box1" class="boxes-content" >
- <p><?php _e( 'The GNOME Foundation is a non-profit
organization, and donations made by Paypal are tax deductible in the United States. Contact your tax office
for more information and to find out if you qualify.', 'grass' ); ?></p>
- <?php matching_donation_text(); ?>
- <h3><?php _e( 'Donation amount', 'grass' ); ?></h3>
- <form id="donate_form" class="form-horizontal"
action="https://www.paypal.com/cgi-bin/webscr" method="post" name="application_form">
- <input type="hidden" name="business" value="friends
gnome org" />
- <input type="hidden" name="return"
value="https://www.gnome.org/thank-you/" />
- <input type="hidden" name="item_name" value="Friends
of GNOME - One time donation" />
- <input type="hidden" name="notify_url"
value="https://muelli.cryptobitch.de/paypaltest/ipnhandler.php" />
+ <!-- Donation Boxes Content -->
+ <div class="boxes-content-container row">
+ <div class="col-sm-12">
+ <!-- PayPal -->
+ <div id="box1" class="boxes-content" >
+ <p><?php esc_html_e( 'PayPal donations are made to the GNOME Foundation, a
501(c)(3) nonprofit organization, and can therefore be tax deductible in the United States. Contact your tax
office for more information and to find out if you qualify.', 'grass' ); ?></p>
+ <h3><?php esc_html_e( 'Donation amount', 'grass' ); ?></h3>
+ <form id="donate_form" class="form-horizontal"
action="https://www.paypal.com/cgi-bin/webscr" method="post" name="application_form">
+ <input type="hidden" name="business" value="friends gnome org" />
+ <input type="hidden" name="return" value="https://www.gnome.org/thank-you/"
/>
+ <input type="hidden" name="item_name" value="Friends of GNOME - One time
donation" />
+ <input type="hidden" name="notify_url"
value="https://muelli.cryptobitch.de/paypaltest/ipnhandler.php" />
- <div class="form-group">
- <div class="col-sm-2 col-md-1">
- <label class="control-label"><?php _e( 'Currency', 'grass' ); ?></label>
- </div>
- <div class="col-sm-10 col-md-11">
- <label class="radio-inline">
- <input type="radio"
name="os0" value="USD" id="cur-usd" onClick="document.getElementById('cur').value=this.value"
checked="checked"/>$ USD
- </label>
- <label class="radio-inline">
- <input type="radio"
name="os0" value="EUR" id="cur-eur" onClick="document.getElementById('cur').value=this.value"/>€ EUR
- <input type="hidden"
name="currency_code" value="" id="cur">
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 col-md-1">
- <label class="control-label"><?php _e( 'Amount', 'grass' ); ?></label>
+ <div class="form-group">
+ <div class="col-sm-2 col-md-1">
+ <label class="control-label"><?php esc_html_e( 'Currency', 'grass'
); ?></label>
+ </div>
+ <div class="col-sm-10 col-md-11">
+ <label class="radio-inline">
+ <input type="radio" name="os0" value="USD" id="cur-usd"
checked="checked"/>$ USD
+ </label>
+ <label class="radio-inline">
+ <input type="radio" name="os0" value="EUR" id="cur-eur"/>€
EUR
+ <input type="hidden" name="currency_code" value="" id="cur">
+ </label>
+ </div>
</div>
- <div class="col-sm-10 col-md-11 no-padding">
- <input type="hidden" name="cmd"
value="_xclick" />
- <input type="text" disabled
class="currency" placeholder="$" style="background: #fff; border: 0; width: 10px;"/>
- <input id="amount-paypal"
style="width: 65px;" type="tel" name="amount" size="5" value="25" required /> <br>
+ <div class="form-group">
+ <div class="col-sm-2 col-md-1">
+ <label for="amount-paypal" class="control-label"><?php esc_html_e(
'Amount', 'grass' ); ?></label>
+ </div>
+ <div class="col-sm-5 col-md-2 no-padding">
+ <div class="col-xs-12 col-sm-3 col-md-6 col-lg-5 input-group">
+ <span class="input-group-addon input-group-no-bg">$</span>
+ <input type="hidden" name="cmd" value="_xclick" />
+ <input id="amount-paypal" type="number" class="form-control"
name="amount" min="5" step="1" value="25" required="" /> <br>
+ </div>
+ </div>
</div>
- </div>
- <div class="form-group">
- <div class="checkbox col-sm-10">
- <label>
- <input type="hidden" name="os1" id="notify_donor" value="No" />
- <input name="os1" id="notify_donor" type="checkbox" value="Yes"
checked /> <?php _e( "GNOME can contact me by email (we don't do this very often)", 'grass' ); ?>
- <input type="hidden" name="on1" value="Keep me updated by email" />
- </label>
+ <div class="form-group">
+ <div class="checkbox col-sm-10">
+ <label>
+ <input type="hidden" name="os1" value="No" />
+ <input name="os1" type="checkbox" value="Yes" checked /> <?php
esc_html_e( "GNOME can contact me by email (we don't do this very often)", 'grass' ); ?>
+ <input type="hidden" name="on1" value="Keep me updated by email"
/>
+ </label>
+ </div>
</div>
- </div>
- <br>
- <div class="form-group">
- <div class="col-sm-12">
- <button type="submit" class="btn
btn-success" name="submit"><?php _e( 'Donate', 'grass' ); ?></button>
+ <br>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <button type="submit" class="btn btn-success" name="submit"><?php
esc_html_e( 'Donate', 'grass' ); ?></button>
+ </div>
</div>
- </div>
- </form>
- </div>
+ </form>
+ </div>
- <!-- Bank transfer -->
- <div id="box2" class="boxes-content" style="display:none;">
- <p><?php _e( 'Bank transfers to the GNOME Foundation from
within the EU can be sent to WHS Foundation. Payments sent WHS Foundation are tax deductible. Contact your
tax office for more information and to find out if you qualify.', 'grass' ); ?></p>
- <p><strong><?php _e( 'Donors should include the word "GNOME"
and their postal address on their money transfer. This will allow the WHS to send a donation receipt for
income tax deduction', 'grass' ); ?></strong></p>
-
- <dl class="dl-horizontal">
- <dt>Account Name</dt>
- <dd>Wau Holland Stiftung</dd>
- <dt>Bank Name</dt>
- <dd>Commerzbank Kassel</dd>
- <dt>Bank Address</dt>
- <dd>Königsplatz 32-34, 34117, Kassel, Germany</dd>
- <dt>IBAN</dt>
- <dd>DE08 5204 0021 0277 2812 09</dd>
- <dt>BIC</dt>
- <dd>COBADEFFXXX</dd>
- </dl>
+ <!-- Bank transfer -->
+ <div id="box2" class="boxes-content" style="display:none;">
+ <p><?php esc_html_e( 'Bank transfers can be sent from EU bank accounts to GNOME
via the WHS Foundation. These can be tax deductible - contact your tax office for more information and to
find out if you qualify.', 'grass' ); ?></p>
+ <h3><?php esc_html_e( 'Transfer details', 'grass' ); ?></h3>
+ <p><?php esc_html_e( 'Bank transfers can be sent to:', 'grass' ); ?></p>
+ <dl class="dl-horizontal">
+ <dt><?php esc_html_e( 'Account Name', 'grass' ); ?></dt>
+ <dd>Wau Holland Stiftung</dd>
+ <dt><?php esc_html_e( 'Bank Name', 'grass' ); ?></dt>
+ <dd>Commerzbank Kassel</dd>
+ <dt><?php esc_html_e( 'Bank Address', 'grass' ); ?></dt>
+ <dd>Königsplatz 32-34, 34117, Kassel, Germany</dd>
+ <dt>IBAN</dt>
+ <dd>DE08 5204 0021 0277 2812 09</dd>
+ <dt>BIC</dt>
+ <dd>COBADEFFXXX</dd>
+ </dl>
+
+ <p><strong><?php esc_html_e( 'Donors should include the word "GNOME" and their
postal address on their money transfer. This will allow the WHS to send a donation receipt for tax deduction
purposes.', 'grass' ); ?></strong></p>
+ </div>
- <?php matching_donation_text(); ?>
- </div>
-
- <!-- Check -->
- <div id="box3" class="boxes-content" style="display:none;">
- <p><?php _e( 'US bank account holders can send payments
check. The GNOME Foundation is a non-profit organization, and donation made by check are tax deductible in
the United States. Contact your tax office for more information and to find out if you qualify.', 'grass' );
?></p>
- <p><?php _e( 'Checks should be marked as payable to "GNOME
Foundation, Inc." and sent to:', 'grass' ); ?></p>
- <address>
- GNOME Foundation<br>
- #117<br>
- 21 Orinda Way Ste. C<br>
- Orinda, CA 94563<br>
- USA
- </address>
- <br>
- <?php matching_donation_text(); ?>
- </div>
-
- <!-- Bitcoin -->
- <div id="box4" class="boxes-content" style="display:none;">
- <?php matching_donation_text(); ?>
+ <!-- Check -->
+ <div id="box3" class="boxes-content" style="display:none;">
+ <p><?php esc_html_e( 'US bank account holders can make donations via check. The
GNOME Foundation is a 501(c)(3) non-profit organization, and can therefore be tax deductible in the United
States. Contact your tax office for more information and to find out if you qualify.', 'grass' ); ?></p>
+ <h3><?php esc_html_e( 'Postal details', 'grass' ); ?></h3>
+ <p><?php esc_html_e( 'Checks should be marked as payable to "GNOME Foundation,
Inc." and sent to:', 'grass' ); ?></p>
+ <address>
+ GNOME Foundation<br>
+ #117<br>
+ 21 Orinda Way Ste. C<br>
+ Orinda, CA 94563<br>
+ USA
+ </address>
+ </div>
- <form id="bitcoin_donation"
action="https://bitpay.com/checkout" method="post" onsubmit="return
bp.validateMobileCheckoutForm($('#makeDonation'));"><input type="hidden" name="action" value="checkout" />
- <fieldset class="phone-form form-horizontal"
style="margin-top: 5px;">
- <div id="orderIDC" class="form-group">
- <div class="col-sm-2">
- <label class="control-label"><?php _e( 'Currency', 'grass' ); ?></label>
+ <!-- Bitcoin -->
+ <div id="box4" class="boxes-content" style="display:none;">
+ <form id="bitcoin_donation" class="form-horizontal"
action="https://bitpay.com/checkout" method="post">
+ <input type="hidden" name="action" value="checkout" />
+ <div class="form-group">
+ <div class="col-sm-2">
+ <label class="control-label" for="bitcoin_currency"><?php
esc_html_e( 'Currency', 'grass' ); ?></label>
+ </div>
+ <div class="col-sm-5 col-md-2 no-padding">
+ <div class="col-xs-3 col-md-6 no-padding">
+ <select id="bitcoin_currency" class="form-control"
name="currency"><option selected="selected" value="USD">USD</option><option value="BTC">BTC</option><option
value="EUR">EUR</option><option value="GBP">GBP</option><option value="AUD">AUD</option><option
value="BGN">BGN</option><option value="BRL">BRL</option><option value="CAD">CAD</option><option
value="CHF">CHF</option><option value="CNY">CNY</option><option value="CZK">CZK</option><option
value="DKK">DKK</option><option value="HKD">HKD</option><option value="HRK">HRK</option><option
value="HUF">HUF</option><option value="IDR">IDR</option><option value="ILS">ILS</option><option
value="INR">INR</option><option value="JPY">JPY</option><option value="KRW">KRW</option><option
value="LTL">LTL</option><option value="LVL">LVL</option><option value="MXN">MXN</option><option
value="MYR">MYR</option><option value="NOK">NOK</option><option value="NZD">NZD</option><option
value="PHP">PHP</o
ption><option value="PLN">PLN</option><option value="RON">RON</option><option
value="RUB">RUB</option><option value="SEK">SEK</option><option value="SGD">SGD</option><option
value="THB">THB</option><option value="TRY">TRY</option><option value="ZAR">ZAR</option></select>
+ </div>
+ </div>
</div>
- <div class="col-sm-10">
- <select id="bitcoin_currency"
style="width: 80px;" name="currency"><option selected="selected" value="USD">USD</option><option
value="BTC">BTC</option><option value="EUR">EUR</option><option value="GBP">GBP</option><option
value="AUD">AUD</option><option value="BGN">BGN</option><option value="BRL">BRL</option><option
value="CAD">CAD</option><option value="CHF">CHF</option><option value="CNY">CNY</option><option
value="CZK">CZK</option><option value="DKK">DKK</option><option value="HKD">HKD</option><option
value="HRK">HRK</option><option value="HUF">HUF</option><option value="IDR">IDR</option><option
value="ILS">ILS</option><option value="INR">INR</option><option value="JPY">JPY</option><option
value="KRW">KRW</option><option value="LTL">LTL</option><option value="LVL">LVL</option><option
value="MXN">MXN</option><option value="MYR">MYR</option><option value="NOK">NOK</option><option
value="NZD">NZD</option><option value="PHP">PHP</option><option value="PLN">PLN</opti
on><option value="RON">RON</option><option value="RUB">RUB</option><option value="SEK">SEK</option><option
value="SGD">SGD</option><option value="THB">THB</option><option value="TRY">TRY</option><option
value="ZAR">ZAR</option></select>
- </div>
- </div>
- <div id="price" class="form-group">
- <div class="col-sm-2">
- <label class="control-label"><?php _e( 'Amount', 'grass' ); ?></label>
+ <div class="form-group">
+ <div class="col-sm-2">
+ <label for="amount-bitcoin" class="control-label"><?php esc_html_e(
'Amount', 'grass' ); ?></label>
+ </div>
+ <div class="col-sm-5 col-md-2 no-padding">
+ <div class="col-xs-3 col-md-6 input-group">
+ <span class="input-group-addon input-group-no-bg
currency-bitcoin">$</span>
+ <input id="amount-bitcoin" class="form-control" type="number"
min="5" step="1" name="price" value="25" required />
+ </div>
+ </div>
</div>
- <div class="col-sm-10">
- <input type="text" disabled
class="currency-bitcoin" placeholder="$" style="background: #fff; border: 0; width: 10px;"/>
- <input id="amount-bitcoin"
style="width: 65px;" type="tel" name="price" value="25" required />
+ <div class="form-group">
+ <div class="col-sm-2">
+ <label for="email-bitcoin" class="control-label"><?php esc_html_e(
'Email address', 'grass' ); ?></label>
+ </div>
+ <div class="col-sm-3 col-md-2 no-padding">
+ <input id="email-bitcoin" class="form-control" type="email"
maxlength="50" name="orderID" aria-describedby="bitcoin-msg"/>
+ </div>
+ <div id="bitcoin-msg" class="col-sm-6 col-md-8 help-block"><?php
esc_html_e( 'Optional', 'grass' ); ?></div>
</div>
- </div>
- <div id="orderIDD" class="form-group">
- <div class="col-sm-2">
- <label class="control-label"><?php _e( 'Email address', 'grass' );
?></label>
+ <div class="form-group">
+ <div class="checkbox col-sm-11">
+ <label>
+ <input type="hidden" name="os2" value="No" />
+ <input name="os2" disabled="disabled" type="checkbox"
value="Yes" checked /> <?php esc_html_e( "GNOME can contact me by email (we don't do this very often)",
'grass' ); ?>
+ <input type="hidden" name="on2" value="Keep me updated by email"
/>
+ </label>
+ </div>
</div>
- <div class="col-sm-10">
- <input class="input input-xlarge"
type="email" maxlength="50" name="orderID"/> <?php _e( 'Optional', 'grass' ); ?> <br>
- </div>
- </div>
- <div id="orderID" class="form-group">
- <div class="checkbox col-sm-11">
- <label>
- <input type="hidden" name="os2"
id="update_donor" value="No" />
- <input name="os2" id="update_donor"
disabled="disabled" type="checkbox" value="Yes" checked /> <?php _e( "GNOME can contact me by email (we don't
do this very often)", 'grass' ); ?>
- <input type="hidden" name="on2"
value="Keep me updated by email" />
- </label>
+ <input type="hidden" name="data"
value="nZRF5Hm4nQGR1KC5Teo6TKlb70jK8EHVcreK7DFO6yMJSbIPTqK0XcB/Et62OHNuPy5dIcrZWQN2GKC1HU7L4zOqX9jwoBIKwlrVorwfnMlCWbL1YynaGevJjggRZQu4THkqvYaCQ7GFtSOjtLXcgZNUeD0m0q3Z/y/5iLFCqdGgiR8WMzb3H9sjPPtSTfSrMkdSnBCzdMJVfOUgkAWK2vppfBJDjNlAGDrJB820w0qU6+2B9kM0v8UUGZ7IrZrDM9hoFgKUpsAfL2PyDfF93L8siKwV2F0HnpXE8WqeiOu/Zi1W6K7Ev9NnNxkVcNaelEHoPaxSfiLBhTaCg5i7eg=="
/>
+ <br>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <button type="submit" class="btn btn-success"
name="submit-bitcoin"><?php esc_html_e( 'Donate', 'grass' ); ?></button>
+ </div>
</div>
- </div>
-
- <input type="hidden" name="data"
value="nZRF5Hm4nQGR1KC5Teo6TKlb70jK8EHVcreK7DFO6yMJSbIPTqK0XcB/Et62OHNuPy5dIcrZWQN2GKC1HU7L4zOqX9jwoBIKwlrVorwfnMlCWbL1YynaGevJjggRZQu4THkqvYaCQ7GFtSOjtLXcgZNUeD0m0q3Z/y/5iLFCqdGgiR8WMzb3H9sjPPtSTfSrMkdSnBCzdMJVfOUgkAWK2vppfBJDjNlAGDrJB820w0qU6+2B9kM0v8UUGZ7IrZrDM9hoFgKUpsAfL2PyDfF93L8siKwV2F0HnpXE8WqeiOu/Zi1W6K7Ev9NnNxkVcNaelEHoPaxSfiLBhTaCg5i7eg=="
/>
- <br>
- <div style="margin: auto; width: 100%;">
- <button type="submit" class="btn btn-success"
name="submit"><?php _e( 'Donate', 'grass' ); ?></button>
- </div>
- </fieldset>
- </form>
- </div>
- </div>
- </div> <!-- END content -->
-<?php require_once("footer_art.php"); ?>
- </div> <!-- END .container -->
- </div> <!-- END #container -->
+ </form>
+ </div> <!-- END Bitcoin -->
+ </div>
+ </div> <!-- END boxes-content-container -->
+ </div>
+ </div> <!-- END content -->
+ </div> <!-- END container -->
<div class="clearfix"></div>
- <?php require_once("footer.php"); ?>
-</body>
-</html>
+<?php get_footer(); ?>
diff --git a/theme/page-friends.php b/theme/page-friends.php
index 5419888..41ef3f2 100644
--- a/theme/page-friends.php
+++ b/theme/page-friends.php
@@ -1,513 +1,159 @@
-<?php
-/**
- * @package GNOME Website
- * @subpackage Grass Theme
- */
-
-require_once("header.php");
-
-class HackerList {
- /**
- * @param Array one HackerDicts
- * @return HTML Html displaying one hacker
- */
- function parseHackerDictToHtml($hackerDict) {
- $returnHtml = '';
- // if no name is in the hackerDict, then return an empty string (don't display this hackerDict)
- if (isset($hackerDict['name'])) {
- if (!isset($hackerDict['shortName'])) {
- // short name is the name without spaces and html characters
- $shortName = 'http://wiki.gnome.org/' . urlencode(str_replace(' ', '', $hackerDict['name']));
- $hackerDict['shortName'] = $shortName;
- }
- $returnHtml = sprintf('<li><input type="radio" name="os0" ' .
- 'value="You will receive a postcard from %s" /> ' .
- '<a href="%s" target="_blank">'.
- '%s</a></li>',
- $hackerDict['name'], $hackerDict['shortName'], $hackerDict['name']);
- }
- return $returnHtml;
- }
-
- /**
- * @param Array List of HackerDicts
- * @return HTML Html displaying one hacker per line
- */
- function parseHackerDictArrayToHtml($hackerDictArray) {
- $returnHtmlArray = Array();
- foreach ($hackerDictArray as $hackerDict) {
- $snippet = $this->parseHackerDictToHtml($hackerDict);
- // don't add the snippet if it's empty
- if (strlen($snippet)) {
- $returnHtmlArray[] = $snippet;
- }
- }
- $returnHtml = implode("\n", $returnHtmlArray);
- return $returnHtml;
- }
-}
-?>
-
-<style type="text/css">
-#boxes {
-
-}
-
-#boxes > div {
- margin: 10px;
- width: 150px;
- height: 150px;
- -moz-border-radius: 4px;
- /*display: inline-block;*/
- background-color: #73d216;
- overflow: hidden;
- background-repeat: no-repeat;
- background-position: center center;
- float: left;
-}
-
-#boxes > div {
- cursor: pointer;
-}
-
-#adopt {
- background-image: url("http://www.gnome.org/wp-content/themes/gnome-grass/images/adopt-normal.png");
-}
-
-#adopt.greyed {
- background-image: url("http://www.gnome.org/wp-content/themes/gnome-grass/images/adopt-inactive.png")
!important;
-}
-
-#associate {
- background-image: url("http://www.gnome.org/wp-content/themes/gnome-grass/images/associate-normal.png");
-}
-
-#associate.greyed {
- background-image:
url("http://www.gnome.org/wp-content/themes/gnome-grass/images/associate-inactive.png") !important;
-}
-
-#sponsor {
- background-image: url("http://www.gnome.org/wp-content/themes/gnome-grass/images/sponsor-normal.png");
-}
-
-#sponsor.greyed {
- background-image: url("http://www.gnome.org/wp-content/themes/gnome-grass/images/sponsor-inactive.png")
!important;
-}
-
-#philanthropist {
- background-image:
url("http://www.gnome.org/wp-content/themes/gnome-grass/images/philanthropist-normal.png");
-}
-
-#philanthropist.greyed {
- background-image:
url("http://www.gnome.org/wp-content/themes/gnome-grass/images/philanthropist-inactive.png") !important;
-}
-
-.active-text {
- font-size: 11px;
- padding: 1em;
- visibility: hidden;
- text-align: center;
- height: 65%;
-}
-
-/* relative position, bottom, left */
-.level-text {
- position: relative;
- /* really ugly, why does this work? */
- text-align: center;
- height: 35%;
-}
-
-.greyed {
- background-color: #d3d7cf !important;
- color: #babdb6;
-}
-
-
-div#below {
- margin: 10px;
- padding: 0px;
- position: relative;
- width: 660px;
- clear: both;
-}
-
-p#donation-details {
- text-align: center;
- font-weight: bold;
-}
-
-div#below > p {
- text-align: center;
-}
-
-p.hidden {
- display: none;
-}
-
-div#below > form {
- display: none;
-}
-
-
-/* allow room for 3 columns */
-#below ul {
- width: 700px;
-}
-
-
-/* float & allow room for the widest item */
-#below ul li {
- float: left;
- width: 200px;
- list-style: none;
-}
-
-/* stop the float */
-#below br {
- clear: left;
-}
-
-/* Get rid of some 960 spacing */
-#below li {
- margin-left: 0px;
-}
-
-/* separate the list from subsequent markup */
-div.wrapper {
- margin-bottom: 10em;
-}
-
-#foundation-info {
-
- padding: 10px;
- width: 650px;
-}
-
-small {
- font-size: 12px;
- color: gray;
-}
-</style>
+<?php get_header(); ?>
<!-- container -->
- <div id="container" class="two_columns">
- <div class="container_12">
-
- <?php require_once('inc/page-title.php'); ?>
-
- <div class="content">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; // End the loop. Whew. ?>
-
+ <div class="container">
+ <div class="row content">
+ <div class="col-xs-12">
+ <div class="page_title">
+ <h1><?php esc_html_e('Become a Friend of GNOME', 'grass');?></h1>
+ </div>
- <!-- Page content has finished, now it's the template -->
-
- <div class="container_24">
- <div class="grid_18">
- <div id="boxes">
- <div id="adopt">
- <div class="active-text">
- You get: GNOME stickers, a thank you postcard from a hacker, a subscription
- to LWN and a t-shirt if you commit to a year for $10/month!
- </div>
-
- <div class="level-text">
- Adopt a Hacker
- </div>
- </div>
-
- <div id="associate">
- <div class="active-text">
- You get: A GNOME mouse pad, a set of stickers, and recognition of your
- contribution of $25-$500.
- </div>
-
- <div class="level-text">
- Associate
- </div>
+ <p class="main_feature"><?php esc_html_e( "Join today to help GNOME continue its mission.",
'grass' ); ?></p>
+
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+ <?php endwhile; // End the loop. Whew. ?>
+
+ <div class="clearfix"></div>
+
+ <div class="row">
+ <div class="col-md-12">
+ <form id="donate_form" class="form-horizontal"
action="https://www.paypal.com/cgi-bin/webscr" method="post" name="application_form">
+ <input type="hidden" name="business" value="friends gnome org" />
+ <input type="hidden" name="return" value="https://www.gnome.org/thank-you/" />
+ <input type="hidden" name="item_name" value="Friends of GNOME - Adopt a hacker
monthly subscription" />
+ <input type="hidden" name="notify_url"
value="https://muelli.cryptobitch.de/paypaltest/ipnhandler.php" />
+
+ <!-- Specify a Subscribe button. -->
+ <input type="hidden" name="cmd" value="_xclick-subscriptions" />
+ <!-- Define the intervals between payments. "1" means every period. -->
+ <input type="hidden" name="p3" value="1" />
+ <!-- "t3" defines the period duration (D=days; W=weeks; M=months and Y=Years).
-->
+ <input id="t3" type="hidden" name="t3" value="M" />
+ <!-- "src" with a value of "1" causes it to repeat for every interval. -->
+ <input type="hidden" name="src" value="1" />
+ <!-- Reattempt on failure. If a recurring payment fails, PayPal attempts to
collect the payment two more times before canceling the subscription. See
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
-->
+ <input type="hidden" name="sra" value="1" />
+ <input type="hidden" name="on1" value="Favorite Hacker" />
+
+ <h3><?php esc_html_e( 'Monthly subscription amount', 'grass'); ?></h3>
+
+ <div class="form-group">
+ <div class="col-sm-2 col-md-1">
+ <label class="control-label"><?php esc_html_e( 'Currency', 'grass' );
?></label>
+ </div>
+ <div class="col-sm-10 col-md-11">
+ <label class="radio-inline">
+ <input type="radio" name="os0" value="USD" id="cur-usd"
checked="checked"/>$ USD
+ </label>
+ <label class="radio-inline">
+ <input type="radio" name="os0" value="EUR" id="cur-eur"/>€ EUR
+ <input type="hidden" name="currency_code" value="" id="cur">
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="col-sm-2 col-md-1">
+ <label class="control-label" for="amount"><?php esc_html_e( 'Amount',
'grass' ); ?></label>
+ </div>
+ <div class="col-sm-5 col-md-2 no-padding">
+ <div class="col-xs-12 col-sm-3 col-md-6 col-lg-5 input-group">
+ <span class="input-group-addon input-group-no-bg">$</span>
+ <input type="hidden" name="cmd" value="_xclick-subscriptions" />
+ <input id="amount" type="number" class="form-control" name="a3"
min="5" step="1" value="25" required="" aria-describedby="validation-msg"/>
+ </div>
+ </div>
+ <div class="alert-validation-container">
+ <div id="validation-msg" class="col-sm-7 col-md-8 col-lg-7
help-block"></div>
+ </div>
+ </div>
+
+ <p class="text-gray">Subscription payments will continue until you contact the
GNOME Foundation to cancel the payments. Regular donations can only be made through PayPal. <a
href="../donate">One time donations</a> can be made using other payment methods, but do not qualify for
Friends of GNOME membership.</p>
+
+ <div class="col-sm-12 no-padding">
+ <h3><?php esc_html_e( 'Adopt a hacker!', 'grass' ); ?></h3>
+ <p><?php esc_html_e( 'Select which of our dedicated hackers you want to
receive a thank you post card from.', 'grass' ); ?></p>
+ </div>
+
+ <!-- Show the hackers -->
+ <div class="control-group">
+ <?php
+ $original_query = clone $wp_query;
+ // Show 8 hackers in alphabetical order
+ query_posts(array('post_type' => 'hackers', 'posts_per_page' => 8,
'orderby'=> 'title', 'order' => 'ASC'));
+ // Set variables for the checked attribute. Add it only on the first
radio button.
+ $checked_attr = 'checked="checked"';
+ $is_checked = true;
+ ?>
+
+ <?php while ( have_posts() ) : the_post(); ?>
+ <div class="fog-hackers col-xs-10 col-sm-6">
+ <div class="media">
+ <div class="pull-left" style="margin-top: 25px;">
+ <input id="fog-<?php the_ID(); ?>" class="radio" type="radio"
name="os1" value="You will receive a postcard from <?php the_title(); ?>" required="" <?php if ($is_checked)
echo $checked_attr; ?> >
+ </div>
+
+ <div class="media-left">
+ <?php
+ if (has_post_thumbnail()) {
+ echo the_post_thumbnail('fog-hacker-icon', array(
'class' => 'media-object pull-left'));
+ } else {
+ echo '<img
src="'.get_bloginfo('template_url').'/images/photo-missing.png" class="media-object pull-left"
alt="the_photo_is_missing" />';
+ }
+ ?>
+ </div>
+
+ <div class="media-body media-middle">
+ <p class="media-heading">
+ <label for="fog-<?php the_ID(); ?>"><?php the_title();
?></label>
+ </p>
+ <?php
+ if (has_excerpt( $post->ID )) {
+ the_excerpt();
+ } else {
+ echo ('FoG Hacker');
+ }
+ ?>
+ </div>
+ </div>
+ </div>
+ <?php
+ $is_checked = false; // We've already set the checked attribute
+ endwhile; // End the loop. Whew.
+ ?>
+ </div>
+
+ <div class="clearfix"></div>
+
+ <h3>Details</h3>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <div class="checkbox">
+ <label>
+ <input type="hidden" name="os2" id="list_donor" value="No" />
+ <input name="os2" id="list_donor" type="checkbox" value="Yes"
checked /> <?php esc_html_e( 'Include me on the list of donors', 'grass' ); ?>
+ <input type="hidden" name="on2" value="List me on the donors
page" />
+ </label>
+ </div>
+ <div class="checkbox">
+ <label>
+ <input type="hidden" name="os3" id="notify_donor" value="No" />
+ <input name="os3" id="notify_donor" type="checkbox" value="Yes"
checked /> <?php esc_html_e( "GNOME can contact me by email (we don't do this very often)", 'grass' ); ?>
+ <input type="hidden" name="on3" value="Keep me updated by email"
/>
+ </label>
+ </div>
+ <br>
+ <button id="subscription-btn" class="btn btn-success" type="submit"
name="submit"><?php esc_html_e( 'Join', 'grass' ); ?></button>
+ </div>
+ </div>
+ </form>
</div>
-
- <div id="sponsor">
- <div class="active-text">
- You get: A GNOME coffee mug, a GNOME t-shirt, and recognition of your
- contribution of $500-$1200.
- </div>
-
- <div class="level-text">
- Sponsor
- </div>
- </div>
-
- <div id="philanthropist">
- <div class="active-text">
- You get: A print of the GNOME foot signed by the Board of Directors and
- recognition of your contribution of $1200+.
- </div>
-
- <div class="level-text">
- Philanthropist
- </div>
- </div>
- </div>
-
- <div id="below">
- <p id="donation-details">Please select your donation level</p>
-
-<?php
-function print_form_head($form_name, $product_name) {
-?>
- <form id="<?php echo "$form_name";?>-form"
- action="https://www.paypal.com/cgi-bin/webscr"
- method="post" name="<?php echo "$form_name";?>">
- <input type="hidden" name="business" value="friends gnome org" />
- <input type="hidden" name="return" value="http://www.gnome.org/thank-you/" />
- <input type="hidden" name="item_name" value="<?php echo "$product_name"; ?>" />
- <input type="hidden" name="notify_url"
value="https://muelli.cryptobitch.de/paypaltest/ipnhandler.php" />
-<?php } /* print_form_head */ ?>
-
-
- <?php print_form_head("adopt", "Friends of GNOME - Adopt a hacker monthly
subscription"); ?>
-
- <!-- Specify a Subscribe button. -->
- <input type="hidden" name="cmd" value="_xclick-subscriptions" />
-
- <!-- Define the intervals between payments. "1" means every period. -->
- <input type="hidden" name="p3" value="1" />
- <!-- "t3" defines the period duration (D=days; W=weeks; M=months and Y=Years). -->
- <input id="t3" type="hidden" name="t3" value="M" />
- <!-- "src" with a value of "1" causes it to repeat for every interval. -->
- <input type="hidden" name="src" value="1" />
- <!-- Reattempt on failure. If a recurring payment fails, PayPal attempts to collect
the payment two more times before canceling the subscription. See
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
-->
- <input type="hidden" name="sra" value="1" />
-
- You have chosen to <strong>adopt a hacker</strong> for a monthly amount of:
- <input id="amount" type="text" name="a3" size="5" value="25" />
- <select name="currency_code">
- <option value="USD">
- $ USD
- </option>
-
- <option value="EUR">
- € EUR
- </option>
- </select>
- <small>Please increase the amount above if you want to make a larger
difference.</small>
-
- <p style="text-align: left;"><span style="color: #993300;">PLEASE NOTE</span>:
- Monthly or annual subscription payments made through Paypal will continue until
- you contact the <a href="http://www.gnome.org/foundation/">GNOME Foundation</a>
- to cancel the payments.</p>
-
- <h5>Pick a hacker from whom you will receive a post card:</h5>
- <input type="hidden" name="on0" value="Favorite Hacker" />
-
- <div class="wrapper">
- <?php
- $hackerList = array(
- 0 => array('name' => 'Emmanuele Bassi'),
- 2 => array('name' => 'Diego Escalante Urrelo'),
- 3 => array('name' => 'Behdad Esfahbod'),
- 4 => array('name' => 'Andre Klapper'),
- 5 => array('name' => 'Alexander Larsson', 'shortName' =>
'http://blogs.gnome.org/alexl'),
- 6 => array('name' => 'Federico Mena Quintero'),
- 7 => array('name' => 'Andreas Nilsson'),
- 8 => array('name' => 'Tobias Mueller'),
- 9 => array('name' => 'Frederic Peters'),
- 12 => array('name' => 'Vincent Untz'),
- 13 => array('name' => 'Luis Villa', 'shortName' =>
'http://wiki.gnome.org/LuisVilla4'),
- 14 => array('name' => 'Karen Sandler'),
- );
-
- // Instanciate the parser class
- $hackerListParser = new HackerList;
-
- // echo the result
- ?>
- <ul>
- <?php echo $hackerListParser->parseHackerDictArrayToHtml($hackerList) . "\n"; ?>
- </ul>
- </div>
-
-<?php
-/*
- * print_form_questions_gift_listname_note
- *
- * Simply print form elements to ask whether a gift should be sent or the donor wants to be listed.
- * And a free text area.
- * It also sets option 4 ("variables_epoch") to "1". We'll see whether this will help
- * processing IPNs. In the future, when the number or names of the options are changed
- * and the epoch is bumped, a script could use that information to determine how to
- * parse the IPN.
- */
-function print_form_questions_gift_listname_note() {
-?>
- <h5>Do you want to receive a gift?</h5>
- <input type="hidden" name="on1" value="Donation Gift" />
- <input type="radio" checked="checked" name="os1" value="Yes" />Yes
- <input type="radio" name="os1" value="No" />No
- <br />
- <small>If you do not want to receive a gift (or a LWN subscription, respectively), we
will save the money for the gift and shipping and
- use it to further the mission of the GNOME Project, bringing a free desktop to
- the public.</small>
-
- <h5>Do you want to have your name listed in the donors page?:</h5>
- <input type="hidden" name="on2" value="List name in the donors page" />
- <input type="radio" checked="checked" name="os2" value="Yes" />Yes
- <input type="radio" name="os2" value="No" />No
-
- <input type="hidden" name="on4" value="variables_epoch" />
- <input type="hidden" name="os4" value="1" />
-
- <h5>Additional comments or ideas on how we can improve the GNOME
- Foundation:</h5>
-
- <small>You can also write an email to
- <a href="mailto:friends gnome org">friends gnome org</a>.
- </small>
-
- <textarea cols="88" name="custom" rows="7" maxlength="256"> </textarea>
-<?php } /* print_form_questions_gift_listname_note */?>
-
-
-<?php
-/*
- * print_form_shirts - Simply print form elements to ask for t-shirt size
- *
- */
-function print_form_shirts() {
-?>
- <h5>T-shirt size:</h5>
- <input type="hidden" name="on3" value="T-shirt Size" />
- <input type="radio" name="os3" value="M" />M
- <input type="radio" checked="checked" name="os3" value="L" />L
- <input type="radio" checked="checked" name="os3" value="XL" />XL
- <input type="radio" name="os3" value="XXL" />XXL
-<?php } /* print_form_shirts */?>
-
- <?php print_form_shirts(); ?>
- <?php print_form_questions_gift_listname_note(); ?>
-
- <!-- Display the payment button. -->
- <input type="image" alt="PayPal - The safer, easier way to pay online" name=
- "submit" src=
- "http://www.gnome.org/wp-content/themes/gnome-grass/images/donate-button.png" />
- <img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
- height="1" border="0" />
- </form>
-
-
-
-
-<?php
-/*
- * A simple function that echos the standard FoG form to reduce redundancies
- *
- * level_name: Used for the id and name of the form as well as in the description text
- *
- * amount: The default value of the form
- *
- * product_name: A hidden option for PayPal to indicate the product name we are "selling".
- * We could probably get rid of that in favour of something generic like "GNOME Donation"
- * that would also make it much harder in the post processing to only depend on this product
name
- * i.e. one would have to verify the amount of of money not the "product" that was sold. And
- * that is what should be done anyway as the amount is free form and lower bounds are not
enforced.
- */
-function printform($level_name, $amount, $product_name, $with_shirts=false) {
-?>
- <?php print_form_head($level_name, $product_name); ?>
-
- <input type="hidden" name="cmd" value="_xclick" />
-
- You have chosen to become a <strong><?php echo "$level_name";?></strong> for a one
time amount of:
-
- <input id="amount" type="text" name="amount" size="5" value="<?php echo "$amount";?>"
/>
- <select name="currency_code">
- <option value="USD">
- $ USD
- </option>
-
- <option value="EUR">
- € EUR
- </option>
- </select>
- <small>Please increase the amount above if you want to make a larger
difference.</small>
-
- <?php if ($with_shirts===true) {
- print_form_shirts();
- }
- ?>
- <?php print_form_questions_gift_listname_note(); ?>
-
- <input type="image" alt="Donate" name="submit"
src="http://www.gnome.org/wp-content/themes/gnome-grass/images/donate-button.png" />
- <small>You will be redirected to the Paypal website.</small>
- </form>
-
-<?php } /* printform */?>
-
- <?php printform("associate", "50", 'Friends of GNOME - Associate level donation
($25-500)');?>
- <?php printform("sponsor", "500", 'Friends of GNOME - Sponsor level donation
($500-1200)', $with_shirts=true);?>
- <?php printform("philanthropist", "1200", 'Friends of GNOME - Philanthropist level
donation ($500-1200)');?>
-
- </div>
-
- <p style="text-align: center;"><small>GNOME Foundation is a 501(c)3 non-profit
- organization, and your donation is considered charitable to the extent of
- applicable law. Consult your tax preparer to determine
- tax-deductibility.</small></p>
</div>
- </div>
-
- <div class="clear"></div>
-
- <div class="container_24"></div>
-
- <div class="footer"></div>
-
-
- <br />
- <div class="clear"></div>
</div>
-
- <div class="sidebar">
-
- <?php
- $parent_id = $post->post_parent;
- $breadcrumbs = array();
- while ($parent_id) {
- $page = get_page($parent_id);
- $breadcrumbs[] = get_page($parent_id);
- $parent_id = $page->post_parent;
- }
- $breadcrumbs = array_reverse($breadcrumbs);
- if (isset($breadcrumbs[0])) {
- $first_page = $breadcrumbs[0];
- } else {
- $first_page = NULL;
- }
- ?>
+ </div> <!-- END content -->
+ </div> <!-- END container -->
- <?php if(is_page()) {?>
- <ul class="navigation_list">
- <?php
- if(isset($first_page) && $first_page->ID != '') {
- wp_list_pages(array('title_li' => '', 'include' => $first_page->ID));
- wp_list_pages(array('title_li' => '', 'child_of' => $first_page->ID));
- } else {
- wp_list_pages(array('title_li' => '', 'include' => $post->ID));
- wp_list_pages(array('title_li' => '', 'child_of' => $post->ID));
- }
- ?>
- </ul>
- <?php } ?>
- </div>
- <?php require_once("footer_art.php"); ?>
- </div>
- </div>
-
<div class="clearfix"></div>
- <?php require_once("footer.php"); ?>
-</body>
-</html>
+<?php get_footer(); ?>
diff --git a/theme/page-support-us.php b/theme/page-support-us.php
index 074a1da..3b1654d 100644
--- a/theme/page-support-us.php
+++ b/theme/page-support-us.php
@@ -1,90 +1,92 @@
-<?php
+<?php get_header(); ?>
-$year = get_option('support_year');
-$contributors = get_option('support_contributors');
-$hackfests = get_option('support_hackfests');
+ <!-- container -->
+ <div class="container">
+ <div id="support-gnome" class="row content">
+ <div class="col-xs-12">
+ <div class="page_title">
+ <h1><?php esc_html_e('Support GNOME', 'grass');?></h1>
+ </div>
-require_once("header.php"); ?>
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+ <?php endwhile; // End the loop. Whew. ?>
- <!-- container -->
- <div id="container">
- <div class="container">
- <div class="page_title">
- <h1><?php echo __('Support GNOME', 'grass');?></h1>
- </div>
-
- <?php while ( have_posts() ) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; // End the loop. Whew. ?>
+ <div class="clearfix"></div>
+
+ <p class="main_feature"><?php esc_html_e( "Our mission to create a competitive free desktop
has never been more important. It is only through your support that we can carry on our work.", 'grass' );
?></p>
+ <p><?php esc_html_e( "Donations are handled by the GNOME Foundation, GNOME's community-run
non-profit organization.", 'grass' ); ?></p>
- <div class="clearfix"></div>
+ <div class="donation-boxes-container">
+ <div class="row">
+ <div class="col-sm-6 donation-boxes">
+ <a href="./friends" class="btn btn-success btn-block">
+ <p><?php esc_html_e( 'Become a Friend of GNOME', 'grass' ); ?></p>
+ <p><?php esc_html_e( 'Monthly subscription - one of the best ways to support
the GNOME project', 'grass' ); ?></p>
+ </a>
+ </div>
+ <div class="col-sm-6 col-md-4" style="padding: 10px;">
+ <p><?php esc_html_e('Friends receive a thank you postcard from a GNOME hacker
and have the option to receive a free Linux Weekly News subscription.', 'grass');?></p>
+ <a href="./previous-donors"><?php esc_html_e('See who is already a Friend of
GNOME', 'grass');?></a>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-6 donation-boxes">
+ <a href="./donate" class="btn btn-success btn-block">
+ <p><?php esc_html_e( 'Make a Donation', 'grass' ); ?></p>
+ <p><?php esc_html_e( 'One time donation - help to support our work today',
'grass' ); ?></p>
+ </a>
+ </div>
+ </div>
+ </div> <!-- END donation-boxes-container -->
- <div id="support-gnome" class="content">
- <p><?php _e( "Donations are essential to the everyday operations of the GNOME
project. Without them, we wouldn't be able to carry on our work, to produce a Free Software alternative that
works in the interests of everyone.", 'grass' ); ?></p>
+ <p><?php esc_html_e('Donations are used for:', 'grass');?></p>
+ <ul>
+ <li><?php esc_html_e("GNOME's development infrastructure, which is essential for all our
development work", 'grass');?></li>
+ <li><?php esc_html_e("Travel sponsorship, for community members to attend hackfests and
conferences", 'grass');?></li>
+ <li><?php esc_html_e("Outreach activities, such as hack camps and GNOME's presence at
conferences", 'grass');?></li>
+ </ul>
- <div class="row" style="padding-bottom: 25px;">
- <div class="col-xs-12 col-sm-5 col-md-4">
- <a href="#"><img class="img-responsive" src="<?php
bloginfo('stylesheet_directory'); ?>/images/donations/friends-of-gnome.png" alt=""></a>
- </div>
- <div class="col-xs-12 col-sm-7 col-md-8">
- <h2><?php _e( 'Friends of GNOME', 'grass' ); ?></h2>
- <p><?php _e( 'Becoming a Friend of GNOME is one of the best
ways to support the GNOME project. By paying a monthly subscription, you can provide a predictable income for
the GNOME Foundation. Friends receive a thank you post card from a GNOME hacker and have the option of a free
LWN subscription.', 'grass' ); ?></p>
- <div class="links">
- <p><a class="btn btn-success"
href="friends-of-gnome"><?php _e( 'Become a Friend of GNOME', 'grass' ); ?></a></p>
- <p><a href="previous-donors"><?php _e( 'View the list
of donors', 'grass' ); ?></a></p>
- </div>
- </div>
- </div>
- <h3><?php _e( 'What donations pay for', 'grass' ); ?></h3>
- <br>
- <div class="row article clearfix">
- <div class="col-sm-12">
- <img src="<?php bloginfo('stylesheet_directory');
?>/images/donations/hackfests.png" class="pull-left" alt="">
- <div class="col-sm-8">
- <p class="title"><?php _e( 'Hackfests', 'grass' ); ?></p>
- <?php _e( 'Hackfests are events where contributors get
together to work and plan for the future. They are essential to how the GNOME project works.', 'grass' ); ?>
- <p>In <?php echo $year ?>, we sponsored <?php echo
$contributors ?> contributors to attend <?php echo $hackfests ?> hackfests, thanks to donations.</p>
+ <div class="donation-benefits">
+ <div class="row">
+ <div class="col-xs-12">
+ <button class="btn btn-link" type="button" data-toggle="collapse"
data-target="#taxDeduction" aria-expanded="false" aria-controls="taxDeduction">
+ <?php esc_html_e('Donations are tax deductible in the United States and
European Union', 'grass');?>
+ <i class="fa fa-chevron-right" aria-hidden="true"></i>
+ </button>
+ <div class="collapse" id="taxDeduction">
+ <p>Donations to the GNOME Foundation are <strong>tax deductible</strong> in
the United States and <a href="./donate">one time donations</a> can also qualify for tax exemption in the
European Union. If you think that you might qualify, contact your tax office for more information.</p>
+ </div>
</div>
</div>
- </div>
- <div class="row article clearfix">
- <div class="col-md-12">
- <img src="<?php bloginfo('stylesheet_directory');
?>/images/donations/infrastructure.png" class="pull-left" alt="">
- <div class="col-sm-8">
- <p class="title"><?php _e( 'Infrastructure', 'grass' ); ?></p>
- <?php _e( "GNOME could not operate without its development
infrastructure. We wouldn't be able to keep it operating without donations.", 'grass' ); ?>
+ <div class="row">
+ <div class="col-xs-12">
+ <button class="btn btn-link" type="button" data-toggle="collapse"
data-target="#donationMatching" aria-expanded="false" aria-controls="donationMatching">
+ <?php esc_html_e( 'Many employers will match donations made to GNOME',
'grass' );?>
+ <i class="fa fa-chevron-right" aria-hidden="true"></i>
+ </button>
+ <div class="collapse" id="donationMatching">
+ <p><?php esc_html_e( 'Many employers, including Apple, Google, Microsoft and
Red Hat, will match donations made by their employees. This is a great way to increase your contribution.
Before you donate, you might want to check whether your employer operates donation matching.', 'grass' );
?></p>
+ <p><?php esc_html_e( 'Some employers will only match one time donations
rather than subscriptions.', 'grass' ); ?></p>
+ </div>
</div>
</div>
- </div>
- <div class="row article clearfix">
- <div class="col-md-12">
- <img src="<?php bloginfo('stylesheet_directory');
?>/images/donations/outreach.png" class="pull-left" alt="">
- <div class="col-sm-8">
- <p class="title"><?php _e( 'Outreach', 'grass' ); ?></p>
- <?php _e( 'Reaching out to new users and contributors is an
important part of what GNOME does. Donations enable us to organize outreach events and have presence at major
conferences.', 'grass' ); ?>
+ <div class="row">
+ <div class="col-xs-12">
+ <button class="btn btn-link" type="button" data-toggle="collapse"
data-target="#otherWays" aria-expanded="false" aria-controls="otherWays">
+ <?php esc_html_e('Other ways to support GNOME', 'grass');?>
+ <i class="fa fa-chevron-right" aria-hidden="true"></i>
+ </button>
+ <div class="collapse" id="otherWays">
+ <p>Companies can sponsor events or join the GNOME Foundation Advisory Board.
If you are interested in this, please contact the <a href="../foundation/contacts">GNOME Foundation Board of
Directors</a> for more details. GNOME also benefits when you shop at the <a href="./amazon">GNOME Amazon
store</a>.</p>
+ </div>
</div>
</div>
- </div>
-
- <h3><?php _e( 'Other ways to support us', 'grass' ); ?></h3>
- <p><?php _e( 'There are many other ways to help the GNOME project. These
include:', 'grass' ); ?></p>
- <ul>
- <li>Make a <a href="donate">one time donation</a> through PayPal,
bank transfer, check or Bitcoin.</li>
- <li>Shop at the <a href="https://www.gnome.org/friends/amazon/">GNOME
Amazon store</a>.</li>
- <li>Companies can <a href="">sponsor events</a> or join the <a
href="https://www.gnome.org/foundation/governance">GNOME Advisory Board</a>.</li>
- </ul>
-
- <h3><?php _e( 'Donor benefits', 'grass' ); ?></h3>
- <p>The GNOME Foundation is a non-profit organization. <strong>Donations are
tax deductible</strong> in the United States, and you can also make tax free donations in the European Union
(see <a href="donate">donate to GNOME</a>). Contact your tax office for more information about tax free
donations</p>
- <p>Employees of some companies can have their <strong>donation to GNOME
matched by their employer</strong>. This is a great way to increase your donation. Companies that offer
donation matching include ..., ... and ...</p>
- </div> <!-- END content -->
-<?php require_once("footer_art.php"); ?>
- </div> <!-- END .container -->
- </div> <!-- END #container -->
+ </div> <!-- END donation-benefits -->
+ </div>
+ </div> <!-- END content -->
+ </div> <!-- END container -->
<div class="clearfix"></div>
- <?php require_once("footer.php"); ?>
-</body>
-</html>
-
+<?php get_footer(); ?>
diff --git a/theme/page-thank-you.php b/theme/page-thank-you.php
index 6a38cc0..feba291 100644
--- a/theme/page-thank-you.php
+++ b/theme/page-thank-you.php
@@ -1,55 +1,49 @@
-<?php
+<?php get_header(); ?>
-require_once("header.php"); ?>
-
- <!-- container -->
- <div id="container">
- <div class="container">
- <div class="page_title">
- <h1><?php echo __('Thank you!', 'grass');?></h1>
+ <!-- container -->
+ <div class="container">
+ <div class="content">
+ <div class="col-md-12">
+ <div class="page_title">
+ <h1><?php esc_html_e('Thank you!', 'grass');?></h1>
+ </div>
+ <?php
+ if ( has_post_thumbnail() ) {
+ the_post_thumbnail( 'full', array( 'class' => 'img-responsive center-block
featured-banner' ) );
+ }
+ ?>
+ <p class="main_feature text-center"><?php esc_html_e( 'Thank you for supporting GNOME and
our mission to give everyone access to Free Software.', 'grass' ); ?></p>
</div>
-
- <div class="content">
- <div class="col-md-12 text-center">
- <img class="img-responsive center-block" src="<?php
bloginfo('stylesheet_directory'); ?>/images/donations/thankyou-banner.png" alt="">
- <div class="main_feature">
- <p><?php _e( 'Thank you for supporting GNOME and our mission to give everyone
access to Free Software.', 'grass' ); ?></p>
- </div>
- </div>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php the_content(); ?>
- <?php endwhile; // End the loop. Whew. ?>
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+ <?php endwhile; // End the loop. Whew. ?>
+
+ <div class="clearfix"></div>
+
+ <div id="thankyou" class="col-md-12">
+ <h3><?php esc_html_e( "Show that you're a Friend of GNOME", 'grass' ); ?></h3>
+ <p><?php esc_html_e( "Tell your social networks that you're a Friend of GNOME!", 'grass' );
?></p>
- <div class="clearfix"></div>
-
- <div id="thankyou" class="col-md-12">
- <h3><?php _e( "Show that you're a Friend of GNOME", 'grass' ); ?></h3>
- <p><?php _e( "Tell your social networks that you're a Friend of
GNOME!", 'grass' ); ?></p>
+ <a href="https://twitter.com/share?url=https://gnome.org/friends&related=gnome&text=I've
become a Friend of GNOME! Find out more at" aria-label="Share on Twitter"
+ onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
+ <i class="fa fa-twitter" aria-hidden="true" title="Share on Twitter"></i>
+ </a>
- <a href="https://twitter.com/share?
- url=https://gnome.org/friends
- &related=gnome
- &text=I've become a Friend of GNOME! Find out more at"
- onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
- <i class="fa fa-twitter"></i>
- </a>
+ <a href="https://plus.google.com/share?url=https://gnome.org/friends" aria-label="Share on
Google Plus"
+ onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
+ <i class="fa fa-google-plus" aria-hidden="true" title="Share on Google Plus"></i>
+ </a>
- <a href="https://plus.google.com/share?url=https://gnome.org/friends"
- onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
- <i class="fa fa-google-plus"></i>
- </a>
-
- <a
href="https://www.facebook.com/sharer/sharer.php?u=https://gnome.org/friends"
- onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
- <i class="fa fa-facebook"></i>
- </a>
- </div>
-
- <div class="col-md-12">
- <h3><?php _e( 'Get a badge', 'grass' ); ?></h3>
- <p><?php _e( "To show that you're a Friend of GNOME, you can put one
of these badges on your blog or website.", 'grass' ); ?></p>
-
+ <a href="https://www.facebook.com/sharer/sharer.php?u=https://gnome.org/friends"
aria-label="Share on Facebook"
+ onclick="javascript:window.open(this.href,'',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
+ <i class="fa fa-facebook" aria-hidden="true" title="Share on Facebook"></i>
+ </a>
+ </div>
+
+ <div class="col-md-12">
+ <h3><?php esc_html_e( 'Get a badge', 'grass' ); ?></h3>
+ <p><?php esc_html_e( "To show that you're a Friend of GNOME, you can put one of these badges
on your blog or website.", 'grass' ); ?></p>
<div class="row" id="badges">
<div class="col-sm-2">
<img src="https://static.gnome.org/friends/banners/fog-125x125.png" alt="Become
a Friend of GNOME" border="0" hspace="3" />
@@ -64,28 +58,23 @@ require_once("header.php"); ?>
</div>
</div>
- <br> <br>
+ <br><br>
<div class="row hide" id="badgecode-container">
<div class="col-sm-8">
- <?php _e( 'Your code is ready!', 'grass' ); ?>
+ <?php esc_html_e( 'Your code is ready!', 'grass' ); ?>
<div class="input-group">
<input type="text" class="form-control" id="badgecode" value="">
- <span class="input-group-btn">
- <button class="btn btn-success" data-clipboard-target="#badgecode"
type="button"><?php _e( 'Copy code', 'grass' ); ?></button>
- </span>
+ <span class="input-group-btn">
+ <button class="btn btn-success" data-clipboard-target="#badgecode"
type="button"><?php esc_html_e( 'Copy code', 'grass' ); ?></button>
+ </span>
</div>
- </div>
</div>
</div>
- </div> <!-- END content -->
-<?php $footer_art = 'friends'; ?>
-<?php require_once("footer_art.php"); ?>
- </div> <!-- END .container -->
- </div> <!-- END #container -->
+ </div>
+ </div> <!-- END content -->
+ </div> <!-- END .container -->
<div class="clearfix"></div>
- <?php require_once("footer.php"); ?>
-</body>
-</html>
+<?php get_footer(); ?>
diff --git a/theme/style.css b/theme/style.css
index c46c436..be6c6e7 100644
--- a/theme/style.css
+++ b/theme/style.css
@@ -43,6 +43,9 @@ a:visited {
.no-padding {
padding: 0 !important;
}
+.featured-banner {
+ min-width: 100%;
+}
/* Sticky Footer */
.gnome-body {
@@ -84,6 +87,21 @@ body.admin-bar .navbar-fixed-top {
color: #fff !important;
}
+.input-group-no-bg {
+ background-color: transparent;
+ border: none;
+ padding: 6px 4px;
+ width: 19px;
+}
+input[type=number] {
+ -moz-appearance: textfield;
+}
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
/* Accessibility access */
/* ========================================================================== */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]