Authored by xuqi

Merge branch 'feature/header-footer' into develop

@@ -70,25 +70,28 @@ @@ -70,25 +70,28 @@
70 70
71 //header 71 //header
72 { 72 {
73 - header: {  
74 - back: true/false,  
75 - title: '',  
76 - home: '' //对应页面有就传,没有就不传 73 + pageHeader: {
  74 + //对应页面有就传,没有就不传
  75 + navBack: '',
  76 + navTitle: '',
  77 + navHome: ''
77 } 78 }
78 } 79 }
79 80
80 //footer已登录 81 //footer已登录
81 { 82 {
82 - footer: {  
83 - name: '',  
84 - url: '',  
85 - signoutUrl: '' 83 + pageFooter: {
  84 + user: {
  85 + name: '',
  86 + url: '',
  87 + signoutUrl: ''
  88 + }
86 } 89 }
87 } 90 }
88 91
89 //footer未登录 92 //footer未登录
90 { 93 {
91 - footer: { 94 + pageFooter: {
92 loginUrl: '', 95 loginUrl: '',
93 signupUrl: '' 96 signupUrl: ''
94 } 97 }
@@ -3,6 +3,8 @@ $pxConvertRem: 40; @@ -3,6 +3,8 @@ $pxConvertRem: 40;
3 3
4 * { 4 * {
5 -webkit-tap-highlight-color: rgba(0,0,0,0); 5 -webkit-tap-highlight-color: rgba(0,0,0,0);
  6 + -moz-tap-highlight-color: rgba(0,0,0,0);
  7 + tap-highlight-color: rgba(0,0,0,0);
6 } 8 }
7 9
8 html, body { 10 html, body {
@@ -45,4 +47,4 @@ a { @@ -45,4 +47,4 @@ a {
45 color: #000; 47 color: #000;
46 } 48 }
47 49
48 -@import "passport/index";  
  50 +@import "layout/header", "layout/footer", "passport/index";
  1 +.yoho-footer {
  2 + font-size: 12px;
  3 + background-color: #fff;
  4 +
  5 + .op-row {
  6 + position: relative;
  7 + padding: 0 30px;
  8 + height: 60px;
  9 + line-height: 60px;
  10 +
  11 + .user-name {
  12 + text-decoration: underline;
  13 + }
  14 +
  15 + .back-to-top {
  16 + position: absolute;
  17 + right: 20px;
  18 + }
  19 + }
  20 +
  21 + .copyright {
  22 + height: 60px;
  23 + line-height: 60px;
  24 + border-top: 1px solid #ccc;
  25 + text-align: center;
  26 + color: #666;
  27 + background-color: #eee;
  28 + }
  29 +}
  1 +.yoho-header {
  2 + position: relative;
  3 + background-color: #000;
  4 + color: #fff;
  5 + width: 100%;
  6 + overflow: hidden;
  7 + height: 44px;
  8 + line-height: 44px;
  9 +
  10 + .nav-back {
  11 + position: absolute;
  12 + left: 17px;
  13 + top: 14px;
  14 + width: 9px;
  15 + height: 16px;
  16 + background: image-url('layout/back.png') no-repeat;
  17 + background-size: 100% 100%;
  18 + outline: none;
  19 + }
  20 +
  21 + .nav-home {
  22 + position: absolute;
  23 + top: 14px;
  24 + right: 17px;
  25 + width: 20px;
  26 + height: 20px;
  27 + background: image-url('layout/home.png') no-repeat;
  28 + background-size: 100% 100%;
  29 + outline: none;
  30 + }
  31 +
  32 + .nav-title {
  33 + position: absolute;
  34 + margin-left: 26px;
  35 + margin-right: 32px;
  36 + height: 100%;
  37 + font-size: 18px;
  38 + color: #fff;
  39 + font-weight: bold;
  40 + top: 0;
  41 + right: 0;
  42 + left: 0;
  43 + overflow: hidden;
  44 + white-space: nowrap;
  45 + text-overflow: ellipsis;
  46 + text-align: center;
  47 + }
  48 +}
  1 +{{> layout/page_footer}}
1 <script src="http://172.16.6.248:8000/static/js/sea.js?nowrap"></script> 2 <script src="http://172.16.6.248:8000/static/js/sea.js?nowrap"></script>
2 <script> 3 <script>
3 seajs.config({ 4 seajs.config({
@@ -25,4 +25,5 @@ @@ -25,4 +25,5 @@
25 </script> 25 </script>
26 <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> 26 <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
27 </head> 27 </head>
28 -<body {{#if isPassportPage}}class=passport-body{{/if}}>  
  28 +<body {{#if isPassportPage}}class=passport-body{{/if}}>
  29 +{{> layout/page_header}}
  1 +{{#pageFooter}}
  2 + <footer class="yoho-footer">
  3 + <p class="op-row">
  4 + {{# user}}
  5 + Hi,
  6 + <a class="user-name" href="{{url}}">{{name}}</a>
  7 + <a href="{{signoutUrl}}">退出</a>
  8 + {{^}}
  9 + <a href="{{loginUrl}}">登录</a>
  10 + <span class="sep-line">|</span>
  11 + <a href="{{signupUrl}}">注册</a>
  12 + {{/ user}}
  13 + <span class="back-to-top">
  14 + Back to top
  15 + <i class="iconfont">&#xe608;</i>
  16 + </span>
  17 + </p>
  18 + <address class="copyright">
  19 + CopyRight©2007-2016 南京新与力文化传播有限公司
  20 + </address>
  21 + </footer>
  22 +{{/pageFooter}}
  1 +{{#pageHeader}}
  2 + <header class="yoho-header">
  3 + {{#navBack}}
  4 + <a href={{.}} class="nav-back"></a>
  5 + {{/navBack}}
  6 + {{#navHome}}
  7 + <a href={{.}} class="nav-home"></a>
  8 + {{/navHome}}
  9 + {{#navTitle}}
  10 + <p class="nav-title">{{.}}</p>
  11 + {{/navTitle}}
  12 + </header>
  13 +{{/pageHeader}}
@@ -94,7 +94,16 @@ class BackController extends AbstractAction @@ -94,7 +94,16 @@ class BackController extends AbstractAction
94 'showHeaderText' => true, 94 'showHeaderText' => true,
95 'headerText' => '找回密码', 95 'headerText' => '找回密码',
96 'isPassportPage' => true, 96 'isPassportPage' => true,
97 - 'modulePath' => 'passport/back/new-password' 97 + 'modulePath' => 'passport/back/new-password',
  98 + 'pageHeader' => array(
  99 + 'navBack' => 'm.yohobuy.com',
  100 + 'navHome' => 'm.yohobuy.com',
  101 + 'navTitle' => '上衣'
  102 + ),
  103 + 'pageFooter' => array(
  104 + 'loginUrl' => 'm.yohobuy.com/login.html',
  105 + 'signupUrl' => 'm.yohobuy.com/signup.html'
  106 + )
98 ); 107 );
99 108
100 $this->_view->assign('title', 'YOHO!有货'); 109 $this->_view->assign('title', 'YOHO!有货');