Authored by 张丽霞

奥莱-热门品牌模板

... ... @@ -583,7 +583,152 @@ exports.outletBanner = () => {
],
hotBrands: {
name: '热门品牌',
brandUrl: 'www.baidu.com'
},
brandList: {
logoBrand: [{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
},
{
href: 'www.baidu.com',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50'
}]
},
recommend: {
tplrecommend: {
name: '热门品类',
keyword: [{
name: 'T-SHIRTS',
herf: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75'
},
{
name: 'T-SHIRTS',
herf: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75'
},
{
name: 'T-SHIRTS',
herf: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/75'
}],
category: [{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/380/h/500',
name: '衬衣'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}, {
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/50/h/50',
name: '衬衣'
}],
brands: [{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/380/h/500',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/380/h/500'
}],
types: [{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
},
{
href: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250',
name: '衬衣',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/180/h/250'
}]
}
}
};
};
... ...
... ... @@ -34,6 +34,14 @@
{{!热门品牌}}
{{# hotBrands}}
{{> brand/hot-brand}}
{{> index/floor-header}}
<div class="logo-brand " data-url="{{brandUrl}}">
</div>
{{/hotBrands}}
{{! 热门品类}}
{{# recommend}}
{{> index/outlets-recommend}}
{{/ recommend}}
</div>
\ No newline at end of file
... ...
{{> index/floor-header}}
<div class="preference-brand imgopacity">
<div class="logo-brand " data-url="{{brandUrl}}">
</div>
</div>
\ No newline at end of file
{{# tplrecommend}}
<div class="tpl-recommend clearfix">
{{> index/floor-header}}
<div class="tpl-body clearfix">
<div class="tpl-nav">
<div class="tpl-keywords">
{{#each keyword}}
<a class="keywords{{@index}}" title="{{name}}" href="{{href}}" target= "_blank"><img src="{{img}}"/></a>
{{/each}}
</div>
<div class="tpl-category clearfix">
{{#each category}}
<a href="{{href}}" target= "_blank">{{name}}</a>
{{/each}}
</div>
</div>
<div class="tpl-brands imgopacity clearfix">
{{#each brands}}
<a title="{{name}}" href="{{href}}" target= "_blank"><img src="{{img}}"/></a>
{{/each}}
</div>
<div class="tpl-types imgopacity clearfix">
<ul>
{{#each types}}
<li><a title="{{name}}" href="{{href}}" target= "_blank"><img src="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
</div>
</div>
{{/ tplrecommend}}
\ No newline at end of file
... ...
... ... @@ -83,7 +83,6 @@ var $ = require('yoho-jquery'),
return;
}
that._createHelper();
brandHtml = '\{{#brandList logoBrand}}' +
'<a href="\{{href}}" target="_blank"><img class="lazy" data-original="\{{img}}" alt=""></a>' +
'\{{/brandList}}';
... ...
... ... @@ -3,9 +3,9 @@
* @author: wangqing(robin.wang@yoho.cn)
* @date: 205/7/2
*/
var $ = require('yoho.jquery');
var $ = require('yoho-jquery');
(function($) {
(function() {
$.fn.slider2 = function(options) {
function autoplay(index, limit, toright) {
if (toright === true) {
... ... @@ -113,4 +113,4 @@ var $ = require('yoho.jquery');
};
}($));
}());
... ...
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload'),
homePage = $('.home-page').data('page');
lazyLoad($('img.lazy'));
// lazyLoad = require('yoho-jquery-lazyload'),
homePage = $('.home-page').data('page'),
brandUrl = $('.logo-brand').data('url');
// lazyLoad($('img.lazy'));
// require('../header');
require('../common/slider');
require('../common/slider2');
require('../common/logo-brand');
... ... @@ -19,15 +22,15 @@ if (homePage === 'boys') {
$('.slide-container').slider();
}
// if (homePage === 'boys') {
// $('.logo-brand').logoBrand({
// url: brandUrl
// });
// $('.img-brand').slider2();
// } else {
// $('.logo-brand').logoBrand({
// showNum: 10,
// url: brandUrl
// });
// $('.img-slider-wrapper').slider2();
// }
if (homePage === 'boys') {
$('.logo-brand').logoBrand({
url: brandUrl
});
$('.img-brand').slider2();
} else {
$('.logo-brand').logoBrand({
showNum: 10,
url: brandUrl
});
$('.img-slider-wrapper').slider2();
}
... ...
.yoho-page {
.floor-header {
position: relative;
margin: 80px 0 40px;
... ... @@ -41,3 +40,115 @@
}
}
}
/*
热门推荐模板样式
*/
.home-page {
.tpl-recommend {
width: 100%;
position: relative;
a {
display: block;
img {
display: block;
width: 100%;
height: 100%;
}
}
.tpl-body {
margin-bottom: 8px;
}
.tpl-nav {
float: left;
overflow: hidden;
.tpl-keywords {
margin-bottom: 8px;
}
.tpl-category {
padding: 10px 0;
background-color: #f8f8f8;
overflow: hidden;
a {
float: left;
width: 50%;
text-align: center;
color: #000;
overflow: hidden;
}
}
}
.tpl-brands {
float: left;
overflow: hidden;
margin-left: 8px;
li {
margin-top: 8px;
}
}
.tpl-types {
float: left;
overflow: hidden;
margin-top: -8px;
width: 579px;
li {
float: left;
margin-left: 8px;
margin-top: 8px;
a {
width: 185px;
height: 248px;
}
}
}
.tpl-products {
overflow: hidden;
margin-left: -10px;
li {
float: left;
margin-left: 10px;
a {
width: 222px;
height: 298px;
}
}
}
.tpl-nav {
width: 185px;
.keywords0,
.keywords1,
.keywords2 {
margin-bottom: 10px;
height: 76px;
}
.keywords2 {
margin-bottom: 0;
}
.tpl-category {
height: 228px;
a {
height: 38px;
line-height: 38px;
font-size: 14px;
}
}
}
.tpl-brands {
width: 378px;
height: 512px;
li a {
height: 248px;
}
}
}
}
... ...