Template:Montgomery Cougars NJUSA/Common CSS

From 2014hs.igem.org

(Difference between revisions)
Line 1: Line 1:
/* Edit this file: https://2014hs.igem.org/wiki/index.php?title=Template:Montgomery_Cougars_NJUSA/Common_CSS&action=edit */
/* Edit this file: https://2014hs.igem.org/wiki/index.php?title=Template:Montgomery_Cougars_NJUSA/Common_CSS&action=edit */
-
/* https://2011.igem.org/Team:DTU-Denmark/How_to_customize_an_iGEM_wiki#Centralizing_the_layout_using_templates */
 
 +
/* https://2011.igem.org/Team:DTU-Denmark/How_to_customize_an_iGEM_wiki#Remove_all_empty_.3Cp.3E.3C.2Fp.3E_tags */
 +
$(document).ready(function() {
 +
    $("p").filter( function() {
 +
        return $.trim($(this).html()) == '';
 +
    }).remove();
 +
    $("br:only-child").remove();
 +
    if($('#slider').length != 0) {
 +
        $('.generic-image').remove();
 +
        $('#slider').unslider({
 +
            delay: 3250,
 +
            fluid: true
 +
        });
 +
    }
-
/***************************************/
+
    $('#nav ul ul').parent().addClass('is-parent');
-
/* WIKI RESET                          */
+
-
/***************************************/
+
-
body.mediawiki {
+
    if($('#toc').length != 0) {
-
    margin-top: -1.5em;
+
        $('#toc').remove();
-
}
+
        $('body').addClass('with-toc');
-
#contentSub,
+
        var $jqtoc = $('<div id="jqtoc"></div>')
-
#search-controls,
+
        .prependTo('#main')
-
.firstHeading,
+
        .toc({
-
#footer-box,
+
            container: '#inner-content',
-
#catlinks,
+
            headerText: function(i, heading, $heading) { // remove [edit] link
-
#p-logo {
+
                return $heading.text().replace(/\[edit\]/g, '');  
-
    display:none;
+
            },
-
}
+
            selectors: 'h1, h2'
-
#top-section {
+
        });
-
    border: none;
+
-
    height: 0px;
+
-
}
+
-
#content {
+
-
    border: none;
+
-
}
+
-
#menubar > ul > li:last-child {
+
-
    display: none;
+
-
}
+
-
#menubar {
+
-
    width: auto;
+
-
}
+
-
#menubar ul {
+
-
    margin-bottom: 0.5em;
+
-
}
+
-
.firstHeading {
+
-
    display: none;
+
-
}
+
 +
        $('#jqtoc > ul').stickySidebar({
 +
            breakingPoint1: 401,
 +
            contentSelector: '#inner-content',
 +
            footerThreshold: 150,
 +
            sidebarTopMargin: 0
 +
        });
-
/* CUSTOM STYLES */
+
        if($(window).height() < $('#jqtoc > ul').height()) {
 +
            $('<a id="scrolltop" href="#">↑</a>')
 +
                .appendTo('#main')
 +
                .fadeOut()
 +
                .click(function()  {
 +
                    $('html, body').animate({scrollTop: 0});
 +
                    return false;
 +
                });
 +
            $(window).scroll(function() {
 +
                if($(window).scrollTop() > 500) {
 +
                    $('#scrolltop').fadeIn(200);
 +
                } else {
 +
                    $('#scrolltop').fadeOut(200);
 +
                }
 +
            });
 +
        }
 +
    }
-
#content {
+
});
-
    width: 100%;
+
-
    padding: 0;
+
-
}
+
-
.container {
+
/**
-
    width: 70%;
+
*  Unslider by @idiot
-
    max-width: 1100px;
+
*/
-
    margin: 0 auto;
+
(function(e,t){if(!e)return t;var n=function(){this.el=t;this.items=t;this.sizes=[];this.max=[0,0];this.current=0;this.interval=t;this.opts={speed:500,delay:3e3,complete:t,keys:!t,dots:t,fluid:t};var n=this;this.init=function(t,n){this.el=t;this.ul=t.children("ul");this.max=[t.outerWidth(),t.outerHeight()];this.items=this.ul.children("li").each(this.calculate);this.opts=e.extend(this.opts,n);this.setup();return this};this.calculate=function(t){var r=e(this),i=r.outerWidth(),s=r.outerHeight();n.sizes[t]=[i,s];if(i>n.max[0])n.max[0]=i;if(s>n.max[1])n.max[1]=s};this.setup=function(){this.el.css({overflow:"hidden",width:n.max[0],height:this.items.first().outerHeight()});this.ul.css({width:this.items.length*100+"%",position:"relative"});this.items.css("width",100/this.items.length+"%");if(this.opts.delay!==t){this.start();this.el.hover(this.stop,this.start)}this.opts.keys&&e(document).keydown(this.keys);this.opts.dots&&this.dots();if(this.opts.fluid){var r=function(){n.el.css("width",Math.min(Math.round(n.el.outerWidth()/n.el.parent().outerWidth()*100),100)+"%")};r();e(window).resize(r)}if(this.opts.arrows){this.el.parent().append('<p class="arrows"><span class="prev">←</span><span class="next">→</span></p>').find(".arrows span").click(function(){e.isFunction(n[this.className])&&n[this.className]()})}if(e.event.swipe){this.el.on("swipeleft",n.prev).on("swiperight",n.next)}};this.move=function(t,r){if(!this.items.eq(t).length)t=0;if(t<0)t=this.items.length-1;var i=this.items.eq(t);var s={height:i.outerHeight()};var o=r?5:this.opts.speed;if(!this.ul.is(":animated")){n.el.find(".dot:eq("+t+")").addClass("active").siblings().removeClass("active");this.el.animate(s,o)&&this.ul.animate(e.extend({left:"-"+t+"00%"},s),o,function(i){n.current=t;e.isFunction(n.opts.complete)&&!r&&n.opts.complete(n.el)})}};this.start=function(){n.interval=setInterval(function(){n.move(n.current+1)},n.opts.delay)};this.stop=function(){n.interval=clearInterval(n.interval);return n};this.keys=function(t){var r=t.which;var i={37:n.prev,39:n.next,27:n.stop};if(e.isFunction(i[r])){i[r]()}};this.next=function(){return n.stop().move(n.current+1)};this.prev=function(){return n.stop().move(n.current-1)};this.dots=function(){var t='<ol class="dots">';e.each(this.items,function(e){t+='<li class="dot'+(e<1?" active":"")+'">'+(e+1)+"</li>"});t+="</ol>";this.el.addClass("has-dots").append(t).find(".dot").click(function(){n.move(e(this).index())})}};e.fn.unslider=function(t){var r=this.length;return this.each(function(i){var s=e(this);var u=(new n).init(s,t);s.data("unslider"+(r>1?"-"+(i+1):""),u)})}})(window.jQuery,false);
-
}
+
-
p {
+
// jQuery.event.swipe
-
    line-height: 1.7;
+
// 0.5
-
}
+
// Stephen Band
-
/***************************************/
+
// Dependencies
-
/* RANDOM                              */
+
// jQuery.event.move 1.2
-
/***************************************/
+
-
body {
+
// One of swipeleft, swiperight, swipeup or swipedown is triggered on
-
    min-width: 1200px;
+
// moveend, when the move has covered a threshold ratio of the dimension
-
    background-color: white;
+
// of the target node, or has gone really fast. Threshold and velocity
-
    border-bottom: solid #333 1px;
+
// sensitivity changed with:
-
}
+
//
 +
