색상대비 css 로드 관련 코드 추가
This commit is contained in:
17
head.php
17
head.php
@ -108,6 +108,23 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
<? // 색상대비 on/off
|
||||||
|
$cr_path = g4_path();
|
||||||
|
if($contrast_use == 'on') {
|
||||||
|
$cr_uri = $cr_path['curr_url'].'?contrast=off';
|
||||||
|
} else {
|
||||||
|
$cr_uri = $cr_path['curr_url'].'?contrast=on';
|
||||||
|
}
|
||||||
|
if($_SERVER['QUERY_STRING']) {
|
||||||
|
$query_string = preg_replace("/contrast=(on|off)&?/", "", $_SERVER['QUERY_STRING']);
|
||||||
|
if($query_string)
|
||||||
|
$cr_uri .= '&'.$query_string;
|
||||||
|
}
|
||||||
|
unset($cr_path);
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<a href="<?=$cr_uri;?>">색상대비</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
18
head.sub.php
18
head.sub.php
@ -28,6 +28,14 @@ header("Expires: 0"); // rfc2616 - Section 14.21
|
|||||||
header("Pragma: no-cache"); // HTTP/1.0
|
header("Pragma: no-cache"); // HTTP/1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 색상대비
|
||||||
|
if($_GET['contrast'] == 'on') {
|
||||||
|
set_session('ss_contrast_use', 'on');
|
||||||
|
} else if($_GET['contrast'] == 'off') {
|
||||||
|
set_session('ss_contrast_use', 'off');
|
||||||
|
}
|
||||||
|
$contrast_use = get_session('ss_contrast_use');
|
||||||
|
|
||||||
$g4_css = "";
|
$g4_css = "";
|
||||||
if (G4_IS_MOBILE) $g4_css = "mobile";
|
if (G4_IS_MOBILE) $g4_css = "mobile";
|
||||||
else $g4_css = "default";
|
else $g4_css = "default";
|
||||||
@ -40,9 +48,15 @@ else $g4_css = "default";
|
|||||||
<!-- <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> -->
|
<!-- <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> -->
|
||||||
<title><?=$g4_head_title?></title>
|
<title><?=$g4_head_title?></title>
|
||||||
<? if (isset($administrator)) { ?>
|
<? if (isset($administrator)) { ?>
|
||||||
<link rel="stylesheet" href="<?=G4_CSS_URL?>/adm.css?=<?=date("md")?>">
|
<link rel="stylesheet" href="<?=G4_CSS_URL?>/admin.css?=<?=date("md")?>">
|
||||||
|
<? if($contrast_use == 'on') { ?>
|
||||||
|
<link rel="stylesheet" href="<?=G4_CSS_URL?>/admin_cr.css?=<?=date("md")?>">
|
||||||
|
<? } ?>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<link rel="stylesheet" href="<?=G4_CSS_URL?>/<?=$g4_css?>.css?=<?=date("md")?>">
|
<link rel="stylesheet" href="<?=G4_CSS_URL?>/<?=$g4_css?>.css?=<?=date("md")?>">
|
||||||
|
<? if($contrast_use == 'on') { ?>
|
||||||
|
<link rel="stylesheet" href="<?=G4_CSS_URL?>/<?=$g4_css?>_cr.css?=<?=date("md")?>">
|
||||||
|
<? } ?>
|
||||||
<?}?>
|
<?}?>
|
||||||
<!--[if lte IE 8]>
|
<!--[if lte IE 8]>
|
||||||
<script src="<?=G4_JS_URL?>/html5.js"></script>
|
<script src="<?=G4_JS_URL?>/html5.js"></script>
|
||||||
@ -67,8 +81,10 @@ var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
|
|||||||
<script src="<?=G4_JS_URL?>/jquery-1.8.3.min.js"></script>
|
<script src="<?=G4_JS_URL?>/jquery-1.8.3.min.js"></script>
|
||||||
<script src="<?=G4_JS_URL?>/common.js"></script>
|
<script src="<?=G4_JS_URL?>/common.js"></script>
|
||||||
<script src="<?=G4_JS_URL?>/wrest.js"></script>
|
<script src="<?=G4_JS_URL?>/wrest.js"></script>
|
||||||
|
<? if(G4_IS_MOBILE) { ?>
|
||||||
<script>
|
<script>
|
||||||
document.cookie = "device_width=" + screen.width;
|
document.cookie = "device_width=" + screen.width;
|
||||||
</script>
|
</script>
|
||||||
|
<? } ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Reference in New Issue
Block a user