Authored by xuqi

文件目录重新布局

Showing 23 changed files with 83 additions and 111 deletions
... ... @@ -5,45 +5,12 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="telephone=no" name="format-detection">
<script type="text/javascript">
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
};
if (!doc.addEventListener) {
return;
}
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
<link rel="stylesheet" href="../css/detail.css">
{{> header}}
</head>
<body>
<div id="detail-container" class="detail-container" style="display:none">
<div id="container" class="hide">
{{{body}}}
</div>
</body>
<script src="//localhost:5000/dist/all-debug.js"></script>
<script type="text/javascript">
seajs.use(['jquery/1.8.3/jquery-debug',
'yohobuy-mobile/1.0.0/public/js/article-type-three-debug',
'yohobuy-mobile/1.0.0/public/js/detail-debug'], function($, article, detail) {
$(".detail-container").show();
if (article) {
article.init();
}
if(detail) {
detail.init();
}
});
</script>
{{> footer}}
</html>
\ No newline at end of file
... ...
seajs.use(['jquery/1.8.3/jquery-debug',
'yohobuy-mobile/1.0.0/public/js/article-type-three-debug',
'yohobuy-mobile/1.0.0/public/js/detail-debug'], function($, article, detail) {
$("#container").removeClass('hide');
if (article) {
article.init();
}
if(detail) {
detail.init();
}
});
\ No newline at end of file
... ...
seajs.use(['jquery/1.8.3/jquery-debug',
'yohobuy-mobile/1.0.0/public/js/article-type-three-optimize-debug',
'yohobuy-mobile/1.0.0/public/js/detail-debug'], function($, article, detail) {
$("#container").removeClass('hide');
if (article) {
article.init();
}
if(detail) {
detail.init();
}
});
\ No newline at end of file
... ...
... ... @@ -6,15 +6,19 @@
var data = require('../../public/js/data.js')();
exports.show = function(req, res) {
res.render('detail', {
res.render('guang/detail', {
detail: data,
layout: '../layouts/layout'
layout: '../layouts/layout',
css: '../css/detail.css',
usejs: 'detail-footer'
});
};
exports.optimize = function(req, res) {
res.render('detail-optimize', {
res.render('guang/detail-optimize', {
detail: data,
layout: '../layouts/layout-optimize'
layout: '../layouts/layout',
css: '../css/detail.css',
usejs: 'detail-optimize-footer'
});
}
\ No newline at end of file
... ...
{{# detail}}
{{> article_author}}
{{> article}}
{{> related_brand}}
{{> article_tag}}
{{> related_post}}
{{/ detail}}
\ No newline at end of file
<div id="wrapper">
<div id="scroller">
{{# detail}}
{{> article_author}}
{{> article}}
{{> related_brand}}
{{> article_tag}}
{{> related_post}}
{{> guang/article_author}}
{{> guang/article}}
{{> guang/related_brand}}
{{> guang/article_tag}}
{{> guang/related_post}}
{{/ detail}}
</div>
</div>
\ No newline at end of file
... ...
{{# detail}}
{{> guang/article_author}}
{{> guang/article}}
{{> guang/related_brand}}
{{> guang/article_tag}}
{{> guang/related_post}}
{{/ detail}}
\ No newline at end of file
... ...
{{# article}}
{{> article_title}}
{{# content}}
{{> article_type_one}}
{{> article_type_two}}
{{> article_type_three}}
{{> article_type_four}}
{{> article_type_five}}
{{/ content}}
{{/ article}}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="telephone=no" name="format-detection">
<script type="text/javascript">
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
};
if (!doc.addEventListener) {
<script type="text/javascript">
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
<link rel="stylesheet" href="../css/detail.css">
</head>
<body>
<div id="detail-container" class="detail-container" style="display:none">
{{{body}}}
</div>
</body>
<script src="//localhost:5000/dist/all-debug.js"></script>
<script type="text/javascript">
seajs.use(['jquery/1.8.3/jquery-debug',
'yohobuy-mobile/1.0.0/public/js/article-type-three-optimize-debug',
'yohobuy-mobile/1.0.0/public/js/detail-debug'], function($, article, detail) {
if (article) {
article.init();
}
if(detail) {
detail.init();
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
};
$(".detail-container").show();
});
</script>
</html>
\ No newline at end of file
if (!doc.addEventListener) {
return;
}
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
<script src="//localhost:5000/dist/all-debug.js"></script>
<script src="//localhost:5000/js/{{usejs}}.js"></script>
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@
<h2>相关推荐</h2>
<div class="good-list clearfix">
{{# list}}
{{> good_info}}
{{> guang/good_info}}
{{/ list}}
</div>
<div class="more-good clearfix">
... ...
... ... @@ -12,7 +12,7 @@
{{# list}}
<div class="prod hide">
{{# products}}
{{> good_info}}
{{> guang/good_info}}
{{/ products}}
</div>
{{/ list}}
... ...
{{# article}}
{{> guang/article_title}}
{{# content}}
{{> guang/article_type_one}}
{{> guang/article_type_two}}
{{> guang/article_type_three}}
{{> guang/article_type_four}}
{{> guang/article_type_five}}
{{/ content}}
{{/ article}}
\ No newline at end of file
... ...
<link rel="stylesheet" href="{{css}}">
\ No newline at end of file
... ...