// jQuery.event.special.swipe.settings.threshold
 +
// jQuery.event.special.swipe.settings.sensitivity
 +
(function(module){if(typeof define==='function'&&define.amd){define(['jquery'],module);}else{module(jQuery);}})(function(jQuery,undefined){var add=jQuery.event.add,remove=jQuery.event.remove,trigger=function(node,type,data){jQuery.event.trigger(type,data,node);},settings={threshold:0.4,sensitivity:6};function moveend(e){var w,h,event;w=e.currentTarget.offsetWidth;h=e.currentTarget.offsetHeight;event={distX:e.distX,distY:e.distY,velocityX:e.velocityX,velocityY:e.velocityY,finger:e.finger};if(e.distX>e.distY){if(e.distX>-e.distY){if(e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swiperight';trigger(e.currentTarget,event);}} else{if(-e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipeup';trigger(e.currentTarget,event);}}} else{if(e.distX>-e.distY){if(e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipedown';trigger(e.currentTarget,event);}} else{if(-e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swipeleft';trigger(e.currentTarget,event);}}}} function getData(node){var data=jQuery.data(node,'event_swipe');if(!data){data={count:0};jQuery.data(node,'event_swipe',data);} return data;} jQuery.event.special.swipe=jQuery.event.special.swipeleft=jQuery.event.special.swiperight=jQuery.event.special.swipeup=jQuery.event.special.swipedown={setup:function(data,namespaces,eventHandle){var data=getData(this);if(data.count++>0){return;} add(this,'moveend',moveend);return true;},teardown:function(){var data=getData(this);if(--data.count>0){return;} remove(this,'moveend',moveend);return true;},settings:settings};});
-
/* fontawesome */
+
/*!
-
[class*="fontawesome-"]:before {
+
* toc - jQuery Table of Contents Plugin
-
  font-family: 'FontAwesome', sans-serif;
+
* v0.3.2
-
}
+
* http://projects.jga.me/toc/
 +
* copyright Greg Allen 2014
 +
* MIT License
 +
*/
 +
