Warning: Undefined array key "mobile_dir" in /home/kagla/new-sir/old/common.php on line 315
모바일 메인 페이지 메뉴 노출 관련 도움 부탁드립니다!!

모바일 메인 페이지 메뉴 노출 관련 도움 부탁드립니다!!

모바일 메인 페이지 메뉴 노출 관련 도움 부탁드립니다!!

QA

모바일 메인 페이지 메뉴 노출 관련 도움 부탁드립니다!!

답변 1

본문

안녕하세요^^ 그누보드5 QA에서 많은 조언관 도움을 받고 있는 유저입니다!!

현재 그누보드5 + GNUXE 빌더를 쓰고 있는데, 모바일 메인 페이지 메뉴 노출 관련 조언 부탁드립니다~

 

현재 접속 시, 하단 이미지처럼 우측상단 메뉴 버튼을 눌러야 2번째 이미지처럼 메뉴가 보여집니다.

 

ccb796eb9c11a861a986f2e3ee5b2765_1409798820_9488.PNG

 

메뉴 노출 이미지
ccb796eb9c11a861a986f2e3ee5b2765_1409798821_2329.PNG
 

이 부분을 접속시 메뉴 노출이 돼있도록 바꾸고 싶은데 어느 부분을 수정해야 할까요?

아래 소스를 수정해야 할 거 같은데, 도움 부탁드립니다^^

 

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<header id="hd">
    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1>


    <div class="to_content"><a href="#container">본문 바로가기</a></div>


    <div id="hd_wrapper">


        <div id="logo">
            <a href="<?php echo G5_URL ?>" style="font-size:18px;font-weight:bold"><?php echo $config['cf_title']; ?></a>
        </div>


        <button type="button" id="gnb_open" class="hd_opener">메뉴<span class="sound_only"> 열기</span></button>


        <div id="gnb" class="hd_div">
            <ul id="gnb_1dul">
            <?php
            $sql = " select *
                        from {$g5['menu_table']}
                        where me_mobile_use = '1'
                          and length(me_code) = '2'
                        order by me_order, me_id ";
            $result = sql_query($sql, false);


            for($i=0; $row=sql_fetch_array($result); $i++) {
            ?>
                <li class="gnb_1dli">
                    <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_1da"><?php echo $row['me_name'] ?></a>
                    <?php
                    $sql2 = " select *
                                from {$g5['menu_table']}
                                where me_mobile_use = '1'
                                  and length(me_code) = '4'
                                  and substring(me_code, 1, 2) = '{$row['me_code']}'
                                order by me_order, me_id ";
                    $result2 = sql_query($sql2);


                    for ($k=0; $row2=sql_fetch_array($result2); $k++) {
                        if($k == 0)
                            echo '<ul class="gnb_2dul">'.PHP_EOL;
                    ?>
                        <li class="gnb_2dli"><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="gnb_2da"><span></span><?php echo $row2['me_name'] ?></a></li>
                    <?php
                    }


                    if($k > 0)
                        echo '</ul>'.PHP_EOL;
                    ?>
                </li>
            <?php
            }


            if ($i == 0) {  ?>
                <li id="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하세요.<?php } ?></li>
            <?php } ?>
            </ul>
            <button type="button" id="gnb_close" class="hd_closer"><span class="sound_only">메뉴 </span>닫기</button>
        </div>


        <button type="button" id="hd_sch_open" class="hd_opener">검색<span class="sound_only"> 열기</span></button>


        <div id="hd_sch" class="hd_div">
            <h2>사이트 내 전체검색</h2>
            <form name="fsearchbox" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);" method="get">
            <input type="hidden" name="sfl" value="wr_subject||wr_content">
            <input type="hidden" name="sop" value="and">
            <input type="text" name="stx" id="sch_stx" placeholder="검색어(필수)" required class="required" maxlength="20">
            <input type="submit" value="검색" id="sch_submit">
            </form>


            <script>
            function fsearchbox_submit(f)
            {
                if (f.stx.value.length < 2) {
                    alert("검색어는 두글자 이상 입력하십시오.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }


                // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
                var cnt = 0;
                for (var i=0; i<f.stx.value.length; i++) {
                    if (f.stx.value.charAt(i) == ' ')
                        cnt++;
                }


                if (cnt > 1) {
                    alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }


                return true;
            }
            </script>
            <button type="button" id="sch_close" class="hd_closer"><span class="sound_only">검색 </span>닫기</button>
        </div>


        <script>
        $(function () {
            $(".hd_opener").on("click", function() {
                var $this = $(this);
                var $hd_layer = $this.next(".hd_div");


                if($hd_layer.is(":visible")) {
                    $hd_layer.hide();
                    $this.find("span").text("열기");
                } else {
                    var $hd_layer2 = $(".hd_div:visible");
                    $hd_layer2.prev(".hd_opener").find("span").text("열기");
                    $hd_layer2.hide();


                    $hd_layer.show();
                    $this.find("span").text("닫기");
                }
            });


            $(".hd_closer").on("click", function() {
                var idx = $(".hd_closer").index($(this));
                $(".hd_div:visible").hide();
                $(".hd_opener:eq("+idx+")").find("span").text("열기");
            });
        });
        </script>

이 질문에 댓글 쓰기 :

답변 1


<div id="gnb" class="hd_div">​​


<div id="gnb" class="hd_div" style="display:block;">​​
 

로 바꾸시거나,


/css/mobile.css 에서 #gnb를 찾으셔서 display:none; 을 display:block으로 바꾸시면 될 듯 합니다.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,406
© SIRSOFT
현재 페이지 제일 처음으로