Team:CityU HK/Template
From 2014.igem.org
(Difference between revisions)
(141 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
<html> | <html> | ||
+ | <html lang="en"> | ||
- | < | + | <style> |
- | + | body { | |
- | + | /*background-color: #FFFFCC;*/ | |
- | + | background-size:contain; | |
- | + | background-repeat: no-repeat; | |
- | + | background-position:left; | |
- | + | background-attachment: fixed; | |
- | + | background-size: cover | |
- | + | } | |
- | + | ||
- | } | + | /* |
- | </ | + | Back to top button |
+ | */ | ||
+ | #back-top { | ||
+ | position: fixed; | ||
+ | bottom: 30px; | ||
+ | right:30px; | ||
+ | z-index:50; | ||
+ | } | ||
+ | #back-top a { | ||
+ | width: 50px; | ||
+ | display: block; | ||
+ | text-align: center; | ||
+ | font: 11px/100% Arial, Helvetica, sans-serif; | ||
+ | text-transform: uppercase; | ||
+ | text-decoration: none; | ||
+ | color: #bbb; | ||
+ | /* background color transition */ | ||
+ | -webkit-transition: 1s; | ||
+ | -moz-transition: 1s; | ||
+ | transition: 1s; | ||
+ | border-radius: 2px; | ||
+ | } | ||
+ | #back-top a:hover { | ||
+ | color: #000; | ||
+ | } | ||
+ | /* arrow icon (span tag) */ | ||
+ | #back-top span { | ||
+ | width: 50px; | ||
+ | height: 50px; | ||
+ | display: block; | ||
+ | background: #ddd url(https://static.igem.org/mediawiki/2014/5/57/Backtotop_BU14.png) no-repeat center center; | ||
+ | /* background color transition */ | ||
+ | -webkit-transition: 1s; | ||
+ | -moz-transition: 1s; | ||
+ | transition: 1s; | ||
+ | } | ||
+ | #back-top a:hover span { | ||
+ | background-color: #F68F52; | ||
+ | } | ||
+ | |||
+ | </style> | ||
<body> | <body> | ||
- | <div | + | <nav class="navbar navbar-default" role="navigation"> |
- | <a href="https://2014.igem.org/Main_Page | + | <div class="container-fluid"> |
+ | <!-- Brand and toggle get grouped for better mobile display --> | ||
+ | <div class="navbar-header" id="header"> | ||
+ | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | ||
+ | <span class="sr-only">Toggle navigation</span> | ||
+ | <span class="icon-bar"></span> | ||
+ | <span class="icon-bar"></span> | ||
+ | <span class="icon-bar"></span> | ||
+ | </button> | ||
+ | |||
+ | <a class="navbar-brand"> | ||
+ | <a class="navbar-brand" id="igem" href="https://2014.igem.org/Main_Page"><img src="https://static.igem.org/mediawiki/2014/d/d8/Team_Berlin_igem_logo.png" width="80px" height="70px"></a><a class="navbar-brand" href="https://2014.igem.org/Team:CityU_HK">City University of Hong Kong 2014</a> | ||
+ | </div> | ||
- | < | + | <!-- Collect the nav links, forms, and other content for toggling --> |
- | </div> | + | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
+ | <ul class="nav navbar-nav navbar-right"> | ||
+ | <li class="active"><a href="https://2014.igem.org/Team:CityU_HK">Home</a></li> | ||
+ | <li class="dropdown"> | ||
+ | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Team Members</a> | ||
+ | <ul class="dropdown-menu" role="menu"> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/TeamMember">Students</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/Team/instructors">Instructors & Advisors</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/Team/attribution">Attribution</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/Acknowledgement">Acknowledgement</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li class="dropdown"> | ||
+ | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Project</a> | ||
+ | <ul class="dropdown-menu" role="menu"> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/project/overview">Overview</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/project/module_fad">Modules description</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/project/result">Results</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/project/futureplan">Future Plan</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li class="dropdown"> | ||
+ | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Notebook</a> | ||
+ | <ul class="dropdown-menu" role="menu"> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/notebook/lablog">Lab Log</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/notebook/protocols">Protocol</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/notebook/safety">Safety</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li class="dropdown"> | ||
+ | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Achievement</a> | ||
+ | <ul class="dropdown-menu" role="menu"> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/achievement/medal_requirement">Medal Fulfillment</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/achievement/new_biobrick">New Biobricks</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li class="dropdown"> | ||
+ | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Human Practice</a> | ||
+ | <ul class="dropdown-menu" role="menu"> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/HumanPractice">Outreach</a></li> | ||
+ | <li><a href="https://2014.igem.org/Team:CityU_HK/collaboration">Collaborations</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </div><!-- /.navbar-collapse --> | ||
+ | </div><!-- /.container-fluid --> | ||
+ | </nav> | ||
- | < | + | <p id="back-top"> |
+ | <a href="#top"><span></span></a> | ||
+ | </p> | ||
- | |||
- | < | + | <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> |
- | + | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
- | + | <!-- Include all compiled plugins (below), or include individual files as needed --> | |
- | + | <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | <!--// Smooth scroll for in page links--> | |
- | + | <script> | |
- | + | $(document).ready(function() { | |
- | + | $('#btn-custom').click(function() { | |
- | + | $('html,body').animate({ | |
+ | scrollTop:$($.attr(this,'href')).offset().top},500); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | // bootstrap navbar hover dropdown | ||
+ | $(function(){ | ||
+ | $('.dropdown').hover(function() { | ||
+ | $(this).toggleClass('open'); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
- | + | <!--//back to top arrow--> | |
- | + | <script type="text/javascript"> | |
- | + | $(document).ready(function(){ | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | // hide #back-top first | |
+ | $("#back-top").hide(); | ||
+ | |||
+ | // fade in #back-top | ||
+ | $(function () { | ||
+ | $(window).scroll(function () { | ||
+ | if ($(this).scrollTop() > 100) { | ||
+ | $('#back-top').fadeIn(); | ||
+ | } else { | ||
+ | $('#back-top').fadeOut(); | ||
+ | } | ||
+ | }); | ||
- | + | // scroll body to 0px on click | |
- | < | + | $('#back-top a').click(function () { |
- | </body> | + | $('body,html').animate({ |
+ | scrollTop: 0 | ||
+ | }, 800); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | </script> | ||
+ | </body> | ||
</html> | </html> |
Latest revision as of 08:15, 17 October 2014