<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-首页</title>
	<link rel="stylesheet" type="text/css" href="/static/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/static/css/main.css">
	<script type="text/javascript" src="/static/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/static/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="/static/js/slide.js"></script>
</head>
<body>
	<div class="search_bar clearfix">
		<a href="/index/" class="logo fl"><img src="/static/images/logo.png"></a>
		<div class="guest_cart fr">
			<a href="/cart/show_cart/" class="cart_name fl">我的购物车</a>
			<div class="goods_count fl">{{ cart_goods_count }}</div>
			<ul class="cart_goods_show">


                {% for cart_goods in cart_goods_list %}
				<li>
					<img src="/static/goods/{{ cart_goods.goods_img }}.jpg" alt="商品图片">
					{{ cart_goods.goods_name }}
					<div>{{ cart_goods.goods_num }}</div>
				</li>
                {% endfor %}

			</ul>
			
		</div>
	</div>

	<div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
		</div>
	</div>

	<div class="center_con clearfix">
		<ul class="subnav fl">
            {% for cag in categories %}
                <li><a href="/goods/?cag={{ cag.id }}&page=1" class="{{ cag.cag_css }}">{{ cag.cag_name }}</a></li>
            {% endfor %}
		</ul>
		<div class="slide fl">
			<ul class="slide_pics">
				<li><img src="/static/images/slide.jpg" alt="幻灯片"></li>
				<li><img src="/static/images/slide02.jpg" alt="幻灯片"></li>
				<li><img src="/static/images/slide03.jpg" alt="幻灯片"></li>
				<li><img src="/static/images/slide04.jpg" alt="幻灯片"></li>
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			<a href="#"><img src="/static/images/adv01.jpg"></a>
			<a href="#"><img src="/static/images/adv02.jpg"></a>
		</div>
	</div>

    {% for cag in categories %}
	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model01">{{ cag.cag_name }}</h3>
			<a href="/goods/?cag={{ cag.id }}&page=1" class="goods_more fr" id="fruit_more">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/{{ cag.cag_img }}"></div>
			<ul class="goods_list fl">

                {% for goods in cag.goods_list %}
				<li>
					<h4><a href="/detail/?id={{ goods.id }}">{{ goods.goods_name }}</a></h4>
					<a href="/detail/?id={{ goods.id }}"><img src="/static/goods/{{ goods.goods_img }}.jpg"></a>
					<div class="prize">¥ {{ goods.goods_price }}</div>
				</li>
                {% endfor %}

			</ul>
		</div>
	</div>
    {% endfor %}

	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>
</body>
</html>