Team:TU Delft/pages/blog

From 2010.igem.org

Revision as of 09:02, 23 July 2010 by Jcnossen (Talk | contribs)

Blog

Follow our progress day by day via our blog. Also don't forget to become a fan of our Facebook page or follow us on Twitter.

Calendar

March
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

April
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

May
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

June
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

July
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

August
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

September
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

October
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

November
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

Today's post

<style> .ui-datepicker.ui-widget-content .ui-state-default { background: none; } .ui-widget-content .day_with_blog a.ui-state-default { background-color: #ccc; } .ui-widget-content .day_no_blog a.ui-state-default { background-color: #eee; } </style> <script type="text/javascript"> $(function() {

 var datemap = {
   hasDate: function(d) {
     var fmt = $.datepicker.formatDate("dMM", d);
     return this["d" + fmt];
   }
 };
 // use the old calendar to find which days have a blog entry
 $("#calendar_container .month").each(function() { 
   var month = $.trim( $(".heading", this).text() );
   $("a", this).each(function() { 
     var day = $.trim( $(this).text() );
     if ($(".day-active", this).length > 0) {
       datemap["d"+day+month] = true;
     }
   });
 });
 // find the last day with a blog item
 var c=new Date();
 /*var addrdate=$.address.parameter('blog');
 if (addrdate) {
   c = $.datepicker.parseDate('d_MM_yy', addrdate);
 } else while(c.getDate() > 1) {
   if (datemap.hasDate(c))
     break;
   c.setDate(c.getDate()-1);
 }*/
 $("#calendar_container").empty().datepicker( {
   onSelect: dp_onSelect,
   beforeShowDay: dp_getDateInfo,
   defaultDate: c
 });


 function loadBlogDate(date) {
   var datestr = jQuery.datepicker.formatDate("d_MM_yy", date);
   var url = "/Team:TU_Delft/"+datestr+"_content?action=render";
   $.get(url, function(response) {
     $("#blog_item_container").fadeOut(200).queue(function(next) {
       $(this).html(response);
       var refURL = "https://2010.igem.org/Team:TU_Delft#/blog?blog=" + datestr;
       $("#blog_item_date").text(jQuery.datepicker.formatDate("d MM yy", date));
       $("#blog_item_fbcomments").html('<fb:comments url="' + refURL + '" xid="igemblog' + datestr +'" numposts="10" width="450"></fb:comments>');
       FB.XFBML.parse(document.getElementById('blog_item_fbcomments'));
       next();
     }).fadeIn(200);
   });
 }
 function dp_onSelect(dateText, inst) {
   var date = $(this).datepicker("getDate");
   loadBlogDate(date);
 }
 function dp_getDateInfo(date) {
   var hasBlogItem = datemap.hasDate(date);
   return [wgUserName ? true : hasBlogItem, hasBlogItem ? 'day_with_blog' : 'day_no_blog'];
 }
 if (jQuery.support.boxModel) {
// facebook initialization code
 window.fbAsyncInit = function() {
   loadBlogDate(c);
   FB.init({appId: '132572820109093', status: true, cookie: true, xfbml: true});
 };
 var e = document.createElement('script'); e.async = true;
 e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
 document.getElementById('fb-root').appendChild(e);
 } else {
   $("#blog_item_fbcomments").text("Facebook comments unsupported on this browser.");
 }

}); </script> </html>