First commit
This commit is contained in:
75
application/elements/preloaders/simpleSpinner.js
Normal file
75
application/elements/preloaders/simpleSpinner.js
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
import document from "/unify/document.js";
|
||||
|
||||
|
||||
|
||||
class line{
|
||||
|
||||
layers = 1;
|
||||
|
||||
display = "block";
|
||||
|
||||
|
||||
|
||||
create() {
|
||||
|
||||
//this.element.className = "loader-line";
|
||||
|
||||
this.element.classList.add("loader-line-dark")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class lineMask{
|
||||
|
||||
layers = 1;
|
||||
|
||||
display = "block";
|
||||
|
||||
|
||||
line = new line();
|
||||
|
||||
create() {
|
||||
|
||||
//this.element.className = "loader-line-mask";
|
||||
this.element.classList.add("loader-line-mask")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default class preloaderBox{
|
||||
|
||||
layers = 1;
|
||||
|
||||
margin = 40
|
||||
|
||||
left = "0"
|
||||
|
||||
top = "0"
|
||||
|
||||
|
||||
//marginTop = "0px!important"
|
||||
|
||||
//marginLeft = "0px!important";
|
||||
|
||||
|
||||
|
||||
position = "relative!important"
|
||||
|
||||
lineMask = new lineMask();
|
||||
|
||||
|
||||
create() {
|
||||
|
||||
this.element.classList.add("loader-circle")
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
75
application/elements/preloaders/spinner.js
Normal file
75
application/elements/preloaders/spinner.js
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
import document from "/unify/document.js";
|
||||
|
||||
|
||||
class circle{
|
||||
|
||||
customElement = document.createElementNS("http://www.w3.org/2000/svg","circle");
|
||||
|
||||
useCustomElement = true;
|
||||
|
||||
layers = 1;
|
||||
|
||||
zIndex = 1000;
|
||||
|
||||
boxShadow = "inset 0 0 0 1px rgb(0 0 0 / 50%)!important"
|
||||
|
||||
create() {
|
||||
|
||||
this.customElement.setAttributeNS(null,"cx", "50")
|
||||
|
||||
this.customElement.setAttributeNS(null,"cy", "50")
|
||||
|
||||
this.customElement.setAttributeNS(null,"r", "20")
|
||||
|
||||
this.customElement.setAttributeNS(null,"fill", "none")
|
||||
|
||||
this.customElement.setAttributeNS(null,"stroke-width", "2")
|
||||
|
||||
this.customElement.setAttributeNS(null,"stroke-miterlimit", "10")
|
||||
|
||||
this.customElement.setAttributeNS(null,"box-shadow", "inset 0 0 0 1px rgb(0 0 0 / 50%)!important")
|
||||
|
||||
|
||||
|
||||
this.customElement.classList.add('path-dark');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class spinner{
|
||||
|
||||
customElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
|
||||
useCustomElement = true;
|
||||
|
||||
layers = 1;
|
||||
|
||||
circle = new circle();
|
||||
|
||||
create() {
|
||||
|
||||
this.customElement.setAttributeNS(null,"viewBox", "25 25 50 50")
|
||||
|
||||
this.element.setAttributeNS(null, "class", "circular");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default class preloaderBox{
|
||||
|
||||
layers = 1;
|
||||
|
||||
margin = 40
|
||||
|
||||
width = 40;
|
||||
|
||||
spinner = new spinner();
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user