This commit is contained in:
17
node_modules/topbar/.npmignore
generated
vendored
Normal file
17
node_modules/topbar/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.DS_Store
|
||||
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
node_modules
|
||||
13
node_modules/topbar/Gruntfile.coffee
generated
vendored
Normal file
13
node_modules/topbar/Gruntfile.coffee
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = (grunt) ->
|
||||
grunt.loadNpmTasks "grunt-contrib-uglify"
|
||||
grunt.initConfig
|
||||
pkg: grunt.file.readJSON "package.json"
|
||||
uglify:
|
||||
options:
|
||||
banner: '/*! <%= pkg.title || pkg.name %> <%= pkg.version %>, <%= grunt.template.today("yyyy-mm-dd") %>\n' +
|
||||
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
|
||||
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
|
||||
' * Licensed under the <%= pkg.license %> License */\n'
|
||||
build:
|
||||
files: "topbar.min.js": ["topbar.js"]
|
||||
grunt.registerTask "default", "uglify"
|
||||
14
node_modules/topbar/README.md
generated
vendored
Normal file
14
node_modules/topbar/README.md
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
[](https://www.codeshelter.co/)
|
||||
|
||||
topbar
|
||||
====
|
||||
|
||||
Site-wide progress indicator that is:
|
||||
|
||||
* Tiny (1KB minified and gzipped), no dependency
|
||||
* Perfect for single-page applications
|
||||
* Responsive
|
||||
|
||||
Check out [demo & usages](http://buunguyen.github.io/topbar).
|
||||
|
||||
MIT license. Copyright 2019 Buu Nguyen.
|
||||
30
node_modules/topbar/bower.json
generated
vendored
Normal file
30
node_modules/topbar/bower.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "topbar",
|
||||
"main": "topbar.min.js",
|
||||
"version": "0.1.4",
|
||||
"description": "Tiny & beautiful site-wide progress indicator",
|
||||
"homepage": "http://buunguyen.github.io/topbar",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:buunguyen/topbar.git"
|
||||
},
|
||||
"keywords": [
|
||||
"progress",
|
||||
"indicator",
|
||||
"loading",
|
||||
"responsive",
|
||||
"loading"
|
||||
],
|
||||
"license": "MIT",
|
||||
"authors": [{
|
||||
"name": "Buu Nguyen",
|
||||
"email": "buunguyen@gmail.com"
|
||||
}],
|
||||
"ignore": [
|
||||
".gitignore",
|
||||
"package.json",
|
||||
"Gruntfile.coffee",
|
||||
"index",
|
||||
"index.html"
|
||||
]
|
||||
}
|
||||
181
node_modules/topbar/index.html
generated
vendored
Normal file
181
node_modules/topbar/index.html
generated
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="index/stylesheets/stylesheet.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="index/stylesheets/pygment_trac.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="index/stylesheets/print.css" media="print" />
|
||||
<link rel="stylesheet" type="text/css" href="index/stylesheets/tomorrow-night-bright.css" media="all" />
|
||||
<script src="index/javascripts/jquery-1.10.2.min.js"></script>
|
||||
<script src="index/javascripts/prettify.min.js"></script>
|
||||
<script src="topbar.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<title>topbar by buunguyen</title>
|
||||
<script>
|
||||
$(function() {
|
||||
prettyPrint()
|
||||
function resetToDefaults() {
|
||||
topbar.config({
|
||||
autoRun : true,
|
||||
barThickness : 3,
|
||||
barColors : {
|
||||
'0' : 'rgba(26, 188, 156, .9)',
|
||||
'.25' : 'rgba(52, 152, 219, .9)',
|
||||
'.50' : 'rgba(241, 196, 15, .9)',
|
||||
'.75' : 'rgba(230, 126, 34, .9)',
|
||||
'1.0' : 'rgba(211, 84, 0, .9)'
|
||||
},
|
||||
shadowBlur : 10,
|
||||
shadowColor : 'rgba(0, 0, 0, .6)',
|
||||
className : 'topbar'
|
||||
})
|
||||
}
|
||||
|
||||
// Page load
|
||||
resetToDefaults()
|
||||
topbar.show()
|
||||
setTimeout(function() {
|
||||
$('#main_content').fadeIn('slow')
|
||||
topbar.hide()
|
||||
}, 1500)
|
||||
|
||||
// Simple Demo
|
||||
$('#btnStartSimple').click(function() {
|
||||
resetToDefaults()
|
||||
topbar.show()
|
||||
})
|
||||
$('#btnStopSimple').click(function() {
|
||||
topbar.hide()
|
||||
})
|
||||
|
||||
// Advanced Demo
|
||||
$('#btnStartAdvanced').click(function() {
|
||||
resetToDefaults()
|
||||
topbar.config({
|
||||
autoRun : false,
|
||||
barThickness : 5,
|
||||
barColors : {
|
||||
'0' : 'rgba(26, 188, 156, .7)',
|
||||
'.3' : 'rgba(41, 128, 185, .7)',
|
||||
'1.0' : 'rgba(231, 76, 60, .7)'
|
||||
},
|
||||
shadowBlur : 5,
|
||||
shadowColor : 'rgba(0, 0, 0, .5)'
|
||||
})
|
||||
topbar.show();
|
||||
(function step() {
|
||||
setTimeout(function() {
|
||||
if (topbar.progress('+.01') < 1) step()
|
||||
}, 16)
|
||||
})()
|
||||
})
|
||||
$('#btnStopAdvanced').click(function() {
|
||||
topbar.hide()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
<div class="inner">
|
||||
<header>
|
||||
<h1>topbar</h1>
|
||||
<h2>Tiny & beautiful site-wide progress indicator</h2>
|
||||
</header>
|
||||
|
||||
<section id="main_content">
|
||||
<section id="downloads" class="clearfix">
|
||||
<a href="https://github.com/buunguyen/topbar/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
|
||||
<a href="https://github.com/buunguyen/topbar/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
|
||||
<a href="https://github.com/buunguyen/topbar" id="view-on-github" class="button"><span>View on GitHub</span></a>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Highlights</h3>
|
||||
<ul>
|
||||
<li>Tiny (1KB minified and gzipped), no dependency</li>
|
||||
<li>Perfect for single-page/Turbolinks/pjax applications</a></li>
|
||||
<li>Responsive</li>
|
||||
</ul>
|
||||
<h3>Usages</h3>
|
||||
<h4>Installation</h4>
|
||||
<section class="code">
|
||||
<p>Download <a href="https://raw.github.com/buunguyen/topbar/master/topbar.js">topbar.js</a> or <a href="https://raw.github.com/buunguyen/topbar/master/topbar.min.js">topbar.min.js</a> and include it in the page.</p>
|
||||
<pre class="prettyprint"><script src="path/to/topbar.js"></script></pre>
|
||||
<p><em>optional:</em> also available for Bower (<code>bower install topbar</code>) and Browserify (<code>npm install topbar</code>).
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<h4>Basic</h4>
|
||||
<section class="code">
|
||||
<p>Call <code>topbar.show()</code> to show and <code>topbar.hide()</code> to hide the progress bar. Before <code>topbar.hide()</code> is called, the progress bar will move slower and slower but never actually reach 100%. Most of the time, these 2 methods are all you need.</p>
|
||||
<a id="btnStartSimple" class="button" href="javascript:void(0)">Show Progress</a>
|
||||
<a id="btnStopSimple" class="button" href="javascript:void(0)">Hide Progress</a>
|
||||
<pre class="prettyprint">
|
||||
$('#btnStartSimple').click(function() {
|
||||
topbar.show()
|
||||
})
|
||||
|
||||
$('#btnStopSimple').click(function() {
|
||||
topbar.hide()
|
||||
})</pre>
|
||||
</section>
|
||||
<h4>Advanced</h4>
|
||||
<section class="code">
|
||||
<p>Use <code>topbar.config(options)</code> to customize <em>topbar</em>.</p>
|
||||
<ul>
|
||||
<li><code>autoRun</code> (default: <code>true</code>): if <code>false</code>, call <code>topbar.progress()</code> manually to run.</li>
|
||||
<li><code>barThickness</code> (default: <code>3</code>): the progress bar thickness.</li>
|
||||
<li><code>barColors</code>: list of gradient color stops used to draw the progress bar.</li>
|
||||
<li><code>shadowBlur</code> (default: <code>10</code>): the shadow blur.</li>
|
||||
<li><code>shadowColor</code>: the shadow color.</li>
|
||||
<li><code>className</code>: the CSS class name for the progress bar.</li>
|
||||
</ul>
|
||||
<p>Note: <code>topbar.progress()</code> can take a number or string value. If string, you can use <code>+</code> or <code>-</code> to change the progress relatively to current position. If no argument is specified, return the current progress (<code>0</code> to <code>1</code>).</p>
|
||||
<a id="btnStartAdvanced" class="button" href="javascript:void(0)">Show Progress</a>
|
||||
<a id="btnStopAdvanced" class="button" href="javascript:void(0)">Hide Progress</a>
|
||||
<pre class="prettyprint">
|
||||
$('#btnStartAdvanced').click(function() {
|
||||
topbar.config({
|
||||
autoRun : false,
|
||||
barThickness : 5,
|
||||
barColors : {
|
||||
'0' : 'rgba(26, 188, 156, .7)',
|
||||
'.3' : 'rgba(41, 128, 185, .7)',
|
||||
'1.0' : 'rgba(231, 76, 60, .7)'
|
||||
},
|
||||
shadowBlur : 5,
|
||||
shadowColor : 'rgba(0, 0, 0, .5)',
|
||||
className : 'topbar',
|
||||
})
|
||||
topbar.show();
|
||||
(function step() {
|
||||
setTimeout(function() {
|
||||
if (topbar.progress('+.01') < 1) step()
|
||||
}, 16)
|
||||
})()
|
||||
})
|
||||
|
||||
$('#btnStopAdvanced').click(function() {
|
||||
topbar.hide()
|
||||
})</pre>
|
||||
</section>
|
||||
|
||||
<h3>Browsers</h3>
|
||||
<p><em>topbar</em> works with any browser that supports <a href="http://caniuse.com/canvas">HTML5 Canvas</a>.</p>
|
||||
|
||||
<footer>
|
||||
topbar is maintained by <a href="https://github.com/buunguyen">buunguyen</a><br>
|
||||
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
|
||||
</footer>
|
||||
</section> <!-- main_content-->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
node_modules/topbar/index/images/body-bg.png
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/body-bg.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
BIN
node_modules/topbar/index/images/highlight-bg.jpg
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/highlight-bg.jpg
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
node_modules/topbar/index/images/hr.png
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/hr.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
node_modules/topbar/index/images/octocat-icon.png
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/octocat-icon.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
node_modules/topbar/index/images/tar-gz-icon.png
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/tar-gz-icon.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
node_modules/topbar/index/images/zip-icon.png
generated
vendored
Executable file
BIN
node_modules/topbar/index/images/zip-icon.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
6
node_modules/topbar/index/javascripts/jquery-1.10.2.min.js
generated
vendored
Normal file
6
node_modules/topbar/index/javascripts/jquery-1.10.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/topbar/index/javascripts/prettify.min.js
generated
vendored
Normal file
1
node_modules/topbar/index/javascripts/prettify.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/topbar/index/params.json
generated
vendored
Executable file
1
node_modules/topbar/index/params.json
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"name":"Rainbow.js","tagline":"Tiny & beautiful progress indicator for JavaScript","body":"### Welcome to GitHub Pages.\r\nThis automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new branch:\r\n\r\n```\r\n$ cd your_repo_root/repo_name\r\n$ git fetch origin\r\n$ git checkout gh-pages\r\n```\r\n\r\nIf you're using the GitHub for Mac, simply sync your repository and you'll see the new branch.\r\n\r\n### Designer Templates\r\nWe've crafted some handsome templates for you to use. Go ahead and continue to layouts to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved if it remained markdown format.\r\n\r\n### Rather Drive Stick?\r\nIf you prefer to not use the automatic generator, push a branch named `gh-pages` to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator written by our own Tom Preston-Werner. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.\r\n\r\n### Authors and Contributors\r\nYou can @mention a GitHub username to generate a link to their profile. The resulting `<a>` element will link to the contributor's GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out the documentation at http://help.github.com/pages or contact support@github.com and we’ll help you sort it out.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
|
||||
226
node_modules/topbar/index/stylesheets/print.css
generated
vendored
Executable file
226
node_modules/topbar/index/stylesheets/print.css
generated
vendored
Executable file
@@ -0,0 +1,226 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
body {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #d5000d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-top: 35px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-weight: bold;
|
||||
letter-spacing: -1px;
|
||||
font-size: 48px;
|
||||
color: #303030;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
letter-spacing: -1px;
|
||||
font-size: 24px;
|
||||
color: #aaa;
|
||||
font-weight: normal;
|
||||
line-height: 1.3;
|
||||
}
|
||||
#downloads {
|
||||
display: none;
|
||||
}
|
||||
#main_content {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||
color: #222;
|
||||
margin-bottom: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: solid 1px #ddd;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* COMMON STYLES */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #ebebeb;
|
||||
text-align: center;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
form {
|
||||
background: #f2f2f2;
|
||||
padding: 20px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL ELEMENT TYPE STYLES */
|
||||
|
||||
h1 {
|
||||
font-size: 2.8em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #d5000d;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
color: #303030;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: .8em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
p {
|
||||
font-weight: 300;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p a {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-size: 1.6em;
|
||||
border-left: 10px solid #e9e9e9;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 0 0 30px;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: disc inside;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ol li {
|
||||
list-style: decimal inside;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
font-style: italic;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
content: '.';
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
69
node_modules/topbar/index/stylesheets/pygment_trac.css
generated
vendored
Executable file
69
node_modules/topbar/index/stylesheets/pygment_trac.css
generated
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
.highlight { background: #ffffff; }
|
||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||
.highlight .k { font-weight: bold } /* Keyword */
|
||||
.highlight .o { font-weight: bold } /* Operator */
|
||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #999999 } /* Generic.Heading */
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
||||
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #009999 } /* Literal.Number */
|
||||
.highlight .s { color: #d14 } /* Literal.String */
|
||||
.highlight .na { color: #008080 } /* Name.Attribute */
|
||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #008080 } /* Name.Constant */
|
||||
.highlight .ni { color: #800080 } /* Name.Entity */
|
||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
||||
.highlight .nn { color: #555555 } /* Name.Namespace */
|
||||
.highlight .nt { color: #000080 } /* Name.Tag */
|
||||
.highlight .nv { color: #008080 } /* Name.Variable */
|
||||
.highlight .ow { font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
||||
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
||||
|
||||
.type-csharp .highlight .k { color: #0000FF }
|
||||
.type-csharp .highlight .kt { color: #0000FF }
|
||||
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
|
||||
.type-csharp .highlight .nc { color: #2B91AF }
|
||||
.type-csharp .highlight .nn { color: #000000 }
|
||||
.type-csharp .highlight .s { color: #A31515 }
|
||||
.type-csharp .highlight .sc { color: #A31515 }
|
||||
399
node_modules/topbar/index/stylesheets/stylesheet.css
generated
vendored
Executable file
399
node_modules/topbar/index/stylesheets/stylesheet.css
generated
vendored
Executable file
@@ -0,0 +1,399 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
License: none (public domain)
|
||||
*/
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/* LAYOUT STYLES */
|
||||
body {
|
||||
font-size: 1em;
|
||||
line-height: 1.5;
|
||||
background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||
color: #6d6d6d;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #d5000d;
|
||||
}
|
||||
a:hover {
|
||||
color: #c5000c;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-top: 35px;
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif; font-weight: 900;
|
||||
letter-spacing: -1px;
|
||||
font-size: 48px;
|
||||
color: #303030;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
letter-spacing: -1px;
|
||||
font-size: 24px;
|
||||
color: #aaa;
|
||||
font-weight: normal;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
#container {
|
||||
background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat;
|
||||
min-height: 595px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 620px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#container .inner img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#downloads {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
a.button {
|
||||
-moz-border-radius: 30px;
|
||||
-webkit-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
border-top: solid 1px #cbcbcb;
|
||||
border-left: solid 1px #b7b7b7;
|
||||
border-right: solid 1px #b7b7b7;
|
||||
border-bottom: solid 1px #b3b3b3;
|
||||
color: #303030;
|
||||
line-height: 25px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
padding: 12px 8px 12px 8px;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 179px;
|
||||
margin-right: 14px;
|
||||
background: #fdfdfd; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */
|
||||
-webkit-box-shadow: 10px 10px 5px #888;
|
||||
-moz-box-shadow: 10px 10px 5px #888;
|
||||
box-shadow: 0px 1px 5px #e8e8e8;
|
||||
}
|
||||
a.button:hover {
|
||||
border-top: solid 1px #b7b7b7;
|
||||
border-left: solid 1px #b3b3b3;
|
||||
border-right: solid 1px #b3b3b3;
|
||||
border-bottom: solid 1px #b3b3b3;
|
||||
background: #fafafa; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
|
||||
a.button span {
|
||||
padding-left: 50px;
|
||||
display: block;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
#download-zip span {
|
||||
background: transparent url(../images/zip-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#download-tar-gz span {
|
||||
background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#view-on-github span {
|
||||
background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#view-on-github {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||
color: #222;
|
||||
margin-bottom: 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #f2f2f2;
|
||||
border: solid 1px #ddd;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 20px;
|
||||
background: #303030;
|
||||
color: #f2f2f2;
|
||||
text-shadow: none;
|
||||
overflow: auto;
|
||||
}
|
||||
pre code {
|
||||
color: #f2f2f2;
|
||||
background-color: #303030;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* COMMON STYLES */
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
line-height: 1px;
|
||||
margin-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
border: none;
|
||||
background: transparent url('../images/hr.png') 50% 0 no-repeat;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #ebebeb;
|
||||
text-align: center;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
form {
|
||||
background: #f2f2f2;
|
||||
padding: 20px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL ELEMENT TYPE STYLES */
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #d5000d;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
color: #303030;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: .8em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
p {
|
||||
font-weight: 300;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p a {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-size: 1.6em;
|
||||
border-left: 10px solid #e9e9e9;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 0 0 30px;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: disc inside;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ol li {
|
||||
list-style: decimal inside;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
footer {
|
||||
background: transparent url('../images/hr.png') 0 0 no-repeat;
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #666;
|
||||
}
|
||||
footer a:hover {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
content: '.';
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
|
||||
/* #Media Queries
|
||||
================================================== */
|
||||
|
||||
/* Smaller than standard 960 (devices and browsers) */
|
||||
@media only screen and (max-width: 959px) {}
|
||||
|
||||
/* Tablet Portrait size to standard 960 (devices and browsers) */
|
||||
@media only screen and (min-width: 768px) and (max-width: 959px) {}
|
||||
|
||||
/* All Mobile Sizes (devices and browser) */
|
||||
@media only screen and (max-width: 767px) {
|
||||
header {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#downloads {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
#download-zip, #download-tar-gz {
|
||||
display: none;
|
||||
}
|
||||
.inner {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
|
||||
@media only screen and (min-width: 480px) and (max-width: 767px) {}
|
||||
|
||||
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
|
||||
@media only screen and (max-width: 479px) {}
|
||||
|
||||
|
||||
/* #Customization
|
||||
================================================== */
|
||||
#main_content {
|
||||
display: none;
|
||||
}
|
||||
ul, li {
|
||||
font-weight: 300;
|
||||
}
|
||||
.code a.button {
|
||||
-moz-border-radius: 20px;
|
||||
-webkit-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
width: 100px;
|
||||
float: none;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
line-height: 15px;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
p em, li em {
|
||||
text-shadow: none;
|
||||
color: #d5000d;
|
||||
font-style: normal;
|
||||
}
|
||||
160
node_modules/topbar/index/stylesheets/tomorrow-night-bright.css
generated
vendored
Normal file
160
node_modules/topbar/index/stylesheets/tomorrow-night-bright.css
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
/* Tomorrow Night Bright Theme */
|
||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
||||
/* Pretty printing styles. Used with prettify.js. */
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
/* plain text */
|
||||
.pln {
|
||||
color: #eaeaea;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
/* string content */
|
||||
.str {
|
||||
color: #b9ca4a;
|
||||
}
|
||||
|
||||
/* a keyword */
|
||||
.kwd {
|
||||
color: #c397d8;
|
||||
}
|
||||
|
||||
/* a comment */
|
||||
.com {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
/* a type name */
|
||||
.typ {
|
||||
color: #7aa6da;
|
||||
}
|
||||
|
||||
/* a literal value */
|
||||
.lit {
|
||||
color: #e78c45;
|
||||
}
|
||||
|
||||
/* punctuation */
|
||||
.pun {
|
||||
color: #eaeaea;
|
||||
}
|
||||
|
||||
/* lisp open bracket */
|
||||
.opn {
|
||||
color: #eaeaea;
|
||||
}
|
||||
|
||||
/* lisp close bracket */
|
||||
.clo {
|
||||
color: #eaeaea;
|
||||
}
|
||||
|
||||
/* a markup tag name */
|
||||
.tag {
|
||||
color: #d54e53;
|
||||
}
|
||||
|
||||
/* a markup attribute name */
|
||||
.atn {
|
||||
color: #e78c45;
|
||||
}
|
||||
|
||||
/* a markup attribute value */
|
||||
.atv {
|
||||
color: #70c0b1;
|
||||
}
|
||||
|
||||
/* a declaration */
|
||||
.dec {
|
||||
color: #e78c45;
|
||||
}
|
||||
|
||||
/* a variable name */
|
||||
.var {
|
||||
color: #d54e53;
|
||||
}
|
||||
|
||||
/* a function name */
|
||||
.fun {
|
||||
color: #7aa6da;
|
||||
}
|
||||
}
|
||||
/* Use higher contrast and text-weight for printable form. */
|
||||
@media print, projection {
|
||||
.str {
|
||||
color: #006600;
|
||||
}
|
||||
|
||||
.kwd {
|
||||
color: #006;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.com {
|
||||
color: #600;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.typ {
|
||||
color: #404;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.lit {
|
||||
color: #004444;
|
||||
}
|
||||
|
||||
.pun, .opn, .clo {
|
||||
color: #444400;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: #006;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.atn {
|
||||
color: #440044;
|
||||
}
|
||||
|
||||
.atv {
|
||||
color: #006600;
|
||||
}
|
||||
}
|
||||
/* Style */
|
||||
pre.prettyprint {
|
||||
background: black;
|
||||
font-family: Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
border: 1px solid #cccccc;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L4,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8,
|
||||
li.L9 {
|
||||
/* */
|
||||
}
|
||||
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 {
|
||||
/* */
|
||||
}
|
||||
27
node_modules/topbar/package.json
generated
vendored
Normal file
27
node_modules/topbar/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "topbar",
|
||||
"main": "topbar.js",
|
||||
"version": "0.1.4",
|
||||
"description": "Tiny & beautiful site-wide progress indicator",
|
||||
"homepage": "http://buunguyen.github.io/topbar",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:buunguyen/topbar.git"
|
||||
},
|
||||
"keywords": [
|
||||
"progress",
|
||||
"indicator",
|
||||
"loading",
|
||||
"responsive",
|
||||
"loading"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Buu Nguyen",
|
||||
"email": "buunguyen@gmail.com"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-uglify": "~0.2.2"
|
||||
}
|
||||
}
|
||||
142
node_modules/topbar/topbar.js
generated
vendored
Normal file
142
node_modules/topbar/topbar.js
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
/*! topbar 0.1.4, 2020-04-27
|
||||
* http://buunguyen.github.io/topbar
|
||||
* Copyright (c) 2019 Buu Nguyen
|
||||
* Licensed under the MIT License */
|
||||
;(function(window, document) {
|
||||
'use strict'
|
||||
|
||||
// https://gist.github.com/paulirish/1579671
|
||||
;(function() {
|
||||
var lastTime = 0;
|
||||
var vendors = ['ms', 'moz', 'webkit', 'o'];
|
||||
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|
||||
|| window[vendors[x]+'CancelRequestAnimationFrame'];
|
||||
}
|
||||
if (!window.requestAnimationFrame)
|
||||
window.requestAnimationFrame = function(callback, element) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
|
||||
timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
if (!window.cancelAnimationFrame)
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}());
|
||||
|
||||
var canvas, progressTimerId, fadeTimerId, currentProgress, showing,
|
||||
addEvent = function(elem, type, handler) {
|
||||
if (elem.addEventListener) elem.addEventListener(type, handler, false)
|
||||
else if (elem.attachEvent) elem.attachEvent('on' + type, handler)
|
||||
else elem['on' + type] = handler
|
||||
},
|
||||
options = {
|
||||
autoRun : true,
|
||||
barThickness : 3,
|
||||
barColors : {
|
||||
'0' : 'rgba(26, 188, 156, .9)',
|
||||
'.25' : 'rgba(52, 152, 219, .9)',
|
||||
'.50' : 'rgba(241, 196, 15, .9)',
|
||||
'.75' : 'rgba(230, 126, 34, .9)',
|
||||
'1.0' : 'rgba(211, 84, 0, .9)'
|
||||
},
|
||||
shadowBlur : 10,
|
||||
shadowColor : 'rgba(0, 0, 0, .6)',
|
||||
className : null,
|
||||
},
|
||||
repaint = function() {
|
||||
canvas.width = window.innerWidth
|
||||
canvas.height = options.barThickness * 5 // need space for shadow
|
||||
|
||||
var ctx = canvas.getContext('2d')
|
||||
ctx.shadowBlur = options.shadowBlur
|
||||
ctx.shadowColor = options.shadowColor
|
||||
|
||||
var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0)
|
||||
for (var stop in options.barColors)
|
||||
lineGradient.addColorStop(stop, options.barColors[stop])
|
||||
ctx.lineWidth = options.barThickness
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(0, options.barThickness/2)
|
||||
ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness/2)
|
||||
ctx.strokeStyle = lineGradient
|
||||
ctx.stroke()
|
||||
},
|
||||
createCanvas = function() {
|
||||
canvas = document.createElement('canvas')
|
||||
var style = canvas.style
|
||||
style.position = 'fixed'
|
||||
style.top = style.left = style.right = style.margin = style.padding = 0
|
||||
style.zIndex = 100001
|
||||
style.display = 'none'
|
||||
if (options.className)
|
||||
canvas.classList.add(options.className)
|
||||
document.body.appendChild(canvas)
|
||||
addEvent(window, 'resize', repaint)
|
||||
},
|
||||
topbar = {
|
||||
config: function(opts) {
|
||||
for (var key in opts)
|
||||
if (options.hasOwnProperty(key))
|
||||
options[key] = opts[key]
|
||||
},
|
||||
show: function() {
|
||||
if (showing) return
|
||||
showing = true
|
||||
if (fadeTimerId !== null)
|
||||
window.cancelAnimationFrame(fadeTimerId)
|
||||
if (!canvas) createCanvas()
|
||||
canvas.style.opacity = 1
|
||||
canvas.style.display = 'block'
|
||||
topbar.progress(0)
|
||||
if (options.autoRun) {
|
||||
(function loop() {
|
||||
progressTimerId = window.requestAnimationFrame(loop)
|
||||
topbar.progress('+' + (.05 * Math.pow(1-Math.sqrt(currentProgress), 2)))
|
||||
})()
|
||||
}
|
||||
},
|
||||
progress: function(to) {
|
||||
if (typeof to === "undefined")
|
||||
return currentProgress
|
||||
if (typeof to === "string") {
|
||||
to = (to.indexOf('+') >= 0 || to.indexOf('-') >= 0 ? currentProgress : 0) + parseFloat(to)
|
||||
}
|
||||
currentProgress = to > 1 ? 1 : to
|
||||
repaint()
|
||||
return currentProgress
|
||||
},
|
||||
hide: function() {
|
||||
if (!showing) return
|
||||
showing = false
|
||||
if (progressTimerId != null) {
|
||||
window.cancelAnimationFrame(progressTimerId)
|
||||
progressTimerId = null
|
||||
}
|
||||
(function loop() {
|
||||
if (topbar.progress('+.1') >= 1) {
|
||||
canvas.style.opacity -= .05
|
||||
if (canvas.style.opacity <= .05) {
|
||||
canvas.style.display = 'none'
|
||||
fadeTimerId = null
|
||||
return
|
||||
}
|
||||
}
|
||||
fadeTimerId = window.requestAnimationFrame(loop)
|
||||
})()
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
module.exports = topbar
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(function() { return topbar })
|
||||
} else {
|
||||
this.topbar = topbar
|
||||
}
|
||||
}).call(this, window, document)
|
||||
5
node_modules/topbar/topbar.min.js
generated
vendored
Normal file
5
node_modules/topbar/topbar.min.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/*! topbar 0.1.4, 2020-04-27
|
||||
* http://buunguyen.github.io/topbar
|
||||
* Copyright (c) 2020 Buu Nguyen
|
||||
* Licensed under the MIT License */
|
||||
(function(a,b){"use strict";!function(){for(var b=0,c=["ms","moz","webkit","o"],d=0;d<c.length&&!a.requestAnimationFrame;++d)a.requestAnimationFrame=a[c[d]+"RequestAnimationFrame"],a.cancelAnimationFrame=a[c[d]+"CancelAnimationFrame"]||a[c[d]+"CancelRequestAnimationFrame"];a.requestAnimationFrame||(a.requestAnimationFrame=function(c){var d=(new Date).getTime(),e=Math.max(0,16-(d-b)),f=a.setTimeout(function(){c(d+e)},e);return b=d+e,f}),a.cancelAnimationFrame||(a.cancelAnimationFrame=function(a){clearTimeout(a)})}();var c,d,e,f,g,h=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},i={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},j=function(){c.width=a.innerWidth,c.height=5*i.barThickness;var b=c.getContext("2d");b.shadowBlur=i.shadowBlur,b.shadowColor=i.shadowColor;var d=b.createLinearGradient(0,0,c.width,0);for(var e in i.barColors)d.addColorStop(e,i.barColors[e]);b.lineWidth=i.barThickness,b.beginPath(),b.moveTo(0,i.barThickness/2),b.lineTo(Math.ceil(f*c.width),i.barThickness/2),b.strokeStyle=d,b.stroke()},k=function(){c=b.createElement("canvas");var d=c.style;d.position="fixed",d.top=d.left=d.right=d.margin=d.padding=0,d.zIndex=100001,d.display="none",i.className&&c.classList.add(i.className),b.body.appendChild(c),h(a,"resize",j)},l={config:function(a){for(var b in a)i.hasOwnProperty(b)&&(i[b]=a[b])},show:function(){g||(g=!0,null!==e&&a.cancelAnimationFrame(e),c||k(),c.style.opacity=1,c.style.display="block",l.progress(0),i.autoRun&&!function b(){d=a.requestAnimationFrame(b),l.progress("+"+.05*Math.pow(1-Math.sqrt(f),2))}())},progress:function(a){return"undefined"==typeof a?f:("string"==typeof a&&(a=(a.indexOf("+")>=0||a.indexOf("-")>=0?f:0)+parseFloat(a)),f=a>1?1:a,j(),f)},hide:function(){g&&(g=!1,null!=d&&(a.cancelAnimationFrame(d),d=null),function b(){return l.progress("+.1")>=1&&(c.style.opacity-=.05,c.style.opacity<=.05)?(c.style.display="none",void(e=null)):void(e=a.requestAnimationFrame(b))}())}};"object"==typeof module&&"object"==typeof module.exports?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):this.topbar=l}).call(this,window,document);
|
||||
Reference in New Issue
Block a user