Skip to content

Commit 50f03cb

Browse files
committed
improved css and js of the directive
1 parent 62dc613 commit 50f03cb

7 files changed

+47
-29
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ options = {
4343
showHeadline: true, // Show headline in the progress bar (only works if expand is true or type is "big")
4444
expand: true, // Show small bar and expand to big after passing the headline
4545
type: 'small', // Type of bar if expand is "false" available options are "small" or "big"
46+
topOffset: 150, // Offset relative to first headline to expand the progress bar
4647
readingTime: {
4748
enable: true, // Show the estimate reading time
4849
prefix: 'estimate ca. ', // Prefix of estimate
@@ -65,7 +66,7 @@ Use ng-reading-indicator directive to display the reading progress on top of the
6566
<ng-reading-indicator indicator-headline="myHeadline" indicator-element=".myArticle" indicator-options="options"></ng-reading-indicator>
6667
```
6768

68-
##### If you want to display a different text then the headline use the "indicator-headline"-attribute.
69+
If you want to display a different text then the headline use the "indicator-headline"-attribute.
6970

7071
```js
7172
$scope.myHeadline = 'Lorem Ipsum';
@@ -75,12 +76,17 @@ Use ng-reading-indicator directive to display the reading progress on top of the
7576
<ng-reading-indicator indicator-headline="myHeadline"></ng-reading-indicator>
7677
```
7778

78-
##### If you want to use the progress bar just for one special element use the indicator-element-attribute and insert the classname (only the first element with class will be used, will be extendet to id in future release)
79+
If you want to use the progress bar just for one special element use the indicator-element-attribute and insert the classname (only the first element with class will be used, will be extendet to id in future release)
7980

8081
```html
8182
<ng-reading-indicator indicator-element=".myArticle"></ng-reading-indicator>
8283
```
8384

85+
You are also able to create your own template and use it via indicator-template-url.
86+
If you want to display the headline just add a {{ headline }} in your template. Do you want to display the reading time estimate then add {{ readingTime }} inside your template. And last but not least we need an element with the class "ng-reading-indicator-progress" as progress bar.
87+
```html
88+
<ng-reading-indicator indicator-template-url="foo.html"></ng-reading-indicator>
89+
```
8490

8591
License
8692
----

dist/ng-reading-indicator.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-reading-indicator.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)