Template:Team:KIT-Kyoto/mobile
From 2014.igem.org
(Difference between revisions)
(191 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | <div class="clear"><hr /></div> | ||
+ | <div id="mobilemenu"> | ||
+ | <mheader> | ||
+ | <div class="m_title"><a href="javascript:void(0);">KIT-Kyoto</a></div> | ||
+ | <div class="button-toggle">☰</div> | ||
+ | <div class="m_menu"> | ||
+ | <ul class="m_menu_left"> | ||
+ | <li><a href="/Team:KIT-Kyoto">Home</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/About">About Us</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Acknowledgements">Acknowledgements</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Project">Project</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Parts">Parts</a></li> | ||
+ | </ul> | ||
+ | <ul class="m_menu_right"> | ||
+ | <li><a href="/Team:KIT-Kyoto/Modeling">Modeling</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/HumanPractice">Policy&Practices</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Safety">Safety</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Achievement">Achievement</a></li> | ||
+ | <li><a href="/Team:KIT-Kyoto/Notebook">Notebook</a></li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | </mheader> | ||
+ | </div> | ||
<head> | <head> | ||
<meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | <meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | ||
+ | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | ||
+ | <script type="text/javascript"> | ||
+ | $(function(){ | ||
+ | var ua = navigator.userAgent; | ||
+ | if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){ | ||
+ | var mt = function(){ | ||
+ | var tw = $('.main-contents').width(); | ||
+ | $('.m_table,.member_box_before,.member_box_after,.member_img_profile,#ln img').css({width:tw}); | ||
+ | } | ||
+ | $(function(){ | ||
+ | mt(); | ||
+ | $(window).resize(mt); | ||
+ | }); | ||
+ | |||
+ | $(".m_menu").css("display","none"); | ||
+ | $(".button-toggle").on("click", function() { | ||
+ | $(".m_menu").slideToggle(); | ||
+ | }); | ||
+ | var top = $('#mobilemenu'); | ||
+ | $(window).scroll(function () { | ||
+ | if ($(this).scrollTop() > 150) {top.fadeOut();} | ||
+ | else {top.fadeIn ();} | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $(function(){ | ||
+ | var ua = navigator.userAgent; | ||
+ | if(ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 || ua.indexOf('BlackBerry') > 0 || ua.indexOf('Windows Phone') > 0){ | ||
+ | $(".accordion").addClass('m-active'); | ||
+ | $(".ac").eq(0).show(); | ||
+ | } | ||
+ | $(".m-active h2 a").click(function(){ | ||
+ | var num = $(".m-active h2 a").index(this); | ||
+ | var ac =$(".ac").eq(num); | ||
+ | if(ac.is(':hidden')){ | ||
+ | ac.slideDown(); | ||
+ | }else { | ||
+ | ac.slideUp(); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
<style type="text/css"> | <style type="text/css"> | ||
- | @media screen and (max-width: | + | div#mobilemenu{ |
+ | display:none; | ||
+ | position:fixed; | ||
+ | top:0; | ||
+ | left:0; | ||
+ | margin-top:14px; | ||
+ | z-index:4; | ||
+ | } | ||
+ | mheader { | ||
+ | width:100%; | ||
+ | position:fixed; | ||
+ | background: rgba(0,0,0,0.7); | ||
+ | border-bottom: 2px solid rgba(0,200,0,0.7); | ||
+ | height: 50px; | ||
+ | } | ||
+ | |||
+ | |||
+ | .button-toggle { | ||
+ | position: absolute; | ||
+ | z-index:10; | ||
+ | float: left; | ||
+ | width: 30px; | ||
+ | height: 30px; | ||
+ | margin: 10px; | ||
+ | color: #aaa; | ||
+ | font-size: 30px; | ||
+ | line-height: 30px; | ||
+ | text-align: center; | ||
+ | box-shadow: 0 0 0 2px #555; | ||
+ | cursor:pointer; | ||
+ | } | ||
+ | |||
+ | .m_title { | ||
+ | float: left; | ||
+ | height: 5px; | ||
+ | line-height: 50px; | ||
+ | width: 100%; | ||
+ | text-align: center; | ||
+ | } | ||
+ | |||
+ | .m_title { | ||
+ | margin: 3px; | ||
+ | font-size: 20px; | ||
+ | } | ||
+ | |||
+ | .m_title a { | ||
+ | color: #aaa; | ||
+ | text-decoration: none; | ||
+ | } | ||
+ | |||
+ | .m_menu { | ||
+ | position: absolute; | ||
+ | top:50px; | ||
+ | width: 100%; | ||
+ | background: rgba(0,0,0,0.8); | ||
+ | color: #999; | ||
+ | overflow: hidden; | ||
+ | } | ||
+ | |||
+ | .m_menu_left{ | ||
+ | float:left; | ||
+ | width:50%; | ||
+ | } | ||
+ | |||
+ | .m_menu_right{ | ||
+ | float:right; | ||
+ | width:50%; | ||
+ | } | ||
+ | |||
+ | .m_menu ul { | ||
+ | padding: 0; | ||
+ | margin: 0; | ||
+ | list-style: none; | ||
+ | } | ||
+ | |||
+ | .m_menu li { | ||
+ | position: relative; | ||
+ | } | ||
+ | |||
+ | .m_menu a { | ||
+ | display: block; | ||
+ | color: #999; | ||
+ | text-decoration: none; | ||
+ | padding: 3px 20px; | ||
+ | height: 30px; | ||
+ | border-bottom: 1px solid rgba(0,200,0,0.3); | ||
+ | line-height: 40px; | ||
+ | font-size: 15px; | ||
+ | } | ||
+ | |||
+ | .m_menu a:hover { | ||
+ | background: #333; | ||
+ | } | ||
+ | |||
+ | @media screen and (max-width: 568px) { | ||
+ | *{ | ||
+ | font-size:14px; | ||
+ | } | ||
+ | |||
+ | h1{ | ||
+ | font-size:30px; | ||
+ | } | ||
+ | h2{ | ||
+ | font-size:22px; | ||
+ | } | ||
+ | h2 a{ | ||
+ | font-size:22px; | ||
+ | } | ||
+ | h2 em{ | ||
+ | font-size:22px; | ||
+ | } | ||
+ | div#mobilemenu{ | ||
+ | display:inline; | ||
+ | } | ||
+ | body{ | ||
+ | -webkit-text-size-adjust : 100%; | ||
+ | } | ||
.bgimg{ | .bgimg{ | ||
display:none; | display:none; | ||
Line 14: | Line 196: | ||
} | } | ||
div#container{ | div#container{ | ||
- | |||
margin:0px 0px; | margin:0px 0px; | ||
- | |||
padding:0px; | padding:0px; | ||
left:0px; | left:0px; | ||
} | } | ||
- | + | div#container div.main-contents{ | |
- | width: | + | box-sizing:border-box; |
- | + | width:auto; | |
- | + | min-width:0px; | |
- | + | margin:74px 10px 10px 10px; | |
+ | padding:10px; | ||
} | } | ||
.sub{ | .sub{ | ||
Line 40: | Line 221: | ||
padding:0px; | padding:0px; | ||
margin:0px; | margin:0px; | ||
- | |||
} | } | ||
- | # | + | .sentence,ul.procedure{ |
+ | font-size:13px; | ||
+ | line-height:1.5em; | ||
+ | } | ||
+ | |||
+ | #kitfooter{ | ||
display:none; | display:none; | ||
} | } | ||
- | + | #kitfooter-box img{ | |
- | margin:0px; | + | position:relative; |
+ | z-index:0; | ||
+ | } | ||
+ | .kitimg{ | ||
+ | margin:15px 15px 15px -60px; | ||
+ | float:none; | ||
+ | position:relative; | ||
+ | left:50%; | ||
+ | } | ||
+ | div#igem a{ | ||
+ | position:fixed; | ||
+ | z-index:10; | ||
+ | bottom:0; | ||
+ | top:auto; | ||
+ | right:0; | ||
+ | width:80px; | ||
+ | height:80px; | ||
+ | background:url("https://static.igem.org/mediawiki/2014/3/3f/Kit_Igem_m.png") no-repeat 0 0; | ||
+ | -webkit-background-size:80px 80px; | ||
+ | background-size:80px 80px; | ||
+ | } | ||
+ | div#igem{ | ||
+ | z-index:10; | ||
+ | } | ||
+ | .box1,.box2 { | ||
+ | display:none; | ||
+ | } | ||
+ | #page-top{ | ||
+ | right:100px; | ||
+ | bottom:10px; | ||
+ | z-index:10; | ||
+ | } | ||
+ | .accordion h2 a{ | ||
+ | position: relative; | ||
+ | display: block; | ||
+ | cursor: pointer; | ||
+ | } | ||
+ | div.ac { | ||
+ | display:none; | ||
+ | } | ||
+ | |||
+ | .hp_top{ | ||
+ | width:100%; | ||
+ | height:100%; | ||
+ | margin-left:-50%; | ||
+ | } | ||
+ | .member_img_profile{ | ||
+ | margin:5px auto; | ||
+ | width:auto; | ||
+ | } | ||
+ | |||
+ | .img_after,.img_before{ | ||
+ | left:0; | ||
+ | } | ||
+ | .img_after{ | ||
+ | z-index:2; | ||
+ | } | ||
+ | .img_before{ | ||
+ | z-index:3; | ||
+ | } | ||
+ | |||
+ | .member_box_before,.member_box_after{ | ||
+ | width:auto; | ||
+ | text-align:left; | ||
+ | } | ||
+ | |||
+ | .m_table{ | ||
+ | overflow:scroll; | ||
+ | margin:5px 0px; | ||
+ | } | ||
+ | |||
+ | .show,.hide{ | ||
+ | position:relative; | ||
+ | } | ||
} | } | ||
+ | |||
</style> | </style> | ||
+ | |||
</head> | </head> |
Latest revision as of 01:19, 18 October 2014