Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/base.min.css

Large diffs are not rendered by default.

51 changes: 29 additions & 22 deletions js/base.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions js/base.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
});
});

function contentFix(content) {
contentFix = function (content) {
var scrolled = window.innerHeight + window.pageYOffset;

if (window.pageYOffset >= (content.offset().top - headerHeight)) {
Expand All @@ -34,7 +34,7 @@
}

// fixed left/right hand side column padding bottom and width
function contentFixPushCal() {
contentFixPushCal = function () {
$('.content-fix-scroll').each(function(index) {
$(this).css('width', $(this).closest('.content-fix').outerWidth());
$('.content-fix-inner', $(this)).css('width', $(this).closest('.content-fix').width());
Expand Down
2 changes: 1 addition & 1 deletion js/src/footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// footer push
function footerPush() {
footerPush = function () {
if ($('.footer').length) {
$('body').css('margin-bottom', $('.footer').outerHeight());
};
Expand Down
2 changes: 1 addition & 1 deletion js/src/get-target.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// get target from trigger
function getTargetFromTrigger(trigger) {
getTargetFromTrigger = function(trigger) {
var href;
var target = trigger.attr('data-target')
|| (href = trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '');
Expand Down
4 changes: 2 additions & 2 deletions js/src/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
});

// header height
function headerHeightCal() {
headerHeightCal = function () {
if ($('.header').length) {
headerHeight = $header.height();
};
Expand All @@ -34,7 +34,7 @@
});
};

function headerNavPos() {
headerNavPos = function () {
var $headerNav = $('.header-nav-scroll');

$headerNav.removeClass('pull-down');
Expand Down
2 changes: 1 addition & 1 deletion js/src/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
};
});

function mReset() {
mReset = function () {
var $bd = $('body');

if ($bd.hasClass('menu-open')) {
Expand Down
27 changes: 16 additions & 11 deletions js/src/tab.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
// tab indicator
$('.tab-nav').each(function() {
$(this).append('<div class="tab-nav-indicator"></div>');
tabSwitch($('.nav > li.active', $(this)), null);
});

// tab switch
$(document).on('show.bs.tab', '.tab-nav a[data-toggle="tab"]', function(e) {
tabSwitch($(e.target), $(e.relatedTarget));
});

function tabSwitch(newTab, oldTab) {
tabSwitch = function(newTab, oldTab) {

var $nav = newTab.closest('.tab-nav'),
$navIndicator = $('.tab-nav-indicator', $nav),
navOffset = $nav.offset().left,
Expand All @@ -28,4 +20,17 @@
left: (newTabOffset - navOffset),
right: navOffset + navWidth - newTabOffset - newTabWidth
});
}
}



// tab indicator
$('.tab-nav').each(function() {
$(this).append('<div class="tab-nav-indicator"></div>');
tabSwitch($('.nav > li.active', $(this)), null);
});

// tab switch
$(document).on('show.bs.tab', '.tab-nav a[data-toggle="tab"]', function(e) {
tabSwitch($(e.target), $(e.relatedTarget));
});
6 changes: 3 additions & 3 deletions js/src/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
};
});

function tReset() {
tReset = function () {
$('.tile-collapse.active').each(function(index) {
var $collapse = $('.tile-active-show', $(this));
if (!$collapse.hasClass('tile-active-show-still')) {
Expand Down Expand Up @@ -63,7 +63,7 @@
tileInView();
});

function tileInView() {
tileInView = function () {
$('.tile-wrap-animation:not(.isinview)').each(function() {
var $this = $(this);
if (tileInViewCheck($this) && (!$this.hasClass('avoid-fout') || ($this.hasClass('avoid-fout') && $this.hasClass('avoid-fout-done'))) && (!$this.hasClass('el-loading') || ($this.hasClass('el-loading') && $this.hasClass('el-loading-done'))) && !$this.parents('.avoid-fout:not(.avoid-fout-done)').length && !$this.parents('.el-loading:not(.el-loading-done)').length) {
Expand All @@ -72,7 +72,7 @@
});
}

function tileInViewCheck(tile) {
tileInViewCheck = function (tile) {
tile = tile[0];

var rect = tile.getBoundingClientRect();
Expand Down
2 changes: 1 addition & 1 deletion js/src/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
toastHide(0);
});

function toastHide(timer, toast) {
toastHide = function (timer, toast) {
clearTimeout(toastTimeout);

toastTimeout = setTimeout(function() {
Expand Down
2 changes: 1 addition & 1 deletion js/src/winresize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// window smart resize
function on_resize(c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};
on_resize = function (c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};

on_resize(function() {
// fixed left/right hand side column padding bottom and width
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "material",
"version": "0.1.1",
"repository": "https://github.com/Daemonite/material.git",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-concat": "~0.5.1",
Expand Down