<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"	xmlns:fb="http://ogp.me/ns/fb#" lang="ko">
<head>
<?php $this->load->view('partial/head')?>
<link rel="stylesheet" href="/ART/grace/css/default.css">
</head>
<body>
    <?php $this->load->view('partial/sidemenu')?>
    <?php $this->load->view('partial/header')?>
    <!-- //header -->
    <main class="pb50">
        <!-- banner -->
        <section id="banner">
            <h2 class="ir_so">최신 라이프 소식</h2>
            <div class="slider">
                <div class="swiper-container">
                    <!-- Additional required wrapper -->
                    <div class="swiper-wrapper">
                        <!-- Slides -->
                        <?foreach($slide as $k=>$p) {?>
                        <div class="swiper-slide ss<?php echo $k+1?>">
                            <div class="container">
                                <div class="row">
                                    <div class="imgbox"><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><img src="<?php echo imgSrc($p->mainImg)?>"
                                                alt=""></a>
                                    </div>
                                    <div class="txtbox">
                                        <em><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a></em>
                                        <h3><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->title?></a></h3>
                                        <p><a
                                                href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->sub_title? $p->sub_title : mb_substr(strip_tags($p->content), 0, 100)?></a>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php }?>
                    </div>
                    <!-- If we need pagination -->
                    <div class="swiper-pagination"></div>

                    <!-- If we need navigation buttons -->
                    <div class="swiper-button-prev"></div>
                    <div class="swiper-button-next"></div>


                </div>
            </div>
        </section>
        <!-- //banner -->

        <!-- keyword -->
        <section id="keyword_box">
            <div class="container">
                <div class="row">
                    <div class="keyword_box">
                        <h2>크로스맵 KEYWORD</h2>
                        <div>
                            <ul>
                                <li><a class="<?php echo in_array('wordCards', $newUpdated) ? 'new':'' ?>"
                                        href="/grace/category/말씀엽서/30">말씀엽서</a></li>
                                <li><a class="<?php echo in_array('books', $newUpdated) ? 'new':'' ?>" href="/grace/category/도서/31">크맵북스</a></li>
                                <li><a class="<?php echo in_array('dailyQt', $newUpdated) ? 'new':'' ?>" href="/grace/category/데일리QT/32">데일리QT</a></li>
                                <li><a class="<?php echo in_array('engWords', $newUpdated) ? 'new':'' ?>" class="new" href="/grace/category/영어묵상/33">영어묵상</a></li>
                                <li><a class="<?php echo in_array('qna', $newUpdated) ? 'new':'' ?>" href="/grace/category/QnA/34">Q&amp;A</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- //keyword -->

        <!-- book_culture -->
        <section id="popularpost">
            <div class="container">
                <div class="row">
                    <div class="popularpost">
                        <div class="title">
                            <h2><a href="#">인기 포스트</a></h2>
                            <!--<span class="more_btn"><a href="">더보기</a></span>-->
                        </div>
                        <div class="list">
                            <div class="swiper-container2">
                                <!-- Additional required wrapper -->
                                <div class="swiper-wrapper">
                                    <!-- Slides -->
                                    <?php foreach ($popularPosts as $post) {?>
                                    <div class="swiper-slide">
                                        <a href="/grace/<?php echo $post->titleUrl?>/<?php echo $post->idx?>">
                                            <figure><img src="<?php echo imgSrc($post->mainImg)?>" alt=""></figure>
                                            <div class="info">
                                                <p><?php echo $post->editorName?></p>
                                                <h3><?php echo $post->title?>
                                                </h3>
                                                <span class="editor"><img src="<?php echo imgSrc($post->editorImg)?>"
                                                        alt=""></span>

                                            </div>
                                        </a>
                                    </div>
                                    <?php }?>
                                </div>
                                <!-- If we need navigation buttons -->
                                <div class="swiper-button-prev2"><i class="fa fa-angle-left" aria-hidden="true"></i>
                                </div>
                                <div class="swiper-button-next2"><i class="fa fa-angle-right" aria-hidden="true"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- //book_culture -->

        <!-- post_listbox -->
        <section id="post_listbox">
            <div class="container">
                <div class="row">
                    <div class="post_listbox">
                        <div class="tit">
                            <h2>말씀엽서</h2>
                            <span class="more"><a
                                    href="/grace/category/말씀엽서/<?php echo $wordCards[0]->categoryId?>">더보기 <i class="fa fa-angle-right" aria-hidden="true"></i></a></span>
                        </div>
                        <ul>
                            <?php foreach($wordCards as $p) { ?>
                            <li>
                                <div class="box"><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><img
                                            src="<?php echo imgSrc($p->mainImg)?>" alt=""></a></div>
                                <div class="txtbox">
                                    <span class="editor_img"><a href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><img
                                                src="<?php echo imgSrc($p->editorImg)?>" alt=""></a></span>
                                    <dl>
                                        <dd class="editor_txt"><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a>
                                        </dd>
                                        <dt><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->title?></a></dt>

                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $p->views?>회</span>
                                        <span class="reple">댓글 <?php echo $p->comments?>회</span>
                                    </span>
                                </div>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
            </div>

        </section>
        <!-- //post_listbox -->

        <!-- bannerstyle1 -->
        <section id="bannerstyle1">
            <div class="container">
                <div class="row">
                    <div class="bannerstyle1">
                        <a href="https://dramabible.org/" target="_blank"><img src="/ART/grace/img/ban1.jpg" class="img_normal" alt=""> <img
                                src="/ART/grace/img/ban1_@2.jpg" class="img_retina" alt=""></a>
                    </div>
                </div>
            </div>
        </section>
        <!-- //bannerstyle1 -->

        <!-- post_listbox -->
        <section id="post_listbox">
            <div class="container">
                <div class="row">
                    <div class="post_listbox">
                        <div class="tit">
                            <h2>크맵북스</h2>
                            <span class="more"><a
                                    href="/grace/category/도서/<?php echo $books[0]->categoryId?>">더보기 <i class="fa fa-angle-right" aria-hidden="true"></i></a></span>
                        </div>
                        <ul>
                            <?php foreach($books as $p) { ?>
                            <li>
                                <div class="box"><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><img
                                            src="<?php echo imgSrc($p->mainImg)?>" alt=""></a></div>
                                <div class="txtbox">
                                    <span class="editor_img"><a href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><img
                                                src="<?php echo imgSrc($p->editorImg)?>" alt=""></a></span>
                                    <dl>
                                        <dd class="editor_txt"><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a>
                                        </dd>
                                        <dt><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->title?></a></dt>

                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $p->views?>회</span>
                                        <span class="reple">댓글 <?php echo $p->comments?>회</span>
                                    </span>
                                </div>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
            </div>

        </section>
        <!-- //post_listbox -->

        <!-- bannerstyle2 -->
        <section id="bannerstyle2">
            <div class="container">
                <div class="row">
                    <div class="bannerstyle2">
                        <div>
                            <a href="https://crossmap.christiandaily.co.kr/grace/%EC%84%A4%EA%B5%90%EC%9E%90-%EC%98%A8%EA%B0%96-%EC%8A%A4%ED%82%AC-%EC%9E%88%EC%96%B4%EB%8F%84-%ED%95%98%EB%82%98%EB%8B%98-%EC%98%81%EA%B4%91%EC%97%90-%EA%B2%8C%EC%9C%BC%EB%A5%B4%EB%8B%A4%EB%A9%B4/2733" target="_blank">
                                <img src="/ART/grace/img/ban2.jpg" class="img_normal" alt=""> <img
                                    src="/ART/grace/img/ban2_@2.jpg" class="img_retina" alt="">
                            </a>
                        </div>
                        <div>
                            <a href="https://crossmap.christiandaily.co.kr/grace/%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%84-%EC%A7%84%EB%A6%AC%EB%A1%9C-%EB%A7%8E%EC%9D%80-%EC%82%AC%EB%9E%8C%EB%93%A4-%ED%98%84%ED%98%B9%EC%8B%9C%ED%82%A4%EB%8A%94-%EC%9D%B4%EB%8B%A8%EC%82%AC%EC%9D%B4%EB%B9%84/2740" target="_blank">
                                <img src="/ART/grace/img/ban3.jpg" class="img_normal" alt=""> <img
                                    src="/ART/grace/img/ban3_@2.jpg" class="img_retina" alt="">
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- //bannerstyle2 -->

        <!-- post_listbox -->
        <section id="post_listbox">
            <div class="container">
                <div class="row">
                    <div class="post_listbox">
                        <div class="tit">
                            <h2>데일리QT</h2>
                            <span class="more"><a
                                    href="/grace/category/데일리QT/<?php echo $dailyQt[0]->categoryId?>">더보기 <i class="fa fa-angle-right" aria-hidden="true"></i></a></span>
                        </div>
                        <ul>
                            <?php foreach($dailyQt as $p) { ?>
                            <li>
                                <div class="box"><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><img
                                            src="<?php echo imgSrc($p->mainImg)?>" alt=""></a></div>
                                <div class="txtbox">
                                    <span class="editor_img"><a href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><img
                                                src="<?php echo imgSrc($p->editorImg)?>" alt=""></a></span>
                                    <dl>
                                        <dd class="editor_txt"><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a>
                                        </dd>
                                        <dt><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->title?></a></dt>

                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $p->views?>회</span>
                                        <span class="reple">댓글 <?php echo $p->comments?>회</span>
                                    </span>
                                </div>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
            </div>

        </section>
        <!-- //post_listbox -->

        <section id="col3box">
            <div class="container">
                <div class="row">
                    <div class="col3box">
                        <div class="boder_box">
                            <div class="tit">
                                <h2>영어묵상</h2>
                                <div class="more_btn"><a href="/grace/category/영어묵상/<?php echo $engWords[0]->categoryId?>"><span
                                            class="ir_pm ">더보기 </span></a></div>
                            </div>
                            <ul class="listbox1">
                                <?php foreach($engWords as $p) {?>
                                <li>
                                    <h3><a
                                            href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo mb_substr($p->title, 0, 50)?></a>
                                    </h3>
                                    <dl>
                                        <dt><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->sub_title?></a></dt>
                                        <dd><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a>
                                        </dd>
                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $p->views?>회</span>
                                        <span class="reple">댓글 <?php echo $p->comments?>회</span>
                                    </span>

                                </li>
                                <?php }?>
                            </ul>
                            <div>

                            </div>
                        </div>
                        <div class="boder_box">
                            <div class="tit">
                                <h2>지식충전</h2>
                                <div class="more_btn"><a href="/grace/category/QnA/<?php echo $qna[0]->categoryId?>"><span
                                            class="ir_pm ">더보기</span></a></div>
                            </div>
                            <ul class="listbox2">
                                <?php foreach($qna as $p) {?>
                                <li>
                                    <dl>
                                        <dt><a href="/grace/<?php echo $p->titleUrl?>/<?php echo $p->idx?>"><?php echo $p->title?></a></dt>
                                        <dd><a
                                                href="/grace/editor/<?php echo cleanUrl($p->editorName)?>/<?php echo $p->editorId?>"><?php echo $p->editorName?></a>
                                        </dd>
                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $p->views?>회</span>
                                        <span class="reple">댓글 <?php echo $p->comments?>회</span>
                                    </span>
                                </li>
                                <?php }?>
                            </ul>
                        </div>
                        <div>
                            <div class="banbox"><a href="https://play.google.com/store/apps/details?id=com.SS20190423.tube&hl=ko"  target="_blank"><img src="/ART/grace/img/ban4.jpg" alt=""></a></div>
                            <div class="banbox"><a href="https://crossmap.christiandaily.co.kr/web/prayer" target="_blank"><img src="/ART/grace/img/ban5.jpg" alt=""></a></div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>
    <?php $this->load->view('partial/footer')?>
    <script src="/ART/grace/js/living_slide.js"></script>
</body>

</html>