Site Notice

hello, world

Difference between revisions of "Svg loading"

From Project-EPB Commons
([InPageEdit] 没有编辑摘要)
([InPageEdit] 没有编辑摘要)
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
+
There are a lot of loading animations that look great. But it is difficult to insert them into wiki article. And GIF picture quality is often poor. So I made these SVG files.
<div class="spinner-block">
 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="spinner" width="52px" height="52px">
 
<g id="group" style="" transform="translate(26,26)">
 
<circle class="doMinus" r="20" stroke="black" stroke-width="6" stroke-dasharray="120 1000" fill="transparent" style="transition: stroke-dasharray .2s linear" cx="0" cy="0"></circle>
 
</g>
 
</svg>
 
</div>
 
<style>
 
.spinner circle {
 
  animation: circle-spin 2s infinite linear;
 
}
 
@keyframes circle-spin {
 
  from {
 
    transform: rotate(0deg);
 
  }
 
  to {
 
    transform: rotate(720deg);
 
  }
 
}
 
</style>
 
  
<script>
+
Most of them were not designed by publisher, I just imitated their effects using SVG. So if some of them violate copyright, please remind publisher to delete them.
setInterval(function () {
+
 
  var $this = $('.spinner circle'),
+
== Fandom design ==
    $class = $this.attr('class'),
+
Imitated by: [[User:机智的小鱼君]]
    dash = $this.attr('stroke-dasharray'),
+
<div style="text-align:center;margin:0 auto;"><img src="https://vignette.wikia.nocookie.net/dftest/images/c/c0/Loading.svg"><br/>What's that! Animated SVG!! COOOOL!!!</div>
    dash1 = Number(dash.split(' ')[0]),
+
* <nowiki>https://vignette.wikia.nocookie.net/dftest/images/c/c0/Loading.svg</nowiki>
    dash2;
+
 
  if (dash1 > 126) {
+
Copyright Fandom, inc<ref>https://fandomdesignsystem.com/components/progress-indicators</ref>
    $this.attr('class', 'doMinus');
+
 
  } else if (dash1 < 4) {
+
== Microsoft style ==
    $this.attr('class', 'doPlus');
+
These 3 Microsoft style SVG files were imitated by: [[User:机智的小鱼君]]
  }
+
<div style="text-align:center;margin:0 auto;"><img src="https://vignette.wikia.nocookie.net/dftest/images/8/8c/Ms-loading-spinner.svg"><br/>Normal</div>
  if ($this.hasClass('doMinus')) {
+
* <nowiki>https://vignette.wikia.nocookie.net/dftest/images/8/8c/Ms-loading-spinner.svg</nowiki>
    dash2 = dash1 - 8;
+
 
    $this.attr('stroke-dasharray', dash2 + ' 1000');
+
<div style="background:#000;color:#fff;text-align:center;width:45px;margin:0 auto;border-radius:2px;padding: 4px;"><img src="https://vignette.wikia.nocookie.net/dftest/images/c/c3/Ms-loading-spinner-white.svg"><br/>White</div>
  } else if ($this.hasClass('doPlus')) {
+
* <nowiki>https://vignette.wikia.nocookie.net/dftest/images/c/c3/Ms-loading-spinner-white.svg</nowiki>
    dash2 = dash1 + 8;
+
 
    $this.attr('stroke-dasharray', dash2 + ' 1000');
+
<div style="text-align:center;margin:0 auto;"><img src="https://vignette.wikia.nocookie.net/dftest/images/0/07/Ms-loading-spinner-black.svg"><br/>Black</div>
  }
+
* <nowiki>https://vignette.wikia.nocookie.net/dftest/images/0/07/Ms-loading-spinner-black.svg</nowiki>
}, 200);
+
 
</script>
+
Copyright Microsoft, corp
</html>
+
 
 +
== Google Material ==
 +
'''TBD'''
 +
 
 +
== References ==
 +
<references/>

Latest revision as of 04:52, 16 December 2019

There are a lot of loading animations that look great. But it is difficult to insert them into wiki article. And GIF picture quality is often poor. So I made these SVG files.

Most of them were not designed by publisher, I just imitated their effects using SVG. So if some of them violate copyright, please remind publisher to delete them.

Fandom design

Imitated by: User:机智的小鱼君

<img src="https://vignette.wikia.nocookie.net/dftest/images/c/c0/Loading.svg">
What's that! Animated SVG!! COOOOL!!!
  • https://vignette.wikia.nocookie.net/dftest/images/c/c0/Loading.svg

Copyright Fandom, inc[1]

Microsoft style

These 3 Microsoft style SVG files were imitated by: User:机智的小鱼君

  • https://vignette.wikia.nocookie.net/dftest/images/8/8c/Ms-loading-spinner.svg
  • https://vignette.wikia.nocookie.net/dftest/images/c/c3/Ms-loading-spinner-white.svg
  • https://vignette.wikia.nocookie.net/dftest/images/0/07/Ms-loading-spinner-black.svg

Copyright Microsoft, corp

Google Material

TBD

References