!function(a){a.fn.smoothScroller=function(b){b=a.extend({},a.fn.smoothScroller.defaults,b);var c=a(this);return a(b.scrollEl).animate({scrollTop:c.offset().top-a(b.scrollEl).offset().top-b.offset},b.speed,b.ease,function(){var a=c.attr("id");a.length&&(history.pushState?history.pushState(null,null,"#"+a):document.location.hash=a),c.trigger("smoothScrollerComplete")}),this},a.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0},a("body").on("click","[data-smoothscroller]",function(b){b.preventDefault();var c=a(this).attr("href");0===c.indexOf("#")&&a(c).smoothScroller()})}(jQuery),function(a){var b={};a.fn.toc=function(b){var c,d=this,e=a.extend({},jQuery.fn.toc.defaults,b),f=a(e.container),g=a(e.selectors,f),h=[],i=e.activeClass,j=function(b,c){if(e.smoothScrolling&&"function"==typeof e.smoothScrolling){b.preventDefault();var f=a(b.target).attr("href");e.smoothScrolling(f,e,c)}a("li",d).removeClass(i),a(b.target).parent().addClass(i)},k=function(){c&&clearTimeout(c),c=setTimeout(function(){for(var b,c=a(window).scrollTop(),f=Number.MAX_VALUE,g=0,j=0,k=h.length;k>j;j++){var l=Math.abs(h[j]-c);f>l&&(g=j,f=l)}a("li",d).removeClass(i),b=a("li:eq("+g+")",d).addClass(i),e.onHighlight(b)},50)};return e.highlightOnScroll&&(a(window).bind("scroll",k),k()),this.each(function(){var b=a(this),c=a(e.listType);g.each(function(d,f){var g=a(f);h.push(g.offset().top-e.highlightOffset);var i=e.anchorName(d,f,e.prefix);if(f.id!==i){a("<span/>").attr("id",i).insertBefore(g)}var l=a("<a/>").text(e.headerText(d,f,g)).attr("href","#"+i).bind("click",function(c){a(window).unbind("scroll",k),j(c,function(){a(window).bind("scroll",k)}),b.trigger("selected",a(this).attr("href"))}),m=a("<li/>").addClass(e.itemClass(d,f,g,e.prefix)).append(l);c.append(m)}),b.html(c)})},jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(b,c,d){a(b).smoothScroller({offset:c.scrollToOffset}).on("smoothScrollerComplete",function(){d()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:!0,highlightOffset:100,anchorName:function(c,d,e){if(d.id.length)return d.id;var f=a(d).text().replace(/[^a-z0-9]/gi," ").replace(/\s+/g,"-").toLowerCase();if(b[f]){for(var g=2;b[f+g];)g++;f=f+"-"+g}return b[f]=!0,e+"-"+f},headerText:function(a,b,c){return c.text()},itemClass:function(a,b,c,d){return d+"-"+c[0].tagName.toLowerCase()}}}(jQuery);
-
/* http://css-tricks.com/snippets/css/clear-fix/ */
 
-
.clearfix:after {
 
-
visibility: hidden;
 
-
display: block;
 
-
font-size: 0;
 
-
content: " ";
 
-
clear: both;
 
-
height: 0;
 
-
}
 
-
.clearfix { display: inline-block; }
 
-
/* start commented backslash hack \*/
 
-
* html .clearfix { height: 1%; }
 
-
.clearfix { display: block; }
 
-
/* close commented backslash hack */
 
-
.centered {
+
// http://spoiledmilk.com/blog/sticky-sidebar/
-
    display: table;
+
(function ($) {
-
    margin-left: auto;
+
-
    margin-right: auto;
+
-
}
+
-
th {
+
     $.fn.stickySidebar = function (options) {
-
     background-color: #e0e0e0;
+
-
}
+
-
/***************************************/
+
        var config = $.extend({
-
/* FONT TWEAKS                        */
+
            headerSelector: 'header',
-
/***************************************/
+
            navSelector: 'nav',
 +
            contentSelector: '#content',
 +
            footerSelector: 'footer',
 +
            sidebarTopMargin: 20,
 +
            footerThreshold: 40
 +
        }, options);
-
body {
+
        var fixSidebr = function () {
-
    font-size: 12px;
+
-
}
+
-
p {
+
            var sidebarSelector = $(this);
-
    font-size: 16px;
+
            var viewportHeight = $(window).height();
-
}
+
            var viewportWidth = $(window).width();
 +
            var documentHeight = $(document).height();
 +
            var headerHeight = $(config.headerSelector).outerHeight();
 +
            var navHeight = $(config.navSelector).outerHeight();
 +
            var sidebarHeight = sidebarSelector.outerHeight();
 +
            var contentHeight = $(config.contentSelector).outerHeight();
 +
            var footerHeight = $(config.footerSelector).outerHeight();
 +
            var scroll_top = $(window).scrollTop();
 +
            var fixPosition = contentHeight - sidebarHeight;
 +
            var breakingPoint1 = config.breakingPoint1 || (headerHeight + navHeight);
 +
            var breakingPoint2 = documentHeight - (sidebarHeight + footerHeight + config.footerThreshold);
-
*, body, p, span, blockquote, article, section, aside, nav, th, td, .wikitable th, .wikitable td {
+
            // calculate
-
    font-family: 'Open Sans', sans-serif;
+
            if ((contentHeight > sidebarHeight) && (viewportHeight > sidebarHeight)) {
-
}
+
-
h1, h2, h3, h4, h5, h6,
+
                if (scroll_top < breakingPoint1) {
-
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+
-
    font-family:  'Open Sans', sans-serif;
+
-
    font-weight: 400;
+
-
    padding-bottom: 0.25em;
+
-
}
+
-
h1, h1 a {
+
                    sidebarSelector.removeClass('sticky');
-
    border-bottom: none;
+
-
    font-size: 3.25em;
+
-
}
+
-
p {
+
                } else if ((scroll_top >= breakingPoint1) && (scroll_top < breakingPoint2)) {
-
    line-height: 1.5;
+
-
}
+
-
b, strong, th {
+
                    sidebarSelector.addClass('sticky').css('top', config.sidebarTopMargin);
-
    font-weight: 700;
+
-
}
+
-
::selection {
+
                } else {
-
    color: white;
+
-
    background: rgb(0, 102, 0);
+
-
}
+
-
::-moz-selection {
+
-
    color: white;
+
-
    background: rgb(0, 102, 0);
+
-
}
+
-
/***************************************/
+
                    var negative = breakingPoint2 - scroll_top;
-
/* HEADER                              */
+
                    sidebarSelector.addClass('sticky').css('top', negative);
-
/***************************************/
+
-
#header-wrapper {
+
                }
-
    position: relative; /* create new stacking context to keep logo on top */
+
-
    z-index: 100;
+
-
}
+
-
#header {
+
-
    background-color: rgb(38, 38, 38);
+
-
    border-bottom: solid 0.75em rgb(0, 102, 0);
+
-
    height: 7.5em;
+
-
}
+
-
#logo {
+
            }
-
    margin-left: 20px;
+
        };
-
}
+
-
#logo span {
+
        return this.each(function () {
-
    display: none;
+
            $(window).on('scroll', $.proxy(fixSidebr, this));
-
}
+
            $(window).on('resize', $.proxy(fixSidebr, this))
 +
            $.proxy(fixSidebr, this)();
 +
        });
-
#logo img {
+
     };
-
     /*max-width: 275px;*/
+
-
    position: absolute;
+
-
    width: 250px;
+
-
}
+
-
#nav {
+
}(jQuery));
-
    background: none;
+
-
    max-width: 1400px;
+
-
    margin: 0 auto;
+
-
    position: relative;
+
-
}
+
-
 
+
-
#nav ul {
+
-
    position: absolute;
+
-
    left: 320px;
+
-
    top: 4.25em;
+
-
}
+
-
 
+
-
#nav li a {
+
-
    color: #E6E6E6;
+
-
    font-family: 'Open Sans', sans-serif;
+
-
    font-size: 1.2em;
+
-
    font-weight: 300;
+
-
 
+
-
 
+
-
    -webkit-transition: background-color 0.15s ease-in;
+
-
    -moz-transition: background-color 0.15s ease-in;
+
-
    -o-transition: background-color 0.15s ease-in;
+
-
    -ms-transition: background-color 0.15s ease-in;
