From 194e70c63b653fdcc86cb4f0ae2cc82b6583bd35 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 3 Apr 2015 21:01:04 +0900 Subject: [PATCH] =?UTF-8?q?#1354=20=EB=A9=94=EB=89=B4=20=EC=98=81=EC=97=AD?= =?UTF-8?q?=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EB=B0=8F=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/xedition/css/layout.css | 6 ++++ layouts/xedition/demo/welcome_main.html | 6 ++-- layouts/xedition/js/layout.js | 39 ++++++++++++++++++------- layouts/xedition/layout.html | 14 ++++----- 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/layouts/xedition/css/layout.css b/layouts/xedition/css/layout.css index ab4b0917f..4e8c66e8d 100644 --- a/layouts/xedition/css/layout.css +++ b/layouts/xedition/css/layout.css @@ -157,6 +157,12 @@ a:hover,a:active,a:focus{text-decoration:none} .gnb>ul .depth2 a:hover,.gnb>ul .depth2 a:active,.gnb>ul .depth2 a:focus,.gnb>ul .depth2>li.on>a{color:#cda25a} .gnb>ul .depth3{display:none;position:absolute;top:-8px;left:100%;z-index:2;padding:8px 0;background-color:#333} .gnb>ul .depth2>li.more>a:after{position:absolute;right:20px;content:'>'} +.onepage .header_wrap.shrink a, +.onepage .shrink .header > .side > ul > li > a {color: #444; } +.onepage .shrink .gnb {margin-top: 0; } +.magazine .shrink .gnb {margin-bottom: 10px; } +.magazine .shrink h1 {margin-top: 10px; } +.magazine .header_wrap.shrink .gnb > ul > li > a {line-height: 40px; } /* VISUAL */ .visual.sub{position:relative;padding:35px 0;background-color:#f6f6f6;line-height:30px} diff --git a/layouts/xedition/demo/welcome_main.html b/layouts/xedition/demo/welcome_main.html index f17e6aba8..e44b8f155 100644 --- a/layouts/xedition/demo/welcome_main.html +++ b/layouts/xedition/demo/welcome_main.html @@ -10,8 +10,8 @@

Beautiful iconpack
XEIcon

@@ -126,7 +126,7 @@

XE 자료실을 통해 나만의 홈페이지를 만들어보세요.

  • - GITHUB + GITHUB

    GITHUB

    오픈소스 프로젝트 개발참여를 위한 GitHub 페이지입니다.

  • diff --git a/layouts/xedition/js/layout.js b/layouts/xedition/js/layout.js index e84bb1813..0c58a03be 100644 --- a/layouts/xedition/js/layout.js +++ b/layouts/xedition/js/layout.js @@ -1,22 +1,38 @@ (function($){ + "use strict"; $(function(){ - var $shrinkHeaderHeight = 200; - var $fixedHeader = $('.header_wrap'); + var $fixedHeader = $('.fixed_header .header_wrap'); var $gnb = $('.gnb'); var $hoverEl = $('.hover'); var $searchEl = $('.click > a'); var $searchForm = $('.search_area'); // Fixed header - $(window).scroll(function() { - var scroll = $(this).scrollTop(); - if( scroll >= $shrinkHeaderHeight ) { - $fixedHeader.addClass('shrink') - } - else { - $fixedHeader.removeClass('shrink'); - } - }); + if($fixedHeader.length) + { + var fixedHeaderHeight = $fixedHeader.height(); + var hasClass = false; + $(window).scroll(function() { + var scroll = $(this).scrollTop(); + + if(scroll >= fixedHeaderHeight ) { + if(!hasClass) + { + $('body').css('padding-top', fixedHeaderHeight); + $fixedHeader.addClass('shrink'); + hasClass = true; + } + } else { + if(hasClass) + { + $('body').css('padding-top', 0); + $fixedHeader.removeClass('shrink'); + hasClass = false; + } + } + }); + $(window).triggerHandler('scroll'); + } // Gnb $gnb.find('>ul>li>a') @@ -108,6 +124,7 @@ })(jQuery); (function($) { + "use strict"; var $window = $(window); var windowHeight = $window.height(); diff --git a/layouts/xedition/layout.html b/layouts/xedition/layout.html index 854e9a1ac..92dea3e15 100644 --- a/layouts/xedition/layout.html +++ b/layouts/xedition/layout.html @@ -126,7 +126,7 @@
    -
    +
    @@ -148,15 +148,13 @@ {$layout_info->logo_text} - - XEDITION - - + + XEDITION + XEDITION Header : Magazine type - - + XEDITION - +