feat:add assets for admin
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
if (localStorage.getItem("menodarktheme")) {
|
||||
document.querySelector("html").setAttribute("data-theme-mode", "dark")
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "dark")
|
||||
document.querySelector("html").setAttribute("data-header-styles", "dark")
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute("dir", "rtl");
|
||||
document.querySelector("#style")?.setAttribute("href", "{{}}");
|
||||
// rtlFn();
|
||||
}
|
||||
if (localStorage.getItem("menolayout") == "horizontal") {
|
||||
document.querySelector("html").setAttribute("data-nav-layout", "horizontal")
|
||||
}
|
||||
function localStorageBackup() {
|
||||
|
||||
// if there is a value stored, update color picker and background color
|
||||
// Used to retrive the data from local storage
|
||||
if (localStorage.primaryRGB) {
|
||||
if (document.querySelector('.theme-container-primary')) {
|
||||
document.querySelector('.theme-container-primary').value = localStorage.primaryRGB;
|
||||
}
|
||||
document.querySelector('html').style.setProperty('--primary-rgb', localStorage.primaryRGB);
|
||||
}
|
||||
if (localStorage.bodyBgRGB && localStorage.bodylightRGB) {
|
||||
if (document.querySelector('.theme-container-background')) {
|
||||
document.querySelector('.theme-container-background').value = localStorage.bodyBgRGB;
|
||||
}
|
||||
document.querySelector('html').style.setProperty('--body-bg-rgb', localStorage.bodyBgRGB);
|
||||
document.querySelector('html').style.setProperty('--body-bg-rgb2', localStorage.bodylightRGB);
|
||||
document.querySelector('html').style.setProperty('--light-rgb', localStorage.bodylightRGB);
|
||||
document.querySelector('html').style.setProperty('--form-control-bg', `rgb(${localStorage.bodylightRGB})`);
|
||||
document.querySelector('html').style.setProperty('--input-border', "rgba(255,255,255,0.1)");
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('data-theme-mode', 'dark');
|
||||
html.setAttribute('data-menu-styles', 'dark');
|
||||
html.setAttribute('data-header-styles', 'dark');
|
||||
|
||||
|
||||
}
|
||||
if (localStorage.menodarktheme) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('data-theme-mode', 'dark');
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('dir', 'rtl');
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/admin/css/bootstrap.rtl.min.css");
|
||||
setTimeout(() => {
|
||||
rtlFn();
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
localStorageBackup()
|
||||
|
||||
})();
|
||||
|
||||
|
||||
function ltrFn() {
|
||||
let html = document.querySelector('html')
|
||||
if(!document.querySelector("#style").href.includes('bootstrap.min.css')){
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/admin/css/bootstrap.rtl.min.css");
|
||||
}
|
||||
html.setAttribute("dir", "ltr");
|
||||
}
|
||||
|
||||
function rtlFn() {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute("dir", "rtl");
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/admin/css/bootstrap.rtl.min.css");
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
(function () {
|
||||
'use strict'
|
||||
|
||||
/* dropzone */
|
||||
let myDropzone = new Dropzone(".dropzone");
|
||||
myDropzone.on("addedfile", file => {
|
||||
});
|
||||
|
||||
/* filepond */
|
||||
FilePond.registerPlugin(
|
||||
FilePondPluginImagePreview,
|
||||
FilePondPluginImageExifOrientation,
|
||||
FilePondPluginFileValidateSize,
|
||||
FilePondPluginFileEncode,
|
||||
FilePondPluginImageEdit,
|
||||
FilePondPluginFileValidateType,
|
||||
FilePondPluginImageCrop,
|
||||
FilePondPluginImageResize,
|
||||
FilePondPluginImageTransform
|
||||
);
|
||||
|
||||
/* multiple upload */
|
||||
const MultipleElement = document.querySelector('.multiple-filepond');
|
||||
FilePond.create(MultipleElement,);
|
||||
|
||||
/* single upload */
|
||||
FilePond.create(
|
||||
document.querySelector('.single-fileupload'),
|
||||
{
|
||||
labelIdle: `Drag & Drop your picture or <span class="filepond--label-action">Browse</span>`,
|
||||
imagePreviewHeight: 170,
|
||||
imageCropAspectRatio: '1:1',
|
||||
imageResizeTargetWidth: 200,
|
||||
imageResizeTargetHeight: 200,
|
||||
stylePanelLayout: 'compact circle',
|
||||
styleLoadIndicatorPosition: 'center bottom',
|
||||
styleButtonRemoveItemPosition: 'center bottom'
|
||||
}
|
||||
);
|
||||
|
||||
})();
|
||||
+2
File diff suppressed because one or more lines are too long
@@ -0,0 +1,373 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
if (localStorage.getItem("menodarktheme")) {
|
||||
document.querySelector("html").setAttribute("data-theme-mode", "dark");
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "dark");
|
||||
document.querySelector("html").setAttribute("data-header-styles", "dark");
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("dir", "rtl");
|
||||
document
|
||||
.querySelector("#style")
|
||||
?.setAttribute(
|
||||
"href",
|
||||
"/assets/admin/css/bootstrap.rtl.min.css"
|
||||
);
|
||||
}
|
||||
if (localStorage.menolayout) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-nav-layout", "horizontal");
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "light");
|
||||
}
|
||||
if (localStorage.getItem("menolayout") == "horizontal") {
|
||||
document
|
||||
.querySelector("html")
|
||||
.setAttribute("data-nav-layout", "horizontal");
|
||||
}
|
||||
if (localStorage.loaderEnable == "true") {
|
||||
document.querySelector("html").setAttribute("loader", "enable");
|
||||
} else {
|
||||
if (!document.querySelector("html").getAttribute("loader")) {
|
||||
document.querySelector("html").setAttribute("loader", "disable");
|
||||
}
|
||||
}
|
||||
|
||||
function localStorageBackup() {
|
||||
// if there is a value stored, update color picker and background color
|
||||
// Used to retrive the data from local storage
|
||||
if (localStorage.primaryRGB) {
|
||||
if (document.querySelector(".theme-container-primary")) {
|
||||
document.querySelector(".theme-container-primary").value =
|
||||
localStorage.primaryRGB;
|
||||
}
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--primary-rgb", localStorage.primaryRGB);
|
||||
}
|
||||
if (localStorage.bodyBgRGB && localStorage.bodylightRGB) {
|
||||
if (document.querySelector(".theme-container-background")) {
|
||||
document.querySelector(".theme-container-background").value =
|
||||
localStorage.bodyBgRGB;
|
||||
}
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--body-bg-rgb", localStorage.bodyBgRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--body-bg-rgb2", localStorage.bodylightRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--light-rgb", localStorage.bodylightRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--form-control-bg",
|
||||
`rgb(${localStorage.bodylightRGB})`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--gray-3", `rgb(${localStorage.bodylightRGB})`);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--input-border", "rgba(255,255,255,0.1)");
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
html.setAttribute("data-header-styles", "dark");
|
||||
}
|
||||
if (localStorage.menodarktheme) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
}
|
||||
if (localStorage.menolayout) {
|
||||
let html = document.querySelector("html");
|
||||
let layoutValue = localStorage.getItem("menolayout");
|
||||
html.setAttribute("data-nav-layout", "horizontal");
|
||||
html.setAttribute("data-nav-style", "menu-click");
|
||||
// setTimeout(() => {
|
||||
// clearNavDropdown();
|
||||
// }, 1000);
|
||||
// setTimeout(() => {
|
||||
// checkHoriMenu();
|
||||
// }, 5000);
|
||||
}
|
||||
if (localStorage.menoverticalstyles) {
|
||||
let html = document.querySelector("html");
|
||||
let verticalStyles = localStorage.getItem("menoverticalstyles");
|
||||
|
||||
if (verticalStyles == "default") {
|
||||
html.setAttribute("data-vertical-style", "default");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "closed") {
|
||||
html.setAttribute("data-vertical-style", "closed");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "icontext") {
|
||||
html.setAttribute("data-vertical-style", "icontext");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "overlay") {
|
||||
html.setAttribute("data-vertical-style", "overlay");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "detached") {
|
||||
html.setAttribute("data-vertical-style", "detached");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "doublemenu") {
|
||||
html.setAttribute("data-vertical-style", "doublemenu");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
setTimeout(() => {
|
||||
const menuSlideItem = document.querySelectorAll(
|
||||
".main-menu > li > .side-menu__item"
|
||||
);
|
||||
|
||||
// Create the tooltip element
|
||||
const tooltip = document.createElement("div");
|
||||
tooltip.className = "custome-tooltip";
|
||||
// Set the CSS properties of the tooltip element
|
||||
tooltip.style.setProperty("position", "fixed");
|
||||
tooltip.style.setProperty("display", "none");
|
||||
tooltip.style.setProperty("padding", "0.5rem");
|
||||
tooltip.style.setProperty("font-weight", "500");
|
||||
tooltip.style.setProperty("font-size", "0.75rem");
|
||||
tooltip.style.setProperty("background-color", "rgb(15, 23 ,42)");
|
||||
tooltip.style.setProperty("color", "rgb(255, 255 ,255)");
|
||||
tooltip.style.setProperty("margin-inline-start", "48px");
|
||||
tooltip.style.setProperty("border-radius", "0.25rem");
|
||||
tooltip.style.setProperty("z-index", "99");
|
||||
|
||||
menuSlideItem.forEach((e) => {
|
||||
// Add an event listener to the menu slide item to show the tooltip
|
||||
e.addEventListener("mouseenter", () => {
|
||||
if (localStorage.menoverticalstyles == "doublemenu") {
|
||||
tooltip.style.setProperty("display", "block");
|
||||
tooltip.textContent =
|
||||
e.querySelector(".side-menu__label").textContent;
|
||||
if (
|
||||
document
|
||||
.querySelector("html")
|
||||
.getAttribute("data-vertical-style") == "doublemenu"
|
||||
) {
|
||||
e.appendChild(tooltip);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Add an event listener to hide the tooltip
|
||||
e.addEventListener("mouseleave", () => {
|
||||
tooltip.style.setProperty("display", "none");
|
||||
tooltip.textContent =
|
||||
e.querySelector(".side-menu__label").textContent;
|
||||
});
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
if (localStorage.menonavstyles) {
|
||||
let html = document.querySelector("html");
|
||||
let navStyles = localStorage.getItem("menonavstyles");
|
||||
if (navStyles == "menu-click") {
|
||||
html.setAttribute("data-nav-style", "menu-click");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "menu-hover") {
|
||||
html.setAttribute("data-nav-style", "menu-hover");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "icon-click") {
|
||||
html.setAttribute("data-nav-style", "icon-click");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "icon-hover") {
|
||||
html.setAttribute("data-nav-style", "icon-hover");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
}
|
||||
if (localStorage.menoclassic) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-page-style", "classic");
|
||||
}
|
||||
if (localStorage.menomodern) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-page-style", "modern");
|
||||
}
|
||||
if (localStorage.menoboxed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "boxed");
|
||||
}
|
||||
if (localStorage.menofullwidth) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "fullwidth");
|
||||
}
|
||||
if (localStorage.menodefaultwidth) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "default");
|
||||
}
|
||||
if (localStorage.menoheaderfixed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-header-position", "fixed");
|
||||
}
|
||||
if (localStorage.menoheaderscrollable) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-header-position", "scrollable");
|
||||
}
|
||||
if (localStorage.menomenufixed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-menu-position", "fixed");
|
||||
}
|
||||
if (localStorage.menomenuscrollable) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-menu-position", "scrollable");
|
||||
}
|
||||
if (localStorage.menoMenu) {
|
||||
let html = document.querySelector("html");
|
||||
let menuValue = localStorage.getItem("menoMenu");
|
||||
switch (menuValue) {
|
||||
case "light":
|
||||
html.setAttribute("data-menu-styles", "light");
|
||||
break;
|
||||
case "dark":
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
break;
|
||||
case "color":
|
||||
html.setAttribute("data-menu-styles", "color");
|
||||
break;
|
||||
case "gradient":
|
||||
html.setAttribute("data-menu-styles", "gradient");
|
||||
break;
|
||||
case "transparent":
|
||||
html.setAttribute("data-menu-styles", "transparent");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (localStorage.menoHeader) {
|
||||
let html = document.querySelector("html");
|
||||
let headerValue = localStorage.getItem("menoHeader");
|
||||
html.setAttribute("data-header-styles", headerValue);
|
||||
}
|
||||
if (localStorage.bgimg) {
|
||||
let html = document.querySelector("html");
|
||||
let value = localStorage.getItem("bgimg");
|
||||
html.setAttribute("data-bg-img", value);
|
||||
}
|
||||
}
|
||||
localStorageBackup();
|
||||
|
||||
// keep chosen files here (useful when uploading)
|
||||
let selectedFiles = [];
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const input = document.getElementById('imageInput');
|
||||
if (input) {
|
||||
input.addEventListener('change', previewImages);
|
||||
}
|
||||
|
||||
// Optional: allow dropping files onto the placeholder
|
||||
const placeholder = document.getElementById('uploadPlaceholder');
|
||||
if (placeholder) {
|
||||
placeholder.addEventListener('dragover', e => {
|
||||
e.preventDefault();
|
||||
placeholder.style.borderColor = '#555';
|
||||
});
|
||||
placeholder.addEventListener('dragleave', e => {
|
||||
placeholder.style.borderColor = '#cfcfcf';
|
||||
});
|
||||
placeholder.addEventListener('drop', e => {
|
||||
e.preventDefault();
|
||||
placeholder.style.borderColor = '#cfcfcf';
|
||||
const dtFiles = Array.from(e.dataTransfer.files || []);
|
||||
// Use same handler as input: create a fake event-like object with .files
|
||||
previewImages({ target: { files: dtFiles } });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Update the actual input.files property to match selectedFiles using DataTransfer
|
||||
function updateInputFiles() {
|
||||
const dataTransfer = new DataTransfer();
|
||||
selectedFiles.forEach(file => dataTransfer.items.add(file));
|
||||
const input = document.getElementById('imageInput');
|
||||
input.files = dataTransfer.files;
|
||||
}
|
||||
|
||||
function previewImages(event) {
|
||||
const container = document.getElementById('imagePreviewContainer');
|
||||
const uploadPlaceholder = document.getElementById('uploadPlaceholder');
|
||||
const newFiles = Array.from(event.target.files || []);
|
||||
|
||||
if (!newFiles.length) return;
|
||||
|
||||
newFiles.forEach(file => {
|
||||
if (!file.type.startsWith('image/')) return;
|
||||
|
||||
// avoid exact duplicates (same name + size)
|
||||
if (selectedFiles.some(f => f.name === file.name && f.size === file.size)) {
|
||||
return;
|
||||
}
|
||||
selectedFiles.push(file);
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.className = 'preview-item';
|
||||
wrapper.style.position = 'relative';
|
||||
wrapper.style.width = '150px';
|
||||
wrapper.style.height = '150px';
|
||||
wrapper.style.marginRight = '8px';
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.alt = file.name;
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.className = 'img-fluid rounded';
|
||||
|
||||
const btn = document.createElement('button');
|
||||
btn.type = 'button';
|
||||
btn.className = 'remove-btn btn btn-sm btn-danger position-absolute top-0 end-0';
|
||||
btn.innerText = '×';
|
||||
btn.title = 'Remove';
|
||||
btn.style.cursor = 'pointer';
|
||||
|
||||
// Position button at top right
|
||||
btn.style.position = 'absolute';
|
||||
btn.style.top = '2px';
|
||||
btn.style.right = '2px';
|
||||
btn.style.zIndex = '10';
|
||||
|
||||
btn.addEventListener('click', () => {
|
||||
wrapper.remove();
|
||||
selectedFiles = selectedFiles.filter(f => !(f.name === file.name && f.size === file.size));
|
||||
updateInputFiles();
|
||||
});
|
||||
|
||||
wrapper.appendChild(img);
|
||||
wrapper.appendChild(btn);
|
||||
|
||||
// insert before the upload placeholder so the placeholder stays on the right
|
||||
container.insertBefore(wrapper, uploadPlaceholder);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
|
||||
// update input.files to include all selected files
|
||||
updateInputFiles();
|
||||
}
|
||||
|
||||
// for debugging: expose selectedFiles in console
|
||||
window.getSelectedFiles = () => selectedFiles;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
|
||||
+3
File diff suppressed because one or more lines are too long
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
(function() {
|
||||
'use strict'
|
||||
|
||||
document.querySelectorAll(".prism-toggle").forEach((element)=>{
|
||||
element.addEventListener("click",()=>{
|
||||
let carElement = element.parentNode.parentNode
|
||||
if(!carElement.children[1].classList.contains("d-none")){
|
||||
element.firstElementChild.childNodes[1].className = "ri-code-s-slash-line ms-2 align-middle d-inline-block"
|
||||
carElement.children[1].classList.add("d-none")
|
||||
carElement.children[2].classList.remove("d-none")
|
||||
}else{
|
||||
element.firstElementChild.childNodes[1].className = "ri-code-line ms-2 align-middle d-inline-block"
|
||||
carElement.children[1].classList.remove("d-none")
|
||||
carElement.children[2].classList.add("d-none")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,590 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
/* Sales Revenue */
|
||||
var options = {
|
||||
chart: {
|
||||
height: 367,
|
||||
toolbar: {
|
||||
show: false,
|
||||
},
|
||||
zoom: {
|
||||
enabled: false,
|
||||
},
|
||||
dropShadow: {
|
||||
enabled: true,
|
||||
enabledOnSeries: undefined,
|
||||
top: 7,
|
||||
left: 0,
|
||||
blur: 1,
|
||||
color: ["var(--primary-color)", "var(--primary02)", "rgb(255, 90, 41)"],
|
||||
opacity: 0.05,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
show: true,
|
||||
borderColor: "rgba(119, 119, 142, 0.1)",
|
||||
strokeDashArray: 4,
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false,
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5, 1.5],
|
||||
curve: "straight",
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
position: "top",
|
||||
horizontalAlign: "center",
|
||||
fontWeight: 600,
|
||||
fontSize: "11px",
|
||||
labels: {
|
||||
colors: "#74767c",
|
||||
},
|
||||
markers: {
|
||||
size: 4,
|
||||
strokeWidth: 0,
|
||||
strokeColor: '#fff',
|
||||
fillColors: undefined,
|
||||
radius: 5,
|
||||
customHTML: undefined,
|
||||
onClick: undefined,
|
||||
offsetX: 0,
|
||||
offsetY: 0
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "فروش",
|
||||
data: [5,15, 21,20,15,40,55,55, 55,30,45,100,85, 85,85,130,100,56, 131,140,195,140,140,140, 85,115,106,100,100,110, 129,140,137,135,140,145, 153,157,160,220,110,100,95, 90,90,105,92,105,120,122, 150,130,117, 108,120,127,150,],
|
||||
type: "area",
|
||||
},
|
||||
{
|
||||
name:"بازاریابی",
|
||||
data: [40,45, 47,49,52,50,80,86, 85,70,89,130,100, 110,110,180,130,106, 140,110,110,90,80,110, 135,145,120,110,110,120, 139,150,117,110,110,100, 123,137,110,110,130,140,135, 140,190,125,102,105,100,92, 108,120,127,150,130,117],
|
||||
type: "line",
|
||||
},
|
||||
],
|
||||
fill: {
|
||||
type: ['gradient', 'solid'],
|
||||
gradient: {
|
||||
shadeIntensity: 1,
|
||||
opacityFrom: 0.4,
|
||||
opacityTo: 0.1,
|
||||
stops: [0, 90, 100],
|
||||
colorStops: [
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "var(--primary01)",
|
||||
opacity: 0.1
|
||||
},
|
||||
{
|
||||
offset: 75,
|
||||
color: "var(--primary01)",
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 100,
|
||||
color: 'var(--primary02)',
|
||||
opacity: 1
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 75,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 100,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
},
|
||||
colors: ["var(--primary-color)", "rgb(184 ,122 ,243)"],
|
||||
yaxis: {
|
||||
min:0,
|
||||
title: {
|
||||
style: {
|
||||
color: "#adb5be",
|
||||
fontSize: "14px",
|
||||
fontFamily: "IRANSans",
|
||||
fontWeight: 600,
|
||||
cssClass: "apexcharts-yaxis-label",
|
||||
},
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
type: "day",
|
||||
categories: [
|
||||
"فروردین",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"اردیبهشت",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"خرداد",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"تیر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"مرداد",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"شهریور",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"مهر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"آبان",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"آذر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"دی",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"بهمن",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"اسفند",
|
||||
],
|
||||
axisBorder: {
|
||||
show: true,
|
||||
color: "rgba(119, 119, 142, 0.05)",
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
},
|
||||
axisTicks: {
|
||||
show: true,
|
||||
borderType: "solid",
|
||||
color: "rgba(119, 119, 142, 0.05)",
|
||||
width: 6,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
},
|
||||
labels: {
|
||||
rotate: -90,
|
||||
style: {
|
||||
colors: "#8c9097",
|
||||
fontSize: "11px",
|
||||
fontWeight: 600,
|
||||
cssClass: "apexcharts-xaxis-label",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#sales-revenue"), options);
|
||||
chart.render();
|
||||
/* Sales Revenue */
|
||||
|
||||
/* Sales Summary */
|
||||
var options = {
|
||||
series: [14, 18, 17, 15, 12, 10],
|
||||
chart: {
|
||||
type: 'polarArea',
|
||||
height: 251,
|
||||
|
||||
},
|
||||
stroke: {
|
||||
colors: ['#fff'],
|
||||
},
|
||||
fill: {
|
||||
opacity: 1
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
position: 'bottom',
|
||||
itemMargin: {
|
||||
horizontal: 5,
|
||||
vertical: 5
|
||||
},
|
||||
fontFamily: "IRANSans",
|
||||
},
|
||||
labels: ['تحویل شد', 'لغو', 'در حال تعلیق', 'بازگردانده شد', 'ارسال شد', 'ناموفق'],
|
||||
colors: ["var(--primary-color)", "rgba(175 ,109, 237,0.7)", "rgba(40 ,215 ,133,0.7)", "rgba(241 ,113 ,177,0.7)", "rgba(221 ,58, 82,0.7)", "rgba(253 ,126 ,20,0.7)"],
|
||||
responsive: [{
|
||||
breakpoint: 480,
|
||||
options: {
|
||||
chart: {
|
||||
width: 200,
|
||||
|
||||
},
|
||||
legend: {
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#sales-summary"), options);
|
||||
chart.render();
|
||||
/*Sales Summary */
|
||||
|
||||
/* Visitors Device */
|
||||
var options = {
|
||||
series: [
|
||||
{
|
||||
name: "هفته جاری",
|
||||
data: [25, 50, 30, 55, ]
|
||||
},
|
||||
|
||||
],
|
||||
chart: {
|
||||
height: 300,
|
||||
type: 'bar',
|
||||
offsetY: -10
|
||||
},
|
||||
plotOptions: {
|
||||
|
||||
bar: {
|
||||
startAngle: -135,
|
||||
endAngle: 135,
|
||||
columnWidth: "40%",
|
||||
|
||||
dataLabels: {
|
||||
name: {
|
||||
fontSize: '16px',
|
||||
color: undefined,
|
||||
offsetY: 120
|
||||
},
|
||||
value: {
|
||||
offsetY: 76,
|
||||
fontSize: '22px',
|
||||
color: undefined,
|
||||
formatter: function (val) {
|
||||
return val + "%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
stroke: {
|
||||
dashArray: 4
|
||||
},
|
||||
labels: ['موبایل','دسکتاپ','لپ تاپ','تبلت'],
|
||||
colors: ["var(--primary-color)", "rgba(175 ,109, 237,0.7)", "rgba(40 ,215 ,133,0.7)", "rgba(241 ,113 ,177,0.7)", ],
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#visitors-device"), options);
|
||||
chart.render();
|
||||
/* Visitors Device */
|
||||
|
||||
/* line-graph charts */
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [25, 39, 15, 89, 47, 70, 44]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(88 ,155, 255)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph1"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [5, 20, 15, 29, 17, 40, 4]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(175 ,109, 237)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph2"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [55,9, 55, 29, 87, 70, 64]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(40 ,215 ,133)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph3"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [2, 39, 5, 49, 37, 70, 24]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(241 ,113 ,177)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph4"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [25, 89, 15, 89, 47, 70, 44]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(253 ,126 ,20)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph5"), options2);
|
||||
chart2.render();
|
||||
/* line-graph charts */
|
||||
|
||||
/* Orders Summary */
|
||||
var options = {
|
||||
series: [1754, 834,549,234 ],
|
||||
labels: ["مرد", "زن", "سایر","نامشخص"],
|
||||
chart: {
|
||||
height: 310,
|
||||
type: 'donut',
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
stroke: {
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'round',
|
||||
colors: "#fff",
|
||||
width: 2,
|
||||
dashArray: 0,
|
||||
},
|
||||
plotOptions: {
|
||||
pie: {
|
||||
startAngle: -90,
|
||||
endAngle: 90,
|
||||
offsetY: 10,
|
||||
expandOnClick: false,
|
||||
donut: {
|
||||
size: '75%',
|
||||
background: 'transparent',
|
||||
labels: {
|
||||
show: true,
|
||||
name: {
|
||||
show: true,
|
||||
fontSize: '20px',
|
||||
color: '#495057',
|
||||
fontFamily: "IRANSans",
|
||||
offsetY: -35
|
||||
},
|
||||
value: {
|
||||
show: true,
|
||||
fontSize: '22px',
|
||||
color: undefined,
|
||||
offsetY: -25,
|
||||
fontWeight: 600,
|
||||
fontFamily: "IRANSans",
|
||||
formatter: function (val) {
|
||||
return val + "%"
|
||||
}
|
||||
},
|
||||
total: {
|
||||
show: true,
|
||||
showAlways: true,
|
||||
label: 'کل بازدیدکنندگان',
|
||||
fontSize: '14px',
|
||||
fontWeight: 400,
|
||||
color: '#495057',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
padding: {
|
||||
bottom: -100
|
||||
}
|
||||
},
|
||||
colors: ["var(--primary-color)", "rgb(175 ,109, 237)", "rgb(40 ,215 ,133)", "rgb(241 ,113 ,177)"],
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#orders-summary"), options);
|
||||
chart.render();
|
||||
/* Orders Summary */
|
||||
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
"use strict"
|
||||
|
||||
// for show password
|
||||
let createpassword = (type, ele) => {
|
||||
document.getElementById(type).type = document.getElementById(type).type == "password" ? "text" : "password"
|
||||
let icon = ele.childNodes[0].classList
|
||||
let stringIcon = icon.toString()
|
||||
if (stringIcon.includes("ri-eye-line")) {
|
||||
ele.childNodes[0].classList.remove("ri-eye-line")
|
||||
ele.childNodes[0].classList.add("ri-eye-off-line")
|
||||
}
|
||||
else {
|
||||
ele.childNodes[0].classList.add("ri-eye-line")
|
||||
ele.childNodes[0].classList.remove("ri-eye-off-line")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var myElement = document.getElementById('sidebar-scroll');
|
||||
new SimpleBar(myElement, { autoHide: true });
|
||||
|
||||
})();
|
||||
+10
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
|
||||
"use strict";
|
||||
(() => {
|
||||
window.addEventListener('scroll', stickyFn);
|
||||
var navbar = document.getElementById("sidebar");
|
||||
var navbar1 = document.getElementById("header");
|
||||
var sticky = navbar.offsetTop;
|
||||
var sticky1 = navbar1.offsetTop;
|
||||
function stickyFn() {
|
||||
if (window.scrollY >= 75) {
|
||||
navbar.classList.add("sticky-pin")
|
||||
navbar1.classList.add("sticky-pin")
|
||||
} else {
|
||||
navbar.classList.remove("sticky-pin");
|
||||
navbar1.classList.remove("sticky-pin");
|
||||
}
|
||||
}
|
||||
window.addEventListener('scroll', stickyFn);
|
||||
window.addEventListener('DOMContentLoaded', stickyFn);
|
||||
})();
|
||||
|
||||
Vendored
+2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user