项目作者: the-muda-organization

项目描述 :
Super lighweight, pure JavaScript page load progress bar
高级语言: HTML
项目地址: git://github.com/the-muda-organization/nanobar.git
创建时间: 2019-09-19T18:28:28Z
项目社区:https://github.com/the-muda-organization/nanobar

开源协议:MIT License

下载


Nanobar

Super lighweight, pure JavaScript page load progress bar


Status

GitHub Version
License

Github Star
Github Fork

JS gzip size


View Preview



Table of contents


Quick Start

Several options are available:


What’s included

Within the download you’ll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You’ll see something like this:

There are no dependencies. See below for Installation Guide and How to Use

  1. nanobar/
  2. └─ dist/
  3. ├── nanobar.js
  4. └── nanobar.min.js

Bugs and feature requests

Have a bug or a feature request? Before opening a new issue search for existing and closed issues. If your problem or idea is not addressed yet, open a new issue.


Installation

  1. Download and copy files to your project
  2. Add JS to your project:
    1. <script src="https://example.com/nanobar/1.x.x/nanobar.min.js"></script>
    OR add script inline (recommended):
    1. <script>Paste script here</script>
  3. Place nanobar <script> right after opening <body> tag.
  4. Ready to use!

How to Use

Nanobar is designed to be placed in CDN and used on multiple pages. Nanobar has default background color set to red. You may set custom background color you like the most in JavaScript variables (at the beginning of the script).

If you want to change color on a single page add data-nanobar="" attribute to <body>. You can use any color value that is usually used in CSS #nanobar{background: something} - color name, hex value, gradients and more.

  1. <body data-nanobar="#ff8c00">
  2. <body data-nanobar="blue">
  3. <body data-nanobar="linear-gradient(to right,#40e0d0,#ff8c00,#ff0080)">

Do not add this attribute and do not leave blank if you don’t want to change background color. JavaScript checks if data-nanobar=”#ff8c00” has a new background color value.

Nanobar has assigned ID: <div id="nanobar"></div>


Versioning

Nanobar will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:
<major>.<minor>.<patch>


Changelog

For last releases see detailed CHANGELOG.


Team


Code of conduct

We will behave ourselves if you behave yourselves. For more details see our
CODE OF CONDUCT.


Code and documentation copyright 2017-2020 The MUDA Organization.

Code released under the MIT License.