Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
4db8c11e
Commit
4db8c11e
authored
Jul 23, 2012
by
Vanessa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #47
parent
c17e8aea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
war/src/main/webapp/js/common.js
war/src/main/webapp/js/common.js
+3
-3
war/src/main/webapp/skins/ease/css/ease.min.css
war/src/main/webapp/skins/ease/css/ease.min.css
+4
-5
war/src/main/webapp/skins/ease/js/ease.min.js
war/src/main/webapp/skins/ease/js/ease.min.js
+1
-1
No files found.
war/src/main/webapp/js/common.js
View file @
4db8c11e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
*
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.2.
1, Jul 16
, 2012
* @version 1.0.2.
2, Jul 23
, 2012
*/
*/
/**
/**
...
@@ -44,7 +44,7 @@ var Util = {
...
@@ -44,7 +44,7 @@ var Util = {
if
(
$
.
browser
.
msie
)
{
if
(
$
.
browser
.
msie
)
{
// kill IE6 and IE7
// kill IE6 and IE7
if
(
$
.
browser
.
version
===
"
6.0
"
||
$
.
browser
.
version
===
"
7.0
"
)
{
if
(
$
.
browser
.
version
===
"
6.0
"
||
$
.
browser
.
version
===
"
7.0
"
)
{
window
.
location
=
"
/kill-browser.html
"
;
window
.
location
=
latkeConfig
.
servePath
+
"
/kill-browser.html
"
;
return
;
return
;
}
}
...
@@ -53,7 +53,7 @@ var Util = {
...
@@ -53,7 +53,7 @@ var Util = {
var
path
=
external
.
twGetRunPath
();
var
path
=
external
.
twGetRunPath
();
if
(
path
&&
path
.
toLowerCase
().
indexOf
(
"
360se
"
)
>
-
1
&&
if
(
path
&&
path
.
toLowerCase
().
indexOf
(
"
360se
"
)
>
-
1
&&
window
.
location
.
href
.
indexOf
(
"
admin-index
"
)
>
-
1
)
{
window
.
location
.
href
.
indexOf
(
"
admin-index
"
)
>
-
1
)
{
window
.
location
=
"
/kill-browser.html
"
;
window
.
location
=
latkeConfig
.
servePath
+
"
/kill-browser.html
"
;
return
;
return
;
}
}
}
}
...
...
war/src/main/webapp/skins/ease/css/ease.min.css
View file @
4db8c11e
...
@@ -35,8 +35,7 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
...
@@ -35,8 +35,7 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
#search
,
.translate-ico
{
background-image
:
url(/skins/ease/images/icons.png)
;}
#search
,
.translate-ico
{
background-image
:
url(/skins/ease/images/icons.png)
;}
.translate-ico
{
background-position
:
1px
-125px
;
background-repeat
:
no-repeat
;
border
:
1px
solid
#D5D5D5
;
border-radius
:
3px
;
cursor
:
pointer
;
float
:
right
;
height
:
16px
;
margin
:
-3px
0
0
15px
;
padding
:
1px
;
width
:
16px
;}
.translate-ico
{
background-position
:
1px
-125px
;
background-repeat
:
no-repeat
;
border
:
1px
solid
#D5D5D5
;
border-radius
:
3px
;
cursor
:
pointer
;
float
:
right
;
height
:
16px
;
margin
:
-3px
0
0
15px
;
padding
:
1px
;
width
:
16px
;}
.translate-ico
:hover
{
border-color
:
#9a9a9a
;
box-shadow
:
0
0
1px
#808080
;
background-color
:
#FCFCFC
;}
.translate-ico
:hover
{
border-color
:
#9a9a9a
;
box-shadow
:
0
0
1px
#808080
;
background-color
:
#FCFCFC
;}
.wrapper
{
margin
:
0
50px
;}
.wrapper
{
margin
:
0
auto
;
width
:
990px
;}
.body
{
margin
:
0
auto
50px
;
width
:
990px
;}
.header
{
width
:
100%
;
background-color
:
#FCFCFC
;
z-index
:
1
;}
.header
{
width
:
100%
;
background-color
:
#FCFCFC
;
z-index
:
1
;}
.header
.title
{
border-bottom
:
1px
solid
#808080
;
font-size
:
26px
;
font-weight
:
normal
;}
.header
.title
{
border-bottom
:
1px
solid
#808080
;
font-size
:
26px
;
font-weight
:
normal
;}
.header
.sub-title
{
font-size
:
11px
;}
.header
.sub-title
{
font-size
:
11px
;}
...
@@ -51,10 +50,10 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
...
@@ -51,10 +50,10 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
.nav
a
:hover
{
color
:
#FFF
;
background-color
:
#535353
;}
.nav
a
:hover
{
color
:
#FFF
;
background-color
:
#535353
;}
.nav
a
.current
{
background-color
:
#FFF
;
box-shadow
:
0
-1px
1px
rgba
(
0
,
0
,
0
,
0.1
)
inset
,
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
)
inset
;
color
:
#808080
;}
.nav
a
.current
{
background-color
:
#FFF
;
box-shadow
:
0
-1px
1px
rgba
(
0
,
0
,
0
,
0.1
)
inset
,
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
)
inset
;
color
:
#808080
;}
.nav
img
{
margin-left
:
3px
;}
.nav
img
{
margin-left
:
3px
;}
.footer
{
background-color
:
#FCFCFC
;
border-top
:
2px
solid
#D5D5D5
;
font-size
:
11px
;
padding
:
12px
0
;
-webkit-text-size-adjust
:
none
;}
.footer
{
background-color
:
#FCFCFC
;
border-top
:
2px
solid
#D5D5D5
;
font-size
:
11px
;
padding
:
12px
0
;
-webkit-text-size-adjust
:
none
;
margin-top
:
50px
;
}
#goTop
{
background
:
url(/skins/ease/images/icons.png)
no-repeat
scroll
5px
-51px
#D5D5D5
;
border-radius
:
2px
2px
0
0
;
cursor
:
pointer
;
font-size
:
11px
;
height
:
21px
;
line-height
:
21px
;
padding
:
0
10px
0
23px
;
position
:
absolute
;
right
:
50px
;
display
:
none
;}
#goTop
{
background
:
url(/skins/ease/images/icons.png)
no-repeat
scroll
5px
-51px
#D5D5D5
;
border-radius
:
2px
2px
0
0
;
cursor
:
pointer
;
font-size
:
11px
;
height
:
21px
;
line-height
:
21px
;
padding
:
0
10px
0
23px
;
position
:
absolute
;
right
:
50px
;
display
:
none
;}
#goTop
:hover
{
background-color
:
#D5D5D5
;}
#goTop
:hover
{
background-color
:
#D5D5D5
;}
.
body
>
ul
{
list-style
:
none
;}
.
wrapper
>
ul
{
list-style
:
none
;}
.article
{
border-bottom
:
1px
solid
#f6f6f6
;
padding
:
20px
70px
;}
.article
{
border-bottom
:
1px
solid
#f6f6f6
;
padding
:
20px
70px
;}
.article
:hover
{
border-bottom-color
:
#D5D5D5
;
box-shadow
:
0
0
1px
#f6f6f6
inset
;
background-color
:
#FCFCFC
;}
.article
:hover
{
border-bottom-color
:
#D5D5D5
;
box-shadow
:
0
0
1px
#f6f6f6
inset
;
background-color
:
#FCFCFC
;}
.article-body
{
line-height
:
145%
;
overflow
:
hidden
;
word-wrap
:
break-word
;
margin-bottom
:
10px
;}
.article-body
{
line-height
:
145%
;
overflow
:
hidden
;
word-wrap
:
break-word
;
margin-bottom
:
10px
;}
...
@@ -79,7 +78,7 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
...
@@ -79,7 +78,7 @@ sup{font-size:10px;font-weight:normal;-webkit-text-size-adjust:none;}
.comment-body-ref
>
.comment-header
{
border
:
0
none
;
float
:
right
;
height
:
48px
;
width
:
48px
;
padding
:
0
;}
.comment-body-ref
>
.comment-header
{
border
:
0
none
;
float
:
right
;
height
:
48px
;
width
:
48px
;
padding
:
0
;}
.comment-body-ref
>
.comment-panel
{
margin
:
0
20px
0
0
;
min-height
:
48px
;
width
:
756px
;}
.comment-body-ref
>
.comment-panel
{
margin
:
0
20px
0
0
;
min-height
:
48px
;
width
:
756px
;}
.form
{
padding
:
0
70px
20px
;}
.form
{
padding
:
0
70px
20px
;}
.
body
>
.form
{
float
:
left
;}
.
wrapper
>
.form
{
float
:
left
;}
.form
th
{
text-align
:
right
;
white-space
:
nowrap
;}
.form
th
{
text-align
:
right
;
white-space
:
nowrap
;}
.form
input
[
type
=
text
],
.form
input
[
type
=
password
],
.form
textarea
{
background-color
:
#FCFCFC
;
border-width
:
0
;
box-shadow
:
0
0
2px
#BCBCBC
;
font-family
:
Verdana
,
arial
,
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
12px
;
margin
:
0
5px
10px
0
;
outline
:
medium
none
;
padding
:
0
3px
;
height
:
28px
;
line-height
:
28px
;
width
:
260px
;}
.form
input
[
type
=
text
],
.form
input
[
type
=
password
],
.form
textarea
{
background-color
:
#FCFCFC
;
border-width
:
0
;
box-shadow
:
0
0
2px
#BCBCBC
;
font-family
:
Verdana
,
arial
,
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
12px
;
margin
:
0
5px
10px
0
;
outline
:
medium
none
;
padding
:
0
3px
;
height
:
28px
;
line-height
:
28px
;
width
:
260px
;}
.form
input
:focus
,
.form
textarea
:focus
{
box-shadow
:
0
0
4px
#D5D5D5
;}
.form
input
:focus
,
.form
textarea
:focus
{
box-shadow
:
0
0
4px
#D5D5D5
;}
...
...
war/src/main/webapp/skins/ease/js/ease.min.js
View file @
4db8c11e
var
goTranslate
=
function
(){
window
.
open
(
"
http://translate.google.com/translate?sl=auto&tl=auto&u=
"
+
location
.
href
)};
var
getNextPage
=
function
(){
var
$more
=
$
(
"
.article-next
"
);
currentPage
+=
1
;
var
path
=
"
/articles/
"
;
if
(
location
.
pathname
.
indexOf
(
"
tags
"
)
>-
1
){
var
tagsPathnaem
=
location
.
pathname
.
split
(
"
/tags/
"
);
var
tags
=
tagsPathnaem
[
1
].
split
(
"
/
"
);
path
=
"
/articles/tags/
"
+
tags
[
0
]
+
"
/
"
}
else
if
(
location
.
pathname
.
indexOf
(
"
archives
"
)
>-
1
){
var
archivesPathname
=
location
.
pathname
.
split
(
"
/archives/
"
);
var
archives
=
archivesPathname
[
1
].
split
(
"
/
"
);
path
=
"
/articles/archives/
"
+
archives
[
0
]
+
"
/
"
+
archives
[
1
]
+
"
/
"
}
$
.
ajax
({
url
:
latkeConfig
.
staticServePath
+
path
+
currentPage
,
type
:
"
GET
"
,
beforeSend
:
function
(){
$more
.
css
(
"
background
"
,
"
url(
"
+
latkeConfig
.
staticServePath
+
"
/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe
"
)},
success
:
function
(
result
,
textStatus
){
if
(
!
result
.
sc
){
return
}
var
articlesHTML
=
""
,
pagination
=
result
.
rslts
.
pagination
;
for
(
var
i
=
0
;
i
<
result
.
rslts
.
articles
.
length
;
i
++
){
var
article
=
result
.
rslts
.
articles
[
i
];
articlesHTML
+=
'
<li class="article">
'
+
'
<div class="article-title">
'
+
'
<h2>
'
+
'
<a rel="bookmark" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
">
'
+
article
.
articleTitle
+
'
</a>
'
;
if
(
article
.
hasUpdated
){
articlesHTML
+=
'
<sup>
'
+
Label
.
updatedLabel
+
'
</sup>
'
}
if
(
article
.
articlePutTop
){
articlesHTML
+=
'
<sup>
'
+
Label
.
topArticleLabel
+
'
</sup>
'
}
articlesHTML
+=
'
</h2>
'
+
'
<div class="right">
'
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
#comments">
'
+
+
article
.
articleCommentCount
+
'
'
+
Label
.
commentLabel
+
'
</a>
'
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
">
'
+
article
.
articleViewCount
+
'
'
+
Label
.
viewLabel
+
'
</a>
'
+
'
</div>
'
+
'
<div class="clear"></div>
'
+
'
</div>
'
+
'
<div class="article-body">
'
+
'
<div id="abstract
'
+
article
.
oId
+
'
">
'
+
article
.
articleAbstract
+
'
</div>
'
+
'
<div id="content
'
+
article
.
oId
+
'
" class="none"></div>
'
+
'
</div>
'
+
'
<div class="right ft-gray">
'
;
if
(
article
.
hasUpdated
){
articlesHTML
+=
Util
.
toDate
(
article
.
articleUpdateDate
,
'
yy-MM-dd HH:mm
'
)}
else
{
articlesHTML
+=
Util
.
toDate
(
article
.
articleCreateDate
,
'
yy-MM-dd HH:mm
'
)}
articlesHTML
+=
'
<a href="
'
+
latkeConfig
.
servePath
+
'
/authors/
'
+
article
.
authorId
+
'
">
'
+
article
.
authorName
+
'
</a>
'
+
'
</div>
'
+
'
<div class="left ft-gray">
'
+
Label
.
tag1Label
+
"
"
;
var
articleTags
=
article
.
articleTags
.
split
(
"
,
"
);
for
(
var
j
=
0
;
j
<
articleTags
.
length
;
j
++
){
articlesHTML
+=
'
<a rel="tag" href="
'
+
latkeConfig
.
servePath
+
'
/tags/
'
+
encodeURIComponent
(
articleTags
[
j
])
+
'
">
'
+
articleTags
[
j
]
+
'
</a>
'
;
if
(
j
<
articleTags
.
length
-
1
){
articlesHTML
+=
"
,
"
}}
articlesHTML
+=
'
</div>
'
+
'
<div class="clear"></div>
'
+
'
</li>
'
}
$
(
"
.body>ul
"
).
append
(
articlesHTML
);
if
(
pagination
.
paginationPageCount
===
currentPage
){
$more
.
remove
()}
else
{
$more
.
css
(
"
background
"
,
"
none
"
)}}})};
var
ease
=
{
$header
:
$
(
"
.header
"
),
headerH
:
$
(
"
.header
"
).
height
(),
$body
:
$
(
"
.body
"
),
$nav
:
$
(
"
.nav
"
),
getCurrentPage
:
function
(){
var
$next
=
$
(
"
.article-next
"
);
if
(
$next
.
length
>
0
){
window
.
currentPage
=
$next
.
data
(
"
page
"
)}},
setNavCurrent
:
function
(){
$
(
"
.nav ul a
"
).
each
(
function
(){
var
$this
=
$
(
this
);
if
(
$this
.
attr
(
"
href
"
)
===
latkeConfig
.
servePath
+
location
.
pathname
){
$this
.
addClass
(
"
current
"
)}
else
if
(
/
\/[
0-9
]
+$/
.
test
(
location
.
pathname
)){
$
(
"
.nav ul li
"
)[
0
].
className
=
"
current
"
}})},
initCommon
:
function
(){
Util
.
init
();
Util
.
replaceSideEm
(
$
(
"
.recent-comments-content
"
));
Util
.
buildTags
(
"
tagsSide
"
)},
initArchives
:
function
(){
var
$archives
=
$
(
"
.archives
"
);
if
(
$archives
.
length
<
1
){
return
}
var
years
=
[],
$archiveList
=
$archives
.
find
(
"
span
"
).
each
(
function
(){
var
year
=
$
(
this
).
data
(
"
year
"
),
tag
=
true
;
for
(
var
i
=
0
;
i
<
years
.
length
;
i
++
){
if
(
year
===
years
[
i
]){
tag
=
false
;
break
}}
if
(
tag
){
years
.
push
(
year
)}});
var
yearsHTML
=
""
;
for
(
var
j
=
0
;
j
<
years
.
length
;
j
++
){
var
monthsHTML
=
""
;
for
(
var
l
=
0
;
l
<
$archiveList
.
length
;
l
++
){
var
$month
=
$
(
$archiveList
[
l
]);
if
(
$month
.
data
(
"
year
"
)
===
years
[
j
]){
monthsHTML
+=
$month
.
html
()}}
yearsHTML
+=
"
<div><h3 class='ft-gray'>
"
+
years
[
j
]
+
"
</h3>
"
+
monthsHTML
+
"
</div>
"
}
$archives
.
html
(
yearsHTML
);
var
$items
=
$
(
"
.archives>div
"
),
line
=
0
,
top
=
0
,
heights
=
[];
for
(
var
m
=
0
;
m
<
$items
.
length
;
m
++
){
for
(
var
n
=
0
;
n
<
3
;
n
++
){
if
(
m
>=
$items
.
length
){
break
}
$items
[
m
].
style
.
left
=
(
n
*
318
)
+
"
px
"
;
if
(
line
>
0
){
if
(
$items
[
m
-
3
].
style
.
top
!==
""
){
top
=
parseInt
(
$items
[
m
-
3
].
style
.
top
)}
$items
[
m
].
style
.
top
=
$
(
$items
[
m
-
3
]).
height
()
+
60
+
top
+
"
px
"
;
heights
[
n
]
=
parseInt
(
$items
[
m
].
style
.
top
)
+
$
(
$items
[
m
]).
height
()
+
60
}
else
{
heights
[
n
]
=
$
(
$items
[
m
]).
height
()
+
60
}
if
(
n
<
2
){
m
+=
1
}}
line
+=
1
}
$archives
.
height
(
heights
.
sort
()[
heights
.
length
-
1
])},
scrollEvent
:
function
(){
var
_it
=
this
;
$
(
window
).
scroll
(
function
(){
var
y
=
$
(
window
).
scrollTop
();
if
(
y
>=
_it
.
headerH
+
$
(
"
#top
"
).
height
()){
_it
.
$nav
.
css
(
"
position
"
,
"
fixed
"
);
_it
.
$body
.
css
(
"
marginTop
"
,
"
58px
"
)}
else
{
_it
.
$nav
.
css
(
"
position
"
,
"
inherit
"
);
_it
.
$body
.
css
(
"
marginTop
"
,
"
0
"
)}
if
(
y
>
_it
.
headerH
){
var
bodyH
=
$
(
window
).
height
();
var
top
=
y
+
bodyH
-
21
;
if
(
$
(
"
body
"
).
height
()
-
58
<=
y
+
bodyH
){
top
=
$
(
"
.footer
"
).
offset
().
top
-
21
}
$
(
"
#goTop
"
).
fadeIn
(
"
slow
"
).
css
(
"
top
"
,
top
)}
else
{
$
(
"
#goTop
"
).
hide
()}})},
setDynamic
:
function
(){
var
$dynamic
=
$
(
"
.dynamic
"
);
if
(
$
(
"
.dynamic
"
).
length
<
1
){
return
}
var
$comments
=
$dynamic
.
find
(
"
.side-comments
"
),
$tags
=
$dynamic
.
find
(
"
.side-tags
"
),
$mostComment
=
$dynamic
.
find
(
"
.side-most-comment
"
),
$mostView
=
$dynamic
.
find
(
"
.side-most-view
"
);
if
(
$comments
.
height
()
>
$tags
.
height
()){
$tags
.
height
(
$comments
.
height
())}
else
{
$comments
.
height
(
$tags
.
height
())}
if
(
$mostComment
.
height
()
>
$mostView
.
height
()){
$mostView
.
height
(
$mostComment
.
height
())}
else
{
$mostComment
.
height
(
$mostView
.
height
())}
$
(
"
.article-body
"
).
each
(
function
(){
this
.
innerHTML
=
Util
.
replaceEmString
(
$
(
this
).
html
())})}};(
function
(){
ease
.
getCurrentPage
();
ease
.
initCommon
();
ease
.
scrollEvent
();
ease
.
setNavCurrent
();
ease
.
initArchives
();
ease
.
setDynamic
()})();
var
goTranslate
=
function
(){
window
.
open
(
"
http://translate.google.com/translate?sl=auto&tl=auto&u=
"
+
location
.
href
)};
var
getNextPage
=
function
(){
var
$more
=
$
(
"
.article-next
"
);
currentPage
+=
1
;
var
path
=
"
/articles/
"
;
if
(
location
.
pathname
.
indexOf
(
"
tags
"
)
>-
1
){
var
tagsPathnaem
=
location
.
pathname
.
split
(
"
/tags/
"
);
var
tags
=
tagsPathnaem
[
1
].
split
(
"
/
"
);
path
=
"
/articles/tags/
"
+
tags
[
0
]
+
"
/
"
}
else
if
(
location
.
pathname
.
indexOf
(
"
archives
"
)
>-
1
){
var
archivesPathname
=
location
.
pathname
.
split
(
"
/archives/
"
);
var
archives
=
archivesPathname
[
1
].
split
(
"
/
"
);
path
=
"
/articles/archives/
"
+
archives
[
0
]
+
"
/
"
+
archives
[
1
]
+
"
/
"
}
$
.
ajax
({
url
:
latkeConfig
.
staticServePath
+
path
+
currentPage
,
type
:
"
GET
"
,
beforeSend
:
function
(){
$more
.
css
(
"
background
"
,
"
url(
"
+
latkeConfig
.
staticServePath
+
"
/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe
"
)},
success
:
function
(
result
,
textStatus
){
if
(
!
result
.
sc
){
return
}
var
articlesHTML
=
""
,
pagination
=
result
.
rslts
.
pagination
;
for
(
var
i
=
0
;
i
<
result
.
rslts
.
articles
.
length
;
i
++
){
var
article
=
result
.
rslts
.
articles
[
i
];
articlesHTML
+=
'
<li class="article">
'
+
'
<div class="article-title">
'
+
'
<h2>
'
+
'
<a rel="bookmark" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
">
'
+
article
.
articleTitle
+
'
</a>
'
;
if
(
article
.
hasUpdated
){
articlesHTML
+=
'
<sup>
'
+
Label
.
updatedLabel
+
'
</sup>
'
}
if
(
article
.
articlePutTop
){
articlesHTML
+=
'
<sup>
'
+
Label
.
topArticleLabel
+
'
</sup>
'
}
articlesHTML
+=
'
</h2>
'
+
'
<div class="right">
'
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
#comments">
'
+
+
article
.
articleCommentCount
+
'
'
+
Label
.
commentLabel
+
'
</a>
'
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
article
.
articlePermalink
+
'
">
'
+
article
.
articleViewCount
+
'
'
+
Label
.
viewLabel
+
'
</a>
'
+
'
</div>
'
+
'
<div class="clear"></div>
'
+
'
</div>
'
+
'
<div class="article-body">
'
+
'
<div id="abstract
'
+
article
.
oId
+
'
">
'
+
article
.
articleAbstract
+
'
</div>
'
+
'
<div id="content
'
+
article
.
oId
+
'
" class="none"></div>
'
+
'
</div>
'
+
'
<div class="right ft-gray">
'
;
if
(
article
.
hasUpdated
){
articlesHTML
+=
Util
.
toDate
(
article
.
articleUpdateDate
,
'
yy-MM-dd HH:mm
'
)}
else
{
articlesHTML
+=
Util
.
toDate
(
article
.
articleCreateDate
,
'
yy-MM-dd HH:mm
'
)}
articlesHTML
+=
'
<a href="
'
+
latkeConfig
.
servePath
+
'
/authors/
'
+
article
.
authorId
+
'
">
'
+
article
.
authorName
+
'
</a>
'
+
'
</div>
'
+
'
<div class="left ft-gray">
'
+
Label
.
tag1Label
+
"
"
;
var
articleTags
=
article
.
articleTags
.
split
(
"
,
"
);
for
(
var
j
=
0
;
j
<
articleTags
.
length
;
j
++
){
articlesHTML
+=
'
<a rel="tag" href="
'
+
latkeConfig
.
servePath
+
'
/tags/
'
+
encodeURIComponent
(
articleTags
[
j
])
+
'
">
'
+
articleTags
[
j
]
+
'
</a>
'
;
if
(
j
<
articleTags
.
length
-
1
){
articlesHTML
+=
"
,
"
}}
articlesHTML
+=
'
</div>
'
+
'
<div class="clear"></div>
'
+
'
</li>
'
}
$
(
"
body>.wrapper>ul
"
).
append
(
articlesHTML
);
if
(
pagination
.
paginationPageCount
===
currentPage
){
$more
.
remove
()}
else
{
$more
.
css
(
"
background
"
,
"
none
"
)}}})};
var
ease
=
{
$header
:
$
(
"
.header
"
),
headerH
:
$
(
"
.header
"
).
height
(),
$body
:
$
(
"
body > .wrapper
"
),
$nav
:
$
(
"
.nav
"
),
getCurrentPage
:
function
(){
var
$next
=
$
(
"
.article-next
"
);
if
(
$next
.
length
>
0
){
window
.
currentPage
=
$next
.
data
(
"
page
"
)}},
setNavCurrent
:
function
(){
$
(
"
.nav ul a
"
).
each
(
function
(){
var
$this
=
$
(
this
);
if
(
$this
.
attr
(
"
href
"
)
===
latkeConfig
.
servePath
+
location
.
pathname
){
$this
.
addClass
(
"
current
"
)}
else
if
(
/
\/[
0-9
]
+$/
.
test
(
location
.
pathname
)){
$
(
"
.nav ul li
"
)[
0
].
className
=
"
current
"
}})},
initCommon
:
function
(){
Util
.
init
();
Util
.
replaceSideEm
(
$
(
"
.recent-comments-content
"
));
Util
.
buildTags
(
"
tagsSide
"
)},
initArchives
:
function
(){
var
$archives
=
$
(
"
.archives
"
);
if
(
$archives
.
length
<
1
){
return
}
var
years
=
[],
$archiveList
=
$archives
.
find
(
"
span
"
).
each
(
function
(){
var
year
=
$
(
this
).
data
(
"
year
"
),
tag
=
true
;
for
(
var
i
=
0
;
i
<
years
.
length
;
i
++
){
if
(
year
===
years
[
i
]){
tag
=
false
;
break
}}
if
(
tag
){
years
.
push
(
year
)}});
var
yearsHTML
=
""
;
for
(
var
j
=
0
;
j
<
years
.
length
;
j
++
){
var
monthsHTML
=
""
;
for
(
var
l
=
0
;
l
<
$archiveList
.
length
;
l
++
){
var
$month
=
$
(
$archiveList
[
l
]);
if
(
$month
.
data
(
"
year
"
)
===
years
[
j
]){
monthsHTML
+=
$month
.
html
()}}
yearsHTML
+=
"
<div><h3 class='ft-gray'>
"
+
years
[
j
]
+
"
</h3>
"
+
monthsHTML
+
"
</div>
"
}
$archives
.
html
(
yearsHTML
);
var
$items
=
$
(
"
.archives>div
"
),
line
=
0
,
top
=
0
,
heights
=
[];
for
(
var
m
=
0
;
m
<
$items
.
length
;
m
++
){
for
(
var
n
=
0
;
n
<
3
;
n
++
){
if
(
m
>=
$items
.
length
){
break
}
$items
[
m
].
style
.
left
=
(
n
*
318
)
+
"
px
"
;
if
(
line
>
0
){
if
(
$items
[
m
-
3
].
style
.
top
!==
""
){
top
=
parseInt
(
$items
[
m
-
3
].
style
.
top
)}
$items
[
m
].
style
.
top
=
$
(
$items
[
m
-
3
]).
height
()
+
60
+
top
+
"
px
"
;
heights
[
n
]
=
parseInt
(
$items
[
m
].
style
.
top
)
+
$
(
$items
[
m
]).
height
()
+
60
}
else
{
heights
[
n
]
=
$
(
$items
[
m
]).
height
()
+
60
}
if
(
n
<
2
){
m
+=
1
}}
line
+=
1
}
$archives
.
height
(
heights
.
sort
()[
heights
.
length
-
1
])},
scrollEvent
:
function
(){
var
_it
=
this
;
$
(
window
).
scroll
(
function
(){
var
y
=
$
(
window
).
scrollTop
();
if
(
y
>=
_it
.
headerH
+
$
(
"
#top
"
).
height
()){
_it
.
$nav
.
css
(
"
position
"
,
"
fixed
"
);
_it
.
$body
.
css
(
"
marginTop
"
,
"
58px
"
)}
else
{
_it
.
$nav
.
css
(
"
position
"
,
"
inherit
"
);
_it
.
$body
.
css
(
"
marginTop
"
,
"
0
"
)}
if
(
y
>
_it
.
headerH
){
var
bodyH
=
$
(
window
).
height
();
var
top
=
y
+
bodyH
-
21
;
if
(
$
(
"
body
"
).
height
()
-
58
<=
y
+
bodyH
){
top
=
$
(
"
.footer
"
).
offset
().
top
-
21
}
$
(
"
#goTop
"
).
fadeIn
(
"
slow
"
).
css
(
"
top
"
,
top
)}
else
{
$
(
"
#goTop
"
).
hide
()}})},
setDynamic
:
function
(){
var
$dynamic
=
$
(
"
.dynamic
"
);
if
(
$
(
"
.dynamic
"
).
length
<
1
){
return
}
var
$comments
=
$dynamic
.
find
(
"
.side-comments
"
),
$tags
=
$dynamic
.
find
(
"
.side-tags
"
),
$mostComment
=
$dynamic
.
find
(
"
.side-most-comment
"
),
$mostView
=
$dynamic
.
find
(
"
.side-most-view
"
);
if
(
$comments
.
height
()
>
$tags
.
height
()){
$tags
.
height
(
$comments
.
height
())}
else
{
$comments
.
height
(
$tags
.
height
())}
if
(
$mostComment
.
height
()
>
$mostView
.
height
()){
$mostView
.
height
(
$mostComment
.
height
())}
else
{
$mostComment
.
height
(
$mostView
.
height
())}
$
(
"
.article-body
"
).
each
(
function
(){
this
.
innerHTML
=
Util
.
replaceEmString
(
$
(
this
).
html
())})}};(
function
(){
ease
.
getCurrentPage
();
ease
.
initCommon
();
ease
.
scrollEvent
();
ease
.
setNavCurrent
();
ease
.
initArchives
();
ease
.
setDynamic
()})();
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment