Skip to content

Instantly share code, notes, and snippets.

View hugofabricio's full-sized avatar
:octocat:

Hugo Fabriicio hugofabricio

:octocat:
View GitHub Profile
<div class="share" data-module="Share">
<ul class="list -share -inline">
<li class="item">
<a href="#" data-title="Exemplo de Título da chamada, ideal que não passe de duas linhas" data-url="http://localhost:3000/post.html" class="link -share -social -facebook icon -facebook-before" title="Compartilhe no Facebook"><span class="sr-only">Compartilhe no Facebook</span></a>
</li>
<li class="item">
<a href="#" data-title="Exemplo de Título da chamada, ideal que não passe de duas linhas" data-url="http://localhost:3000/post.html" class="link -share -social -twitter icon -twitter-before" title="Compartilhe no Twitter"><span class="sr-only">Compartilhe no Twitter</span></a>
</li>
<li class="item">
<a href="#" data-title="Exemplo de Título da chamada, ideal que não passe de duas linhas" data-url="http://localhost:3000/post.html" class="link -share -social -google icon -google-before" title="Compartilhe no Google +"><span class="sr-only">Compartilhe no Google +</span></a>
class Share {
constructor() {
console.log('>>> Share constructor');
this.initShare();
}
initShare() {
$('.-share').click(function (e) {
e.preventDefault();
class Slide {
constructor() {
console.log('>>> Slide constructor');
this.initSlide();
}
initSlide() {
const swiperInstances = {};
$('.slide').each(function(index, element){
let $this = $(this);
(function ($) {
$.fn.progressBar = function(){
return this.each(function() {
var bar = this,
bar_progress = $(bar).find('.loading');
$(window).scroll(function(){
if(scrolledIntoView(bar)){
var each_bar_width = bar_progress.attr('aria-valuenow');
(function ($) {
$.fn.scrolledIntoView = function(){
var elem = $(this),
docViewTop = $(window).scrollTop(),
docViewBottom = docViewTop + $(window).height(),
elemTop = $(elem).offset().top,
elemBottom = elemTop + $(elem).height();
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom) && (elemBottom <= docViewBottom) && (elemTop >= docViewTop));
};
.menu {
transition: all 300ms ease;
box-shadow: 0px 0px 2px rgba($color19, .5);
overflow: hidden;
background-color: $color20;
width: 70px;
height: 100%;
min-height: 100%;
position: fixed;
top: 0;
// Maps
window.mod.maps = function() {
var init = function() {
console.log('[brz] begin maps.js');
loadScript();
};
var loadScript = function() {
var script = document.createElement('script');
(function ($) {
$.fn.gmaps = function(options) {
return this.each(function() {
var settings = $.extend({
zoom: 16,
scrollwheel: false,
center: new google.maps.LatLng(-7.119764,-34.872458)
},options);
// Common
window.mod.common = function() {
// Scope
var that = this;
var init = function() {
console.log('[brz] begin common.js');
window.mod.navbar = new window.mod['navbar']();