Added donate menu & updated to the latest Meteor.

This commit is contained in:
Wynne Crisman
2020-09-20 20:34:50 -07:00
parent 87ddce5d77
commit 114cce02c1
9 changed files with 131 additions and 95 deletions

View File

@@ -9,12 +9,13 @@
<div onmousedown="return false">
<a href="{{pathFor 'InternshipsEditor'}}"><li class="fa fa-key theKey" aria-hidden="true"></li></a>
<li><a class="barButton" href="javascript: "><i class="fa fa-bars"></i></a></li>
<li><a id="datesMenu" class="level2 {{isActiveRoute 'ImportantDates'}}" href="{{pathFor 'ImportantDates'}}">Important Dates</a></li>
<li><a id="datesMenu" class="level2 {{isActiveRoute 'ImportantDates'}}" href="{{pathFor 'ImportantDates'}}">Deadlines</a></li>
<li><a id="supportMenu" class="level2 {{isActiveRoute 'Support'}}" href="{{pathFor 'Support'}}">Support &nbsp;</a></li>
<li><a id="programsMenu" class="level2 {{isActiveRoute 'Programs'}}" href="{{pathFor 'Programs'}}">Programs &nbsp;</a></li>
<li><a id="contactMenu" class="level2 {{isActiveRoute 'Contact'}}" href="{{pathFor 'Contact'}}">Contact &nbsp;</a></li>
<li><a id="aboutMenu" class="level2 {{isActiveRoute 'About'}}" href="{{pathFor 'About'}}">About &nbsp;</a></li>
<li><a id="homeMenu" class="{{isActiveRoute 'Home'}}" href="{{pathFor 'Home'}}">Home &nbsp;</a></li>
<li><span class="link donateMenu">Donate &nbsp;</span></li>
</div>
</div>
<div class="dropMenu">
@@ -39,4 +40,4 @@
<div class="copyright">&copy;2013, 2018 Anderson Valley Education Foundation, Inc.</div>
<div class="byline">Web Site By: Wynne Crisman and Caleb Devine-Gomes</div>
</div>
</template>
</template>

View File

@@ -1,9 +1,20 @@
//Needs to be outside the #publicBody because the dialog is created outside that element.
.donateList
list-style-type: none
.donateLink
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-weight: bold
padding: 8px 8px 0 8px
text-decoration: none
color: #269
#publicBody
position: relative
max-width: 960px
min-width: 250px
margin: 0 auto
#page
background: #FDFDFD
@@ -45,6 +56,15 @@
a.active
color: #777777
cursor: default
span.link
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-weight: bold
padding: 8px 8px 0 8px
text-decoration: none
color: #269
cursor: pointer
span.link
color: #5AD
.dropMenu
display: none
position: absolute
@@ -250,4 +270,4 @@
font-size: 7px
.footer
font-size: 7px
text-align: left
text-align: left

View File

@@ -1,8 +1,35 @@
import { Template } from 'meteor/templating';
import Swal from 'sweetalert2';
import './Public.html';
Template.Public.events({
'click .barButton': function(event, template) {
template.$('.dropMenu').toggle();
},
'click .donateMenu': function(event, template) {
let linkOnce = "https://checkout.square.site/pay/5c55a7a6f6bf443baf5b231762bd63ec";
let openOnce = "window.open('" + linkOnce + "', '_blank')";
let linkMonthly = "https://checkout.square.site/pay/fac3678095144f02b4cab4f8efa6e203";
let openMonthly = "window.open('" + linkMonthly + "', '_blank')";
let linkAnnually = "https://checkout.square.site/pay/3a9ab812d91f4a749bdae9f7c390273c";
let openAnnually = "window.open('" + linkAnnually + "', '_blank')";
Swal.fire({
title: 'How would you like to donate?',
showCancelButton: true,
showCloseButton: false,
showConfirmButton: false,
icon: 'question',
//html: '<ul class="donateList">' +
// '<li class="donateLink donateOnce"><button type="button" class="swal2-styled" onclick="' + openOnce + '">Once</button></li>' +
// '<li class="donateLink donateOnce"><button type="button" class="swal2-styled" onclick="' + openMonthly + '">Monthly</button></li>' +
// '<li class="donateLink donateOnce"><button type="button" class="swal2-styled" onclick="' + openAnnually + '">Annually</button></li>' +
// '</ul>'
html: '<div class="btn-group" role="group" aria-label="Donation Types">' +
'<button type="button" class="swal2-styled btn btn-secondary" onclick="' + openOnce + '">Once</button>' +
'<button type="button" class="swal2-styled btn btn-secondary" onclick="' + openMonthly + '">Monthly</button>' +
'<button type="button" class="swal2-styled btn btn-secondary" onclick="' + openAnnually + '">Annually</button>' +
'</div>'
});
}
});
});