Ember addon: Adds a component to show a SVG progress circle
npm install svg-progress-circleAn addon for ember-cli that adds a component to show a sizable circle made with a SVG.
This component is part of the rewrite of the frontend-app for my job at easyPEP.
* easyPEP (german name): homepage
* Staffomatic (english name): homepage
* easyPEP github
Installation
------------------------------------------------------------------------------
* ember install ember-cli-sass
* ember install svg-progress-circle
``handlebars
// blockless:
{{progress-circle size="40" strokeWidth="3" percentage=model.somePercentage}}
// as a block
{{#progress-circle size="40" strokeWidth="3" percentage=model.somePercentage}}
{{!-- inner content --}}
{{/svg-progress-circle}}
// with inner text
{{#progress-circle
size="200"
strokeWidth="10"
percentage=percentage
}}
{{#progress-circle/text
font-size="2rem"
font-family="inherit"
}}
{{percentage}}
{{/progress-circle/text}}
{{/progress-circle}}
// with inner image
{{#progress-circle
size="200"
strokeWidth="10"
percentage=percentage
as |strokeWidth|
}}
{{progress-circle/image
imageUrl="assets/bill.jpg"
strokeWidth=strokeWidth
imageGap="2"
}}
{{/progress-circle}}
`$3
#### progress-circle
* size default 90 -> the SVG viewportstrokeWidth
* default 10 -> the width of the borderpercentage
* default 0 -> a value between 1 and 100
#### progress-circle/text
* font-size default initialfont-family
* dfeault arial
#### progress-circle/image
* imageUrl -> a standard URL to the imagestrokeWidth
* -> an integer number to control the width of the image borderimageGap
* default 0 -> an integer number to control the gap
between the circle and the image
The addon provides the following classes to style the file-picker:
* .progress-circle.progress-circle__svg
* .progress-circle__circle
* .progress-circle__indicator(--empty|--filled|--invalid)
*
or you can import the default styles:
`sass`
@import "svg-progress-circle";
** NOTE:
After wrecking the gh-pages and messing with the repository,
I had to rollback everything and properly learn how to handle this github stuff.
I hope all is now properly documented, pushed and published.
But also there have been Features as well. Read below.
* npm run lint:js -- --fix$3
* ember test – Runs the test suite on the current Ember version
* ember test --server – Runs the test suite in "watch mode"
* npm test – Runs ember try:each` to test your addon against multiple Ember versions