<!DOCTYPE html>
<html lang="en">
<head>
    <%include("/common/_head.html"){}%>
    <title>我的想法 -飞趣</title>
    <style>
        .c-list-info {
            position: relative;
            overflow: hidden;
            font-size: 13px;
            line-height: 2
        }

        .detail-body {
            min-height: 0;
            margin-top: 0;
            line-height: 24px;
            font-size: 14px
        }

        .c-reply-block {
            -webkit-box-shadow: 0 1px 3px 0 rgba(0, 33, 77, .05);
            box-shadow: 0 1px 3px 0 rgba(0, 33, 77, .05);
            margin-top: 12px;
            overflow: visible;
            border-radius: 4px
        }

        .reply-input {
            padding: 5px 12px !important;
            position: relative
        }

        .reply-input input {
            width: 80%;
            background: none
        }

        .reply-input button {
            position: absolute;
            right: 10px;
            top: 5px
        }

        .comments span {
            padding-right: 0
        }

        .c-signin cite {
            padding: 0 5px;
            color: #FF5722;
            font-style: normal
        }

        .detail-about .fly-avatar {
            left: 0;
            top: 0
        }

        .detail-about {
            padding: 0 0 0 55px;
            background: none
        }

        .thought-body {
            margin: 25px 0 20px;
            min-height: 0;
            line-height: 24px;
            font-size: 14px
        }

        .t-intro {
            display: inline-block;
            vertical-align: top;
            height: 21px;
            letter-spacing: 3.8px;
            color: #1b7fb6
        }

        .left-block {
            padding: 10px
        }

        .left-block a {
            font-size: 14px;
            font-weight: bold;
            padding: 0 0 0 15px;
            height: 34px;
            line-height: 34px
        }

        .home-nav {
            position: absolute;
            left: 0;
            top: 7px;
            z-index: 1000;
            height: 100%;
            padding: 10px 0;
            background-color: #82b9dc;
            width: 200px;
            border-radius: 2px
        }

        @media screen and (max-width: 768px) {
            .home-nav {
                left: -300px;
                transition: all .3s;
                -webkit-transition: all .3s
            }

            .site-mobile .home-nav {
                left: 0
            }

            .home-all .home-main {
                margin-left: 0
            }
        }

        .left-nav {
            border-color: rgba(255, 255, 255, 0.2)
        }

        #pagesplit-head .layui-laypage {
            margin: 0
        }

        .site-mobile .c-user-main > .layui-nav {
            left: 0
        }

        .home-main {
            margin-left: 200px
        }

        .reply-input span {
            position: absolute;
            right: 22%;
            cursor: pointer;
            padding: 0 10px;
            line-height: 38px;
            color: #ffa405
        }

        .t-area {
            padding-right: 10px
        }

        .c-reply span {
            width: 25%;
            float: left;
            padding-right: 0;
        }

        .del-t {
            position: absolute;
            right: 0;
        }

        .c-list2 {
            min-height: 300px;
        }
    </style>
</head>
<body>
<%
var user = c.currentUser(request, servlet.response);
var isLogin = false;
if(user != null){
isLogin=true;
}
include("/common/_headwithlogin.html",{user:user,isLogin:isLogin}){}
%>
<div class="layui-container layui-clear topToFix home-all">
    <%include("/common/_home_nav.html",{user:user}){}%>
    <div class="home-main layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="c-panel">
                <div class="c-panel-title">
                    我的帖子管理
                </div>
                <ul class="c-list2 " id="thoughtList">
                    <%for(var theme in page.list){%>
                    <li data-id="${theme.id}">
                        <div class="detail-about">
                            <a href="javascript:;" class="del layui-btn layui-btn-danger c-position-rt">删除</a>
                            <a href="${ctxPath}/u/${theme.userId}/peopleIndex" class="fly-avatar"><img
                                    src="${theme.icon!}"></a>
                            <div class="fly-detail-user">
                                <a href="${ctxPath}/u/${theme.userId}/peopleIndex" class="c-fly-link">
                                    <cite>${theme.nickname}</cite>
                                </a>
                            </div>
                            <div class="detail-hits"><span>${printTime(theme.createTime)}</span></div>
                        </div>
                        <div class="detail-body thought-body photos">
                            <div class="thought-text"><a href="/theme/${theme.id}"> ${emojiShow(theme.title)}</a></div>
                        </div>
                    </li>
                    <%}%>
                </ul>
                <div id="pagesplit">
                </div>
            </div>
        </div>
    </div>
</div>
<div class="site-tree-mobile layui-hide"><i class="layui-icon">&#xe602;</i></div>
<div class="site-mobile-shade"></div>
<%include("/common/_footor.html"){}%>
</body>
<script src="/js/twemoji.min.js?2.4"></script>
<%include("/common/_scripts.html",{user:user}){}%>
<script>
    layui.use(['layer', 'fly', 'face', 'laypage'], function () {
        var layer = layui.layer, fly = layui.fly, face = layui.face, laypage = layui.laypage;
        $('.del').on('click', function () {
            var id = $(this).parents('li').data('id');
            fly.json('${ctxPath}/theme/delete/' + id, {}, function (res) {
                layer.msg('删除帖子成功')
                setTimeout(function () {
                    location.reload()
                }, 500)
            })
        })
        laypage.render({
            elem: 'pagesplit'
            , curr:${page.pageNum}
            , count: ${page.total}
            , limit:${page.pageSize}
            , layout: ['count', 'prev', 'page', 'next', 'skip']
            , jump: function (obj, first) {
                if (!first) {
                    location.href = "${ctxPath}/theme/my?index=" + obj.curr
                }
            }
        });
    })
</script>
</html>