mazer-rails 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +75 -0
- data/lib/mazer-rails.rb +13 -0
- data/lib/mazer_rails/engine.rb +27 -0
- data/lib/mazer_rails/version.rb +1 -1
- data/mazer-rails.gemspec +5 -2
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-300-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-400-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-600-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-700-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-800-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff +0 -0
- data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff2 +0 -0
- data/vendor/assets/javascripts/mazer/app.js +2 -0
- data/vendor/assets/javascripts/mazer/bootstrap.js +2 -0
- data/vendor/assets/javascripts/mazer/initTheme.js +1 -0
- data/vendor/assets/javascripts/mazer/mazer.js +2 -0
- data/vendor/assets/stylesheets/mazer/app-dark.scss +1 -0
- data/vendor/assets/stylesheets/mazer/app.scss +13 -0
- metadata +60 -120
- data/lib/mazer_rails.rb +0 -7
- data/vendor/assets/fonts/iconly/Iconly---Bold.eot +0 -0
- data/vendor/assets/fonts/iconly/Iconly---Bold.svg +0 -19
- data/vendor/assets/fonts/iconly/Iconly---Bold.ttf +0 -0
- data/vendor/assets/fonts/iconly/Iconly---Bold.woff +0 -0
- data/vendor/assets/images/bg/4853433.png +0 -0
- data/vendor/assets/images/faces/1.jpg +0 -0
- data/vendor/assets/images/faces/2.jpg +0 -0
- data/vendor/assets/images/faces/3.jpg +0 -0
- data/vendor/assets/images/faces/4.jpg +0 -0
- data/vendor/assets/images/faces/5.jpg +0 -0
- data/vendor/assets/images/faces/6.jpg +0 -0
- data/vendor/assets/images/faces/7.jpg +0 -0
- data/vendor/assets/images/faces/8.jpg +0 -0
- data/vendor/assets/images/logo/favicon.png +0 -0
- data/vendor/assets/images/logo/favicon.svg +0 -1
- data/vendor/assets/images/logo/logo.svg +0 -1
- data/vendor/assets/images/samples/1.png +0 -0
- data/vendor/assets/images/samples/2.png +0 -0
- data/vendor/assets/images/samples/3.png +0 -0
- data/vendor/assets/images/samples/4.png +0 -0
- data/vendor/assets/images/samples/architecture1.jpg +0 -0
- data/vendor/assets/images/samples/banana.jpg +0 -0
- data/vendor/assets/images/samples/bg-mountain.jpg +0 -0
- data/vendor/assets/images/samples/building.jpg +0 -0
- data/vendor/assets/images/samples/error-403.svg +0 -94
- data/vendor/assets/images/samples/error-404.svg +0 -88
- data/vendor/assets/images/samples/error-500.svg +0 -76
- data/vendor/assets/images/samples/jump.jpg +0 -0
- data/vendor/assets/images/samples/motorcycle.jpg +0 -0
- data/vendor/assets/images/samples/origami.jpg +0 -0
- data/vendor/assets/images/samples/water.jpg +0 -0
- data/vendor/assets/images/svg-loaders/audio.svg +0 -29
- data/vendor/assets/images/svg-loaders/ball-triangle.svg +0 -1
- data/vendor/assets/images/svg-loaders/bars.svg +0 -1
- data/vendor/assets/images/svg-loaders/circles.svg +0 -20
- data/vendor/assets/images/svg-loaders/grid.svg +0 -1
- data/vendor/assets/images/svg-loaders/hearts.svg +0 -1
- data/vendor/assets/images/svg-loaders/oval.svg +0 -1
- data/vendor/assets/images/svg-loaders/puff.svg +0 -1
- data/vendor/assets/images/svg-loaders/rings.svg +0 -1
- data/vendor/assets/images/svg-loaders/spinning-circles.svg +0 -1
- data/vendor/assets/images/svg-loaders/tail-spin.svg +0 -1
- data/vendor/assets/images/svg-loaders/three-dots.svg +0 -1
- data/vendor/assets/javascripts/app.js +0 -9
- data/vendor/assets/javascripts/bootstrap.js +0 -6
- data/vendor/assets/javascripts/components/dark.js +0 -65
- data/vendor/assets/javascripts/components/sidebar.js +0 -185
- data/vendor/assets/javascripts/helper/isDesktop.js +0 -1
- data/vendor/assets/javascripts/initTheme.js +0 -5
- data/vendor/assets/javascripts/mazer.js +0 -9
- data/vendor/assets/javascripts/pages/ckeditor.js +0 -3
- data/vendor/assets/javascripts/pages/component-toasts.js +0 -9
- data/vendor/assets/javascripts/pages/dashboard.js +0 -158
- data/vendor/assets/javascripts/pages/datatables.js +0 -1
- data/vendor/assets/javascripts/pages/filepond.js +0 -181
- data/vendor/assets/javascripts/pages/form-editor.js +0 -27
- data/vendor/assets/javascripts/pages/form-element-select.js +0 -14
- data/vendor/assets/javascripts/pages/horizontal-layout.js +0 -43
- data/vendor/assets/javascripts/pages/jquery.js +0 -1
- data/vendor/assets/javascripts/pages/jsvectormap.js +0 -60
- data/vendor/assets/javascripts/pages/parsley.js +0 -55
- data/vendor/assets/javascripts/pages/quill.js +0 -27
- data/vendor/assets/javascripts/pages/rater-js.js +0 -38
- data/vendor/assets/javascripts/pages/simple-datatables.js +0 -46
- data/vendor/assets/javascripts/pages/summernote.js +0 -20
- data/vendor/assets/javascripts/pages/sweetalert2.js +0 -142
- data/vendor/assets/javascripts/pages/tinymce.js +0 -22
- data/vendor/assets/javascripts/pages/toastify.js +0 -81
- data/vendor/assets/javascripts/pages/ui-apexchart.js +0 -521
- data/vendor/assets/javascripts/pages/ui-chartjs.js +0 -445
- data/vendor/assets/javascripts/pages/ui-todolist.js +0 -5
- data/vendor/assets/stylesheets/_fonts.scss +0 -5
- data/vendor/assets/stylesheets/_mazer.scss +0 -103
- data/vendor/assets/stylesheets/_utilities.scss +0 -53
- data/vendor/assets/stylesheets/_variables.scss +0 -1626
- data/vendor/assets/stylesheets/app.scss +0 -20
- data/vendor/assets/stylesheets/bootstrap.scss +0 -58
- data/vendor/assets/stylesheets/components/_alert.scss +0 -43
- data/vendor/assets/stylesheets/components/_avatar.scss +0 -78
- data/vendor/assets/stylesheets/components/_badge.scss +0 -20
- data/vendor/assets/stylesheets/components/_breadcrumb.scss +0 -10
- data/vendor/assets/stylesheets/components/_buttons.scss +0 -62
- data/vendor/assets/stylesheets/components/_card.scss +0 -126
- data/vendor/assets/stylesheets/components/_carousel.scss +0 -6
- data/vendor/assets/stylesheets/components/_divider.scss +0 -37
- data/vendor/assets/stylesheets/components/_dropdowns.scss +0 -24
- data/vendor/assets/stylesheets/components/_forms.scss +0 -213
- data/vendor/assets/stylesheets/components/_icons.scss +0 -48
- data/vendor/assets/stylesheets/components/_modal.scss +0 -46
- data/vendor/assets/stylesheets/components/_navbar.scss +0 -280
- data/vendor/assets/stylesheets/components/_navs.scss +0 -32
- data/vendor/assets/stylesheets/components/_pagination.scss +0 -39
- data/vendor/assets/stylesheets/components/_progress.scss +0 -32
- data/vendor/assets/stylesheets/components/_sidebar.scss +0 -171
- data/vendor/assets/stylesheets/components/_table.scss +0 -36
- data/vendor/assets/stylesheets/iconly.scss +0 -327
- data/vendor/assets/stylesheets/layouts/main.scss +0 -48
- data/vendor/assets/stylesheets/mixins/_navbar.scss +0 -20
- data/vendor/assets/stylesheets/pages/auth.scss +0 -51
- data/vendor/assets/stylesheets/pages/chat.scss +0 -145
- data/vendor/assets/stylesheets/pages/datatables.scss +0 -7
- data/vendor/assets/stylesheets/pages/dripicons.scss +0 -20
- data/vendor/assets/stylesheets/pages/email.scss +0 -625
- data/vendor/assets/stylesheets/pages/error.scss +0 -22
- data/vendor/assets/stylesheets/pages/form-element-select.scss +0 -7
- data/vendor/assets/stylesheets/pages/simple-datatables.scss +0 -20
- data/vendor/assets/stylesheets/pages/summernote.scss +0 -4
- data/vendor/assets/stylesheets/themes/dark/_mazer-dark.scss +0 -82
- data/vendor/assets/stylesheets/themes/dark/_root.scss +0 -55
- data/vendor/assets/stylesheets/themes/dark/_variables-dark.scss +0 -329
- data/vendor/assets/stylesheets/themes/dark/app-dark.scss +0 -54
- data/vendor/assets/stylesheets/widgets/chat.scss +0 -26
- data/vendor/assets/stylesheets/widgets/todo.scss +0 -33
@@ -1,185 +0,0 @@
|
|
1
|
-
import isDesktop from '../helper/isDesktop'
|
2
|
-
|
3
|
-
function slideToggle(a, b, c) { 0 === a.clientHeight ? j(a, b, c, !0) : j(a, b, c) } function slideUp(a, b, c) { j(a, b, c) } function slideDown(a, b, c) { j(a, b, c, !0) } function j(c, a, k, d) { void 0 === a && (a = 400), void 0 === d && (d = !1), c.style.overflow = "hidden", d && (c.style.display = "block"); var l, b = window.getComputedStyle(c), e = parseFloat(b.getPropertyValue("height")), f = parseFloat(b.getPropertyValue("padding-top")), g = parseFloat(b.getPropertyValue("padding-bottom")), h = parseFloat(b.getPropertyValue("margin-top")), i = parseFloat(b.getPropertyValue("margin-bottom")), m = e / a, n = f / a, o = g / a, p = h / a, q = i / a; window.requestAnimationFrame(function s(r) { void 0 === l && (l = r); var b = r - l; d ? (c.style.height = m * b + "px", c.style.paddingTop = n * b + "px", c.style.paddingBottom = o * b + "px", c.style.marginTop = p * b + "px", c.style.marginBottom = q * b + "px") : (c.style.height = e - m * b + "px", c.style.paddingTop = f - n * b + "px", c.style.paddingBottom = g - o * b + "px", c.style.marginTop = h - p * b + "px", c.style.marginBottom = i - q * b + "px"), b >= a ? (c.style.height = "", c.style.paddingTop = "", c.style.paddingBottom = "", c.style.marginTop = "", c.style.marginBottom = "", c.style.overflow = "", d || (c.style.display = "none"), "function" == typeof k && k()) : window.requestAnimationFrame(s) }) }
|
4
|
-
|
5
|
-
/**
|
6
|
-
* a Sidebar component
|
7
|
-
* @param {HTMLElement} el - sidebar element
|
8
|
-
* @param {object} options={} - options
|
9
|
-
*/
|
10
|
-
class Sidebar {
|
11
|
-
constructor(el, options = {}) {
|
12
|
-
this.sidebarEL = el instanceof HTMLElement ? el : document.querySelector(el)
|
13
|
-
this.options = options
|
14
|
-
this.init()
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
* initialize the sidebar
|
19
|
-
*/
|
20
|
-
init() {
|
21
|
-
// add event listener to sidebar
|
22
|
-
document
|
23
|
-
.querySelectorAll(".burger-btn")
|
24
|
-
.forEach((el) => el.addEventListener("click", this.toggle.bind(this)))
|
25
|
-
document
|
26
|
-
.querySelectorAll(".sidebar-hide")
|
27
|
-
.forEach((el) => el.addEventListener("click", this.toggle.bind(this)))
|
28
|
-
window.addEventListener("resize", this.onResize.bind(this))
|
29
|
-
|
30
|
-
//
|
31
|
-
let sidebarItems = document.querySelectorAll(".sidebar-item.has-sub")
|
32
|
-
for (var i = 0; i < sidebarItems.length; i++) {
|
33
|
-
let sidebarItem = sidebarItems[i]
|
34
|
-
sidebarItems[i]
|
35
|
-
.querySelector(".sidebar-link")
|
36
|
-
.addEventListener("click", (e) => {
|
37
|
-
e.preventDefault()
|
38
|
-
|
39
|
-
let submenu = sidebarItem.querySelector(".submenu")
|
40
|
-
if (submenu.classList.contains("active"))
|
41
|
-
submenu.style.display = "block"
|
42
|
-
|
43
|
-
if (submenu.style.display == "none") submenu.classList.add("active")
|
44
|
-
else submenu.classList.remove("active")
|
45
|
-
slideToggle(submenu, 300, () =>
|
46
|
-
this.forceElementVisibility(sidebarItem)
|
47
|
-
)
|
48
|
-
})
|
49
|
-
}
|
50
|
-
|
51
|
-
// Perfect Scrollbar Init
|
52
|
-
if (typeof PerfectScrollbar == "function") {
|
53
|
-
const container = document.querySelector(".sidebar-wrapper")
|
54
|
-
const ps = new PerfectScrollbar(container, {
|
55
|
-
wheelPropagation: false,
|
56
|
-
})
|
57
|
-
}
|
58
|
-
|
59
|
-
// Scroll into active sidebar
|
60
|
-
setTimeout(
|
61
|
-
() =>
|
62
|
-
document.querySelector(".sidebar-item.active")?.scrollIntoView(false),
|
63
|
-
100
|
64
|
-
)
|
65
|
-
|
66
|
-
// check responsive
|
67
|
-
this.onFirstLoad()
|
68
|
-
}
|
69
|
-
|
70
|
-
/**
|
71
|
-
* On First Load
|
72
|
-
*/
|
73
|
-
onFirstLoad() {
|
74
|
-
if (!isDesktop(window)) {
|
75
|
-
this.sidebarEL.classList.remove("active")
|
76
|
-
}
|
77
|
-
}
|
78
|
-
|
79
|
-
/**
|
80
|
-
* On Sidebar Rezise Event
|
81
|
-
*/
|
82
|
-
onResize() {
|
83
|
-
if (isDesktop(window)) {
|
84
|
-
this.sidebarEL.classList.add("active")
|
85
|
-
} else {
|
86
|
-
this.sidebarEL.classList.remove("active")
|
87
|
-
}
|
88
|
-
|
89
|
-
// reset
|
90
|
-
this.deleteBackdrop()
|
91
|
-
this.toggleOverflowBody(true)
|
92
|
-
}
|
93
|
-
|
94
|
-
/**
|
95
|
-
* Toggle Sidebar
|
96
|
-
*/
|
97
|
-
toggle() {
|
98
|
-
const sidebarState = this.sidebarEL.classList.contains("active")
|
99
|
-
if (sidebarState) {
|
100
|
-
this.hide()
|
101
|
-
} else {
|
102
|
-
this.show()
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
/**
|
107
|
-
* Show Sidebar
|
108
|
-
*/
|
109
|
-
show() {
|
110
|
-
this.sidebarEL.classList.add("active")
|
111
|
-
this.createBackdrop()
|
112
|
-
this.toggleOverflowBody()
|
113
|
-
}
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Hide Sidebar
|
117
|
-
*/
|
118
|
-
hide() {
|
119
|
-
this.sidebarEL.classList.remove("active")
|
120
|
-
this.deleteBackdrop()
|
121
|
-
this.toggleOverflowBody()
|
122
|
-
}
|
123
|
-
|
124
|
-
/**
|
125
|
-
* Create Sidebar Backdrop
|
126
|
-
*/
|
127
|
-
createBackdrop() {
|
128
|
-
if (isDesktop(window)) return
|
129
|
-
this.deleteBackdrop()
|
130
|
-
const backdrop = document.createElement("div")
|
131
|
-
backdrop.classList.add("sidebar-backdrop")
|
132
|
-
backdrop.addEventListener("click", this.hide.bind(this))
|
133
|
-
document.body.appendChild(backdrop)
|
134
|
-
}
|
135
|
-
|
136
|
-
/**
|
137
|
-
* Delete Sidebar Backdrop
|
138
|
-
*/
|
139
|
-
deleteBackdrop() {
|
140
|
-
const backdrop = document.querySelector(".sidebar-backdrop")
|
141
|
-
if (backdrop) {
|
142
|
-
backdrop.remove()
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
/**
|
147
|
-
* Toggle Overflow Body
|
148
|
-
*/
|
149
|
-
toggleOverflowBody(active) {
|
150
|
-
if(isDesktop(window)) return;
|
151
|
-
const sidebarState = this.sidebarEL.classList.contains("active")
|
152
|
-
const body = document.querySelector("body")
|
153
|
-
if (typeof active == "undefined") {
|
154
|
-
body.style.overflowY = sidebarState ? "hidden" : "auto"
|
155
|
-
} else {
|
156
|
-
body.style.overflowY = active ? "auto" : "hidden"
|
157
|
-
}
|
158
|
-
}
|
159
|
-
|
160
|
-
isElementInViewport(el) {
|
161
|
-
var rect = el.getBoundingClientRect()
|
162
|
-
|
163
|
-
return (
|
164
|
-
rect.top >= 0 &&
|
165
|
-
rect.left >= 0 &&
|
166
|
-
rect.bottom <=
|
167
|
-
(window.innerHeight || document.documentElement.clientHeight) &&
|
168
|
-
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
|
169
|
-
)
|
170
|
-
}
|
171
|
-
|
172
|
-
forceElementVisibility(el) {
|
173
|
-
if (!this.isElementInViewport(el)) {
|
174
|
-
el.scrollIntoView(false)
|
175
|
-
}
|
176
|
-
}
|
177
|
-
}
|
178
|
-
|
179
|
-
/**
|
180
|
-
* Create Sidebar Wrapper
|
181
|
-
*/
|
182
|
-
let sidebarEl = document.getElementById("sidebar")
|
183
|
-
if (sidebarEl) {
|
184
|
-
window.sidebar = new Sidebar(sidebarEl)
|
185
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default (window) => window.innerWidth > 1200;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
// Don't forget to load bootstrap js in your project
|
2
|
-
// Here, we load it in our app.js
|
3
|
-
|
4
|
-
// We could import PerfectScrollbar directly in the sidebar module
|
5
|
-
window.PerfectScrollbar = require("perfect-scrollbar/dist/perfect-scrollbar.min.js")
|
6
|
-
|
7
|
-
let Sidebar = require("./components/sidebar")
|
8
|
-
|
9
|
-
export { Sidebar }
|
@@ -1,9 +0,0 @@
|
|
1
|
-
const toastTrigger = document.getElementById("liveToastBtn")
|
2
|
-
const toastLiveExample = document.getElementById("liveToast")
|
3
|
-
if (toastTrigger) {
|
4
|
-
toastTrigger.addEventListener("click", () => {
|
5
|
-
const toast = new bootstrap.Toast(toastLiveExample)
|
6
|
-
|
7
|
-
toast.show()
|
8
|
-
})
|
9
|
-
}
|
@@ -1,158 +0,0 @@
|
|
1
|
-
var optionsProfileVisit = {
|
2
|
-
annotations: {
|
3
|
-
position: "back",
|
4
|
-
},
|
5
|
-
dataLabels: {
|
6
|
-
enabled: false,
|
7
|
-
},
|
8
|
-
chart: {
|
9
|
-
type: "bar",
|
10
|
-
height: 300,
|
11
|
-
},
|
12
|
-
fill: {
|
13
|
-
opacity: 1,
|
14
|
-
},
|
15
|
-
plotOptions: {},
|
16
|
-
series: [
|
17
|
-
{
|
18
|
-
name: "sales",
|
19
|
-
data: [9, 20, 30, 20, 10, 20, 30, 20, 10, 20, 30, 20],
|
20
|
-
},
|
21
|
-
],
|
22
|
-
colors: "#435ebe",
|
23
|
-
xaxis: {
|
24
|
-
categories: [
|
25
|
-
"Jan",
|
26
|
-
"Feb",
|
27
|
-
"Mar",
|
28
|
-
"Apr",
|
29
|
-
"May",
|
30
|
-
"Jun",
|
31
|
-
"Jul",
|
32
|
-
"Aug",
|
33
|
-
"Sep",
|
34
|
-
"Oct",
|
35
|
-
"Nov",
|
36
|
-
"Dec",
|
37
|
-
],
|
38
|
-
},
|
39
|
-
}
|
40
|
-
let optionsVisitorsProfile = {
|
41
|
-
series: [70, 30],
|
42
|
-
labels: ["Male", "Female"],
|
43
|
-
colors: ["#435ebe", "#55c6e8"],
|
44
|
-
chart: {
|
45
|
-
type: "donut",
|
46
|
-
width: "100%",
|
47
|
-
height: "350px",
|
48
|
-
},
|
49
|
-
legend: {
|
50
|
-
position: "bottom",
|
51
|
-
},
|
52
|
-
plotOptions: {
|
53
|
-
pie: {
|
54
|
-
donut: {
|
55
|
-
size: "30%",
|
56
|
-
},
|
57
|
-
},
|
58
|
-
},
|
59
|
-
}
|
60
|
-
|
61
|
-
var optionsEurope = {
|
62
|
-
series: [
|
63
|
-
{
|
64
|
-
name: "series1",
|
65
|
-
data: [310, 800, 600, 430, 540, 340, 605, 805, 430, 540, 340, 605],
|
66
|
-
},
|
67
|
-
],
|
68
|
-
chart: {
|
69
|
-
height: 80,
|
70
|
-
type: "area",
|
71
|
-
toolbar: {
|
72
|
-
show: false,
|
73
|
-
},
|
74
|
-
},
|
75
|
-
colors: ["#5350e9"],
|
76
|
-
stroke: {
|
77
|
-
width: 2,
|
78
|
-
},
|
79
|
-
grid: {
|
80
|
-
show: false,
|
81
|
-
},
|
82
|
-
dataLabels: {
|
83
|
-
enabled: false,
|
84
|
-
},
|
85
|
-
xaxis: {
|
86
|
-
type: "datetime",
|
87
|
-
categories: [
|
88
|
-
"2018-09-19T00:00:00.000Z",
|
89
|
-
"2018-09-19T01:30:00.000Z",
|
90
|
-
"2018-09-19T02:30:00.000Z",
|
91
|
-
"2018-09-19T03:30:00.000Z",
|
92
|
-
"2018-09-19T04:30:00.000Z",
|
93
|
-
"2018-09-19T05:30:00.000Z",
|
94
|
-
"2018-09-19T06:30:00.000Z",
|
95
|
-
"2018-09-19T07:30:00.000Z",
|
96
|
-
"2018-09-19T08:30:00.000Z",
|
97
|
-
"2018-09-19T09:30:00.000Z",
|
98
|
-
"2018-09-19T10:30:00.000Z",
|
99
|
-
"2018-09-19T11:30:00.000Z",
|
100
|
-
],
|
101
|
-
axisBorder: {
|
102
|
-
show: false,
|
103
|
-
},
|
104
|
-
axisTicks: {
|
105
|
-
show: false,
|
106
|
-
},
|
107
|
-
labels: {
|
108
|
-
show: false,
|
109
|
-
},
|
110
|
-
},
|
111
|
-
show: false,
|
112
|
-
yaxis: {
|
113
|
-
labels: {
|
114
|
-
show: false,
|
115
|
-
},
|
116
|
-
},
|
117
|
-
tooltip: {
|
118
|
-
x: {
|
119
|
-
format: "dd/MM/yy HH:mm",
|
120
|
-
},
|
121
|
-
},
|
122
|
-
}
|
123
|
-
|
124
|
-
let optionsAmerica = {
|
125
|
-
...optionsEurope,
|
126
|
-
colors: ["#008b75"],
|
127
|
-
}
|
128
|
-
let optionsIndonesia = {
|
129
|
-
...optionsEurope,
|
130
|
-
colors: ["#dc3545"],
|
131
|
-
}
|
132
|
-
|
133
|
-
var chartProfileVisit = new ApexCharts(
|
134
|
-
document.querySelector("#chart-profile-visit"),
|
135
|
-
optionsProfileVisit
|
136
|
-
)
|
137
|
-
var chartVisitorsProfile = new ApexCharts(
|
138
|
-
document.getElementById("chart-visitors-profile"),
|
139
|
-
optionsVisitorsProfile
|
140
|
-
)
|
141
|
-
var chartEurope = new ApexCharts(
|
142
|
-
document.querySelector("#chart-europe"),
|
143
|
-
optionsEurope
|
144
|
-
)
|
145
|
-
var chartAmerica = new ApexCharts(
|
146
|
-
document.querySelector("#chart-america"),
|
147
|
-
optionsAmerica
|
148
|
-
)
|
149
|
-
var chartIndonesia = new ApexCharts(
|
150
|
-
document.querySelector("#chart-indonesia"),
|
151
|
-
optionsIndonesia
|
152
|
-
)
|
153
|
-
|
154
|
-
chartIndonesia.render()
|
155
|
-
chartAmerica.render()
|
156
|
-
chartEurope.render()
|
157
|
-
chartProfileVisit.render()
|
158
|
-
chartVisitorsProfile.render()
|
@@ -1 +0,0 @@
|
|
1
|
-
let jquery_datatable = $("#table1").DataTable()
|
@@ -1,181 +0,0 @@
|
|
1
|
-
// Filepond: Basic
|
2
|
-
FilePond.create(document.querySelector(".basic-filepond"), {
|
3
|
-
credits: null,
|
4
|
-
allowImagePreview: false,
|
5
|
-
allowMultiple: false,
|
6
|
-
allowFileEncode: false,
|
7
|
-
required: false,
|
8
|
-
})
|
9
|
-
|
10
|
-
// Filepond: Multiple Files
|
11
|
-
FilePond.create(document.querySelector(".multiple-files-filepond"), {
|
12
|
-
credits: null,
|
13
|
-
allowImagePreview: false,
|
14
|
-
allowMultiple: true,
|
15
|
-
allowFileEncode: false,
|
16
|
-
required: false,
|
17
|
-
})
|
18
|
-
|
19
|
-
// Filepond: With Validation
|
20
|
-
FilePond.create(document.querySelector(".with-validation-filepond"), {
|
21
|
-
credits: null,
|
22
|
-
allowImagePreview: false,
|
23
|
-
allowMultiple: true,
|
24
|
-
allowFileEncode: false,
|
25
|
-
required: true,
|
26
|
-
acceptedFileTypes: ["image/png"],
|
27
|
-
fileValidateTypeDetectType: (source, type) =>
|
28
|
-
new Promise((resolve, reject) => {
|
29
|
-
// Do custom type detection here and return with promise
|
30
|
-
resolve(type)
|
31
|
-
}),
|
32
|
-
})
|
33
|
-
|
34
|
-
// Filepond: ImgBB with server property
|
35
|
-
FilePond.create(document.querySelector(".imgbb-filepond"), {
|
36
|
-
credits: null,
|
37
|
-
allowImagePreview: false,
|
38
|
-
server: {
|
39
|
-
process: (fieldName, file, metadata, load, error, progress, abort) => {
|
40
|
-
// We ignore the metadata property and only send the file
|
41
|
-
|
42
|
-
const formData = new FormData()
|
43
|
-
formData.append(fieldName, file, file.name)
|
44
|
-
|
45
|
-
const request = new XMLHttpRequest()
|
46
|
-
// you can change it by your client api key
|
47
|
-
request.open(
|
48
|
-
"POST",
|
49
|
-
"https://api.imgbb.com/1/upload?key=762894e2014f83c023b233b2f10395e2"
|
50
|
-
)
|
51
|
-
|
52
|
-
request.upload.onprogress = (e) => {
|
53
|
-
progress(e.lengthComputable, e.loaded, e.total)
|
54
|
-
}
|
55
|
-
|
56
|
-
request.onload = function () {
|
57
|
-
if (request.status >= 200 && request.status < 300) {
|
58
|
-
load(request.responseText)
|
59
|
-
} else {
|
60
|
-
error("oh no")
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
request.onreadystatechange = function () {
|
65
|
-
if (this.readyState == 4) {
|
66
|
-
if (this.status == 200) {
|
67
|
-
let response = JSON.parse(this.responseText)
|
68
|
-
|
69
|
-
Toastify({
|
70
|
-
text: "Success uploading to imgbb! see console f12",
|
71
|
-
duration: 3000,
|
72
|
-
close: true,
|
73
|
-
gravity: "bottom",
|
74
|
-
position: "right",
|
75
|
-
backgroundColor: "#4fbe87",
|
76
|
-
}).showToast()
|
77
|
-
|
78
|
-
console.log(response)
|
79
|
-
} else {
|
80
|
-
Toastify({
|
81
|
-
text: "Failed uploading to imgbb! see console f12",
|
82
|
-
duration: 3000,
|
83
|
-
close: true,
|
84
|
-
gravity: "bottom",
|
85
|
-
position: "right",
|
86
|
-
backgroundColor: "#ff0000",
|
87
|
-
}).showToast()
|
88
|
-
|
89
|
-
console.log("Error", this.statusText)
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
request.send(formData)
|
95
|
-
},
|
96
|
-
},
|
97
|
-
})
|
98
|
-
|
99
|
-
// Filepond: Image Preview
|
100
|
-
FilePond.create(document.querySelector(".image-preview-filepond"), {
|
101
|
-
credits: null,
|
102
|
-
allowImagePreview: true,
|
103
|
-
allowImageFilter: false,
|
104
|
-
allowImageExifOrientation: false,
|
105
|
-
allowImageCrop: false,
|
106
|
-
acceptedFileTypes: ["image/png", "image/jpg", "image/jpeg"],
|
107
|
-
fileValidateTypeDetectType: (source, type) =>
|
108
|
-
new Promise((resolve, reject) => {
|
109
|
-
// Do custom type detection here and return with promise
|
110
|
-
resolve(type)
|
111
|
-
}),
|
112
|
-
})
|
113
|
-
|
114
|
-
// Filepond: Image Crop
|
115
|
-
FilePond.create(document.querySelector(".image-crop-filepond"), {
|
116
|
-
credits: null,
|
117
|
-
allowImagePreview: true,
|
118
|
-
allowImageFilter: false,
|
119
|
-
allowImageExifOrientation: false,
|
120
|
-
allowImageCrop: true,
|
121
|
-
acceptedFileTypes: ["image/png", "image/jpg", "image/jpeg"],
|
122
|
-
fileValidateTypeDetectType: (source, type) =>
|
123
|
-
new Promise((resolve, reject) => {
|
124
|
-
// Do custom type detection here and return with promise
|
125
|
-
resolve(type)
|
126
|
-
}),
|
127
|
-
})
|
128
|
-
|
129
|
-
// Filepond: Image Exif Orientation
|
130
|
-
FilePond.create(document.querySelector(".image-exif-filepond"), {
|
131
|
-
credits: null,
|
132
|
-
allowImagePreview: true,
|
133
|
-
allowImageFilter: false,
|
134
|
-
allowImageExifOrientation: true,
|
135
|
-
allowImageCrop: false,
|
136
|
-
acceptedFileTypes: ["image/png", "image/jpg", "image/jpeg"],
|
137
|
-
fileValidateTypeDetectType: (source, type) =>
|
138
|
-
new Promise((resolve, reject) => {
|
139
|
-
// Do custom type detection here and return with promise
|
140
|
-
resolve(type)
|
141
|
-
}),
|
142
|
-
})
|
143
|
-
|
144
|
-
// Filepond: Image Filter
|
145
|
-
FilePond.create(document.querySelector(".image-filter-filepond"), {
|
146
|
-
credits: null,
|
147
|
-
allowImagePreview: true,
|
148
|
-
allowImageFilter: true,
|
149
|
-
allowImageExifOrientation: false,
|
150
|
-
allowImageCrop: false,
|
151
|
-
imageFilterColorMatrix: [
|
152
|
-
0.299, 0.587, 0.114, 0, 0, 0.299, 0.587, 0.114, 0, 0, 0.299, 0.587, 0.114,
|
153
|
-
0, 0, 0.0, 0.0, 0.0, 1, 0,
|
154
|
-
],
|
155
|
-
acceptedFileTypes: ["image/png", "image/jpg", "image/jpeg"],
|
156
|
-
fileValidateTypeDetectType: (source, type) =>
|
157
|
-
new Promise((resolve, reject) => {
|
158
|
-
// Do custom type detection here and return with promise
|
159
|
-
resolve(type)
|
160
|
-
}),
|
161
|
-
})
|
162
|
-
|
163
|
-
// Filepond: Image Resize
|
164
|
-
FilePond.create(document.querySelector(".image-resize-filepond"), {
|
165
|
-
credits: null,
|
166
|
-
allowImagePreview: true,
|
167
|
-
allowImageFilter: false,
|
168
|
-
allowImageExifOrientation: false,
|
169
|
-
allowImageCrop: false,
|
170
|
-
allowImageResize: true,
|
171
|
-
imageResizeTargetWidth: 200,
|
172
|
-
imageResizeTargetHeight: 200,
|
173
|
-
imageResizeMode: "cover",
|
174
|
-
imageResizeUpscale: true,
|
175
|
-
acceptedFileTypes: ["image/png", "image/jpg", "image/jpeg"],
|
176
|
-
fileValidateTypeDetectType: (source, type) =>
|
177
|
-
new Promise((resolve, reject) => {
|
178
|
-
// Do custom type detection here and return with promise
|
179
|
-
resolve(type)
|
180
|
-
}),
|
181
|
-
})
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var snow = new Quill("#snow", {
|
2
|
-
theme: "snow",
|
3
|
-
})
|
4
|
-
var bubble = new Quill("#bubble", {
|
5
|
-
theme: "bubble",
|
6
|
-
})
|
7
|
-
new Quill("#full", {
|
8
|
-
bounds: "#full-container .editor",
|
9
|
-
modules: {
|
10
|
-
toolbar: [
|
11
|
-
[{ font: [] }, { size: [] }],
|
12
|
-
["bold", "italic", "underline", "strike"],
|
13
|
-
[{ color: [] }, { background: [] }],
|
14
|
-
[{ script: "super" }, { script: "sub" }],
|
15
|
-
[
|
16
|
-
{ list: "ordered" },
|
17
|
-
{ list: "bullet" },
|
18
|
-
{ indent: "-1" },
|
19
|
-
{ indent: "+1" },
|
20
|
-
],
|
21
|
-
["direction", { align: [] }],
|
22
|
-
["link", "image", "video"],
|
23
|
-
["clean"],
|
24
|
-
],
|
25
|
-
},
|
26
|
-
theme: "snow",
|
27
|
-
})
|
@@ -1,14 +0,0 @@
|
|
1
|
-
let choices = document.querySelectorAll(".choices")
|
2
|
-
let initChoice
|
3
|
-
for (let i = 0; i < choices.length; i++) {
|
4
|
-
if (choices[i].classList.contains("multiple-remove")) {
|
5
|
-
initChoice = new Choices(choices[i], {
|
6
|
-
delimiter: ",",
|
7
|
-
editItems: true,
|
8
|
-
maxItemCount: -1,
|
9
|
-
removeItemButton: true,
|
10
|
-
})
|
11
|
-
} else {
|
12
|
-
initChoice = new Choices(choices[i])
|
13
|
-
}
|
14
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
function slideToggle(a, b, c) { 0 === a.clientHeight ? j(a, b, c, !0) : j(a, b, c) } function slideUp(a, b, c) { j(a, b, c) } function slideDown(a, b, c) { j(a, b, c, !0) } function j(c, a, k, d) { void 0 === a && (a = 400), void 0 === d && (d = !1), c.style.overflow = "hidden", d && (c.style.display = "block"); var l, b = window.getComputedStyle(c), e = parseFloat(b.getPropertyValue("height")), f = parseFloat(b.getPropertyValue("padding-top")), g = parseFloat(b.getPropertyValue("padding-bottom")), h = parseFloat(b.getPropertyValue("margin-top")), i = parseFloat(b.getPropertyValue("margin-bottom")), m = e / a, n = f / a, o = g / a, p = h / a, q = i / a; window.requestAnimationFrame(function s(r) { void 0 === l && (l = r); var b = r - l; d ? (c.style.height = m * b + "px", c.style.paddingTop = n * b + "px", c.style.paddingBottom = o * b + "px", c.style.marginTop = p * b + "px", c.style.marginBottom = q * b + "px") : (c.style.height = e - m * b + "px", c.style.paddingTop = f - n * b + "px", c.style.paddingBottom = g - o * b + "px", c.style.marginTop = h - p * b + "px", c.style.marginBottom = i - q * b + "px"), b >= a ? (c.style.height = "", c.style.paddingTop = "", c.style.paddingBottom = "", c.style.marginTop = "", c.style.marginBottom = "", c.style.overflow = "", d || (c.style.display = "none"), "function" == typeof k && k()) : window.requestAnimationFrame(s) }) }
|
2
|
-
|
3
|
-
// Responsive burger btn onclick
|
4
|
-
document.querySelector(".burger-btn").addEventListener("click", (e) => {
|
5
|
-
e.preventDefault()
|
6
|
-
let navbar = document.querySelector(".main-navbar")
|
7
|
-
|
8
|
-
slideToggle(navbar, 300)
|
9
|
-
})
|
10
|
-
|
11
|
-
window.onload = () => checkWindowSize()
|
12
|
-
window.addEventListener("resize", (event) => {
|
13
|
-
checkWindowSize()
|
14
|
-
})
|
15
|
-
|
16
|
-
function checkWindowSize() {
|
17
|
-
if (window.innerWidth < 1200) listener()
|
18
|
-
if (window.innerWidth > 1200)
|
19
|
-
document.querySelector(".main-navbar").style.display = ""
|
20
|
-
}
|
21
|
-
|
22
|
-
function listener() {
|
23
|
-
let menuItems = document.querySelectorAll(".menu-item.has-sub")
|
24
|
-
menuItems.forEach((menuItem) => {
|
25
|
-
menuItem.querySelector(".menu-link").addEventListener("click", (e) => {
|
26
|
-
e.preventDefault()
|
27
|
-
let submenu = menuItem.querySelector(".submenu")
|
28
|
-
submenu.classList.toggle("active")
|
29
|
-
})
|
30
|
-
})
|
31
|
-
|
32
|
-
// Three level menu event listener
|
33
|
-
let submenuItems = document.querySelectorAll(".submenu-item.has-sub")
|
34
|
-
|
35
|
-
submenuItems.forEach((submenuItem) => {
|
36
|
-
submenuItem
|
37
|
-
.querySelector(".submenu-link")
|
38
|
-
.addEventListener("click", (e) => {
|
39
|
-
e.preventDefault()
|
40
|
-
submenuItem.querySelector(".subsubmenu").classList.toggle("active")
|
41
|
-
})
|
42
|
-
})
|
43
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
let $ = require("jquery")
|