merge 처리
This commit is contained in:
@ -119,8 +119,9 @@ function imageview(id, w, h)
|
|||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="text_size">
|
<div id="text_size">
|
||||||
<button class="no_text_resize" onclick="font_resize('container', 'default');">기본</button>
|
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
|
||||||
<button class="no_text_resize" onclick="font_resize('container', 'large');">크게</button>
|
<button onclick="font_resize('container', 'ts_up ts_up2', '');">기본</button>
|
||||||
<button class="no_text_resize" onclick="font_resize('container', 'larger');">더크게</button>
|
<button onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');">크게</button>
|
||||||
|
<button onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');">더크게</button>
|
||||||
</div>
|
</div>
|
||||||
<h1><?php echo $g5['title'] ?></h1>
|
<h1><?php echo $g5['title'] ?></h1>
|
||||||
|
|||||||
@ -9,10 +9,12 @@ h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
|
|||||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
||||||
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
|
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
|
||||||
label, input, select, img {vertical-align:middle}
|
label, input, select, img {vertical-align:middle}
|
||||||
|
|
||||||
select {font-size:1em}
|
select {font-size:1em}
|
||||||
input {margin:0;padding:0;border-radius:0;font-family:dotum}
|
input {margin:0;padding:0;border-radius:0;font-family:dotum}
|
||||||
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
|
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
|
||||||
button {border-radius:0;font-size:1em;-webkit-appearance:none}
|
button {border-radius:0;font-size:1em;-webkit-appearance:none}
|
||||||
|
|
||||||
p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
|
p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
|
||||||
hr {display:none}
|
hr {display:none}
|
||||||
pre {overflow-x:scroll;font-size:1.1em}
|
pre {overflow-x:scroll;font-size:1.1em}
|
||||||
|
|||||||
7
head.php
7
head.php
@ -168,7 +168,8 @@ if ($config['cf_include_head']) {
|
|||||||
<div id="container">
|
<div id="container">
|
||||||
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
|
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
|
||||||
<div id="text_size">
|
<div id="text_size">
|
||||||
<button id="text_size_down" class="no_text_resize" onclick="font_resize('container', 'default');">기본</button>
|
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
|
||||||
<button id="text_size_def" class="no_text_resize" onclick="font_resize('container', 'large');">크게</button>
|
<button id="text_size_down" onclick="font_resize('container', 'ts_up ts_up2', '');">기본</button>
|
||||||
<button id="text_size_up" class="no_text_resize" onclick="font_resize('container', 'larger');">더크게</button>
|
<button id="text_size_def" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');">크게</button>
|
||||||
|
<button id="text_size_up" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');">더크게</button>
|
||||||
</div>
|
</div>
|
||||||
@ -161,7 +161,8 @@ $dir_arr = array (
|
|||||||
$data_path.'/file',
|
$data_path.'/file',
|
||||||
$data_path.'/log',
|
$data_path.'/log',
|
||||||
$data_path.'/member',
|
$data_path.'/member',
|
||||||
$data_path.'/session'
|
$data_path.'/session',
|
||||||
|
$data_path.'/tmp'
|
||||||
);
|
);
|
||||||
|
|
||||||
for ($i=0; $i<count($dir_arr); $i++) {
|
for ($i=0; $i<count($dir_arr); $i++) {
|
||||||
|
|||||||
91
js/common.js
91
js/common.js
@ -393,97 +393,16 @@ $(function() {
|
|||||||
/**
|
/**
|
||||||
* 텍스트 리사이즈
|
* 텍스트 리사이즈
|
||||||
**/
|
**/
|
||||||
var default_font_size_saved = false;
|
function font_resize(id, rmv_class, add_class)
|
||||||
var default_line_height_saved = false;
|
|
||||||
function font_resize(id, act)
|
|
||||||
{
|
{
|
||||||
var $elements = $("#"+id+" *").not("select").not("option");
|
var $el = $("#"+id);
|
||||||
$elements.removeClass("applied");
|
|
||||||
|
|
||||||
// 폰트 크기 변경에 따른 line-height 적용
|
$el.removeClass(rmv_class).addClass(add_class);
|
||||||
var lh = 1.5;
|
|
||||||
if(act == "default")
|
|
||||||
lh = ""
|
|
||||||
|
|
||||||
$("#"+id+" *").css("line-height", lh);
|
set_cookie("ck_font_resize_rmv_class", rmv_class, 1, g5_cookie_domain);
|
||||||
|
set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain);
|
||||||
// 엘리먼트의 기본 폰트사이즈 저장
|
|
||||||
if(!default_font_size_saved) {
|
|
||||||
save_default_font_size($elements);
|
|
||||||
}
|
|
||||||
|
|
||||||
$elements.each(function() {
|
|
||||||
if($(this).hasClass("no_text_resize"))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if($(this).data("fs")) {
|
|
||||||
set_font_size($(this), act)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
set_cookie("ck_font_resize_act", act, 1, g5_cookie_domain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* font size 적용
|
|
||||||
**/
|
|
||||||
function set_font_size($el, act)
|
|
||||||
{
|
|
||||||
if($el.hasClass("applied"))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
var x = 0;
|
|
||||||
var fs = $el.data("fs");
|
|
||||||
var unit = fs.replace(/[0-9\.]/g, "");
|
|
||||||
var fsize = parseFloat(fs.replace(/[^0-9\.]/g, ""));
|
|
||||||
var nfsize;
|
|
||||||
|
|
||||||
if(!fsize)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(unit == "em")
|
|
||||||
x = 1;
|
|
||||||
|
|
||||||
switch(act) {
|
|
||||||
case "large":
|
|
||||||
nfsize = fsize * 1.5;
|
|
||||||
break;
|
|
||||||
case "larger":
|
|
||||||
nfsize = fsize * 2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
nfsize = fsize;
|
|
||||||
lh = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
nfsize = nfsize.toFixed(x);
|
|
||||||
|
|
||||||
$el.css("font-size", nfsize+unit).addClass("applied");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 기본 font size .data()에 저장
|
|
||||||
**/
|
|
||||||
function save_default_font_size($el)
|
|
||||||
{
|
|
||||||
$el.each(function() {
|
|
||||||
// 텍스트노드 있는지 체크
|
|
||||||
var text = $(this).contents().filter(function() {
|
|
||||||
return this.nodeType == 3;
|
|
||||||
}).text().replace(/\s*/, "");
|
|
||||||
|
|
||||||
if(text.length) {
|
|
||||||
$(this).data("fs", $(this).css("font-size"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
default_font_size_saved = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
$(".win_point").click(function() {
|
$(".win_point").click(function() {
|
||||||
win_point(this.href);
|
win_point(this.href);
|
||||||
|
|||||||
5
tail.php
5
tail.php
@ -68,10 +68,7 @@ if ($config['cf_analytics']) {
|
|||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
// 폰트 리사이즈 쿠키있으면 실행
|
// 폰트 리사이즈 쿠키있으면 실행
|
||||||
var font_resize_act = get_cookie("ck_font_resize_act");
|
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
|
||||||
if(font_resize_act != "") {
|
|
||||||
font_resize("container", font_resize_act);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user