Team:CityU HK/Template
From 2014.igem.org
(Difference between revisions)
(74 intermediate revisions not shown) | |||
Line 3: | Line 3: | ||
<html> | <html> | ||
<html lang="en"> | <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> | ||
Line 16: | Line 69: | ||
</button> | </button> | ||
- | <a class="navbar-brand" | + | <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> | </div> | ||
Line 29: | Line 80: | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Team Members</a> | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Team Members</a> | ||
<ul class="dropdown-menu" role="menu"> | <ul class="dropdown-menu" role="menu"> | ||
- | <li><a href="https://2014.igem.org/Team:CityU_HK/ | + | <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/ | + | <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/ | + | <li><a href="https://2014.igem.org/Team:CityU_HK/Team/attribution">Attribution</a></li> |
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/Acknowledgement">Acknowledgement</a></li> |
- | + | ||
</ul> | </ul> | ||
</li> | </li> | ||
Line 39: | Line 89: | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project</a> | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Project</a> | ||
<ul class="dropdown-menu" role="menu"> | <ul class="dropdown-menu" role="menu"> | ||
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/project/overview">Overview</a></li> |
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/project/module_fad">Modules description</a></li> |
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/project/result">Results</a></li> |
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/project/futureplan">Future Plan</a></li> |
</ul> | </ul> | ||
</li> | </li> | ||
Line 50: | Line 100: | ||
<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/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/protocols">Protocol</a></li> | ||
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/notebook/safety">Safety</a></li> |
</ul> | </ul> | ||
</li> | </li> | ||
Line 56: | Line 106: | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Achievement</a> | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Achievement</a> | ||
<ul class="dropdown-menu" role="menu"> | <ul class="dropdown-menu" role="menu"> | ||
- | <li><a href=" | + | <li><a href="https://2014.igem.org/Team:CityU_HK/achievement/medal_requirement">Medal Fulfillment</a></li> |
- | <li><a href=" | + | <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> | </ul> | ||
</li> | </li> | ||
- | |||
</ul> | </ul> | ||
</div><!-- /.navbar-collapse --> | </div><!-- /.navbar-collapse --> | ||
</div><!-- /.container-fluid --> | </div><!-- /.container-fluid --> | ||
</nav> | </nav> | ||
- | + | ||
+ | <p id="back-top"> | ||
+ | <a href="#top"><span></span></a> | ||
+ | </p> | ||
+ | |||
+ | |||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | ||
Line 74: | Line 135: | ||
<script> | <script> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
- | $(' | + | $('#btn-custom').click(function() { |
$('html,body').animate({ | $('html,body').animate({ | ||
scrollTop:$($.attr(this,'href')).offset().top},500); | scrollTop:$($.attr(this,'href')).offset().top},500); | ||
Line 88: | Line 149: | ||
}); | }); | ||
</script> | </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,html').animate({ | ||
+ | scrollTop: 0 | ||
+ | }, 800); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 08:15, 17 October 2014