Difference between revisions of "Template:Kyoto"

Line 556: Line 556:
 
#menu_content { display:block;}
 
#menu_content { display:block;}
 
.menu_button.direct_to_page {padding-left: 17px;}
 
.menu_button.direct_to_page {padding-left: 17px;}
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
  
 
}
 
}
Line 574: Line 574:
 
.menu_button.direct_to_page { padding-left: 36px; }
 
.menu_button.direct_to_page { padding-left: 36px; }
 
 
        <script>
 
var pc_width = 1080;
 
var device = (screen.width < 600 ? 'sp' : 'pc');
 
var view_mode = (device == 'pc' || document.cookie.indexOf('view_mode=pc') != -1 ? 'pc' : 'sp');
 
if (device == 'sp' && view_mode == 'pc') {
 
    document.getElementsByName('viewport')[0].setAttribute('content', 'width=' + pc_width + ',initial-scale=1');
 
}
 
 
$(function () {
 
    if (device == 'sp') {
 
        if (view_mode == 'pc') {
 
            $('.sp-mode').on('click', function () {
 
                var date = new Date();
 
                date.setTime(0);
 
                document.cookie = 'view_mode=;expires='+date.toGMTString();
 
                location.reload(false);
 
            }).show();
 
        } else {
 
            $('.pc-mode').on('click', function () {
 
                document.cookie = 'view_mode=pc';
 
                location.reload(false);
 
            }).show();
 
        }
 
    }
 
});
 
</script>
 
 
 
  
   
+
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
         }
 
         }
  
Line 631: Line 603:
  
 
<!-- This tells the browser that your page is responsive -->
 
<!-- This tells the browser that your page is responsive -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" #contents {
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">  
width:100%;
+
}
+
#cont_left {
+
width:100%;
+
}
+
#cont_right {
+
width:100%;
+
}>
+
<script type="text/javascript">
+
var ua = navigator.userAgent;
+
if(ua.indexOf('iPhone') != -1 || ua.indexOf('Android') != -1){
+
//iPhone & Android
+
document.write('<link rel="stylesheet" href="style_mb.css">');
+
}else{
+
//PC
+
document.write('<link rel="stylesheet" href="style.css">');
+
}
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
</script>
+
  
 
</head>
 
</head>

Revision as of 05:14, 8 October 2018