Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
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
Commits
c047f532
Commit
c047f532
authored
Jan 30, 2013
by
Vanessa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
记得明天去用脚本压缩
parent
2a3d386e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1027 additions
and
126 deletions
+1027
-126
war/src/main/webapp/skins/timeline/css/timeline.css
war/src/main/webapp/skins/timeline/css/timeline.css
+1
-1
war/src/main/webapp/skins/timeline/css/timeline.min.css
war/src/main/webapp/skins/timeline/css/timeline.min.css
+718
-110
war/src/main/webapp/skins/timeline/index.ftl
war/src/main/webapp/skins/timeline/index.ftl
+2
-2
war/src/main/webapp/skins/timeline/js/timeline.js
war/src/main/webapp/skins/timeline/js/timeline.js
+33
-12
war/src/main/webapp/skins/timeline/js/timeline.min.js
war/src/main/webapp/skins/timeline/js/timeline.min.js
+273
-1
No files found.
war/src/main/webapp/skins/timeline/css/timeline.css
View file @
c047f532
...
...
@@ -437,7 +437,7 @@ a:hover > .ico-pre {
.articles
>
div
.fn-clear
{
position
:
relative
;
margin-bottom
:
2
0px
;
margin-bottom
:
5
0px
;
}
.articles
>
div
.fn-clear
>
h2
{
...
...
war/src/main/webapp/skins/timeline/css/timeline.min.css
View file @
c047f532
This diff is collapsed.
Click to expand it.
war/src/main/webapp/skins/timeline/index.ftl
View file @
c047f532
...
...
@@ -10,7 +10,7 @@
<body>
${topBarReplacement}
<
#include
"
header
.
ftl
"
>
<ul
class=
"nav-abs"
style=
"padding: 0;
"
>
<ul
class=
"nav-abs"
style=
"padding: 0;position: fixed
"
>
<
#list
archiveDates
as
archiveDate
>
<li
data-year=
"${archiveDate.archiveDateYear}"
onclick=
"timeline.getArchive('${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}')"
>
...
...
@@ -23,7 +23,7 @@
</
#
list>
</ul>
<div
class=
"wrapper"
>
<div
class=
"articles container"
>
<div
class=
"articles container"
style=
"margin-top: 0"
>
<div
class=
"vertical"
></div>
<
#list
archiveDates
as
archiveDate
>
<div
class=
"fn-clear"
id=
"${archiveDate.archiveDateYear}${archiveDate.archiveDateMonth}"
>
...
...
war/src/main/webapp/skins/timeline/js/timeline.js
View file @
c047f532
...
...
@@ -41,9 +41,9 @@ var timeline = {
});
if
(
isLeft
)
{
$it
.
addClass
(
"
l
"
)
;
this
.
className
=
"
l
"
;
}
else
{
$it
.
addClass
(
"
r
"
)
;
this
.
className
=
"
r
"
;
}
colH
[(
isLeft
?
'
0
'
:
'
1
'
)]
+=
parseInt
(
$it
.
outerHeight
(
true
));
...
...
@@ -81,6 +81,7 @@ var timeline = {
var
$articles
=
$
(
this
).
find
(
"
article
"
);
if
(
$articles
.
length
===
0
)
{
$
(
this
).
find
(
"
h2
"
).
remove
();
$
(
this
).
css
(
"
margin-bottom
"
,
0
);
}
else
{
$articles
.
each
(
function
()
{
var
$it
=
$
(
this
),
...
...
@@ -92,9 +93,9 @@ var timeline = {
});
if
(
isLeft
)
{
$it
.
addClass
(
"
l
"
)
;
this
.
className
=
"
l
"
;
}
else
{
$it
.
addClass
(
"
r
"
)
;
this
.
className
=
"
r
"
;
}
colH
[(
isLeft
?
'
0
'
:
'
1
'
)]
+=
parseInt
(
$it
.
outerHeight
(
true
));
...
...
@@ -143,7 +144,7 @@ var timeline = {
+
'
<div class="article-more" onclick="timeline.getNextPage(this,
\'
'
+
archive
+
'
\'
)" data-page="0">
'
+
Label
.
moreLabel
+
'
</div>
'
;
$
(
"
#
"
+
archiveDate
).
html
(
archiveHTML
);
$
(
"
#
"
+
archiveDate
).
html
(
archiveHTML
)
.
css
(
"
margin-bottom
"
,
"
50px
"
)
;
timeline
.
getNextPage
(
$
(
"
#
"
+
archiveDate
).
find
(
"
.article-more
"
)[
0
],
archive
);
}
},
...
...
@@ -219,8 +220,25 @@ var timeline = {
+
'
</a></span></div></article>
'
;
}
var
colH
=
[
parseInt
(
$
(
"
.article-more
"
).
prev
().
prev
().
css
(
"
top
"
))
+
$
(
"
.article-more
"
).
prev
().
prev
().
outerHeight
(
true
),
parseInt
(
$
(
"
.article-more
"
).
prev
().
css
(
"
top
"
))
+
$
(
"
.article-more
"
).
prev
().
outerHeight
(
true
)];
var
colHA
=
parseInt
(
$
(
"
.article-more
"
).
prev
().
prev
().
css
(
"
top
"
))
+
$
(
"
.article-more
"
).
prev
().
prev
().
outerHeight
(
true
),
colHB
=
parseInt
(
$
(
"
.article-more
"
).
prev
().
css
(
"
top
"
))
+
$
(
"
.article-more
"
).
prev
().
outerHeight
(
true
);
if
(
archive
)
{
// 前面无 article
if
(
$
(
"
.article-more
"
).
prev
()[
0
].
tagName
.
toLowerCase
()
===
"
h2
"
)
{
colHA
=
timeline
.
_COLHA
+
60
;
colHB
=
timeline
.
_COLHB
*
4
;
}
// 前面只有1篇文章
if
(
$
(
"
.article-more
"
).
prev
()[
0
].
tagName
.
toLowerCase
()
===
"
article
"
&&
$
(
"
.article-more
"
).
prev
().
prev
()[
0
].
tagName
.
toLowerCase
()
===
"
h2
"
)
{
colHA
=
parseInt
(
$
(
"
.article-more
"
).
prev
().
css
(
"
top
"
))
+
$
(
"
.article-more
"
).
prev
().
outerHeight
(
true
);
colHB
=
timeline
.
_COLHB
*
4
;
}
}
var
colH
=
[
colHA
,
colHB
];
$more
.
before
(
articlesHTML
).
data
(
"
page
"
,
currentPage
);
...
...
@@ -242,9 +260,9 @@ var timeline = {
});
if
(
isLeft
)
{
$it
.
addClass
(
"
l
"
)
;
this
.
className
=
"
l
"
;
}
else
{
$it
.
addClass
(
"
r
"
)
;
this
.
className
=
"
r
"
;
}
colH
[(
isLeft
?
'
0
'
:
'
1
'
)]
+=
parseInt
(
$it
.
outerHeight
(
true
));
...
...
@@ -257,9 +275,12 @@ var timeline = {
toggleArchives
:
function
(
year
)
{
$
(
"
.nav-abs li
"
).
each
(
function
(
i
)
{
var
$this
=
$
(
this
);
if
(
year
===
$this
.
data
(
"
year
"
))
{
$this
.
toggle
();
var
$it
=
$
(
this
);
if
(
this
.
className
!==
"
year
"
)
{
$it
.
hide
();
if
(
year
===
$it
.
data
(
"
year
"
))
{
$it
.
show
();
}
}
});
}
...
...
war/src/main/webapp/skins/timeline/js/timeline.min.js
View file @
c047f532
This diff is collapsed.
Click to expand it.
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