<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="kr"><![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie10 lt-ie9 lt-ie8" lang="kr"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie10 lt-ie9" lang="kr"><![endif]-->
<!--[if (IE 9)&!(IEMobile)]><html class="no-js lt-ie10" lang="kr"><![endif]-->
<!--[if gt IE 9]><!-->
<html class="no-js" lang="kr">
<!--<![endif]-->

<head>
    <?php $this->load->view('mobile/news/news-head-meta')?>

    <link rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" />
    <?php $this->load->view('mobile/news/news-head')?>
</head>

<body>
    <?php $this->load->view('mobile/news/news-header')?>
    <div class="main-container">
        <!--Body Container-->
        <div class="container">

            <!--Main Slide-->
            <div class="mainNews">
                <a href="#">
                    <div class="photo"
                        style="background:url('https://crossmap.co.kr<?php echo $posts[0]->postImage ?>') no-repeat center; background-size:cover;">
                    </div>
                </a>
                <div class="mainNewsTitle">
                    <h2><a href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $posts[0]->postSeq ?>"><?php echo $posts[0]->postTitle ?></a>
                    </h2>
                    <ul>
                        <?php foreach($relatedNews as $a) {?>
                        <li><a href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postID ?>"><?php echo $a->postTitle ?></a>
                        </li>
                        <?php }?>
                    </ul>
                </div>
            </div>

            <div class="mainBox">
                <div class="thumbList">
                    <ul>
                        <?php foreach(array_slice($posts, 1, 6) as $a) {?>
                        <li>
                            <a class="img-scaleup" href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><img
                                    src="https://crossmap.co.kr<?php echo $a->postImage ?>" style="max-height:86px"></a>
                            <div class="des">
                                <p><a href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><?php echo $a->postTitle ?></a></p>
                                <div><i class="far fa-clock"></i> <?php echo date('Y.m.d', strtotime($a->datePosted)) ?>
                                </div>
                            </div>
                        </li>
                        <?php }?>
                    </ul>
                </div>
            </div>

            <!--Banner-->
            <div class="mBanner">
                <a href="#"><img src="<?php echo THEME_FOLDER?>/mobile/img/m-banner.gif"></a>
            </div>

            <!--Tag-->
            <div class="mainBox">
                <div class="tagBox">
                    <ul class='owl-carousel'>
                        <?php foreach(array_slice($posts, 7, 9) as $a) {?>
                        <li>
                            <a class="img-scaleup" href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><img
                                    src="https://crossmap.co.kr<?php echo $a->postImage?>" style="max-height:141px"></a>
                            <h3><a
                                    href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><?php echo mb_strimwidth($a->postTitle, 0, 30, '...', 'utf-8')?></a>
                            </h3>
                        </li>
                        <?php }?>
                    </ul>
                </div>
            </div>

            <div class="mainBox">
                <div class="thumbList">
                    <ul>
                        <?php foreach(array_slice($posts, 16) as $a) {?>
                        <li>
                            <a class="img-scaleup" href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><img
                                    src="https://crossmap.co.kr<?php echo $a->postImage?>" style="max-height:86px"></a>
                            <div class="des">
                                <p><a href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $a->postSeq ?>"><?php echo $a->postTitle?></a></p>
                                <div><i class="far fa-clock"></i> <?php echo date('Y.m.d', strtotime($a->datePosted)) ?>
                                </div>
                            </div>
                        </li>
                        <?php }?>
                        <li class="more"><a href="#">더보기 <i class="fas fa-chevron-down"></i></a></li>
                    </ul>
                </div>
            </div>

            <!--Banner-->
            <div class="mBanner">
                <a href="#"><img src="<?php echo THEME_FOLDER?>/mobile/img/m-banner.gif"></a>
            </div>

            <!--많이 본/댓글많은 뉴스-->
            <div class="mainBox">
                <ul class="titleBoxTab">
                    <li class="current">많이 본</li>
                    <li>댓글 많은</li>
                </ul>
                <div class="thumbList countList">
                    <ul>
                        <?php for ($i = 0; $i < 9; $i++) { ?>
                        <li>
                            <a class="img-scaleup" href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $hotNews[$i]->postID ?>"><img
                                    src="https://crossmap.co.kr<?php echo $hotNews[$i]->postImage?>"
                                    style="max-height:86px"></a>
                            <div class="des">
                                <span class="blue"><?php $i+1?></span>
                                <p><a
                                        href="/news/<?php echo $this->uri->segment(2) ?>/<?php echo $hotNews[$i]->postID ?>"><?php echo $hotNews[$i]->postTitle?></a>
                                </p>
                            </div>
                        </li>
                        <?php }?>
                    </ul>
                </div>
            </div>

            <!--포토-->
            <div class="mainBox">
                <div class="titleBox">
                    <ul>
                        <li class="view"><a href="#">포토</a></li>
                    </ul>
                </div>
                <div class="mainBox-slider">
                    <div class="thumbBox">
                        <ul>
                            <li>
                                <a class="img-scaleup"
                                    href="/channel/<?php echo $photoNews[0]->pageID?>/<?php echo $photoNews[0]->postSeq?>"><img
                                        src="https://crossmap.co.kr<?php echo $photoNews[0]->postImage?>"></a>
                                <div class="des">
                                    <p><a
                                            href="/channel/<?php echo $photoNews[0]->pageID?>/<?php echo $photoNews[0]->postSeq?>"><?php echo $photoNews[0]->postTitle?></a>
                                    </p>
                                </div>
                            </li>
                            <li>
                                <a class="img-scaleup"
                                    href="/channel/<?php echo $photoNews[1]->pageID?>/<?php echo $photoNews[1]->postSeq?>"><img
                                        src="https://crossmap.co.kr<?php echo $photoNews[1]->postImage?>"></a>
                                <div class="des">
                                    <p><a
                                            href="/channel/<?php echo $photoNews[1]->pageID?>/<?php echo $photoNews[1]->postSeq?>"><?php echo $photoNews[1]->postTitle?></a>
                                    </p>
                                </div>
                            </li>
                        </ul>
                    </div>

                </div>
            </div>

        </div>
        <?php $this->load->view('mobile/news/news-footer')?>
    </div>
    <!-- container end -->
    <?php $this->load->view('mobile/news/news-foot')?>

</body>

</html>