Team:TU Delft/pages/blog

From 2010.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<noinclude></noinclude>
+
<noinclude>For some reason, there needs to be an empty line at the start otherwise the wiki markup is not working correctly on the main page</noinclude>
==Blog==
==Blog==
Follow our progress day by day via our blog. Also don't forget to become a fan of our [http://tiny.cc/igemtudelft Facebook page] or [http://twitter.com/igemtudelft2010 follow us on Twitter].
Follow our progress day by day via our blog. Also don't forget to become a fan of our [http://tiny.cc/igemtudelft Facebook page] or [http://twitter.com/igemtudelft2010 follow us on Twitter].
-
==Todays Post==
+
<html>
 +
<h2><span class="mv-headline" id="blog_item_date">Today's post</span></h2>
 +
<div id="blog_item_container"></html>
{{:Team:TU_Delft/{{CURRENTDAY}}_{{CURRENTMONTHNAME}}_{{CURRENTYEAR}}_content}}
{{:Team:TU_Delft/{{CURRENTDAY}}_{{CURRENTMONTHNAME}}_{{CURRENTYEAR}}_content}}
 +
<html></div>
 +
<div style="display:none;" id="blog_item_next"></div>
 +
<div style="clear:both;"></div>
 +
</html>
==Calendar==
==Calendar==
 +
<html><div id="calendar_container" style="width: auto;"></html>
{{:Team:TU_Delft/basic_calendar}}
{{:Team:TU_Delft/basic_calendar}}
 +
<html></div>
 +
 +
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
 +
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
 +
 +
<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 = {};
 +
 +
  // 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;
 +
      }
 +
    });
 +
  });
 +
 +
  $("#calendar_container").empty().datepicker( {
 +
      onSelect: function(dateText, inst) {
 +
        var date = $(this).datepicker("getDate");
 +
        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);
 +
            $("#blog_item_date").text(jQuery.datepicker.formatDate("d MM yy", date));
 +
            next();
 +
          }).fadeIn(200);
 +
        });
 +
      },
 +
      beforeShowDay: getDateInfo
 +
    });
 +
 +
  function getDateInfo(date) {
 +
    var fmt = $.datepicker.formatDate("dMM", date);
 +
    var hasBlogItem = datemap["d" + fmt];
 +
    return [wgUserName ? true : hasBlogItem, hasBlogItem ? 'day_with_blog' : 'day_no_blog'];
 +
  }
 +
});
 +
 +
</script>
 +
</html>

Revision as of 14:49, 25 June 2010

For some reason, there needs to be an empty line at the start otherwise the wiki markup is not working correctly on the main page

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.

Today's post

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