Team:Calgary/Sandbox
From 2013.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
- | |||
<html> | <html> | ||
- | < | + | <head> |
- | < | + | <!-- Reset for BodyContent --> |
- | + | <style> | |
- | + | #content{ | |
- | + | width: 100%; | |
- | + | margin: 0; | |
- | + | padding: 0; | |
- | + | background-color:transparent; | |
- | + | border: none; | |
- | + | } | |
- | + | ||
- | + | #bodyContent{ | |
- | </ | + | width: 100%; |
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | background-color:transparent; | ||
+ | border: none; | ||
+ | } | ||
+ | </style> | ||
- | < | + | <!-- Fonts --> |
- | + | <link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500' rel='stylesheet' type='text/css'> | |
- | + | <link href='http://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700,800,900' rel='stylesheet' type='text/css'> | |
- | + | <link href='http://fonts.googleapis.com/css?family=Josefin+Sans:700' rel='stylesheet' type='text/css'> | |
- | + | <link href='http://fonts.googleapis.com/css?family=Cabin:400,700,400italic,700italic' rel='stylesheet' type='text/css'> | |
- | + | ||
- | + | ||
- | + | ||
- | </ | + | |
- | < | + | <!-- CSS --> |
- | + | <link href="https://2013.igem.org/Team:Calgary/Sandbox/StyleSheets/Reset?action=raw&ctype=text/css" rel="stylesheet"> | |
- | + | <link href="https://2013.igem.org/Team:Calgary/Sandbox/StyleSheets/Navigation?action=raw&ctype=text/css" rel="stylesheet"> | |
- | + | <link href="https://2013.igem.org/Team:Calgary/Sandbox/StyleSheets/HomePage?action=raw&ctype=text/css" rel="stylesheet"> | |
- | + | ||
- | + | <!-- JavaScript and JQuery --> | |
- | </ | + | <script> |
+ | $(document).ready(function() { | ||
+ | if ($('body').width() > 868) { | ||
+ | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2)); | ||
+ | $('#LogoItem').css('display', 'block'); | ||
+ | } | ||
+ | else if ($('body').width() <= 868) { | ||
+ | if ($('body').width() > 744) { | ||
+ | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 744) / 2)); | ||
+ | $('#LogoItem').css('display', 'none'); | ||
+ | } | ||
+ | } | ||
+ | var ScreenWidth = $('body').width(); | ||
+ | if (ScreenWidth > 1007) { | ||
+ | var Margins = Math.floor(ScreenWidth * .086666); | ||
+ | var ElementWidth = Math.floor(ScreenWidth * .37); | ||
+ | |||
+ | $('#SectionLinks').css('padding-left', Margins); | ||
+ | $('#SectionLinks').css('padding-top', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('margin-right', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('margin-bottom', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('width', ElementWidth); | ||
+ | } | ||
- | + | $(window).resize(function() { | |
- | + | if ($('body').width() > 868) { | |
- | < | + | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2)); |
- | + | $('#LogoItem').css('display', 'block'); | |
- | </ | + | } |
- | + | else if ($('body').width() <= 868) { | |
+ | if ($('body').width() > 744) { | ||
+ | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 744) / 2)); | ||
+ | $('#LogoItem').css('display', 'none'); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | var ScreenWidth = $('body').width(); | ||
+ | if (ScreenWidth > 1007) { | ||
+ | var Margins = Math.floor(ScreenWidth * .086666); | ||
+ | var ElementWidth = Math.floor(ScreenWidth * .37); | ||
+ | |||
+ | $('#SectionLinks').css('padding-left', Margins); | ||
+ | $('#SectionLinks').css('padding-top', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('margin-right', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('margin-bottom', Margins); | ||
+ | $('#SectionLinks .DescriptionLink').css('width', ElementWidth); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | <script> | ||
+ | $(document).ready(function() { | ||
+ | //Set height of slider (12/7 ratio) | ||
+ | $('#Slider').css('height', ($('body').width() / 2.4)); | ||
- | + | //Position right/left arrows | |
- | + | var BarHeight = $('#Slider').height() - $('#BottomLinks').height(); | |
- | + | $('#LeftBar, #RightBar').css('height', BarHeight); | |
- | + | $('#LeftArrow, #RightArrow').css('top', (BarHeight-60)/2); | |
- | + | ||
- | + | //Repeats for window resize | |
+ | $(window).resize(function() { | ||
+ | $('#Slider').css('height', ($('body').width() / 2.4)); | ||
+ | |||
+ | var BarHeight = $('#Slider').height() - $('#BottomLinks').height(); | ||
+ | $('#LeftBar, #RightBar').css('height', BarHeight); | ||
+ | $('#LeftArrow, #RightArrow').css('top', (BarHeight-60)/2); | ||
+ | }); | ||
+ | |||
+ | // var preloadImages = ['TestSlide0.jpg','TestSlide1.jpg','TestSlide2.jpg','TestSlide3.jpg','TestSlide4.jpg']; | ||
+ | // var images = []; | ||
+ | // for (var count = 0; count < preloadImages.length; count++) { | ||
+ | // images[count] = new Image(); | ||
+ | // images[count].src = preloadImages[count]; | ||
+ | // } | ||
- | < | + | var TotalSlides = $('.Slides').length |
- | < | + | var CurrentSlide = 0; |
- | < | + | |
- | + | $('#RightArrow').click(function() { | |
- | </ | + | CurrentSlide = ++CurrentSlide % TotalSlides; |
- | </ | + | $('.Slides').css('display', 'none'); |
- | </ | + | SlideID = '#Slide' + CurrentSlide; |
+ | $(SlideID).css('display', 'block'); | ||
+ | |||
+ | }); | ||
+ | |||
+ | $('#LeftArrow').click(function() { | ||
+ | CurrentSlide = (CurrentSlide + TotalSlides - 1) % TotalSlides; | ||
+ | $('.Slides').css('display', 'none'); | ||
+ | SlideID = '#Slide' + CurrentSlide; | ||
+ | $(SlideID).css('display', 'block'); | ||
+ | |||
+ | }); | ||
+ | |||
+ | $('.SlideLink').click(function() { | ||
+ | var ClickedSlide = $(this).attr('id'); | ||
+ | CurrentSlide = parseInt(ClickedSlide.replace('Link', '')); | ||
+ | $('.Slides').css('display', 'none'); | ||
+ | SlideID = '#Slide' + CurrentSlide; | ||
+ | $(SlideID).css('display', 'block'); | ||
+ | |||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | </head> | ||
+ | |||
+ | <body> | ||
+ | <header id="TopBar"> | ||
+ | <ul id="TopLvlNav"> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/">Home</a></li> | ||
+ | <li> | ||
+ | <a href="https://2013.igem.org/Team:Calgary/Sandbox/Project">Project</a> | ||
+ | <ul> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Tales">Tales</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Ferritin">Ferritin</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Linker">Linker</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Engineering">Engineering</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/HumanPractices">Human Practices</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/References">References</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Attributions">Attributions</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Project/Sponsors">Sponsors</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2013.igem.org/Team:Calgary/Sandbox/OurTeam">Our Team</a> | ||
+ | <ul> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/OurTeam/TeamMembers">Team Members</a></li> | ||
+ | <li><a href="https://igem.org/Team.cgi?id=1189" target="_blank">Our Profile</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/OurTeam/TheUniversity">The<br>University</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/OurTeam/ContactUs">Contact Us</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li id="LogoItem"><img id="NavLogo" src="HexLogo.png"></li> | ||
+ | <li> | ||
+ | <a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook">Notebook</a> | ||
+ | <ul> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal">Journal</a> | ||
+ | <ul> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal/TalesJournal">Tales</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal/FerritinJournal">Ferritin</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal/LinkerJournal">Linker</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal/EngineeringJournal">Engineering</a></li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Journal/HumanPracticesJournal">Human Practices</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Protocols">Protocols</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li><a href="https://2013.igem.org/Team:Calgary/Sandbox/Notebook/Parts">Parts</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2013.igem.org/Team:Calgary/Sandbox/Outreach">Outreach</a> | ||
+ | <ul> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | <li><a href="#">Sub-Page</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2013.igem.org" target="_blank">iGEM</a> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </header> | ||
+ | |||
+ | <div id="NavHeight"></div> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 22:26, 16 August 2013