Authored by 2586703@qq.com

03-30 19:40代码

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 * @author: xuqi(qi.xu@yoho.cn) 3 * @author: xuqi(qi.xu@yoho.cn)
4 * @date;2015/3/30 4 * @date;2015/3/30
5 */ 5 */
6 -var $ = require('jquery'); 6 +var $ = require('jquery');
7 7
8 /** 8 /**
9 * 初始化$事件并默认选中列表第一项 9 * 初始化$事件并默认选中列表第一项
  1 +.detail-tag {
  2 + margin: 28rem / $pxConvertRem 0 0 0;
  3 + padding: 0 0 30rem / $pxConvertRem 0;
  4 + border-top: 1px solid #e0e0e0;
  5 + border-bottom: 1px solid #e0e0e0;
  6 + background: #fff;
  7 +
  8 + li {
  9 + float: left;
  10 + margin: 31rem / $pxConvertRem 0 0 31rem / $pxConvertRem;
  11 +
  12 + a {
  13 + display: block;
  14 + padding: 0 36rem / $pxConvertRem;
  15 + height: 50rem / $pxConvertRem;
  16 + line-height: 50rem / $pxConvertRem;
  17 + font-size: 30rem / $pxConvertRem;
  18 + color: #fff;
  19 + background: #000;
  20 + text-decoration: none;
  21 + }
  22 + }
  23 +}
1 $pxConvertRem : 40; 1 $pxConvertRem : 40;
2 2
3 .article-type-three { 3 .article-type-three {
4 - padding-left: 30rem / $pxConvertRem; 4 + padding:0 0 0 15rem / $pxConvertRem;
  5 + background: #fff;
5 6
6 .thumb-container { 7 .thumb-container {
7 letter-spaceing: -1px; 8 letter-spaceing: -1px;
8 font-size: 0; 9 font-size: 0;
  10 + padding: 0 0 0 30rem / $pxConvertRem;
  11 + margin: 0 0 28rem / $pxConvertRem -15rem / $pxConvertRem;
  12 + background: #fff;
  13 + z-index: 10;
9 14
10 .thumb { 15 .thumb {
11 display: inline-block; 16 display: inline-block;
@@ -27,5 +32,36 @@ $pxConvertRem : 40; @@ -27,5 +32,36 @@ $pxConvertRem : 40;
27 } 32 }
28 } 33 }
29 34
  35 + .prod-list {
  36 + position: relative;
  37 + border-top: 2px solid #efefef;
  38 + padding: 31rem / $pxConvertRem 0 0 0;
  39 +
  40 + .arrow {
  41 + position: absolute;
  42 + top: -49px;
  43 + left: 50rem / $pxConvertRem;
  44 +
  45 + em{
  46 + font-style:normal;
  47 + font-size:36rem / $pxConvertRem;
  48 + position:absolute;
  49 + left:0;
  50 + top:39px;
  51 + color:#e0e0e0;
  52 + }
  53 +
  54 + span{
  55 + font-style:normal;
  56 + font-size:36rem / $pxConvertRem;
  57 + position:absolute;
  58 + left:0;
  59 + top:40px;
  60 + color:white;
  61 + }
  62 +
  63 + }
  64 + }
  65 +
30 66
31 } 67 }
  1 +@mixin relatedTitle {
  2 + margin: 0 29rem / $pxConvertRem;
  3 + background: #fff;
  4 + border: 1px solid #e0e0e0;
  5 + border-bottom: none;
  6 + line-height: 72rem / $pxConvertRem;
  7 + font-size: 30rem / $pxConvertRem;
  8 + color: #b0b0b0;
  9 + text-align: center;
  10 +}
  11 +
1 .related-brand { 12 .related-brand {
  13 +
2 h2 { 14 h2 {
3 - margin: 0 29rem / $pxConvertRem; 15 + @include relatedTitle;
  16 + }
  17 +
  18 + .brand-list {
  19 + padding: 30rem / $pxConvertRem 0 30rem / $pxConvertRem 30rem / $pxConvertRem;
4 background: #fff; 20 background: #fff;
5 - border: 1px solid #e0e0e0;  
6 - line-height: 72rem / $pxConvertRem;  
7 - font-size: 30rem / $pxConvertRem;  
8 - color: #b0b0b0; 21 + border-top: 1px solid #e0e0e0;
  22 + border-bottom: 1px solid #e0e0e0;
  23 +
  24 + li {
  25 + float: left;
  26 + margin: 0 0 0 20rem / $pxConvertRem;
  27 + border: 1px solid #e0e0e0;
  28 +
  29 + a{
  30 + display: table-cell;
  31 + width: 128rem / $pxConvertRem;
  32 + height: 128rem / $pxConvertRem;
  33 + vertical-align:middle;
  34 + }
  35 +
  36 + img {
  37 + display: block;
  38 + max-width: 128rem / $pxConvertRem;
  39 + max-height: 128rem / $pxConvertRem;
  40 + vertical-align: middle;
  41 + margin: 0 auto;
  42 + }
  43 + }
  44 +
  45 + li:first-child {
  46 + margin: 0;
  47 + }
9 } 48 }
10 } 49 }
  1 +.related-post {
  2 + margin: 30rem / $pxConvertRem 0 0 0;
  3 +
  4 + h2 {
  5 + @include relatedTitle;
  6 + }
  7 +
  8 + .post-list{
  9 + background: #fff;
  10 + padding: 0 0 30rem / $pxConvertRem 0;
  11 + border-top: 1px solid #e0e0e0;
  12 +
  13 + li{
  14 + padding: 30rem / $pxConvertRem 0 0 0;
  15 + margin: 0 0 10rem / $pxConvertRem 0;
  16 +
  17 + img{
  18 + float: left;
  19 + margin: 0 0 0 30rem / $pxConvertRem;
  20 + width: 182rem / $pxConvertRem;
  21 + height: 162rem / $pxConvertRem;
  22 + }
  23 +
  24 + span{
  25 + float: left;
  26 + width: 360rem / $pxConvertRem;
  27 + margin: 20rem / $pxConvertRem 0 0 30rem / $pxConvertRem;
  28 + line-height: 45rem / $pxConvertRem;
  29 + color: #444;
  30 + font-size: 28rem / $pxConvertRem;
  31 + }
  32 + }
  33 + }
  34 +}
1 $pxConvertRem : 40; 1 $pxConvertRem : 40;
2 @import "compass"; 2 @import "compass";
3 @include global-reset(); 3 @include global-reset();
4 -@import "article-author", "article", "related-brand"; 4 +@import "article-author", "article", "related-brand", "article-tag", "related-post";
5 5
6 6
7 body { 7 body {
@@ -2,4 +2,6 @@ @@ -2,4 +2,6 @@
2 {{> article_author}} 2 {{> article_author}}
3 {{> article}} 3 {{> article}}
4 {{> related_brand}} 4 {{> related_brand}}
  5 + {{> article_tag}}
  6 + {{> related_post}}
5 {{/ detail}} 7 {{/ detail}}
  1 +<div class="detail-tag">
  2 + <ul class="tag-list clearfix">
  3 + {{# tags}}
  4 + <li><a href="{{url}}">{{name}}</a></li>
  5 + {{/ tags}}
  6 + </ul>
  7 +</div>
  8 +
@@ -7,7 +7,11 @@ @@ -7,7 +7,11 @@
7 </li> 7 </li>
8 {{/ collocation}} 8 {{/ collocation}}
9 </ul> 9 </ul>
10 - <div class="prod-list"> 10 + <div class="prod-list clearfix">
  11 + <div class="arrow">
  12 + <em>&#9670;</em>
  13 + <span>&#9670;</span>
  14 + </div>
11 {{# collocation}} 15 {{# collocation}}
12 <div class="prod hide"> 16 <div class="prod hide">
13 {{# products}} 17 {{# products}}
1 <div class="related-brand"> 1 <div class="related-brand">
2 <h2>相关品牌</h2> 2 <h2>相关品牌</h2>
3 - <ul class="brand-list"> 3 + <ul class="brand-list clearfix">
4 {{# brands}} 4 {{# brands}}
5 <li><a href="{{url}}"> 5 <li><a href="{{url}}">
6 <img src="{{thumb}}" alt="{{name}}"> 6 <img src="{{thumb}}" alt="{{name}}">
  1 +<div class="related-post">
  2 + <h2>相关文章</h2>
  3 + <ul class="post-list">
  4 + {{# otherArticle}}
  5 + <li><a class="clearfix" href="{{url}}">
  6 + <img src="{{thumb}}" alt="">
  7 + <span>{{title}}</span>
  8 + </a></li>
  9 + {{/ otherArticle}}
  10 + </ul>
  11 +</div>