그누보드

위로한칸씩 올라가는 latest

헤롱헤롱이 2020. 5. 28. 09:49
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$mobile_href = "";
if(G5_USE_MOBILE && !G5_IS_MOBILE) {
    $seq = 0;
    $mobile_href = $_SERVER['PHP_SELF'];
    if($_SERVER['QUERY_STRING']) {
        $sep = '?';
        foreach($_GET as $key=>$val) {
            if($key == 'device')
                continue;
            $mobile_href .= $sep.$key.'='.strip_tags($val);
            $sep = '&amp;';
            $seq++;
        }
    }
    if($seq)
        $mobile_href .= '&amp;device=mobile';
    else
        $mobile_href .= '?device=mobile';
}
?>
<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->
<div class="wz_tail_latest">
    <dl id="olinenotice" class="notice">
        <dd class="title"><span class="n_title"><?php echo $bo_subject; ?></span><span class="n_bar">|</span></dd>
        <div class="notice-wrap">
            <ul class="notice-ul">
            <?php for ($i=0; $i<count($list); $i++) {  ?>
                <li><a href="<?php echo $list[$i]['href'];?>"><?php if ($list[$i]['is_notice']) echo "[공지]";?><?php echo $list[$i]['subject'];?></a></li>
            <?php } ?>
            </ul>
        </div>
        <dd class="more"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>">더보기</a></dd>
    </dl>
 
</div>
<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->
<script type="text/javascript">
<!--
    function fn_article(containerID, autoStart){
        var $element = $('#'+containerID).find('.notice-ul');
        var autoPlay = autoStart;
        var auto = null;
        var speed = 4000;
        var timer = null;
        var move = $element.children().outerHeight();
        var first = false;
        var lastChild;
        lastChild = $element.children().eq(-1).clone(true);
        lastChild.prependTo($element);
        $element.children().eq(-1).remove();
        if($element.children().length==1){
            $element.css('top','0px');
        }else{
            $element.css('top','-'+move+'px');
        }
        if(autoPlay) {
            timer = setInterval(moveNextSlide, speed);
            auto = true;
        }
        $element.find('>li').bind({
            'mouseenter': function(){
                if(auto){
                    clearInterval(timer);
                }
            },
            'mouseleave': function(){
                if(auto){
                    timer = setInterval(moveNextSlide, speed);
                }
            }
        });
        function moveNextSlide(){
            $element.each(function(idx){
                var firstChild = $element.children().filter(':first-child').clone(true);
                firstChild.appendTo($element.eq(idx));
                $element.children().filter(':first-child').remove();
                $element.css('top','0px');
                $element.eq(idx).animate({'top':'-'+move+'px'},'normal');
            });
        }
           
    }
    fn_article("olinenotice", true);
//-->
</script>

<style>
@charset "utf-8";
.wz_tail_latest ul, .wz_tail_latest li, .wz_tail_latest .notice-ul, .wz_tail_latest dd, .wz_tail_latest dl {list-style:none;padding:0;margin:0;vertical-align: baseline;border: 0;background: transparent;}
.wz_tail_latest .t_indent {text-indent: -10000em !important;display: inline-block;}
.wz_tail_latest {clear:both;position:relative;/*border: 1px solid #25599f;*/}
.wz_tail_latest:after {display:block;visibility:hidden;clear:both;content:""}
.wz_tail_latest .notice,
.wz_tail_latest .notice .notice-wrap,
.wz_tail_latest .notice dd {float:left;}
.wz_tail_latest .notice {display:inline;padding-left:8px;width:100%;height:40px;box-sizing:border-box;/* background:url(./img/bul_bar2.gif) no-repeat right 12px; */}
.wz_tail_latest .notice dd.title {margin-right: 13px;line-height:40px;}
.wz_tail_latest .notice .notice-wrap {position:relative;width:78%;height:160px;overflow:hidden;}
.wz_tail_latest .notice .notice-ul {position:absolute; top:0px;}
.wz_tail_latest .notice .notice-ul li {color:#666;line-height:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:40px;padding-right:10px;}
.wz_tail_latest .notice dd.more a {display:inline-block;height:40px;color:#eee;font-size:11px;line-height:40px;background:url(./img/bt_arr_more.gif) no-repeat right center;padding-right:10px;;}
.wz_tail_latest .bx_sns {display:inline}
.wz_tail_latest .bx_sns:after {display:block;visibility:hidden;clear:both;content:""}
.wz_tail_latest .ul_sns {position:absolute;top:0;right:7px;}
.wz_tail_latest .ul_sns li {float:left;}
.wz_tail_latest .ul_sns li a {display:inline-block;background:url("./img/icon_sns.png") no-repeat 0 0;width:32px;height:32px;margin:7px 5px 0 3px;}
.wz_tail_latest .ul_sns li a.f {background-position:-91px 0;}
.wz_tail_latest .ul_sns li a.t {background-position:0 0;}
.wz_tail_latest .ul_sns li a.m {background-position:-404px 0;}
.n_title{font-size: 18px;/* font-family: 'Nanum Gothic'; */font-weight: bold;margin-right:5px;line-height:40px;color:#fff}
.notice-ul li a{font-size:14px;font-weight:500;color:#fff36f}
.n_bar{display:inline-block;width: 1px;height:40px;font-size:22px;color:#ccc;line-height:40px;font-weight:500;}
.wz_tail_latest{margin-bottom: 15px;background-color: #153158;height:160px;}


</style>