Skip to content

Commit

Permalink
OPDS: fix performance issue caused by SVG spinner
Browse files Browse the repository at this point in the history
Fixes #1287
  • Loading branch information
johnfactotum committed Mar 31, 2024
1 parent 0fbdd04 commit 7748b6d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/opds/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@
from { opacity: 0; }
to { opacity: 1; }
}
#loading:not([hidden]) svg path {
animation: .6s linear infinite rotate;
transform-origin: center;
}
@keyframes rotate {
from { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

/* feed
------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -648,7 +656,7 @@ <h1><a></a></h1>
<foliate-scrolled id="loading">
<foliate-center>
<svg width="48" height="48" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2">
<path d="M24 8A 16 16 0 0 0 24 40"><animateTransform attributeName="transform" type="rotate" from="0 24 24" to="360 24 24" dur="600ms" repeatCount="indefinite"/></path>
<path d="M24 8A 16 16 0 0 0 24 40"></path>
</svg>
<h1></h1>
</foliate-center>
Expand Down

0 comments on commit 7748b6d

Please sign in to comment.