+
-
    transition: background-color 0.15s ease-in;
+
-
}
+
-
 
+
-
#nav > ul > li:hover > a {
+
-
background: rgb(50, 50, 50);
+
-
}
+
-
 
+
-
#nav li ul {
+
-
    background: rgb(50, 50, 50);
+
-
    opacity: 0;
+
-
    position: absolute;
+
-
        top: 2.5em;
+
-
        left: 0;
+
-
    width: auto;
+
-
    z-index: 99;
+
-
 
+
-
    -webkit-transition: opacity 0.15s ease-in;
+
-
    -moz-transition: opacity 0.15s ease-in;
+
-
    -o-transition: opacity 0.15s ease-in;
+
-
    -ms-transition: opacity 0.15s ease-in;
+
-
    transition: opacity 0.15s ease-in;
+
-
}
+
-
 
+
-
#nav li:hover ul {
+
-
    opacity: 1;
+
-
    visibility: visible;
+
-
}
+
-
 
+
-
#nav li ul li:hover a {
+
-
    background: rgb(75, 75, 75);
+
-
}
+
-
 
+
-
#igem-logo span {
+
-
    display: none;
+
-
}
+
-
#igem-logo  img {
+
-
    width: 200px;
+
-
    margin-top: 1em;
+
-
}
+
-
 
+
-
/***************************************/
+
-
/* GALLERY                            */
+
-
/***************************************/
+
-
 
+
-
.generic-image {
+
-
    position: relative;
+
-
}
+
-
 
+
-
.gallery {
+
-
    position: relative;
+
-
}
+
-
 
+
-
#slider {
+
-
    margin-right: 0;
+
-
    margin-bottom: 0;
+
-
    position: relative;
+
-
    overflow: auto;
+
-
    width: 100%;
+
-
}
+
-
 
+
-
#slider ul {
+
-
    margin-top: 0;
+
-
    padding-left: 0;
+
-
}
+
-
 
+
-
#slider li  {
+
-
    list-style: none;
+
-
    position: relative;
+
-
}
+
-
 
+
-
#slider ul li {
+
-
    float: left;
+
-
}
+
-
 
+
-
#slider ul li a {
+
-
    display: block;
+
-
}
+
-
 
+
-
.slider img {
+
-
    display: table;
+
-
    margin: 0 auto;
+
-
    width: 100%;
+
-
}
+
-
 
+
-
#slider .caption {
+
-
    background-color: rgba(0,10,5,.8);
+
-
    padding: 1.5em 1em;
+
-
    text-align: center;
+
-
    color: white;
+
-
    position: absolute;
+
-
    bottom: 0;
+
-
    width: 100%;
+
-
}
+
-
 
+
-
.slider .caption {
+
-
    display: table;
+
-
    margin: 0;
+
-
    width: auto;
+
-
}
+
-
 
+
-
#slider .caption h2 {
+
-
    color: white;
+
-
    border-bottom: none;
+
-
    font-size: 3em;
+
-
    font-weight: 300;
+
-
    margin: 0.25em 0 0.75em;
+
-
    padding: 0;
+
-
}
+
-
 
+
-
#slider .caption h2:after {
+
-
    content: '»';
+
-
    margin-left: 0.2em;
+
-
    color: rgb(0, 172, 0);
+
-
}
+
-
 
+
-
#slider .caption span{
+
-
    color: white;
+
-
    font-size: 1.25em;
+
-
    font-weight: 300;
+
-
    margin: 0;
+
-
}
+
-
 
+
-
/***************************************/
+
-
/* LEFT LINKS                          */
+
-
/***************************************/
+
-
 
+
-
#left-links-wrapper {
+
-
    font-size: 12px;
+
-
    padding-right: 15px;
+
-
    box-sizing: border-box;
+
-
    -moz-box-sizing: border-box;
+
-
}
+
-
 
+
-
#left-links {
+
-
}
+
-
 
+
-
#left-links h1,
+
-
#left-links ul li a,
+
-
#left-links ul li .selflink {
+
-
    color: rgb(245, 245, 245);
+
-
    font-family: 'Open Sans', sans-serif;
+
-
    text-decoration: none;
+
-
}
+
-
 
+
-
#left-links h1 {
+
-
    background-color: rgba(0, 102, 0, 1);
+
-
    font-size: 2.5em;
+
-
    font-weight: 300;
+
-
    float: left;
+
-
    line-height: 1.15;
+
-
    margin: 0 0 -1px;
+
-
    min-width: 75%;
+
-
    max-width: 95%;
+
-
    padding: 10px;
+
-
}
+
-
 
+
-
 
+
-
#left-links ul {
+
-
  float: left;
+
-
  margin: 0;
+
-
  padding: 0;
+
-
  width: 100%;
+
-
}
+
-
 
+
-
#left-links ul li {
+
-
    display: block;
+
-
    font-size: 1.5em;
+
-
    font-weight: 300;
+
-
    margin-bottom: 0;
+
-
    width: 100%;
+
-
}
+
-
 
+
-
#left-links ul li a,
+
-
#left-links ul li .selflink {
+
-
    display: block;
+
-
    clear: left;
+
-
    float: left;
+
-
    min-width: 30%;
+
-
    padding: 10px 15px;
+
-
 
+
-
    -webkit-transition: background 200ms ease;
+
-
    -moz-transition: background 200ms ease;
+
-
    -ms-transition: background 200ms ease;
+
-
    -o-transition: background 200ms ease;
+
-
    transition: background 200ms ease;
+
-
}
+
-
 
+
-
#left-links ul li a:hover {
+
-
    background-color: rgb(50,50,50);
+
-
}
+
-
 
+
-
#left #left-links-title {
+
-
    background-color: rgba(0, 102, 0, 1);
+
-
    color: rgb(240, 240, 240);
+
-
}
+
-
#left-links .selflink {
+
-
    background-color: rgb(46, 46, 46);
+
-
    font-weight: 300;
+
-
}
+
-
#left-links ul > :nth-child(1) > a {
+
-
    background-color: rgba(0, 102, 0, 0.95);
