Difference between revisions of "Team:SUSTech Shenzhen/themeJs"

 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<html>
 
<html>
 
<footer>
 
<footer>
     <script src="https://2014.igem.org/Team:SUSTC-Shenzhen/js/pace.min.js?action=raw&ctype=text/javascript"></script>
+
     <script src="https://2014.igem.org/Team:SUSTech_Shenzhen/js/pace-min-js?action=raw&ctype=text/javascript"></script>
 
     <!--script src="//2014.igem.org/Team:SUSTC-Shenzhen/static/js/jquery.pjax.js?action=raw&ctype=text/javascript"></script-->
 
     <!--script src="//2014.igem.org/Team:SUSTC-Shenzhen/static/js/jquery.pjax.js?action=raw&ctype=text/javascript"></script-->
 
     <script src="https://2016.igem.org/Team:SUSTech_Shenzhen/js/bootstrap-min-js?action=raw&ctype=text/javascript"></script>
 
     <script src="https://2016.igem.org/Team:SUSTech_Shenzhen/js/bootstrap-min-js?action=raw&ctype=text/javascript"></script>
Line 31: Line 31:
 
      
 
      
 
       $("nav a").each(function(ind,val){
 
       $("nav a").each(function(ind,val){
         if(val.href===window.location.href){
+
         if(val.href===window.location.href)
 +
          if (val.href!="https://2016.igem.org/Team:SUSTech_Shenzhen"){
 
           val.href="#";
 
           val.href="#";
 
           $(val).parent().addClass("active");
 
           $(val).parent().addClass("active");
Line 101: Line 102:
 
     $("#searchInput").val("SUSTech "+$("#searchInput").val());
 
     $("#searchInput").val("SUSTech "+$("#searchInput").val());
 
   });
 
   });
   $('.reference>a, span.mw-cite-backlink > a').click(function() {
+
   $('.reference>a, span.mw-cite-backlink > a, .page-scroll').click(function() {
 
     console.log(this.hash);
 
     console.log(this.hash);
 
     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')  
 
     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')  
Line 116: Line 117:
 
     }
 
     }
 
   });
 
   });
 +
  $(".table, .katex-block > span").wrap("<div class='table-responsive'></div>")
  
$.ajaxTransport("+binary", function(options, originalOptions, jqXHR){
 
    // check for conditions and support for blob / arraybuffer response type
 
    if (window.FormData && ((options.dataType && (options.dataType == 'binary')) || (options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) || (window.Blob && options.data instanceof Blob)))))
 
    {
 
        return {
 
            // create new XMLHttpRequest
 
            send: function(headers, callback){
 
// setup all variables
 
                var xhr = new XMLHttpRequest(),
 
url = options.url,
 
type = options.type,
 
async = options.async || true,
 
// blob or arraybuffer. Default is blob
 
dataType = options.responseType || "blob",
 
data = options.data || null,
 
username = options.username || null,
 
password = options.password || null;
 
 
                xhr.addEventListener('load', function(){
 
var data = {};
 
data[options.dataType] = xhr.response;
 
// make callback and send data
 
callback(xhr.status, xhr.statusText, data, xhr.getAllResponseHeaders());
 
                });
 
 
                xhr.open(type, url, async, username, password);
 
 
// setup custom headers
 
for (var i in headers ) {
 
xhr.setRequestHeader(i, headers[i] );
 
}
 
 
                xhr.responseType = dataType;
 
                xhr.send(data);
 
            },
 
            abort: function(){
 
                jqXHR.abort();
 
            }
 
        };
 
    }
 
});
 
 
   </script>
 
   </script>
 
+
  <link rel="stylesheet" href="https://2016.igem.org/Team:SUSTech_Shenzhen/css/katex-css?action=raw&ctype=text/css">
 +
  <link rel="stylesheet" href="https://2016.igem.org/Team:SUSTech_Shenzhen/css/ionicons-min-css?action=raw&ctype=text/css">
 
</footer>
 
</footer>
 
</html>
 
</html>

Latest revision as of 20:02, 19 October 2016