Permalink
Browse files

Added travis and javascript lint.

Ignore min files.

First file fixed offenses.

Ignoring jquery and owl files.
Refactor second file.

Fixed eslint

Removed unused js.
Renamed gmaps.
Added lintignore gmaps library.

Added hugo build.

Install brew via npm

Set sudo true.

install ruby and curl.

brew is already installed?

Try ruby image.

changed image to osx.

Create symbolic link.

Added code climate.
Reverted no-shadow-restricted-names.
  • Loading branch information...
ryanfox1985 authored and adrianmo committed Oct 12, 2016
1 parent 1cc6c2c commit 7b28f08fde49e5985e07046723219dc6f76e8792
View
@@ -0,0 +1,4 @@
**/*.min.js
**/owl.*.js
**/jquery.*.js
**/hpneo.*.js
View
@@ -0,0 +1,6 @@
extends: standard
plugins:
- standard
- promise
env:
jquery: true
View
@@ -1,2 +1,3 @@
.DS_Store
public/
public/
npm-debug.log
View
@@ -0,0 +1,23 @@
sudo: required
os:
- osx
language: ruby
rvm:
- 2.3.0
env:
- TRAVIS_NODE_VERSION="6"
install:
- brew update
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- npm install
- npm run install_hugo
script:
- npm run lint
- cd exampleSite
- mkdir themes
- ln -s ../../ themes/hugo-universal-theme
- hugo
notifications:
slack:
rooms:
- devcows:Qs59B9IYFi3IfrejVqNlN5G7#general
View
@@ -1,5 +1,8 @@
# Universal Theme for Hugo
[![Build Status](https://travis-ci.org/devcows/hugo-universal-theme.svg?branch=master)](https://travis-ci.org/devcows/hugo-universal-theme)
[![Code Climate](https://codeclimate.com/github/devcows/hugo-universal-theme/badges/gpa.svg)](https://codeclimate.com/github/devcows/hugo-universal-theme)
Universal is a clean and stylish website template built with Bootstrap. It stands out with its clean design and elegant typography.
This Hugo theme was ported from [Bootstrapious](http://bootstrapious.com/p/universal-business-e-commerce-template) for training and fun. It has a very nice and customizable landing page, a comments system by Disqus, site search by Google, contact forms by Formspree, Google Analytics, and optional widgets for the sidebar.
@@ -7,7 +7,7 @@
<script src="{{ .Site.BaseURL }}js/jquery.counterup.min.js"></script>
<script src="{{ .Site.BaseURL }}js/jquery.parallax-1.1.3.js"></script>
<script src='https://maps.googleapis.com/maps/api/js?v=3.exp'></script>
<script src="{{ .Site.BaseURL }}js/gmaps.js"></script>
<script src="{{ .Site.BaseURL }}js/hpneo.gmaps.js"></script>
<script src="{{ .Site.BaseURL }}js/gmaps.init.js"></script>
<script src="{{ .Site.BaseURL }}js/front.js"></script>
View
@@ -0,0 +1,13 @@
{
"name": "hugo-universal-theme",
"devDependencies": {
"eslint": "latest",
"eslint-config-standard": "^6.2.0",
"eslint-plugin-promise": "^3.0.0",
"eslint-plugin-standard": "^2.0.1"
},
"scripts": {
"lint": "eslint .",
"install_hugo": "brew update && brew install hugo"
}
}
@@ -1,3 +1,5 @@
/* eslint no-shadow-restricted-names: 0 */
/**
* Project: Bootstrap Hover Dropdown
* Author: Cameron Spear
@@ -11,100 +13,103 @@
*
* http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
*/
;
(function($, window, undefined) {
// outside the scope of the jQuery plugin to
// keep track of all dropdowns
var $allDropdowns = $();
// if instantlyCloseOthers is true, then it will instantly
// shut other nav items when a new one is hovered over
$.fn.dropdownHover = function(options) {
// don't do anything if touch is supported
// (plugin causes some issues on mobile)
if ('ontouchstart' in document)
return this; // don't want to affect chaining
// the element we really care about
// is the dropdown-toggle's parent
$allDropdowns = $allDropdowns.add(this.parent());
return this.each(function() {
var $this = $(this),
$parent = $this.parent(),
defaults = {
delay: 500,
instantlyCloseOthers: true
},
data = {
delay: $(this).data('delay'),
instantlyCloseOthers: $(this).data('close-others')
},
showEvent = 'show.bs.dropdown',
hideEvent = 'hide.bs.dropdown',
// shownEvent = 'shown.bs.dropdown',
// hiddenEvent = 'hidden.bs.dropdown',
settings = $.extend(true, {}, defaults, options, data),
timeout;
$parent.hover(function(event) {
// so a neighbor can't open the dropdown
if (!$parent.hasClass('open') && !$this.is(event.target)) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true;
}
(function ($, window, undefined) {
// outside the scope of the jQuery plugin to
// keep track of all dropdowns
var $allDropdowns = $()
// if instantlyCloseOthers is true, then it will instantly
// shut other nav items when a new one is hovered over
$.fn.dropdownHover = function (options) {
// don't do anything if touch is supported
// (plugin causes some issues on mobile)
if ('ontouchstart' in document) {
return this // don't want to affect chaining
}
// the element we really care about
// is the dropdown-toggle's parent
$allDropdowns = $allDropdowns.add(this.parent())
return this.each(function () {
var $this = $(this)
var $parent = $this.parent()
var defaults = {
delay: 500,
instantlyCloseOthers: true
}
var data = {
delay: $(this).data('delay'),
instantlyCloseOthers: $(this).data('close-others')
}
var showEvent = 'show.bs.dropdown'
var hideEvent = 'hide.bs.dropdown'
// var shownEvent = 'shown.bs.dropdown'
// var hiddenEvent = 'hidden.bs.dropdown'
var settings = $.extend(true, {}, defaults, options, data)
var timeout
openDropdown(event);
}, function() {
if ($(document).width() > 768) {
timeout = window.setTimeout(function() {
$parent.hover(function (event) {
// so a neighbor can't open the dropdown
if (!$parent.hasClass('open') && !$this.is(event.target)) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true
}
$parent.removeClass('open');
$this.trigger(hideEvent);
}, settings.delay);
}
});
// this helps with button groups!
$this.hover(function(event) {
// this helps prevent a double event from firing.
// see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
if (!$parent.hasClass('open') && !$parent.is(event.target)) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true;
}
openDropdown(event)
}, function () {
if ($(document).width() > 768) {
timeout = window.setTimeout(function () {
$parent.removeClass('open')
$this.trigger(hideEvent)
}, settings.delay)
}
})
openDropdown(event);
});
// handle submenus
$parent.find('.dropdown-submenu').each(function() {
var $this = $(this);
var subTimeout;
$this.hover(function() {
window.clearTimeout(subTimeout);
$this.children('.dropdown-menu').show();
// always close submenu siblings instantly
$this.siblings().children('.dropdown-menu').hide();
}, function() {
var $submenu = $this.children('.dropdown-menu');
subTimeout = window.setTimeout(function() {
$submenu.hide();
}, settings.delay);
});
});
function openDropdown(event) {
if ($(document).width() > 760) {
$allDropdowns.find(':focus').blur();
if (settings.instantlyCloseOthers === true)
$allDropdowns.removeClass('open');
window.clearTimeout(timeout);
$parent.addClass('open');
$this.trigger(showEvent);
}
// this helps with button groups!
$this.hover(function (event) {
// this helps prevent a double event from firing.
// see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
if (!$parent.hasClass('open') && !$parent.is(event.target)) {
// stop this event, stop executing any code
// in this callback but continue to propagate
return true
}
}
});
};
$(document).ready(function() {
// apply dropdownHover to all elements with the data-hover="dropdown" attribute
$('[data-hover="dropdown"]').dropdownHover();
});
})(jQuery, this);
openDropdown(event)
})
// handle submenus
$parent.find('.dropdown-submenu').each(function () {
var $this = $(this)
var subTimeout
$this.hover(function () {
window.clearTimeout(subTimeout)
$this.children('.dropdown-menu').show()
// always close submenu siblings instantly
$this.siblings().children('.dropdown-menu').hide()
}, function () {
var $submenu = $this.children('.dropdown-menu')
subTimeout = window.setTimeout(function () {
$submenu.hide()
}, settings.delay)
})
})
function openDropdown (event) {
if ($(document).width() > 760) {
$allDropdowns.find(':focus').blur()
if (settings.instantlyCloseOthers === true) {
$allDropdowns.removeClass('open')
}
window.clearTimeout(timeout)
$parent.addClass('open')
$this.trigger(showEvent)
}
}
})
}
$(document).ready(function () {
// apply dropdownHover to all elements with the data-hover="dropdown" attribute
$('[data-hover="dropdown"]').dropdownHover()
})
})(jQuery, this)
Oops, something went wrong.

0 comments on commit 7b28f08

Please sign in to comment.