테마 모바일 수정중

This commit is contained in:
thisgun
2017-09-01 14:53:27 +09:00
parent bb896d81aa
commit b5b4c67bcd
11 changed files with 67 additions and 43 deletions
+25 -17
View File
@@ -19,7 +19,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
</div>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
</div>
<button type="button" id="top_btn">상단으로</button>
<button type="button" id="top_btn"><i class="fa fa-arrow-up" aria-hidden="true"></i><span class="sound_only">상단으로</span></button>
<?php
if(G5_DEVICE_BUTTON_DISPLAY && G5_IS_MOBILE) { ?>
<a href="<?php echo get_device_change_url(); ?>" id="device_change">PC 버전으로 보기</a>
@@ -35,28 +35,36 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<script>
$(function() {
// 폰트 리사이즈 쿠키있으면 실행
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
});
jQuery(function($) {
//상단고정
$(window).scroll(function(){
var sticky = $('.top'),
scroll = $(window).scrollTop();
$( document ).ready( function() {
if (scroll >= 50) sticky.addClass('fixed');
else sticky.removeClass('fixed');
});
// 폰트 리사이즈 쿠키있으면 실행
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
//상단고정
if( $(".top").length ){
var jbOffset = $(".top").offset();
$( window ).scroll( function() {
if ( $( document ).scrollTop() > jbOffset.top ) {
$( '.top' ).addClass( 'fixed' );
}
else {
$( '.top' ).removeClass( 'fixed' );
}
});
}
//상단으로
$("#top_btn").on("click", function() {
$("html, body").animate({scrollTop:0}, '500');
return false;
});
//상단으로
$(function() {
$("#top_btn").on("click", function() {
$("html, body").animate({scrollTop:0}, '500');
return false;
});
});
</script>
<?php
include_once(G5_THEME_PATH."/tail.sub.php");
?>