+
-
}
+
-
#left-links ul > :nth-child(2) > a {
+
-
    background-color: rgba(0, 102, 0, 0.91);
+
-
}
+
-
#left-links ul > :nth-child(3) > a {
+
-
    background-color: rgba(0, 102, 0, .87);
+
-
}
+
-
#left-links ul > :nth-child(4) > a {
+
-
    background-color: rgba(0, 102, 0, 0.83);
+
-
}
+
-
#left-links ul > :nth-child(5) > a {
+
-
    background-color: rgba(0, 102, 0, 0.79);
+
-
}
+
-
#left-links ul > :nth-child(6) > a {
+
-
    background-color: rgba(0, 102, 0, 0.75);
+
-
}
+
-
#left-links ul > :nth-child(7) > a {
+
-
    background-color: rgba(0, 102, 0, 0.71);
+
-
}
+
-
#left-links ul > :nth-child(8) > a {
+
-
    background-color: rgba(0, 102, 0, 0.67);
+
-
}
+
-
 
+
-
 
+
-
/***************************************/
+
-
/* CONTENT                            */
+
-
/***************************************/
+
-
 
+
-
#main {
+
-
    position: relative;
+
-
}
+
-
 
+
-
#main-wrapper {
+
-
    max-width: 1400px;
+
-
    margin: 0 auto;
+
-
    position: relative;
+
-
}
+
-
 
+
-
#inner-content {
+
-
    box-sizing: border-box;
+
-
    -moz-box-sizing: border-box;
+
-
    padding-right: 3em;
+
-
}
+
-
 
+
-
#inner-content h1 {
+
-
    margin: 0.25em 0 0.75em;
+
-
}
+
-
 
+
-
#inner-content p {
+
-
    margin: 1.5em 0 .5em;
+
-
}
+
-
 
+
-
.editsection, .editsection a {
+
-
    font-size: 16px;
+
-
}
+
-
 
+
-
.toc {
+
-
    float: right;
+
-
    margin: 3em 0 2em 2em;
+
-
}
+
-
 
+
-
/***************************************/
+
-
/* PIKACHOOSE                          */
+
-
/***************************************/
+
-
 
+
-
.slider {
+
-
    margin-left: 10%;
+
-
    width: 75%;
+
-
}
+
-
 
+
-
.pika-thumbs {
+
-
    height:75px;
+
-
    padding:0 16px;
+
-
}
+
-
 
+
-
.pika-thumbs li {
+
-
    width:144px;
+
-
    height:74px;
+
-
    overflow:hidden;
+
-
    float:left;
+
-
    list-style-type:none;
+
-
    background:#fafafa;
+
-
    border:1px solid #e5e5e5;
+
-
    cursor:pointer;
+
-
    margin:0 5px;
+
-
    padding:3px;
+
-
}
+
-
 
+
-
.pika-thumbs li .clip {
+
-
    position:relative;
+
-
    height:100%;
+
-
    text-align:center;
+
-
    vertical-align:middle;
+
-
    overflow:hidden;
+
-
}
+
-
 
+
-
.pika-stage {
+
-
    position:relative;
+
-
    background:#fafafa;
+
-
    border:1px solid #e5e5e5;
+
-
    text-align:center;
+
-
    margin:0 auto;
+
-
    padding:10px 10px 40px;
+
-
}
+
-
 
+
-
.pika-stage img {
+
-
    height:100%;
+
-
}
+
-
 
+
-
.pika-stage .caption {
+
-
    position:absolute;
+
-
    background:rgba(0,0,0,0.75);
+
-
    border:1px solid #141414;
+
-
    color:#fafafa;
+
-
    text-align:right;
+
-
    bottom:50px;
+
-
    right:10px;
+
-
    padding:10px;
+
-
}
+
-
.pika-stage .caption p {
+
-
    line-height:14px;
+
-
    margin:0;
+
-
    padding:0;
+
-
}
+
-
 
+
-
.pika-imgnav a {
+
-
    position:absolute;
+
-
    text-indent:-5000px;
+
-
    display:block;
+
-
    z-index:3;
+
-
}
+
-
 
