Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangxiaoru
9 years ago
Commit
a37c656514138fc56ba15071f306c897376fcddd
1 parent
9224866b
资讯首页
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
17 deletions
apps/editorial/controllers/editorial.js
apps/editorial/views/action/index.hbs
apps/editorial/views/partial/msg.hbs
public/js/editorial/index.page.js
public/scss/editorial/_index.css
public/scss/editorial/_msg.css
public/scss/index.css
apps/editorial/controllers/editorial.js
View file @
a37c656
...
...
@@ -8,9 +8,9 @@
const
index
=
(
req
,
res
)
=>
{
//
var pageNum = req.query.page || 1;
var
pageNum
=
req
.
query
.
page
||
1
;
res
.
render
(
'index'
,
{
res
.
display
(
'index'
,
{
module
:
'editorial'
,
page
:
'index'
,
title
:
'资讯'
,
...
...
@@ -59,17 +59,31 @@ const index = (req, res) => {
type
:
'潮品'
}
],
m
ags
:
[
m
sg
:
[
{
msgLeft
:
'潮品'
,
msgTitle
:
'很到位和范围的恢复文件和'
,
msgTitle
:
'很到位和范围的恢复文件和的减肥了晚餐费'
,
img
:
''
,
msgContent
:
'鞋款定价回复即可老地方了服务'
,
time
:
'2016/05/25 19:36'
,
liked
:
true
,
like
:
'8'
},
{
msgLeft
:
'潮品'
,
msgTitle
:
'很到位和范围的恢复文件和的减肥了晚餐费'
,
img
:
''
,
msgContent
:
'鞋款定价回复即可老地方了服务'
,
time
:
'2016/05/25 19:36'
,
liked
:
true
,
like
:
'8'
}
]
],
paginationOpts
:
{
page
:
pageNum
,
// current page: http://host/?page=2
limit
:
10
,
// per_page records' number
totalRows
:
100
// total page number
}
},
helpers
:
{
// import component, path depends on your project
...
...
apps/editorial/views/action/index.hbs
View file @
a37c656
<div
class=
"editorial-index-page"
>
{{#
editorial
}}
{{>
path-nav
}}
{{#
editorial
}}
{{>
path-nav
}}
<div
class=
"index-content"
>
<ul
class=
"msg-nav"
>
...
...
@@ -14,12 +12,15 @@
</ul>
<div
id=
"msg-list"
class=
"msg-list"
>
{{#
msg
s
}}
{{#
msg
}}
{{>
msg
}}
{{/
msg
s
}}
{{/
msg
}}
</div>
<div
class=
"paging"
>
{{{
pagination
paginationOpts
}}}
</div>
</div>
{{/
editorial
}}
{{/
editorial
}}
</div>
\ No newline at end of file
...
...
apps/editorial/views/partial/msg.hbs
View file @
a37c656
...
...
@@ -10,7 +10,7 @@
<b
class=
"time-word"
>
{{
time
}}
</b>
</span>
<span
class=
"like-comment"
>
<i
class=
"iconfont like-icon
{{#if
liked
}}
liked
{{/if}}
"
>
æ
26
;
</i>
<i
class=
"iconfont like-icon
{{#if
liked
}}
liked
{{/if}}
"
>
æ
0e
;
</i>
<b
class=
"like-num"
>
{{
like
}}
</b>
</span>
</div>
...
...
public/js/editorial/index.page.js
0 → 100644
View file @
a37c656
/**
* 资讯首页
* @author: zxr<xiaoru.zhang@yoho.cn>
* @date: 2016/07/05
*/
// var $ = require('yoho-jquery'),
// lazyLoad = require('yoho-jquery-lazyload');
// lazyLoad($('#msg-list img.lazy'));
...
...
public/scss/editorial/_index.css
View file @
a37c656
...
...
@@ -39,6 +39,12 @@
}
}
}
.paging
{
margin
:
20px
auto
;
width
:
300px
;
height
:
40px
;
}
}
@import
"msg"
;
...
...
public/scss/editorial/_msg.css
View file @
a37c656
...
...
@@ -47,7 +47,6 @@
line-height
:
24px
;
word-wrap
:
break-word
;
margin-top
:
10px
;
margin-bottom
:
10px
;
overflow
:
hidden
;
word-wrap
:
break-word
;
text-overflow
:
ellipsis
;
...
...
@@ -57,8 +56,8 @@
}
.msg-app
{
height
:
30px
;
line-height
:
30px
;
height
:
45px
;
line-height
:
45px
;
font-size
:
14px
;
}
...
...
@@ -81,6 +80,14 @@
color
:
#a6a6a6
;
cursor
:
pointer
;
font-size
:
14px
;
.like-icon
{
cursor
:
pointer
;
&.liked
{
color
:
#000
;
}
}
}
.like-num
{
...
...
public/scss/index.css
View file @
a37c656
...
...
@@ -8,7 +8,6 @@
/* 模块 */
@import
"me/index"
;
@import
"channel/index"
;
@import
"base"
;
@import
"components/index"
;
...
...
Please
register
or
login
to post a comment