After spending all day trying to solve the problem of displaying a Google calendar in list format on my website, I finally found some code that works. However, there are still some formatting issues that I can't figure out. I'm not very familiar with jQuery, so I'm struggling to fix the formatting. I've tried adjusting things on the CSS side, but it seems like some of the issues are on the script side. If someone could help me clean up the formatting in the script and make it strictly CSS-based, that would be amazing! Or if you have a better solution, please share =)
Thank you so much!
The format I'm looking for is as follows, split into three sections within different divs:
Date: 'Nov 12, 09:00' | Event: 'Student Night' | Location: 'Nicci Beach'
Javascript Code:
// Generated by CoffeeScript 1.4.0
(function() {
// Code here...
}).call(this);
HTML Template:
<div id="gcf-custom-template">
<div class="gcf-item-container-block">
<div class="gcf-item-block">
<div class="gcf-item-header-block">
<div class="gcf-item-title-block">
<div style="float: left; width 250px;"><a class="gcf-item-link"><span class="gcf-item-daterange">2012-02-01 09:00</span>:</a></div>
<div style="float: left; width 250px;"><a class="gcf-item-location">1-877-346-9707 w 55586#</a></div>
<div style="float: left; width 250px;"><strong><a class="gcf-item-title">Item Title of Your event</a></strong></div>
</div>
</div>
</div>
</div>
</div>
Script Call:
<script type="text/javascript">
var $ = jQuery;
$(function() {
$('#gcf-custom-template').gCalFlow({
calid: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="053171356834662b72353263456268646c692b666a68">[email protected]</a>',
maxitem: 50,
mode: 'updates',
date_formatter: function(d, allday_p) { return (d.getMonth()+1) + "/" + d.getDate() + "/" + d.getYear().toString().substr(-2) }
});
});
</script>