Authored by biao

Merge branch 'feature/channel' into develop

const model = require('../models');
exports.index = (req, res) => {
res.render('index', Object.assign({
module: 'channel',
page: 'home'
}, model.getContent()));
};
... ...
const getContent = () => {
const content = {
/* eslint-disable */
content: [
{
slider: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
}
]
},
{
brandsAd: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'GINZA',
des: '藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场',
btnText: 'shop now'
},
{
{
slider: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/28/11/015a86ade17dc6213bab85b2162adebcd6.jpg?imageView2/2/w/1150/h/450',
link: '/'
}
]
},
{
brandsAd: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'GINZA',
des: '藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场',
btnText: 'shop now'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'STUSSY',
des: '藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场',
btnText: 'shop now'
}
]
},
{
floorZh: '新品抢鲜看',
floorEn: 'NEW ARRIVALS',
newArrivals: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'STUSSY',
link: '/',
smallImg: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'DAILY PAPER',
link: '/',
even: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'BAPE',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'SUPREME',
link: '/',
even: true,
smallImg: true
}
]
},
{
floorZh: '经典品牌',
floorEn: 'CLASSIC BRANDS',
classicBrands: [
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/30/10/01714bacda5e9fa323a1dc5f720a7f7140.jpg?imageView2/1/w/185/h/248',
link: ''
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/30/10/01714bacda5e9fa323a1dc5f720a7f7140.jpg?imageView2/1/w/185/h/248',
link: ''
}
],
bottomSpace: true
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
right: true,
bottomSpace: true
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
]
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
right: true
}
]
},
{
floorZh: '潮流标志',
floorEn: 'STYLE ICON',
styleIcon: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
}
]
},
{
adBanner: {
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'STUSSY',
des: '藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场藤原浩于银座停车场',
btnText: 'shop now'
link: ''
}
]
},
{
floorZh: '新品抢鲜看',
floorEn: 'NEW ARRIVALS',
newArrivals: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'STUSSY',
link: '/',
smallImg: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'DAILY PAPER',
link: '/',
even: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'BAPE',
link: '/'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'SUPREME',
link: '/',
even: true,
smallImg: true
},
]
},
{
floorZh: '经典品牌',
floorEn: 'CLASSIC BRANDS',
classicBrands: [
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/30/10/01714bacda5e9fa323a1dc5f720a7f7140.jpg?imageView2/1/w/185/h/248',
link: ''
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/30/10/01714bacda5e9fa323a1dc5f720a7f7140.jpg?imageView2/1/w/185/h/248',
link: ''
}
],
bottomSpace: true
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
},
{
floorZh: '资讯',
floorEn: 'EDITORIAL',
editorial: {
big: {
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
},
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
link: '/',
bottomSpace: true,
rightSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
right: true,
bottomSpace: true
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
link: '/',
bottomSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
]
},
{
big: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
link: '/',
rightSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
],
right: true
}
]
},
{
floorZh: '潮流标志',
floorEn: 'STYLE ICON',
styleIcon: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
name: 'COTE&CIEL',
des: '这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生这都什么时代了?短发女生',
link: '/ ',
btnText: '去看看'
]
}
]
},
{
adBanner: {
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
},
{
floorZh: '资讯',
floorEn: 'EDITORIAL',
editorial: {
big: {
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
},
small: [
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: '/',
bottomSpace: true,
rightSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: '/',
bottomSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: '/',
rightSpace: true
},
{
img: '//img10.static.yhbimg.com/yhb-img01/2016/06/23/13/01ebff30179db84975c42a4f3c8b1f4d44.jpg?imageView2/1/w/1150/h/450',
link: ''
}
]
}
}
]
};
/* eslint-enable */
return content;
}
};
module.exports = {
getContent: getContent
... ...
/**
* router of sub app channel
* @author: biao<bill.zhao@yoho.cn>
* @date: 2016/06/29
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
// Your controller here
const index = require(`${cRoot}`).index;
router.get('/', index);
module.exports = router;
... ...
... ... @@ -8,7 +8,7 @@
</div>
<div class="news right">
{{# small}}
<img class="{{#if bottomSpace}}bottomSpace{{/if}} {{#if rightSpace}}rightSpace{{/if}}" src="{{image img 260 176}}" alt="">
<img class="{{#if bottomSpace}}bottom-space{{/if}} {{#if rightSpace}}right-space{{/if}}" src="{{image img 260 176}}" alt="">
{{/ small}}
</div>
{{/ editorial}}
... ...
... ... @@ -2,9 +2,9 @@ require('../plugins/slider');
$('.slide-container').slider();
$('.card').mouseenter(function() {
var $this = $(this);
var $this = $(this); // eslint-disable-line
if($this.hasClass('active')) {
if ($this.hasClass('active')) {
return false;
}
... ...
... ... @@ -3,6 +3,8 @@
margin-top: 15px;
img {
@extend .cursor-pointer;
width: 100%;
height: 100%;
border: none;
... ...
... ... @@ -6,7 +6,6 @@
background-color: #fff;
.ad {
display: inline-block;
float: left;
width: 50%;
height: 100%;
... ... @@ -18,7 +17,6 @@
}
img {
display: inline-block;
float: left;
width: 50%;
height: 100%;
... ...
... ... @@ -11,7 +11,6 @@
float: right;
}
img {
float: left;
}
... ...
... ... @@ -3,7 +3,6 @@
$line-height: 1.8;
$lines-to-show: 3;
display: inline-block;
float: left;
height: 100%;
width: 50%;
... ...
... ... @@ -10,14 +10,18 @@
display: inline-block;
box-sizing: border-box;
.bottomSpace {
.bottom-space {
margin-bottom: $space;
}
.rightSpace {
.right-space {
margin-right: $space;
}
img {
@extend .cursor-pointer;
}
&.left {
width: $bigImgWidth;
float: left;
... ...
... ... @@ -146,7 +146,6 @@
right: 0;
top: 0;
bottom: 0;
/*background: #000;*/
}
span {
... ... @@ -443,7 +442,6 @@
}
}
.categorys-list {
ul {
width: 1158px;
... ...
... ... @@ -5,57 +5,55 @@
@extend .resource-container;
height: calc($textHeight+$imgHeight+60px);/* 60px is the height of the floor header*/
height: calc($textHeight+$imgHeight+60px);/* 60px is the height of the floor header */
.arrival-item-box {
box-sizing: border-box;
}
.arrival-item {
width: 245px;
display: inline-block;
.arrival-item {
width: 245px;
display: inline-block;
.brand-name {
height: $textHeight;
text-align: center;
font-size: 12px;
.brand-name {
height: $textHeight;
text-align: center;
font-size: 12px;
span {
@extend .cursor-pointer;
span {
@extend .cursor-pointer;
padding-bottom: 3px;
border-bottom: 1px solid #000;
padding-bottom: 3px;
border-bottom: 1px solid #000;
&.top {
line-height: 20px;
}
&.top {
line-height: 20px;
}
&.bottom {
line-height: 40px;
}
&.bottom {
line-height: 40px;
}
}
}
img {
@extend .cursor-pointer;
img {
@extend .cursor-pointer;
width: 100%;
height: $imgHeight;
}
&.normal {
float: left;
margin-right: 18px;
}
width: 100%;
height: $imgHeight;
}
&.last {
float: right;
}
&.normal {
float: left;
margin-right: 18px;
}
&.small-img {
width: 160px;
}
&.last {
float: right;
}
&.small-img {
width: 160px;
}
}
}
... ...
... ... @@ -2,6 +2,7 @@
$width: 164px;
$height: 240px;
$space: 15px;
$buttonWidth: 105px;
@extend .resource-container;
... ... @@ -14,16 +15,13 @@
.card {
height: $height;
display: inline-block;
float: left;
position: relative;
box-sizing: border-box;
.img {
width: $width;
height: 100%;
display: inline-block;
float: left;
margin-right: $space;
background-size: 100% 100%;
... ... @@ -44,7 +42,6 @@
width: 0;
border: none;
p {
height: calc($size*$line-height*$lines-to-show);
width: calc($width-2*$space);
... ... @@ -58,7 +55,7 @@
}
button {
left: calc($width/2-105px/2);
left: calc($width/2-$buttonWidth/2); /* stylelint-disable-line */
}
* {
... ... @@ -77,7 +74,6 @@
.brand-text-box {
width: $width;
height: 100%;
display: inline-block;
float: left;
padding: 25px 0 25px $space;
border: 1px solid #404040;
... ... @@ -92,6 +88,5 @@
}
}
}
}
... ...