Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
432c1252
Commit
432c1252
authored
Feb 06, 2020
by
Julien Chaumond
Committed by
Lysandre Debut
Feb 06, 2020
Browse files
[docs] Add menu w/ links to other pages on hf.co
parent
c069932f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
docs/source/_static/css/huggingface.css
docs/source/_static/css/huggingface.css
+38
-0
docs/source/_static/js/custom.js
docs/source/_static/js/custom.js
+11
-0
No files found.
docs/source/_static/css/huggingface.css
View file @
432c1252
...
@@ -194,3 +194,41 @@ h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend{
...
@@ -194,3 +194,41 @@ h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend{
src
:
url(./Calibre-Thin.otf)
;
src
:
url(./Calibre-Thin.otf)
;
font-weight
:
400
;
font-weight
:
400
;
}
}
/**
* Nav Links to other parts of huggingface.co
*/
div
.menu
{
position
:
absolute
;
top
:
0
;
right
:
0
;
padding-top
:
20px
;
padding-right
:
20px
;
z-index
:
1000
;
}
div
.menu
a
{
font-size
:
14px
;
letter-spacing
:
0.3px
;
text-transform
:
uppercase
;
color
:
white
;
-webkit-font-smoothing
:
antialiased
;
background
:
linear-gradient
(
0deg
,
#6671ff
b8
,
#9a66ff
b8
50%
);
padding
:
10px
16px
6px
16px
;
border-radius
:
3px
;
margin-left
:
12px
;
position
:
relative
;
}
div
.menu
a
:active
{
top
:
1px
;
}
@media
(
min-width
:
768px
)
and
(
max-width
:
1750px
)
{
.wy-breadcrumbs
{
margin-top
:
32px
;
}
}
@media
(
max-width
:
768px
)
{
div
.menu
{
display
:
none
;
}
}
docs/source/_static/js/custom.js
View file @
432c1252
...
@@ -58,6 +58,16 @@ function addGithubButton() {
...
@@ -58,6 +58,16 @@ function addGithubButton() {
document
.
querySelector
(
"
.wy-side-nav-search .icon-home
"
).
insertAdjacentHTML
(
'
afterend
'
,
div
);
document
.
querySelector
(
"
.wy-side-nav-search .icon-home
"
).
insertAdjacentHTML
(
'
afterend
'
,
div
);
}
}
function
addHfMenu
()
{
const
div
=
`
<div class="menu">
<a href="/welcome">🔥 Sign in</a>
<a href="/models">🚀 Models</a>
</div>
`
;
document
.
body
.
insertAdjacentHTML
(
'
afterbegin
'
,
div
);
}
/*!
/*!
* github-buttons v2.2.10
* github-buttons v2.2.10
* (c) 2019 なつき
* (c) 2019 なつき
...
@@ -74,6 +84,7 @@ function onLoad() {
...
@@ -74,6 +84,7 @@ function onLoad() {
addCustomFooter
();
addCustomFooter
();
addGithubButton
();
addGithubButton
();
parseGithubButtons
();
parseGithubButtons
();
addHfMenu
();
}
}
window
.
addEventListener
(
"
load
"
,
onLoad
);
window
.
addEventListener
(
"
load
"
,
onLoad
);
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