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
0fed47eb
Commit
0fed47eb
authored
Jun 25, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.9.1-dev'
parents
02c38803
57077695
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
src/main/webapp/skins/Medium/js/common.min.js
src/main/webapp/skins/Medium/js/common.min.js
+1
-1
src/main/webapp/skins/Medium/links.ftl
src/main/webapp/skins/Medium/links.ftl
+27
-27
No files found.
src/main/webapp/skins/Medium/js/common.min.js
View file @
0fed47eb
...
...
@@ -15,4 +15,4 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
var
Skin
=
{
init
:
function
(){
$
(
"
body
"
).
on
(
"
click
"
,
"
.content-reset img
"
,
function
(){
window
.
open
(
this
.
src
)}),
$
(
window
).
scroll
(
function
(){
0
!==
$
(
"
#headerNav
"
).
length
&&
(
$
(
window
).
scrollTop
()
>
64
?(
$
(
"
#headerNav
"
).
addClass
(
"
header__nav--fixed
"
),
$
(
"
.main
"
).
css
(
"
margin-top
"
,
"
100px
"
)):(
$
(
"
#headerNav
"
).
removeClass
(
"
header__nav--fixed
"
),
$
(
"
.main
"
).
css
(
"
margin-top
"
,
"
50px
"
)))}),
$
(
window
).
scroll
()},
initArticle
:
function
(){
Skin
.
_share
(
"
#articleShare
"
),
Skin
.
_share
(
"
#articleSideShare
"
),
Skin
.
_share
(
"
#articleBottomShare
"
);
var
t
=
$
(
"
.post__side
"
);
$
(
window
).
height
()
>=
$
(
"
.post
"
).
height
()
&&
t
.
css
(
"
opacity
"
,
1
),
t
.
css
(
"
left
"
,(
$
(
"
.post
"
).
offset
().
left
-
20
)
/
2
-
27
+
"
px
"
);
var
e
=
(
$
(
window
).
height
()
-
249
)
/
2
+
125
,
i
=
$
(
window
).
scrollTop
();
$
(
window
).
scroll
(
function
(){
var
o
=
$
(
window
).
scrollTop
(),
a
=
$
(
"
.article__bottom
"
).
offset
().
top
;
o
>
65
?(
t
.
css
(
"
opacity
"
,
1
),
i
-
o
>
0
?(
$
(
"
.header
"
).
addClass
(
"
header--fixed
"
).
css
({
top
:
"
0
"
}),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
64px
"
),
$
(
window
).
height
()
<=
$
(
"
.post
"
).
height
()
&&
o
<
a
-
$
(
window
).
height
()
&&
$
(
"
.article__toolbar
"
).
css
({
bottom
:
0
,
opacity
:
1
})):
i
-
o
<
0
&&
(
$
(
"
.header
"
).
css
({
top
:
"
-64px
"
}).
removeClass
(
"
header--fixed
"
),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
0
"
),
$
(
"
.article__toolbar
"
).
css
({
bottom
:
"
-44px
"
,
opacity
:
0
}))):(
$
(
window
).
height
()
<=
$
(
"
.post
"
).
height
()
&&
t
.
css
(
"
opacity
"
,
0
),
$
(
"
.header
"
).
removeClass
(
"
header--fixed
"
).
css
(
"
top
"
,
"
-64px
"
),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
0
"
)),
o
>
a
-
$
(
window
).
height
()?
a
<
$
(
window
).
height
()?
t
.
css
({
position
:
"
absolute
"
,
top
:
a
-
125
+
"
px
"
}):
t
.
css
({
position
:
"
absolute
"
,
top
:
a
-
e
+
"
px
"
}):
t
.
css
({
position
:
"
fixed
"
,
top
:
"
50%
"
}),
i
=
o
}),
$
(
window
).
scroll
()},
_share
:
function
(
t
){
var
e
=
$
(
t
),
i
=
e
.
find
(
"
.article__code
"
),
o
=
i
.
data
(
"
url
"
),
a
=
i
.
data
(
"
avatar
"
),
s
=
encodeURIComponent
(
i
.
data
(
"
title
"
)
+
"
-
"
+
i
.
data
(
"
blogtitle
"
)),
n
=
encodeURIComponent
(
o
),
c
=
{};
c
.
tencent
=
"
http://share.v.t.qq.com/index.php?c=share&a=index&title=
"
+
s
+
"
&url=
"
+
n
+
"
&pic=
"
+
a
,
c
.
weibo
=
"
http://v.t.sina.com.cn/share/share.php?title=
"
+
s
+
"
&url=
"
+
n
+
"
&pic=
"
+
a
,
c
.
google
=
"
https://plus.google.com/share?url=
"
+
n
,
c
.
twitter
=
"
https://twitter.com/intent/tweet?status=
"
+
s
+
"
"
+
n
,
e
.
find
(
"
span
"
).
click
(
function
(){
var
t
=
$
(
this
).
data
(
"
type
"
);
if
(
t
)
return
"
wechat
"
===
t
?(
0
===
i
.
find
(
"
canvas
"
).
length
?
i
.
qrcode
({
width
:
128
,
height
:
128
,
text
:
o
}):
i
.
slideToggle
(),
!
1
):
void
window
.
open
(
c
[
t
],
"
_blank
"
,
"
top=100,left=200,width=648,height=618
"
)})}};
Skin
.
init
();
\ No newline at end of file
var
Skin
=
{
init
:
function
(){
$
(
"
body
"
).
on
(
"
click
"
,
"
.content-reset img
"
,
function
(){
window
.
open
(
this
.
src
)}),
$
(
window
).
scroll
(
function
(){
0
!==
$
(
"
#headerNav
"
).
length
&&
(
$
(
window
).
scrollTop
()
>
64
?(
$
(
"
#headerNav
"
).
addClass
(
"
header__nav--fixed
"
),
$
(
"
.main
"
).
css
(
"
margin-top
"
,
"
100px
"
)):(
$
(
"
#headerNav
"
).
removeClass
(
"
header__nav--fixed
"
),
$
(
"
.main
"
).
css
(
"
margin-top
"
,
"
50px
"
)))}),
$
(
window
).
scroll
(),
Util
.
initPjax
(
function
(){
Util
.
parseMarkdown
(
"
content-reset
"
),
location
.
href
===
latkeConfig
.
servePath
+
"
/tags.html
"
&&
Skin
.
initTags
()},
function
(){
Util
.
parseMarkdown
(
"
content-reset
"
),
Skin
.
initArticle
(),
Skin
.
initComment
(
$
(
"
.post__tags
"
).
data
(
"
oid
"
),
$
(
"
.post__tags
"
).
data
(
"
tag
"
))})},
initTags
:
function
(){
for
(
var
t
=
$
(
"
#tags
"
),
e
=
t
.
find
(
"
.tag
"
),
i
=
parseInt
(
e
.
first
().
data
(
"
count
"
)),
o
=
Math
.
ceil
(
i
/
5
),
a
=
0
;
a
<
e
.
length
;
a
++
)
for
(
var
n
=
parseInt
(
$
(
e
[
a
]).
data
(
"
count
"
)),
s
=
0
;
s
<
5
;
s
++
)
if
(
n
>
s
*
o
&&
n
<=
(
s
+
1
)
*
o
){
e
[
a
].
className
=
"
tag tag__level
"
+
s
;
break
}
t
.
html
(
e
.
get
().
sort
(
function
(
t
,
e
){
var
i
=
$
(
t
).
text
().
toLowerCase
(),
o
=
$
(
e
).
text
().
toLowerCase
();
return
i
.
localeCompare
(
o
)}))},
initArticle
:
function
(){
Skin
.
_share
(
"
#articleShare
"
),
Skin
.
_share
(
"
#articleSideShare
"
),
Skin
.
_share
(
"
#articleBottomShare
"
);
var
t
=
$
(
"
.post__side
"
);
$
(
window
).
height
()
>=
$
(
"
.post
"
).
height
()
&&
t
.
css
(
"
opacity
"
,
1
),
t
.
css
(
"
left
"
,(
$
(
"
.post
"
).
offset
().
left
-
20
)
/
2
-
27
+
"
px
"
);
var
e
=
(
$
(
window
).
height
()
-
249
)
/
2
+
125
,
i
=
$
(
window
).
scrollTop
();
$
(
window
).
scroll
(
function
(){
var
o
=
$
(
window
).
scrollTop
(),
a
=
$
(
"
.article__bottom
"
).
offset
().
top
;
o
>
65
?(
t
.
css
(
"
opacity
"
,
1
),
i
-
o
>
0
?(
$
(
"
.header
"
).
addClass
(
"
header--fixed
"
).
css
({
top
:
"
0
"
}),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
64px
"
),
$
(
window
).
height
()
<=
$
(
"
.post
"
).
height
()
&&
o
<
a
-
$
(
window
).
height
()
&&
$
(
"
.article__toolbar
"
).
css
({
bottom
:
0
,
opacity
:
1
})):
i
-
o
<
0
&&
(
$
(
"
.header
"
).
css
({
top
:
"
-64px
"
}).
removeClass
(
"
header--fixed
"
),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
0
"
),
$
(
"
.article__toolbar
"
).
css
({
bottom
:
"
-44px
"
,
opacity
:
0
}))):(
$
(
window
).
height
()
<=
$
(
"
.post
"
).
height
()
&&
t
.
css
(
"
opacity
"
,
0
),
$
(
"
.header
"
).
removeClass
(
"
header--fixed
"
).
css
(
"
top
"
,
"
-64px
"
),
$
(
"
.main
"
).
css
(
"
padding-top
"
,
"
0
"
)),
o
>
a
-
$
(
window
).
height
()?
a
<
$
(
window
).
height
()?
t
.
css
({
position
:
"
absolute
"
,
top
:
a
-
125
+
"
px
"
}):
t
.
css
({
position
:
"
absolute
"
,
top
:
a
-
e
+
"
px
"
}):
t
.
css
({
position
:
"
fixed
"
,
top
:
"
50%
"
}),
i
=
o
}),
$
(
window
).
scroll
()},
_share
:
function
(
t
){
var
e
=
$
(
t
),
i
=
e
.
find
(
"
.article__code
"
),
o
=
i
.
data
(
"
url
"
),
a
=
i
.
data
(
"
avatar
"
),
n
=
encodeURIComponent
(
i
.
data
(
"
title
"
)
+
"
-
"
+
i
.
data
(
"
blogtitle
"
)),
s
=
encodeURIComponent
(
o
),
r
=
{};
r
.
tencent
=
"
http://share.v.t.qq.com/index.php?c=share&a=index&title=
"
+
n
+
"
&url=
"
+
s
+
"
&pic=
"
+
a
,
r
.
weibo
=
"
http://v.t.sina.com.cn/share/share.php?title=
"
+
n
+
"
&url=
"
+
s
+
"
&pic=
"
+
a
,
r
.
google
=
"
https://plus.google.com/share?url=
"
+
s
,
r
.
twitter
=
"
https://twitter.com/intent/tweet?status=
"
+
n
+
"
"
+
s
,
e
.
find
(
"
span
"
).
click
(
function
(){
var
t
=
$
(
this
).
data
(
"
type
"
);
if
(
t
)
return
"
wechat
"
===
t
?(
0
===
i
.
find
(
"
canvas
"
).
length
?
i
.
qrcode
({
width
:
128
,
height
:
128
,
text
:
o
}):
i
.
slideToggle
(),
!
1
):
void
window
.
open
(
r
[
t
],
"
_blank
"
,
"
top=100,left=200,width=648,height=618
"
)})}};
Skin
.
init
();
\ No newline at end of file
src/main/webapp/skins/Medium/links.ftl
View file @
0fed47eb
...
...
@@ -29,14 +29,14 @@
<body>
<
#include
"
header
.
ftl
"
>
<div
id=
"pjax"
>
<
#if
pjax
>
<!---- pjax {#pjax} start ---->
</
#
if>
<
#include
"
nav
.
ftl
"
>
<div
class=
"main"
>
<
#if
noticeBoard
??
>
<
#if
pjax
>
<!---- pjax {#pjax} start ---->
</
#
if>
<
#include
"
nav
.
ftl
"
>
<div
class=
"main"
>
<
#if
noticeBoard
??
>
<div
class=
"board"
>
${noticeBoard}
</div>
</
#
if>
</
#
if>
<div
class=
"wrapper content"
>
<div
class=
"module__title"
>
<span>
...
...
@@ -58,9 +58,9 @@
</
#
list>
</
#
if>
</div>
<
#include
"
bottom
.
ftl
"
>
</div>
<
#if
pjax
>
<!---- pjax {#pjax} end ---->
</
#
if>
<
#include
"
bottom
.
ftl
"
>
</div>
<
#if
pjax
>
<!---- pjax {#pjax} end ---->
</
#
if>
</div>
<
#include
"
footer
.
ftl
"
>
</body>
...
...
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