<!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('templates/webtoon/webtoon-head-meta')?>
    <?php $this->load->view('templates/webtoon/webtoon-head')?>
</head>

<body>
    <?php $this->load->view('templates/webtoon/webtoon-header'); ?>

    <main id="main" role="main" tabindex="-1">
        <div class="container">
            <div class="layout-blog">
                <div>
                    <article class="current-webtoon poster gap-bottom-sm">
                        <a href=""><img src="http://crossmap.co.kr<?php echo $page->img?>" alt="" width="191"
                                height="241"></a>
                        <h2 class="title"><?php echo $page->pageTitle?></h2>
                        <div class="summary">
                            <p><?php echo $page->pageDescription?></p>
                        </div>
                        <div class="tools">
                            <a href="" class="cm-toon-series-recomm">추천</a>
                            <a class="add" class="cm-toon-series-favorite" href="">관심웹툰 <span
                                    class="plus-circle"></span></a>
                            <a href="/webtoon/<?php echo $series[count($series)-1]->postSeq?>">첫화보기</a>
                        </div>
                    </article>
                    <!-- <div class="webtoon-tips gap-bottom-md"><span>공지</span>작가님 사정으로 인해 2O회 휴재합니다．</div> -->

                    <div class="webtoon-series-list-wrapper">
                        <table class="webtoon-series-list" cellspacing="0" cellpadding="0">
                            <caption><span class="visually-hidden">회차별 목록</span></caption>
                            <colgroup>
                                <col width="99">
                                <col width="*">
                                <col width="141">
                                <col width="76">
                            </colgroup>
                            <thead>
                                <tr>
                                    <th scope="col">이미지</th>
                                    <th scope="col">제목</th>
                                    <th scope="col">좋아요</th>
                                    <th scope="col">등록일</th>
                                </tr>
                            </thead>
                            <!-- 게임배너 or 광고배너 -->
                            <tbody>
                                <?php foreach($series as $s) {?>
                                <tr>
                                    <td>
                                        <a href="/webtoon/<?php echo $s->postSeq?>">
                                            <img src="http://crossmap.co.kr<?php echo $s->postImage?>"
                                                title="<?php echo $s->postTitle?>" alt="<?php echo $s->postTitle?>"
                                                width="71" height="41">
                                            <span class="mask"></span>
                                        </a>
                                    </td>
                                    <td class="title">
                                        <a href="/webtoon/<?php echo $s->postSeq?>"><span
                                                class="episode"><?php echo $s->postTitle?></span> <span
                                                class="summary"><?php echo $s->postExcerpt?></span></a></td>
                                    <td>
                                        <div>
                                            <span class="webtoon-star">
                                                <span class="icon i-heart active">
                                                    <img src="<?php echo THEME_FOLDER?>/img/ic-heart.gif">
                                                </span>
                                            </span>
                                            <strong class="heartNum"><?php echo $s->rating? $s->rating : 0?></strong>
                                        </div>
                                    </td>
                                    <td class="num"><?php echo $s->dateUpdated?></td>
                                </tr>
                                <?php }?>
                            </tbody>
                        </table>
                    </div>
                    <!-- <div class="pagination">
                    <a href="" class="prev prev-angle">이전</a>
                    <a href="">1</a>
                    <span class="current">2</span>
                    <a href="">3</a>
                    <a href="">4</a>
                    <a href="" class="next next-angle">다음</a>
                </div> -->
                </div>

                <!-- side bar -->
                <div class="sidebar">
                    <div class="ad gap-bottom-sm"><a href=""><img
                                src="https://crossmap.co.kr/renew/img/banner-2.gif?id=30" alt="" width="300"
                                height="250"></a></div>

                    <section class="realtime-rank gap-bottom-md">
                        <header class="row-header">
                            <h2>실시간 조회 순위</h2>
                        </header>
                        <div class="rank-list two-cols">
                            <ol class="col-item">
                                <?php 
                            $hotToons2 = $hotToons; shuffle($hotToons2);
                            foreach($hotToons2 as $t) {?>
                                <li><a href="/webtoon/<?php echo $t->postSeq?>"><?php echo $t->postTitle?></a></li>
                                <?php }?>
                            </ol>
                        </div>
                    </section>

                    <section class="recommend-rank gap-bottom-xs">
                        <header class="row-header row-header--compact">
                            <h2>누적 인기 웹툰</h2>
                        </header>
                        <ol class="rank-list rank-list--thumbs rank-list--border">
                            <?php for($i=0;$i<5;$i++) {?>
                            <li>
                                <div class="thumb"><a href="/webtoon/<?php echo $hotToons[$i]->postSeq?>">
                                        <img src="http://crossmap.co.kr<?php echo $hotToons[$i]->postImage?>" alt=""
                                            width="40" height="43" style="height:43px !important;"></a></div>
                                <div class="info"><a href="/webtoon/<?php echo $hotToons[$i]->postSeq?>"
                                        class="title"><?php echo $hotToons[$i]->postTitle?></a><a
                                        href="/webtoon/series/<?php echo $hotToons[$i]->pageID?>"
                                        class="artist"><?php echo $hotToons[$i]->author?></a></div>
                                <div class="rank-count"><?php echo $hotToons[$i]->rating?></div>
                            </li>
                            <?php }?>
                        </ol>
                    </section>

                    <!-- sidebar banners -->
                    <div class="ad gap-bottom-xs"><a href=""><img
                                src="<?php echo THEME_FOLDER?>/img/sidebar-banner1.png" alt="" width="300"
                                height="86"></a></div>
                    <div class="ad gap-bottom-xs"><a href=""><img
                                src="<?php echo THEME_FOLDER?>/img/sidebar-banner2.png" alt="" width="300"
                                height="86"></a></div>
                    <div class="ad gap-bottom-md"><a href=""><img
                                src="<?php echo THEME_FOLDER?>/img/sidebar-banner3.png" alt="" width="300"
                                height="86"></a></div>

                    <section class="recommend-life">
                        <header class="row-header row-header--compact">
                            <h2>추천라이프</h2>
                        </header>
                        <div class="photo-news">
                            <div class="thumb"><a
                                    href="/channel/<?php echo $recommLife[0]->pageID?>/<?php echo $recommLife[0]->postSeq?>"><img
                                        src="https://crossmap.co.kr<?php echo $recommLife[0]->postImage?>" alt=""
                                        width="666" height="461"></a></div>
                            <div class="txt"><a
                                    href="/channel/<?php echo $recommLife[0]->pageID?>/<?php echo $recommLife[0]->postSeq?>"><?php echo $recommLife[0]->postTitle?></a>
                            </div>
                        </div>
                        <ul class="list-card">
                            <li>
                                <a
                                    href="/channel/<?php echo $recommLife[1]->pageID?>/<?php echo $recommLife[1]->postSeq?>"><img
                                        src="https://crossmap.co.kr<?php echo $recommLife[1]->postImage?>" alt=""
                                        width="640" height="444">
                                    <span><?php echo $recommLife[1]->postTitle?></span>
                                </a>
                            </li>
                            <li>
                                <a
                                    href="/channel/<?php echo $recommLife[2]->pageID?>/<?php echo $recommLife[2]->postSeq?>"><img
                                        src="https://crossmap.co.kr<?php echo $recommLife[2]->postImage?>" alt=""
                                        width="640" height="444">
                                    <span><?php echo $recommLife[2]->postTitle?></span>
                                </a>
                            </li>
                        </ul>
                    </section>
                </div>
            </div>
        </div>
    </main>

    <?php $this->load->view('templates/webtoon/webtoon-footer')?>