Skip to content

Commit dc67ddc

Browse files
committed
refactor code structure and styles
1 parent dbba7f7 commit dc67ddc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2688
-3866
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ License
6464

6565
All loader files here are released under CC0 License. However, you could attribute to this link: [loading.io css spinner ( https://loading.io/css/ )](https://loading.io/css/) to give loading.io a thumbs-up.
6666

67+
Other source codes are released under MIT License.
68+
6769

6870
Other Resources
6971
----------------

basic.styl

Lines changed: 0 additions & 71 deletions
This file was deleted.

build.ls

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
require! <[fs fs-extra progress colors stylus pug]>
2+
3+
console.log "Build all CSS-spinners..."
4+
5+
progress-bar = (total = 10, text = "converting") ->
6+
bar = new progress(
7+
" #text [#{':bar'.yellow}] #{':percent'.cyan} :etas",
8+
{ total: total, width: 60, complete: '#' }
9+
)
10+
11+
spinners = fs.readdir-sync \src/
12+
.filter -> fs.lstat-sync "src/#it" .is-directory!
13+
14+
bar = progress-bar spinners.length, "Build Spinners"
15+
vars = fs.read-file-sync "vars.styl" .toString!
16+
all-css = ""
17+
18+
spinners.map ->
19+
src = do
20+
stylus: [vars, fs.read-file-sync("src/#it/index.styl").toString!].join(\\n)
21+
pug: fs.read-file-sync "src/#it/index.pug" .toString!
22+
css = stylus src.stylus .render!
23+
all-css += css
24+
html = pug.render src.pug
25+
html-css = """
26+
<style type="text/css">
27+
#css
28+
</style>
29+
#html
30+
"""
31+
fs-extra.ensure-dir-sync "dist/entries/#it"
32+
fs.write-file-sync "dist/entries/#it/index.css", css
33+
fs.write-file-sync "dist/entries/#it/index.html", html
34+
fs.write-file-sync "dist/#it.html", html-css
35+
bar.tick!
36+
37+
fs.write-file-sync "dist/index.css", all-css
38+
fs.write-file-sync "web/static/assets/index.css", all-css
39+
console.log "\nFinished."

build/circle/sample.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

build/default/sample.html

Lines changed: 0 additions & 86 deletions
This file was deleted.

build/dual-ring/sample.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

build/ellipsis/sample.html

Lines changed: 0 additions & 59 deletions
This file was deleted.

build/facebook/sample.html

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)