Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c4bab2dc
Commit
c4bab2dc
authored
Jul 09, 2019
by
LysandreJik
Browse files
Added footer with social links.
parent
331db8cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
6 deletions
+54
-6
docs/source/_static/css/huggingface.css
docs/source/_static/css/huggingface.css
+12
-0
docs/source/_static/js/custom.js
docs/source/_static/js/custom.js
+42
-6
No files found.
docs/source/_static/css/huggingface.css
View file @
c4bab2dc
...
@@ -113,6 +113,18 @@ a {
...
@@ -113,6 +113,18 @@ a {
text-transform
:
uppercase
;
text-transform
:
uppercase
;
}
}
.footer
{
margin-top
:
20px
;
}
.footer__Social
{
display
:
flex
;
flex-direction
:
row
;
}
.footer__CustomImage
{
margin
:
2px
5px
0
0
;
}
...
...
docs/source/_static/js/custom.js
View file @
c4bab2dc
function
addIcon
()
{
function
addIcon
()
{
const
huggingFaceLogo
=
"
http://lysand.re/huggingface_logo.svg
"
;
const
huggingFaceLogo
=
"
http://lysand.re/huggingface_logo.svg
"
;
const
image
=
document
.
createElement
(
"
img
"
);
const
image
=
document
.
createElement
(
"
img
"
);
image
.
setAttribute
(
"
src
"
,
huggingFaceLogo
)
image
.
setAttribute
(
"
src
"
,
huggingFaceLogo
)
;
const
div
=
document
.
createElement
(
"
div
"
);
const
div
=
document
.
createElement
(
"
div
"
)
div
.
appendChild
(
image
);
div
.
appendChild
(
image
);
div
.
style
.
textAlign
=
'
center
'
;
div
.
style
.
textAlign
=
'
center
'
;
div
.
style
.
paddingTop
=
'
30px
'
;
div
.
style
.
paddingTop
=
'
30px
'
;
div
.
style
.
backgroundColor
=
'
#6670FF
'
div
.
style
.
backgroundColor
=
'
#6670FF
'
;
const
scrollDiv
=
document
.
getElementsByClassName
(
"
wy-side-scroll
"
)[
0
];
const
scrollDiv
=
document
.
getElementsByClassName
(
"
wy-side-scroll
"
)[
0
];
scrollDiv
.
prepend
(
div
)
scrollDiv
.
prepend
(
div
);
}
function
addCustomFooter
()
{
const
customFooter
=
document
.
createElement
(
"
div
"
);
const
questionOrIssue
=
document
.
createElement
(
"
div
"
);
questionOrIssue
.
innerHTML
=
"
Stuck? Read our <a href='https://medium.com/huggingface'>Blog posts</a> or <a href='https://github.com/huggingface/pytorch_transformers'>Create an issue</a>
"
;
customFooter
.
appendChild
(
questionOrIssue
);
customFooter
.
classList
.
add
(
"
footer
"
);
const
social
=
document
.
createElement
(
"
div
"
);
social
.
classList
.
add
(
"
footer__Social
"
);
const
imageDetails
=
[
{
link
:
"
https://huggingface.co
"
,
imageLink
:
"
http://lysand.re/icons/website.svg
"
},
{
link
:
"
https://twitter.com/huggingface
"
,
imageLink
:
"
http://lysand.re/icons/twitter.svg
"
},
{
link
:
"
https://github.com/huggingface
"
,
imageLink
:
"
http://lysand.re/icons/github.svg
"
},
{
link
:
"
https://www.linkedin.com/company/huggingface/
"
,
imageLink
:
"
http://lysand.re/icons/linkedin.svg
"
}
];
imageDetails
.
forEach
(
imageLinks
=>
{
const
link
=
document
.
createElement
(
"
a
"
);
const
image
=
document
.
createElement
(
"
img
"
);
image
.
src
=
imageLinks
.
imageLink
;
link
.
href
=
imageLinks
.
link
;
image
.
style
.
width
=
"
30px
"
;
image
.
classList
.
add
(
"
footer__CustomImage
"
);
link
.
appendChild
(
image
);
social
.
appendChild
(
link
);
});
customFooter
.
appendChild
(
social
);
document
.
getElementsByTagName
(
"
footer
"
)[
0
].
appendChild
(
customFooter
);
}
function
onLoad
()
{
addIcon
();
addCustomFooter
();
}
}
window
.
addEventListener
(
"
load
"
,
addIcon
)
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