+
-
.pika-imgnav a.previous {
+
-
    background:url(https://static.igem.org/mediawiki/2014hs/3/39/Prev1.png) no-repeat left 45%;
+
-
    height:100%;
+
-
    width:50px;
+
-
    top:50px;
+
-
    left:0;
+
-
    cursor:pointer;
+
-
}
+
-
 
+
-
.pika-imgnav a.next {
+
-
    background:url(https://static.igem.org/mediawiki/2014hs/a/a1/Next1.png) no-repeat right 45%;
+
-
    height:100%;
+
-
    width:50px;
+
-
    top:50px;
+
-
    right:0;
+
-
    cursor:pointer;
+
-
}
+
-
 
+
-
 
+
-
 
+
-
.pika-imgnav a.play {
+
-
    background:url(https://static.igem.org/mediawiki/2014hs/3/3c/Play1.png) no-repeat 0 50%;
+
-
    height:100px;
+
-
    width:44px;
+
-
    top:0;
+
-
    left:50%;
+
-
    display:none;
+
-
    cursor:pointer;
+
-
}
+
-
 
+
-
.pika-imgnav a.pause {
+
-
    background:url(https://static.igem.org/mediawiki/2014hs/4/47/Pause.png) no-repeat 0 50%;
+
-
    height:100px;
+
-
    width:44px;
+
-
    top:0;
+
-
    left:50%;
+
-
    display:none;
+
-
    cursor:pointer;
+
-
}
+
-
 
+
-
.pika-textnav {
+
-
    overflow:hidden;
+
-
    bottom:2px;
+
-
    position:absolute;
+
-
    width:100%;
+
-
    margin:10px 0 0;
+
-
}
+
-
 
+
-
.pika-textnav a {
+
-
    font-size:12px;
+
-
    text-decoration:none;
+
-
    color:#333;
+
-
    padding:4px;
+
-
}
+
-
 
+
-
.pika-textnav a.previous {
+
-
    float:left;
+
-
    width:auto;
+
-
    display:block;
+
-
}
+
-
 
+
-
.pika-textnav a.next {
+
-
    float:right;
+
-
    width:auto;
+
-
    display:block;
+
-
    margin-right:20px;
+
-
}
+
-
 
+
-
.pika-tooltip {
+
-
    font-size:12px;
+
-
    position:absolute;
+
-
    color:#FFF;
+
-
    background-color:rgba(0,0,0,0.7);
+
-
    border:3px solid #000;
+
-
    padding:3px;
+
-
}
+
-
 
+
-
.pika-counter {
+
-
    position:absolute;
+
-
    bottom:45px;
+
-
    left:15px;
+
-
    color:#FFF;
+
-
    background:rgba(0,0,0,0.7);
+
-
    font-size:11px;
+
-
    -moz-border-radius:5px;
+
-
    border-radius:5px;
+
-
    padding:3px;
+
-
}
+
-
 
+
-
.pika-loader {
+
-
 
+
-
    background:url(loading.gif) 3px 3px no-repeat #000;
+
-
 
+
-
    background-color:rgba(0,0,0,0.9);
+
-
 
+
-
    color:#FFF;
+
-
 
+
-
    width:60px;
+
-
 
+
-
    font-size:11px;
+
-
 
+
-
    text-align:right;
+
-
 
+
-
    position:absolute;
+
-
 
+
-
    top:15px;
+
-
 
+
-
    right:15px;
+
-
 
+
-
    padding:5px 3px;
+
-
 
+
-
}
+
-
 
+
-
 
+
-
 
+
-
.slider img {
+
-
 
+
-
    width:auto;
+
-
 
+
-
}
+
-
 
+
-
 
+
-
 
+
-
.slider .clip img {
+
-
 
+
-
    position:relative;
+
-
 
+
-
    bottom:40%;
+
-
 
+
-
}
+
-
 
+
-
 
+
-
 
+
-
.slider .jcarousel-container-horizontal { padding: 15px 20px; overflow:hidden;}
+
-
.slider.jcarousel-clip-horizontal {height: 90px; width: 485px;}
+
-
.slider .jcarousel-item-horizontal { margin-right: 10px;}
+
-
 
+
-
 
+
-
/***************************************/
+
-
/* FOOTER                              */
+
-
/***************************************/
+
-
 
+
-
#footer {
+
-
    border-top: 1px solid rgb(175, 175, 175);
+
-
    margin-top: 2em;
+
-
    padding: 1em;
+
-
}
+
-
 
+
-
#footer li {
+
-
    display: inline-block;
+
-
    margin: 0;
+
-
}
+
-
 
+
-
#footer-links {
+
-
    text-align: center;
+
-
}
+
-
 
+
-
#footer-text {
+
-
    color: #777;
+
-
    font-size: 0.8em;
+
-
    margin: 0.75em 0;
+
-
    text-align: center;
+
-
}
+
-
 
+
-
#footer-links-2 ul {
+
-
    margin: 0.75em 0 0.25em;
+
-
    padding: 0;
+
-
}
+
-
 
+
-
#footer-links-2 ul li {
+
-
    display: inline;
+
-
    list-style: none;
+
-
    padding-right: 1em;
+
-
}
+
-
 
+
-
#footer-links-2 ul li:last-child {
+
-
    padding-right: 0;
+
-
}
+
-
 
+
-
#footer-links-2 ul li a {
+
-
    font-size: 0.9em;
+
-
    color: #777;
+
-
    text-decoration: none;
+
-
}
+
-
 
+
-
/***************************************/
+
-
/* TOC                                */
+
-
/***************************************/
+
-
 
+
-
#jqtoc {
+
-
    background: #3A3A3A;
+
-
    color: #fff;
+
-
    font-size: 12px;
+
-
    font-family: 'Open Sans', sans-serif;
+
-
    position: absolute;
+
-
    top: 0;
+
-
    bottom: 0; 
+
-
    right: 0;
+
-
    width: 150px;
+
-
}
+
-
 
+
-
#jqtoc ul {
+
-
    box-sizing: border-box;
+
-
    list-style: none;
+
-
    margin: 0;
+
-
    padding: 1em 0 0;
+
-
    width: 150px;
+
-
}
+
-
 
+
-
#jqtoc li {
+
-
    box-sizing: border-box;
+
-
    letter-spacing: initial;
+
-
    padding: 5px 10px;
+
-
    width: 100%;
+
-
}
+
-
 
+
-
#jqtoc a {
+
-
    color: #fff;
+
-
    text-decoration: none;
+
-
    display: block;
+
-
}
+
-
 
+
-
#jqtoc .toc-h1 {
+
-
    background-color: rgb(70, 70, 70);
+
-
}
+
-
 
+
-
#jqtoc .toc-h2 {
+
-
    padding-left: 10px;
+
-
}
+
-
 
+
-
#jqtoc .toc-h3 {
+
-
    padding-left: 20px;
+
-
}
+
-
 
+
-
#jqtoc .toc-active {
+
-
    background: rgb(0, 75, 15);
+
-
}
+
-
 
+
-
.with-toc #inner-content {
+
-
    padding-right: 175px;
+
-
}
+
-
 
+
-
.sticky {
+
-
    float: none;
+
-
    position: fixed;
+
-
    z-index: 6;
+
-
    left: auto;
+
-
}
+
-
 
+
-
#scrolltop {
+
-
    background-color: rgba(0, 92, 0,0.85);
+
-
    position: fixed;
+
-
    right: 12.5%;
+
-
    color: white;
+
-
    bottom: 0px;
+
-
    font-size: 3em;
+
-
    width: 1em;
+
-
    text-align: center;
+
-
    border-radius: 5px 5px 0 0;
+
-
    height: 1em;
+
-
    line-height: 1.2;
+
-
}
+
-
 
+
-
#igem-logo {
+
-
    position: absolute;
+
-
    right: 0;
