Template:Team:Paris-Saclay/left-column

From 2012.igem.org

(Difference between revisions)
 
(39 intermediate revisions not shown)
Line 3: Line 3:
<link rel='stylesheet' type='text/css' href='/Team:Paris-Saclay/left-column.css?action=raw&ctype=text/css'/>
<link rel='stylesheet' type='text/css' href='/Team:Paris-Saclay/left-column.css?action=raw&ctype=text/css'/>
<link rel='stylesheet' type='text/css' href='/Team:Paris-Saclay/jtweetsanywhere.css?action=raw&ctype=text/css'/>
<link rel='stylesheet' type='text/css' href='/Team:Paris-Saclay/jtweetsanywhere.css?action=raw&ctype=text/css'/>
 +
<link rel='stylesheet' type='text/css' href='/Team:Paris-Saclay/MetroJs.css?action=raw&ctype=text/css'/>
<script type="text/javascript" src='/Team:Paris-Saclay/jquery.min.js?action=raw&ctype=text/javascript'></script>
<script type="text/javascript" src='/Team:Paris-Saclay/jquery.min.js?action=raw&ctype=text/javascript'></script>
-
<script type="text/javascript" src='/Team:Paris-Saclay/jtweetsanywhere.min.js?action=raw&ctype=text/javascript'></script>
+
<script type="text/javascript" src='/Team:Paris-Saclay/jtweetsanywhere.min.js?action=raw&ctype=text/javascript'>
 +
</script>
 +
<script type="text/javascript" src='/Team:Paris-Saclay/MetroJs.js?action=raw&ctype=text/javascript'></script>
</head>
</head>
<body>
<body>
<div id="left-column">
<div id="left-column">
 +
 +
<div id="articles-widget" class="widget">
 +
<div>
 +
<ul id="ltArticles">
 +
</ul>
 +
</div>
 +
<script type="text/javascript">
 +
 +
$(document).ready(function() {
 +
    var url = document.location.href;
 +
    var idxPS = url.indexOf("Team:Paris-Saclay",0);
 +
    var Title = url.substring(idxPS,url.length);
 +
    LinkTitle = url.replace("_"," ");
 +
    Category = "";
 +
   
 +
    $.ajax({
 +
    type: "GET",
 +
    url: "https://2012.igem.org/wiki/api.php", // name of file you want to parse
 +
    async : false,
 +
data:{
 +
format: 'xml',
 +
action: 'query',
 +
titles: Title,
 +
prop: 'categories'},
 +
    dataType: "xml", // type of file you are trying to read
 +
    success  : function(xmlData){
 +
$(xmlData).find('cl').each(function() {
 +
                Category = $(this).attr("title");
 +
                var idxCategory = Category.lastIndexOf("/");
 +
                var name = Category.substring(idxCategory+1);
 +
} )
 +
},
 +
error : function(){
 +
}
 +
});
 +
});
 +
 +
 +
$(document).ready(function() {
 +
    $.ajax({
 +
    type: "GET",
 +
    url: "https://2012.igem.org/wiki/api.php", // name of file you want to parse
 +
    async : false,
 +
data:{
 +
format: 'xml',
 +
action: 'query',
 +
list: 'categorymembers',
 +
cmlimit: 'max',
 +
cmtitle: Category},
 +
    dataType: "xml", // type of file you are trying to read
 +
    success  : function(xmlData){
 +
        var count = 0;
 +
$(xmlData).find('cm').each(function() {
 +
                var idxArticle = $(this).attr("title").lastIndexOf("/");
 +
                var Article = $(this).attr("title").substring(idxArticle+1);
 +
                var linkArticle = "https://2012.igem.org/"+$(this).attr("title");
 +
                if (linkArticle != LinkTitle){
 +
if(Article == "Notebook")
 +
{
 +
$("ul#ltArticles").append('<li>' + '<a href="https://2012.igem.org/Team:Paris-Saclay/Project/Notebook/Week 1">' + Article + '</a>'+ '</li>');
 +
count += 1;
 +
}
 +
else
 +
{
 +
$("ul#ltArticles").append('<li>' + '<a href="' + linkArticle + '">' + Article + '</a>'+ '</li>');
 +
count += 1;
 +
}
 +
}}
 +
 +
)
 +
if (count == 0) {
 +
$("div#articles-widget").hide();
 +
}
 +
},
 +
error : function(){
 +
}
 +
});
 +
});
 +
</script>
 +
</div>
<div id="social-widget" class="widget">
<div id="social-widget" class="widget">

Latest revision as of 23:53, 26 September 2012

Follow us !