radames commited on
Commit
38a0fb2
1 Parent(s): 4f04847
Files changed (2) hide show
  1. code.js +1 -2
  2. imgs/loading.svg +0 -1
code.js CHANGED
@@ -114,7 +114,7 @@ async function generateSequence({
114
  }
115
  function updateStatus(data) {
116
  if (data.status === "loading") {
117
- contentEl.innerHTML = `<img src="imgs/loading.svg" />`;
118
  }
119
  if (data.status === "aborted") {
120
  contentEl.innerHTML = ``;
@@ -167,7 +167,6 @@ async function initWorkers() {
167
  .style("color", fontColor)
168
  .style("grid-row-start", `${i + 1}`)
169
  .classed("c-block ", true);
170
-
171
  containerEl.append(() => contentEl.node());
172
  return [contentEl.node(), await workerPool.getWorker()];
173
  })
 
114
  }
115
  function updateStatus(data) {
116
  if (data.status === "loading") {
117
+ contentEl.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="1.5em" height="1.5em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-dasharray="15" stroke-dashoffset="15" stroke-linecap="round" stroke-width="2" d="M12 3a9 9 0 0 1 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>`;
118
  }
119
  if (data.status === "aborted") {
120
  contentEl.innerHTML = ``;
 
167
  .style("color", fontColor)
168
  .style("grid-row-start", `${i + 1}`)
169
  .classed("c-block ", true);
 
170
  containerEl.append(() => contentEl.node());
171
  return [contentEl.node(), await workerPool.getWorker()];
172
  })
imgs/loading.svg DELETED