Commit 7df8d9f0 authored by Nicholas J Anderson's avatar Nicholas J Anderson
Browse files

Merge branch 'cal' into 'master'

Import meeting times from Google calendar

Utilizing the calendar API and my personal API key. Should probably update later to use's API key.

See merge request !5
parents a4e4afba f8f86e29
...@@ -62,18 +62,49 @@ channel on <a href="">freenode</a>, #srct. More ways to ...@@ -62,18 +62,49 @@ channel on <a href="">freenode</a>, #srct. More ways to
get in touch are on our <a href="{{ url_for('contact') }}">contact page</a>.</p> get in touch are on our <a href="{{ url_for('contact') }}">contact page</a>.</p>
<legend><i class="fa fa-gavel fa-fw"></i>&nbsp;<strong>Next Meeting</strong></legend> <legend><i class="fa fa-gavel fa-fw"></i>&nbsp;<strong>Next Meeting</strong></legend>
<p>Due to the upcoming break, the meetings this Saturday (March 7<sup>th</sup> <p id="meetingDate">Please wait while we fetch the upcoming meeting information...</p>
) and the following Saturday (March 14<sup>th</sup>) have been canceled. Our <!--<a href="{{ url_for('calendar') }}">calendar</a> or visit our
next meeting is scheduled for Saturday March 21<sup>st</sup> at 2pm in SUB1 3B. For more
information, check out our
<a href="{{ url_for('calendar') }}">calendar</a> or visit our
<a href="">Facebook</a> or <a href="">Facebook</a> or
<a href="">Twitter</a> pages.</p> <a href="">Twitter</a> pages.</p>-->
</div> </div>
{% endblock %}
{% block scripts %}
<!-- <script src="/static/js/parallax.min.js"></script> <!-- <script src="/static/js/parallax.min.js"></script>
var scene = document.getElementById('jumboparallax'); var scene = document.getElementById('jumboparallax');
var parallax = new Parallax(jumboparallax); --> var parallax = new Parallax(jumboparallax); -->
$(function() {
// Public API Key for Google Calendar access (Key from nander13's gmail account)
var apiKey = "AIzaSyDgaXDxmMEdtbIaq3TXmf4jxXZLG8CeoMs";
// Instead of loading the _entire_ Google API library, let's just make a GET request
// Expand one recurring event to multiple events
// Starting now until we hit the first event.
"timeMin":new Date().toISOString(),
// Change this if the title of the weekly meeting on the calendar changes!
function(data) {
var d = new Date(data.items[0].start.dateTime),
monthName = d.toLocaleString("en-us", {month: "long"}),
dateOptions = { weekday: 'long', month: 'long', day: 'numeric' },
timeOptions = { hour: 'numeric', minute: 'numeric'},
dateString = d.toLocaleString("en-us", dateOptions),
timeString = d.toLocaleString("en-us", timeOptions);
$("#meetingDate").text("Join us for our next meeting in "+data.items[0].location+" at "+timeString+" on "+dateString +".")
{% endblock %} {% endblock %}
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
<script src="/static/js/jquery-2.0.3.min.js"></script> <script src="/static/js/jquery-2.0.3.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script> <script src="/static/js/bootstrap.min.js"></script>
{% block scripts %}
{% endblock %}
<!-- Piwik --> <!-- Piwik -->
<script type="text/javascript"> <script type="text/javascript">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment