{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新闻列表页</title>
    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
    <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
    <link rel="stylesheet" href="{% static '/css/common.css' %}">
    <link rel="stylesheet" href="{% static '/css/module.css' %}">
    <link rel="stylesheet" href="{% static '/css/newsList.css' %}">
</head>

<body>
    <div class="header">
        <div class="headerTxt">
            <div class="wrapper">
                <p class="logoNameCn">休闲农业旅游网</p>
                <p class="logoNameEn">Leisure agricultural tourism network</p>
            </div>

        </div>
        <!-- 广告 -->
        <div class="bjColor advImg"></div>
    </div>
    <!-- 主体部分 -->
    <div class="content">
        <div class="wrapper">
            <div class="newsDiv">
                <!-- 面包屑导航 -->
                <div class="breadcrumb">
                    <span class="layui-breadcrumb">
                        <a href="home">首页</a>
                        <a>
                            <cite>新闻资讯</cite>
                        </a>
                    </span>
                    <div class="searchDiv">
                        <input type="text" id="searchTitlt" value="{{con|default:''}}" placeholder="请输入标题" autocomplete="off" class="layui-input" >
                        <button type="button" onclick="searchCon()" class="layui-btn layui-btn-ms"><i class="layui-icon">&#xe615;</i></button>
                    </div>
                </div>
                <!-- 新闻列表 -->
                <div class="innerDiv">
                    <ul class="newsList">
                        {% if art|length %} {% for news in art %}
                        <li class="newsItem">
                            <a href="news_view?id={{news.id}}">
                                <img src="{{ news.head_img }}" alt="">
                                <div class="newsDetial">
                                    <h2>{{ news.title }}</h2>
                                    <div class="abstract-wrap">
                                        <p class="abstract-text">{{ news.intro }}</p>
                                    </div>
                                    <div class="date">
                                        <span>{{ news.upl_time|date:"Y年m月d日"}}</span>
                                        <!-- <a class="more" href="">more ></a> -->
                                        <span class="more">more ></span>
                                    </div>
                                </div>
                            </a>
                        </li>
                        {% endfor %} {% else %}
                            <li class="newsItem">
                                <!-- <a href="news_view">
                                    <img src="{% static '/imgs/farm/farm11.jpg' %}" alt="">
                                    <div class="newsDetial">
                                        <h2>农业比较效益低是退租弃耕症结所在</h2>
                                        <div class="abstract-wrap">
                                            <p class="abstract-text">有媒体近日报道称，部分粮食主产区新型经营主体出现退租现象。笔者认为，新型农业经营主体是市场主体，其成长有自身的内在规律。在培育新型主体过程中，必须尊重市场规律，既要在政策上扶持和倾斜，又要通过市场选择、优胜劣汰。虽然一时的经营情况无须过于在意，但要正视农业比较效益较低引发的农民种粮积极性问题，让有能力、有意愿务农的人敢于投身农业。</p>
                                        </div>
                                        <div class="date">
                                            <span>2019年03月25日</span>
                                            <a class="more" href="">more ></a>
                                        </div>
                                    </div>
                                </a> -->
                                <div style="text-align:center;line-height:200px;font-size:18px">暂无数据</div>
                            </li>
                        {% endif %}
                    </ul>
                    <!-- 分页 -->
                    {% if art|length %}
                    <div id="page"></div>
                    <input type="hidden" value="{{nums}}" id="nums">
                    <input type="hidden" value="{{page}}" id="currPage">
                    {% else %}
                    {% endif %}
                    <!-- 类型 -->
                    {% for news in art %}
                        {% if forloop.first%}
                        <input type="hidden" value="{{news.art_type}}" id="newsType">
                        {% endif %}
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
    <!-- 底部版权 -->
    <div class="footer bjColor">
        <div class="wrapper">
            <div class="floatDiv">
                <div class="copyrightTxt">
                    <div>休闲农业旅游网</div>
                    <div>联系人：李四　　联系电话：13811111111</div>
                    <div>地址：河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
                </div>
                <div class="WeChatCode">
                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
                    <p>关注公众号</p>
                </div>
            </div>
            <div class="copyright">
                版权所有XXXXXXXXXXXXXXXXXXXXXX
            </div>
        </div>
    </div>

    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
    <script src="{% static '/lib/layui/layui.js'%}"></script>
    <script src="{% static '/js/newsList.js'%}"></script>
</body>

</html>