+
-
}
+

Revision as of 08:14, 20 June 2014

/* Edit this file: https://2014hs.igem.org/wiki/index.php?title=Template:Montgomery_Cougars_NJUSA/Common_CSS&action=edit */

/* https://2011.igem.org/Team:DTU-Denmark/How_to_customize_an_iGEM_wiki#Remove_all_empty_.3Cp.3E.3C.2Fp.3E_tags */ $(document).ready(function() {

   $("p").filter( function() {
       return $.trim($(this).html()) == ;
   }).remove();
   $("br:only-child").remove();
   if($('#slider').length != 0) {
       $('.generic-image').remove();
       $('#slider').unslider({
           delay: 3250,
           fluid: true
       });
   }
   $('#nav ul ul').parent().addClass('is-parent');
   if($('#toc').length != 0) {
       $('#toc').remove();
       $('body').addClass('with-toc');
var $jqtoc = $('
')
       .prependTo('#main')
       .toc({
           container: '#inner-content',
           headerText: function(i, heading, $heading) { // remove [edit] link
               return $heading.text().replace(/\[edit\]/g, ); 
           },
           selectors: 'h1, h2'
       });
       $('#jqtoc > ul').stickySidebar({
           breakingPoint1: 401,
           contentSelector: '#inner-content',
           footerThreshold: 150,
           sidebarTopMargin: 0
       });
       if($(window).height() < $('#jqtoc > ul').height()) {
           $('<a id="scrolltop" href="#">↑</a>')
               .appendTo('#main')
               .fadeOut()
               .click(function()  {
                   $('html, body').animate({scrollTop: 0});
                   return false;
               });
           $(window).scroll(function() {
               if($(window).scrollTop() > 500) {
                   $('#scrolltop').fadeIn(200);
               } else {
                   $('#scrolltop').fadeOut(200);
               }
           });
       }
   }

});

/**

*   Unslider by @idiot
*/
(function(e,t){if(!e)return t;var n=function(){this.el=t;this.items=t;this.sizes=[];this.max=[0,0];this.current=0;this.interval=t;this.opts={speed:500,delay:3e3,complete:t,keys:!t,dots:t,fluid:t};var n=this;this.init=function(t,n){this.el=t;this.ul=t.children("ul");this.max=[t.outerWidth(),t.outerHeight()];this.items=this.ul.children("li").each(this.calculate);this.opts=e.extend(this.opts,n);this.setup();return this};this.calculate=function(t){var r=e(this),i=r.outerWidth(),s=r.outerHeight();n.sizes[t]=[i,s];if(i>n.max[0])n.max[0]=i;if(s>n.max[1])n.max[1]=s};this.setup=function(){this.el.css({overflow:"hidden",width:n.max[0],height:this.items.first().outerHeight()});this.ul.css({width:this.items.length*100+"%",position:"relative"});this.items.css("width",100/this.items.length+"%");if(this.opts.delay!==t){this.start();this.el.hover(this.stop,this.start)}this.opts.keys&&e(document).keydown(this.keys);this.opts.dots&&this.dots();if(this.opts.fluid){var r=function(){n.el.css("width",Math.min(Math.round(n.el.outerWidth()/n.el.parent().outerWidth()*100),100)+"%")};r();e(window).resize(r)}if(this.opts.arrows){this.el.parent().append('

←→

').find(".arrows span").click(function(){e.isFunction(n[this.className])&&n[this.className]()})}if(e.event.swipe){this.el.on("swipeleft",n.prev).on("swiperight",n.next)}};this.move=function(t,r){if(!this.items.eq(t).length)t=0;if(t<0)t=this.items.length-1;var i=this.items.eq(t);var s={height:i.outerHeight()};var o=r?5:this.opts.speed;if(!this.ul.is(":animated")){n.el.find(".dot:eq("+t+")").addClass("active").siblings().removeClass("active");this.el.animate(s,o)&&this.ul.animate(e.extend({left:"-"+t+"00%"},s),o,function(i){n.current=t;e.isFunction(n.opts.complete)&&!r&&n.opts.complete(n.el)})}};this.start=function(){n.interval=setInterval(function(){n.move(n.current+1)},n.opts.delay)};this.stop=function(){n.interval=clearInterval(n.interval);return n};this.keys=function(t){var r=t.which;var i={37:n.prev,39:n.next,27:n.stop};if(e.isFunction(i[r])){i[r]()}};this.next=function(){return n.stop().move(n.current+1)};this.prev=function(){return n.stop().move(n.current-1)};this.dots=function(){var t='
    ';e.each(this.items,function(e){t+='<li class="dot'+(e<1?" active":"")+'">'+(e+1)+""});t+="
";this.el.addClass("has-dots").append(t).find(".dot").click(function(){n.move(e(this).index())})}};e.fn.unslider=function(t){var r=this.length;return this.each(function(i){var s=e(this);var u=(new n).init(s,t);s.data("unslider"+(r>1?"-"+(i+1):""),u)})}})(window.jQuery,false);

// jQuery.event.swipe // 0.5 // Stephen Band

// Dependencies // jQuery.event.move 1.2

// One of swipeleft, swiperight, swipeup or swipedown is triggered on // moveend, when the move has covered a threshold ratio of the dimension // of the target node, or has gone really fast. Threshold and velocity // sensitivity changed with: // // jQuery.event.special.swipe.settings.threshold // jQuery.event.special.swipe.settings.sensitivity (function(module){if(typeof define==='function'&&define.amd){define(['jquery'],module);}else{module(jQuery);}})(function(jQuery,undefined){var add=jQuery.event.add,remove=jQuery.event.remove,trigger=function(node,type,data){jQuery.event.trigger(type,data,node);},settings={threshold:0.4,sensitivity:6};function moveend(e){var w,h,event;w=e.currentTarget.offsetWidth;h=e.currentTarget.offsetHeight;event={distX:e.distX,distY:e.distY,velocityX:e.velocityX,velocityY:e.velocityY,finger:e.finger};if(e.distX>e.distY){if(e.distX>-e.distY){if(e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swiperight';trigger(e.currentTarget,event);}} else{if(-e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipeup';trigger(e.currentTarget,event);}}} else{if(e.distX>-e.distY){if(e.distY/h>settings.threshold||e.velocityY*e.distY/w*settings.sensitivity>1){event.type='swipedown';trigger(e.currentTarget,event);}} else{if(-e.distX/w>settings.threshold||e.velocityX*e.distX/w*settings.sensitivity>1){event.type='swipeleft';trigger(e.currentTarget,event);}}}} function getData(node){var data=jQuery.data(node,'event_swipe');if(!data){data={count:0};jQuery.data(node,'event_swipe',data);} return data;} jQuery.event.special.swipe=jQuery.event.special.swipeleft=jQuery.event.special.swiperight=jQuery.event.special.swipeup=jQuery.event.special.swipedown={setup:function(data,namespaces,eventHandle){var data=getData(this);if(data.count++>0){return;} add(this,'moveend',moveend);return true;},teardown:function(){var data=getData(this);if(--data.count>0){return;} remove(this,'moveend',moveend);return true;},settings:settings};});

/*!

* toc - jQuery Table of Contents Plugin
* v0.3.2
* http://projects.jga.me/toc/
* copyright Greg Allen 2014
* MIT License
  • /
!function(a){a.fn.smoothScroller=function(b){b=a.extend({},a.fn.smoothScroller.defaults,b);var c=a(this);return a(b.scrollEl).animate({scrollTop:c.offset().top-a(b.scrollEl).offset().top-b.offset},b.speed,b.ease,function(){var a=c.attr("id");a.length&&(history.pushState?history.pushState(null,null,"#"+a):document.location.hash=a),c.trigger("smoothScrollerComplete")}),this},a.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0},a("body").on("click","[data-smoothscroller]",function(b){b.preventDefault();var c=a(this).attr("href");0===c.indexOf("#")&&a(c).smoothScroller()})}(jQuery),function(a){var b={};a.fn.toc=function(b){var c,d=this,e=a.extend({},jQuery.fn.toc.defaults,b),f=a(e.container),g=a(e.selectors,f),h=[],i=e.activeClass,j=function(b,c){if(e.smoothScrolling&&"function"==typeof e.smoothScrolling){b.preventDefault();var f=a(b.target).attr("href");e.smoothScrolling(f,e,c)}a("li",d).removeClass(i),a(b.target).parent().addClass(i)},k=function(){c&&clearTimeout(c),c=setTimeout(function(){for(var b,c=a(window).scrollTop(),f=Number.MAX_VALUE,g=0,j=0,k=h.length;k>j;j++){var l=Math.abs(h[j]-c);f>l&&(g=j,f=l)}a("li",d).removeClass(i),b=a("li:eq("+g+")",d).addClass(i),e.onHighlight(b)},50)};return e.highlightOnScroll&&(a(window).bind("scroll",k),k()),this.each(function(){var b=a(this),c=a(e.listType);g.each(function(d,f){var g=a(f);h.push(g.offset().top-e.highlightOffset);var i=e.anchorName(d,f,e.prefix);if(f.id!==i){a("<span/>").attr("id",i).insertBefore(g)}var l=a("<a/>").text(e.headerText(d,f,g)).attr("href","#"+i).bind("click",function(c){a(window).unbind("scroll",k),j(c,function(){a(window).bind("scroll",k)}),b.trigger("selected",a(this).attr("href"))}),m=a("
  • ").addClass(e.itemClass(d,f,g,e.prefix)).append(l);c.append(m)}),b.html(c)})},jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(b,c,d){a(b).smoothScroller({offset:c.scrollToOffset}).on("smoothScrollerComplete",function(){d()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:!0,highlightOffset:100,anchorName:function(c,d,e){if(d.id.length)return d.id;var f=a(d).text().replace(/[^a-z0-9]/gi," ").replace(/\s+/g,"-").toLowerCase();if(b[f]){for(var g=2;b[f+g];)g++;f=f+"-"+g}return b[f]=!0,e+"-"+f},headerText:function(a,b,c){return c.text()},itemClass:function(a,b,c,d){return d+"-"+c[0].tagName.toLowerCase()}}}(jQuery); // http://spoiledmilk.com/blog/sticky-sidebar/ (function ($) { $.fn.stickySidebar = function (options) { var config = $.extend({ headerSelector: 'header', navSelector: 'nav', contentSelector: '#content', footerSelector: 'footer', sidebarTopMargin: 20, footerThreshold: 40 }, options); var fixSidebr = function () { var sidebarSelector = $(this); var viewportHeight = $(window).height(); var viewportWidth = $(window).width(); var documentHeight = $(document).height(); var headerHeight = $(config.headerSelector).outerHeight(); var navHeight = $(config.navSelector).outerHeight(); var sidebarHeight = sidebarSelector.outerHeight(); var contentHeight = $(config.contentSelector).outerHeight(); var footerHeight = $(config.footerSelector).outerHeight(); var scroll_top = $(window).scrollTop(); var fixPosition = contentHeight - sidebarHeight; var breakingPoint1 = config.breakingPoint1 || (headerHeight + navHeight); var breakingPoint2 = documentHeight - (sidebarHeight + footerHeight + config.footerThreshold); // calculate if ((contentHeight > sidebarHeight) && (viewportHeight > sidebarHeight)) { if (scroll_top < breakingPoint1) { sidebarSelector.removeClass('sticky'); } else if ((scroll_top >= breakingPoint1) && (scroll_top < breakingPoint2)) { sidebarSelector.addClass('sticky').css('top', config.sidebarTopMargin); } else { var negative = breakingPoint2 - scroll_top; sidebarSelector.addClass('sticky').css('top', negative); } } }; return this.each(function () { $(window).on('scroll', $.proxy(fixSidebr, this)); $(window).on('resize', $.proxy(fixSidebr, this)) $.proxy(fixSidebr, this)(); }); }; }(jQuery));