Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Bloque la pub sur Internet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marne
Bloque la pub sur Internet
Commits
24b989f9
Commit
24b989f9
authored
Jan 28, 2019
by
Marne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
e86baad6
Pipeline
#2396
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
scroll.js
scroll.js
+32
-0
No files found.
scroll.js
0 → 100644
View file @
24b989f9
var
header
=
document
.
getElementById
(
"
header
"
);
var
title
=
document
.
getElementById
(
"
title
"
);
var
content
=
document
.
getElementById
(
"
container
"
);
var
minPad
=
20
;
header
.
style
.
position
=
"
fixed
"
;
function
resize
()
{
pad
=
window
.
innerHeight
*
.
28
-
title
.
clientHeight
/
2
;
content
.
style
.
marginTop
=
window
.
innerHeight
*
2
/
3
+
"
px
"
;
content
.
style
.
paddingTop
=
window
.
innerHeight
*
2
/
5
+
"
px
"
;
scroll
();
}
function
scroll
()
{
var
scrolled
=
document
.
documentElement
.
scrollTop
;
var
top
=
pad
-
scrolled
;
var
bottom
=
pad
*
2
-
scrolled
;
header
.
style
.
paddingTop
=
(
top
<
minPad
?
minPad
:
top
)
+
"
px
"
;
header
.
style
.
paddingBottom
=
(
bottom
<
minPad
?
minPad
:
(
pad
<
bottom
?
pad
:
bottom
)
)
+
"
px
"
;
}
onresize
=
resize
;
onscroll
=
scroll
;
resize
();
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