Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
e5800d65
Commit
e5800d65
authored
Jan 02, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the logo as a loading indicator
Closes #5616
parent
c80f75ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
app/assets/javascripts/logo.js.coffee
app/assets/javascripts/logo.js.coffee
+45
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+1
-1
No files found.
app/assets/javascripts/logo.js.coffee
0 → 100644
View file @
e5800d65
NProgress
.
configure
(
showSpinner
:
false
)
defaultClass
=
'tanuki-shape'
highlightClass
=
'highlight'
pieces
=
[
'path#tanuki-right-cheek'
,
'path#tanuki-right-eye, path#tanuki-right-ear'
,
'path#tanuki-nose'
,
'path#tanuki-left-eye, path#tanuki-left-ear'
,
'path#tanuki-left-cheek'
,
]
timeout
=
null
clearHighlights
=
->
$
(
".
#{
defaultClass
}
"
).
attr
(
'class'
,
defaultClass
)
start
=
->
clearHighlights
()
work
(
0
)
stop
=
->
window
.
clearTimeout
(
timeout
)
clearHighlights
()
work
=
(
pieceIndex
)
=>
# jQuery's addClass won't work on an SVG. Who knew!
$piece
=
$
(
pieces
[
pieceIndex
])
$piece
.
attr
(
'class'
,
"
#{
defaultClass
}
#{
highlightClass
}
"
)
timeout
=
setTimeout
(
=>
$piece
.
attr
(
'class'
,
defaultClass
)
# If we hit the last piece, reset the index and then reverse the array to
# get a nice back-and-forth sweeping look
if
pieceIndex
+
1
>=
pieces
.
length
nextIndex
=
0
pieces
.
reverse
()
else
nextIndex
=
pieceIndex
+
1
work
(
nextIndex
)
,
200
)
$
(
document
).
on
'page:fetch'
,
start
$
(
document
).
on
'page:change'
,
stop
app/assets/stylesheets/framework/sidebar.scss
View file @
e5800d65
...
...
@@ -105,7 +105,7 @@
.tanuki-shape
{
transition
:
all
0
.8s
;
&
:hover
{
&
:hover
,
&
.highlight
{
fill
:
rgb
(
255
,
255
,
255
);
transition
:
all
0
.1s
;
}
...
...
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