Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Web-Comic-Reader
Commits
28b71061
Commit
28b71061
authored
Oct 22, 2019
by
Afif Zafri
Browse files
updated loading spinner to show number of page reading
parent
a0fa25b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
assets/css/styles.css
View file @
28b71061
...
...
@@ -13,6 +13,15 @@ body {
display
:
none
;
}
.progress-text
{
font-size
:
26px
;
width
:
200px
;
position
:
absolute
;
top
:
calc
(
60%
-
65px
);
left
:
calc
(
50%
-
105px
);
text-align
:
center
;
}
fieldset
{
display
:
inline-block
;
background
:
#fff
;
...
...
assets/js/script.js
View file @
28b71061
...
...
@@ -24,7 +24,10 @@ $(document).ready(function(){
});
$
(
this
).
click
();
});
// Update progress text
$
(
'
.progress-text
'
).
html
(
"
Reading 0/0 pages
"
);
// show loading
$
(
'
.se-pre-con
'
).
fadeIn
(
'
slow
'
);
...
...
@@ -74,7 +77,7 @@ $(document).ready(function(){
}
// implement setTimout()
// This can minimize browser from overprocessing
which can caused browser to be not respond
ing
// This can minimize browser from overprocessing
and end up freez
ing
// simple way to mimics multi threading
function
processEntries
(
entries
,
i
,
max
)
{
...
...
@@ -136,8 +139,13 @@ $(document).ready(function(){
// output the images
$
(
'
#output
'
).
append
(
"
<a href='
"
+
url
+
"
' id='comicImg'><img src='
"
+
url
+
"
' class='imgUrl'/></a>
"
);
// Update progress text
$
(
'
.progress-text
'
).
html
(
"
Reading
"
+
i
+
"
/
"
+
max
+
"
pages
"
);
// only hide loading spinnder when done process all
if
(
i
==
(
max
-
1
))
{
$
(
'
.progress-text
'
).
html
(
"
<font color='lime'>Completed!</font>
"
);
// hide loading
$
(
'
.se-pre-con
'
).
fadeOut
(
'
slow
'
);
...
...
index.html
View file @
28b71061
...
...
@@ -9,7 +9,9 @@
</head>
<body>
<div
class=
"se-pre-con"
></div>
<!-- loading spinner -->
<div
class=
"se-pre-con"
>
<div
class=
"progress-text"
>
Reading 0/0 pages
</div>
</div>
<!-- loading spinner -->
<center>
<fieldset>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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