59 lines
2.8 KiB
HTML
59 lines
2.8 KiB
HTML
<!--
|
|
spinner.inc
|
|
|
|
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
|
All rights reserved.
|
|
|
|
Uses spin.js by Felix Gnass (fgnass) at http://spin.js.org
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
|
list of conditions and the following disclaimer.
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
this list of conditions and the following disclaimer in the documentation
|
|
and/or other materials provided with the distribution.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
-->
|
|
<!-- attach spinner -->
|
|
<script type="text/javascript">
|
|
function spinner() {
|
|
var opts = {
|
|
lines: 10, // The number of lines to draw
|
|
length: 7, // The length of each line
|
|
width: 4, // The line thickness
|
|
radius: 10, // The radius of the inner circle
|
|
corners: 1, // Corner roundness (0..1)
|
|
rotate: 0, // The rotation offset
|
|
color: '#4D4D4D', // #rgb or #rrggbb
|
|
opacity: 0.45, // Opacity of the lines
|
|
speed: 1, // Rounds per second
|
|
trail: 60, // Afterglow percentage
|
|
shadow: false, // Whether to render a shadow
|
|
hwaccel: false, // Whether to use hardware acceleration
|
|
className: 'spinner', // The CSS class to assign to the spinner
|
|
zIndex: 2e9, // The z-index (defaults to 2000000000)
|
|
top: '50%', // Top position relative to parent
|
|
left: '50%', // Left position relative to parent
|
|
position: 'fixed', // Element positioning
|
|
};
|
|
var target = document.getElementById('spinner_main');
|
|
var spinner = new Spinner(opts).spin(target);
|
|
$('#spinner_overlay').show();
|
|
}
|
|
</script>
|
|
<div id="spinner_main"></div>
|
|
<div id="spinner_overlay" style="display: none; background-color: white; position: fixed; left:0; top:0; height:100%; width:100%; opacity: 0.25;"></div>
|
|
<!-- end of spinner -->
|