vanilla-back-to-top
Advanced tools
Comparing version 3.2.3 to 4.0.0
{ | ||
"name": "vanilla-back-to-top", | ||
"version": "3.2.3", | ||
"version": "4.0.0", | ||
"description": "Configurable zero dependency Back To Top button", | ||
"main": "dist/vanilla-back-to-top.min.js", | ||
"main": "dist/vanilla-back-to-top.umd.min.js", | ||
"repository": { | ||
@@ -12,10 +12,15 @@ "type": "git", | ||
"up", | ||
"back to top", | ||
"back", | ||
"top", | ||
"button", | ||
"link", | ||
"scroll", | ||
"pure", | ||
"zero dependency", | ||
"vanillajs", | ||
"vanilla", | ||
"configurable", | ||
"prerendered", | ||
"blog", | ||
"prerendered", | ||
"static", | ||
"website", | ||
"jekyll", | ||
@@ -22,0 +27,0 @@ "hugo", |
@@ -5,3 +5,3 @@ # Vanilla Back To Top | ||
Ideal for pre-rendered blogs with no frameworks, e.g., [Jekyll](https://jekyllrb.com), [Hugo](http://gohugo.io/) or [Hexo](https://hexo.io/). | ||
Ideal for pre-rendered static websites with no frameworks, e.g., [Jekyll](https://jekyllrb.com), [Hugo](http://gohugo.io/) or [Hexo](https://hexo.io/). | ||
@@ -13,7 +13,23 @@ <img src="http://i.pi.gy/DoaQa.gif" width="300px"/> | ||
Add this to your HTML: | ||
```html | ||
<script src="https://unpkg.com/vanilla-back-to-top@4.0.0/dist/vanilla-back-to-top.min.js"></script> | ||
<script>addBackToTop({})</script> | ||
``` | ||
<script src="https://unpkg.com/vanilla-back-to-top@3.2.3/dist/vanilla-back-to-top.min.js"></script> | ||
If you don't want to rely on [unpkg.com](https://unpkg.com/#/about), save [the file](https://unpkg.com/vanilla-back-to-top@4.0.0/dist/vanilla-back-to-top.min.js) to your project and serve it from your server: | ||
```html | ||
<script src="/assets/vanilla-back-to-top.min.js"></script> | ||
<script>addBackToTop({})</script> | ||
``` | ||
There's also a [UMD](https://github.com/vfeskov/vanilla-back-to-top/blob/master/scripts/umd-template.js) [build](https://github.com/vfeskov/vanilla-back-to-top/blob/master/dist/vanilla-back-to-top.umd.min.js) available so you could import it in your asset pipepline: | ||
```bash | ||
npm install --save vanilla-back-to-top | ||
``` | ||
```js | ||
import { addBackToTop } from 'vanilla-back-to-top' | ||
addBackToTop({}) | ||
// your vue/react/angular/etc bootstrapping code here | ||
``` | ||
Optionally customise CSS of the button using `#back-to-top` selector, e.g.: | ||
@@ -20,0 +36,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10068
4
100