start project
This commit is contained in:
1 parent
88f09b93d5
commit
c7373eb7c0
618 files changed
+281982
-1
No files matched your search
@@ -0,0 +1,95 @@
|
||||
|
||||
/*=============================================================
|
||||
Authour URI: www.binarytheme.com
|
||||
License: Commons Attribution 3.0
|
||||
|
||||
http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
100% To use For Personal And Commercial Use.
|
||||
IN EXCHANGE JUST GIVE US CREDITS AND TELL YOUR FRIENDS ABOUT US
|
||||
|
||||
======================================================== */
|
||||
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
var mainApp = {
|
||||
|
||||
metisMenu: function () {
|
||||
|
||||
/*====================================
|
||||
METIS MENU
|
||||
======================================*/
|
||||
|
||||
$('#main-menu').metisMenu();
|
||||
|
||||
},
|
||||
|
||||
|
||||
loadMenu: function () {
|
||||
|
||||
/*====================================
|
||||
LOAD APPROPRIATE MENU BAR
|
||||
======================================*/
|
||||
|
||||
$(window).bind("load resize", function () {
|
||||
if ($(this).width() < 768) {
|
||||
$('div.sidebar-collapse').addClass('collapse')
|
||||
} else {
|
||||
$('div.sidebar-collapse').removeClass('collapse')
|
||||
}
|
||||
});
|
||||
},
|
||||
slide_show: function () {
|
||||
|
||||
/*====================================
|
||||
SLIDESHOW SCRIPTS
|
||||
======================================*/
|
||||
|
||||
$('#carousel-example').carousel({
|
||||
interval: 3000 // THIS TIME IS IN MILLI SECONDS
|
||||
})
|
||||
},
|
||||
reviews_fun: function () {
|
||||
/*====================================
|
||||
REWIEW SLIDE SCRIPTS
|
||||
======================================*/
|
||||
$('#reviews').carousel({
|
||||
interval: 2000 //TIME IN MILLI SECONDS
|
||||
})
|
||||
},
|
||||
wizard_fun: function () {
|
||||
/*====================================
|
||||
//horizontal wizrd code section
|
||||
======================================*/
|
||||
$(function () {
|
||||
/* $("#wizard").steps({
|
||||
headerTag: "h2",
|
||||
bodyTag: "section",
|
||||
transitionEffect: "slideLeft"
|
||||
}); */
|
||||
});
|
||||
/*====================================
|
||||
//vertical wizrd code section
|
||||
======================================*/
|
||||
$(function () {
|
||||
/* $("#wizardV").steps({
|
||||
headerTag: "h2",
|
||||
bodyTag: "section",
|
||||
transitionEffect: "slideLeft",
|
||||
stepsOrientation: "vertical"
|
||||
}); */
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
$(document).ready(function () {
|
||||
mainApp.metisMenu();
|
||||
mainApp.loadMenu();
|
||||
mainApp.slide_show();
|
||||
mainApp.reviews_fun();
|
||||
mainApp.wizard_fun();
|
||||
|
||||
});
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,310 @@
|
||||
/**
|
||||
* Template Name: MyBiz - v4.5.0
|
||||
* Template URL: https://bootstrapmade.com/mybiz-free-business-bootstrap-theme/
|
||||
* Author: BootstrapMade.com
|
||||
* License: https://bootstrapmade.com/license/
|
||||
*/
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Easy selector helper function
|
||||
*/
|
||||
const select = (el, all = false) => {
|
||||
el = el.trim()
|
||||
if (all) {
|
||||
return [...document.querySelectorAll(el)]
|
||||
} else {
|
||||
return document.querySelector(el)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Easy event listener function
|
||||
*/
|
||||
const on = (type, el, listener, all = false) => {
|
||||
let selectEl = select(el, all)
|
||||
if (selectEl) {
|
||||
if (all) {
|
||||
selectEl.forEach(e => e.addEventListener(type, listener))
|
||||
} else {
|
||||
selectEl.addEventListener(type, listener)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Easy on scroll event listener
|
||||
*/
|
||||
const onscroll = (el, listener) => {
|
||||
el.addEventListener('scroll', listener)
|
||||
}
|
||||
|
||||
/**
|
||||
* Navbar links active state on scroll
|
||||
*/
|
||||
let navbarlinks = select('#navbar .scrollto', true)
|
||||
const navbarlinksActive = () => {
|
||||
let position = window.scrollY + 200
|
||||
navbarlinks.forEach(navbarlink => {
|
||||
if (!navbarlink.hash) return
|
||||
let section = select(navbarlink.hash)
|
||||
if (!section) return
|
||||
if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {
|
||||
navbarlink.classList.add('active')
|
||||
} else {
|
||||
navbarlink.classList.remove('active')
|
||||
}
|
||||
})
|
||||
}
|
||||
window.addEventListener('load', navbarlinksActive)
|
||||
onscroll(document, navbarlinksActive)
|
||||
|
||||
/**
|
||||
* Scrolls to an element with header offset
|
||||
*/
|
||||
const scrollto = (el) => {
|
||||
let header = select('#header')
|
||||
let offset = header.offsetHeight
|
||||
|
||||
let elementPos = select(el).offsetTop
|
||||
window.scrollTo({
|
||||
top: elementPos - offset,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle .header-scrolled class to #header when page is scrolled
|
||||
*/
|
||||
let selectHeader = select('#header')
|
||||
let selectTopbar = select('#topbar')
|
||||
if (selectHeader) {
|
||||
const headerScrolled = () => {
|
||||
if (window.scrollY > 100) {
|
||||
selectHeader.classList.add('header-scrolled')
|
||||
if (selectTopbar) {
|
||||
selectTopbar.classList.add('topbar-scrolled')
|
||||
}
|
||||
} else {
|
||||
selectHeader.classList.remove('header-scrolled')
|
||||
if (selectTopbar) {
|
||||
selectTopbar.classList.remove('topbar-scrolled')
|
||||
}
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', headerScrolled)
|
||||
onscroll(document, headerScrolled)
|
||||
}
|
||||
|
||||
/**
|
||||
* Preloader
|
||||
*/
|
||||
let preloader = select('#preloader');
|
||||
if (preloader) {
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(() => preloader.remove(), 300);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Back to top button
|
||||
*/
|
||||
let backtotop = select('.back-to-top')
|
||||
if (backtotop) {
|
||||
const toggleBacktotop = () => {
|
||||
if (window.scrollY > 100) {
|
||||
backtotop.classList.add('active')
|
||||
} else {
|
||||
backtotop.classList.remove('active')
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', toggleBacktotop)
|
||||
onscroll(document, toggleBacktotop)
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile nav toggle
|
||||
*/
|
||||
on('click', '.mobile-nav-toggle', function (e) {
|
||||
select('#navbar').classList.toggle('navbar-mobile')
|
||||
this.classList.toggle('bi-list')
|
||||
this.classList.toggle('bi-x')
|
||||
})
|
||||
|
||||
/**
|
||||
* Mobile nav dropdowns activate
|
||||
*/
|
||||
on('click', '.navbar .dropdown > a', function (e) {
|
||||
if (select('#navbar').classList.contains('navbar-mobile')) {
|
||||
e.preventDefault()
|
||||
this.nextElementSibling.classList.toggle('dropdown-active')
|
||||
}
|
||||
}, true)
|
||||
|
||||
/**
|
||||
* Scrool with ofset on links with a class name .scrollto
|
||||
*/
|
||||
on('click', '.scrollto', function (e) {
|
||||
if (select(this.hash)) {
|
||||
e.preventDefault()
|
||||
|
||||
let navbar = select('#navbar')
|
||||
if (navbar.classList.contains('navbar-mobile')) {
|
||||
navbar.classList.remove('navbar-mobile')
|
||||
let navbarToggle = select('.mobile-nav-toggle')
|
||||
navbarToggle.classList.toggle('bi-list')
|
||||
navbarToggle.classList.toggle('bi-x')
|
||||
}
|
||||
scrollto(this.hash)
|
||||
}
|
||||
}, true)
|
||||
|
||||
/**
|
||||
* Scroll with ofset on page load with hash links in the url
|
||||
*/
|
||||
window.addEventListener('load', () => {
|
||||
if (window.location.hash) {
|
||||
if (select(window.location.hash)) {
|
||||
scrollto(window.location.hash)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Hero carousel indicators
|
||||
*/
|
||||
let heroCarouselIndicators = select("#hero-carousel-indicators")
|
||||
let heroCarouselItems = select('#heroCarousel .carousel-item', true)
|
||||
|
||||
heroCarouselItems.forEach((item, index) => {
|
||||
(index === 0) ?
|
||||
heroCarouselIndicators.innerHTML += "<li data-bs-target='#heroCarousel' data-bs-slide-to='" + index + "' class='active'></li>" :
|
||||
heroCarouselIndicators.innerHTML += "<li data-bs-target='#heroCarousel' data-bs-slide-to='" + index + "'></li>"
|
||||
});
|
||||
|
||||
/**
|
||||
* Scroll with ofset on page load with hash links in the url
|
||||
*/
|
||||
window.addEventListener('load', () => {
|
||||
if (window.location.hash) {
|
||||
if (select(window.location.hash)) {
|
||||
scrollto(window.location.hash)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Initiate glightbox
|
||||
*/
|
||||
const glightbox = GLightbox({
|
||||
selector: '.glightbox'
|
||||
});
|
||||
|
||||
/**
|
||||
* Porfolio isotope and filter
|
||||
*/
|
||||
window.addEventListener('load', () => {
|
||||
let portfolioContainer = select('.portfolio-container');
|
||||
if (portfolioContainer) {
|
||||
let portfolioIsotope = new Isotope(portfolioContainer, {
|
||||
itemSelector: '.portfolio-item',
|
||||
layoutMode: 'fitRows'
|
||||
});
|
||||
|
||||
let portfolioFilters = select('#portfolio-flters li', true);
|
||||
|
||||
on('click', '#portfolio-flters li', function (e) {
|
||||
e.preventDefault();
|
||||
portfolioFilters.forEach(function (el) {
|
||||
el.classList.remove('filter-active');
|
||||
});
|
||||
this.classList.add('filter-active');
|
||||
|
||||
portfolioIsotope.arrange({
|
||||
filter: this.getAttribute('data-filter')
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Initiate portfolio lightbox
|
||||
*/
|
||||
const portfolioLightbox = GLightbox({
|
||||
selector: '.portfolio-lightbox'
|
||||
});
|
||||
|
||||
/**
|
||||
* Portfolio details slider
|
||||
*/
|
||||
new Swiper('.portfolio-details-slider', {
|
||||
speed: 400,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'bullets',
|
||||
clickable: true
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Parceiros Slider
|
||||
*/
|
||||
new Swiper('.parceiros-slider', {
|
||||
speed: 400,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false
|
||||
},
|
||||
slidesPerView: 'auto',
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'bullets',
|
||||
clickable: true
|
||||
},
|
||||
breakpoints: {
|
||||
320: {
|
||||
slidesPerView: 2,
|
||||
spaceBetween: 30
|
||||
},
|
||||
480: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 40
|
||||
},
|
||||
640: {
|
||||
slidesPerView: 4,
|
||||
spaceBetween: 50
|
||||
},
|
||||
992: {
|
||||
slidesPerView: 5,
|
||||
spaceBetween: 70
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Depoimentos slider
|
||||
*/
|
||||
new Swiper('.depoimentos-slider', {
|
||||
speed: 600,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false
|
||||
},
|
||||
slidesPerView: 'auto',
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'bullets',
|
||||
clickable: true
|
||||
}
|
||||
});
|
||||
|
||||
})()
|
||||
@@ -0,0 +1,62 @@
|
||||
tinyMCE.init({
|
||||
mode: "textareas",
|
||||
theme: "modern",
|
||||
language: "pt_BR",
|
||||
plugins: [
|
||||
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
|
||||
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
|
||||
],
|
||||
toolbar1: "searchreplace | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect | removeformat",
|
||||
toolbar2: "cut copy paste | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media table | hr charmap emoticons | forecolor backcolor",
|
||||
menubar: false,
|
||||
toolbar_items_size: 'small',
|
||||
style_formats: [
|
||||
{
|
||||
title: 'Bold text',
|
||||
inline: 'b'
|
||||
},
|
||||
{
|
||||
title: 'Red text',
|
||||
inline: 'span',
|
||||
styles: {
|
||||
color: '#ff0000'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Red header',
|
||||
block: 'h1',
|
||||
styles: {
|
||||
color: '#ff0000'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Example 1',
|
||||
inline: 'span',
|
||||
classes: 'example1'
|
||||
},
|
||||
{
|
||||
title: 'Example 2',
|
||||
inline: 'span',
|
||||
classes: 'example2'
|
||||
},
|
||||
{
|
||||
title: 'Table styles'
|
||||
},
|
||||
{
|
||||
title: 'Table row 1',
|
||||
selector: 'tr',
|
||||
classes: 'tablerow1'
|
||||
}
|
||||
],
|
||||
templates: [
|
||||
{
|
||||
title: 'Test template 1',
|
||||
content: 'Test 1'
|
||||
},
|
||||
{
|
||||
title: 'Test template 2',
|
||||
content: 'Test 2'
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
window.addEventListener("load", () => {
|
||||
let carregamentoDeImagens = document.querySelectorAll(".carregamento-de-imagem");
|
||||
carregamentoDeImagens.forEach((carregamentoDeImagem) => {
|
||||
|
||||
carregamentoDeImagem.querySelector(".botao-excluir").addEventListener("click", () => {
|
||||
carregamentoDeImagem.querySelector("input[type='file']").value = "";
|
||||
carregamentoDeImagem.querySelector("input[type='hidden']").value = "";
|
||||
carregamentoDeImagem.querySelector("img").setAttribute("src", carregamentoDeImagem.getAttribute("data-fallback"));
|
||||
carregamentoDeImagem.querySelector(".botao-excluir").style.display = "none";
|
||||
});
|
||||
|
||||
carregamentoDeImagem.querySelector("input[type='file']").addEventListener("change", () => {
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
carregamentoDeImagem.querySelector("img").setAttribute("src", e.target.result);
|
||||
carregamentoDeImagem.querySelector(".botao-excluir").style.display = "block";
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user