Skip to content
Snippets Groups Projects
Commit 0d2849b4 authored by Emanuele Laface's avatar Emanuele Laface
Browse files

ccg new site

parent 86a53215
No related branches found
No related tags found
No related merge requests found
Pipeline #115109 passed
Showing
with 2287 additions and 0 deletions
FROM node:6
RUN mkdir -p /usr/share/nginx/html
COPY . /usr/share/nginx/html/
RUN chown -R node:node /usr/share/nginx/html
USER node
WORKDIR /usr/share/nginx/html
RUN npm install; \
npm install grunt-cli underscore
RUN ./node_modules/.bin/grunt
VOLUME ["/usr/share/nginx/html"]
CMD ["bash"]
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
css: {
src: [
'lib/css/thirdparty/*.css',
'lib/css/freeboard/styles.css'
],
dest: 'css/freeboard.css'
},
thirdparty : {
src : [
[
'lib/js/thirdparty/head.js',
'lib/js/thirdparty/jquery.js',
'lib/js/thirdparty/jquery-ui.js',
'lib/js/thirdparty/knockout.js',
'lib/js/thirdparty/underscore.js',
'lib/js/thirdparty/jquery.gridster.js',
'lib/js/thirdparty/jquery.caret.js',
'lib/js/thirdparty/jquery.xdomainrequest.js',
'lib/js/thirdparty/codemirror.js',
]
],
dest : 'js/freeboard.thirdparty.js'
},
fb : {
src : [
'lib/js/freeboard/DatasourceModel.js',
'lib/js/freeboard/DeveloperConsole.js',
'lib/js/freeboard/DialogBox.js',
'lib/js/freeboard/FreeboardModel.js',
'lib/js/freeboard/FreeboardUI.js',
'lib/js/freeboard/JSEditor.js',
'lib/js/freeboard/PaneModel.js',
'lib/js/freeboard/PluginEditor.js',
'lib/js/freeboard/ValueEditor.js',
'lib/js/freeboard/WidgetModel.js',
'lib/js/freeboard/freeboard.js',
],
dest : 'js/freeboard.js'
},
plugins : {
src : [
'plugins/freeboard/*.js'
],
dest : 'js/freeboard.plugins.js'
},
'fb_plugins' : {
src : [
'js/freeboard.js',
'js/freeboard.plugins.js'
],
dest : 'js/freeboard_plugins.js'
}
},
cssmin : {
css:{
src: 'css/freeboard.css',
dest: 'css/freeboard.min.css'
}
},
uglify : {
fb: {
files: {
'js/freeboard.min.js' : [ 'js/freeboard.js' ]
}
},
plugins: {
files: {
'js/freeboard.plugins.min.js' : [ 'js/freeboard.plugins.js' ]
}
},
thirdparty :{
options: {
mangle : false,
beautify : false,
compress: {}
},
files: {
'js/freeboard.thirdparty.min.js' : [ 'js/freeboard.thirdparty.js' ]
}
},
'fb_plugins': {
files: {
'js/freeboard_plugins.min.js' : [ 'js/freeboard_plugins.js' ]
}
}
},
'string-replace': {
css: {
files: {
'css/': 'css/*.css'
},
options: {
replacements: [{
pattern: /..\/..\/..\/img/ig,
replacement: '../img'
}]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-string-replace');
grunt.registerTask('default', [ 'concat:css', 'cssmin:css', 'concat:fb', 'concat:thirdparty', 'concat:plugins', 'concat:fb_plugins', 'uglify:fb', 'uglify:plugins', 'uglify:fb_plugins', 'uglify:thirdparty', 'string-replace:css' ]);
};
The MIT License (MIT)
Copyright (c) 2013 Jim Heising and Bug Labs, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
freeboard
==========
**free·board** (noun) *frē-ˌbȯrd\*
1. the distance between the waterline and the main deck or weather deck of a ship or between the level of the water and the upper edge of the side of a small boat.
2. the act of freeing data from below the "waterline" and exposing it to the world.
3. a damn-sexy, open source real-time dashboard builder/viewer for IOT and other web mashups.
### Demo
http://freeboard.github.io/freeboard
https://freeboard.io
### Screenshots
![Weather](https://raw.github.com/Freeboard/branding/master/screenshots/freeboard-screenshot-1.jpg)
### What is It?
Freeboard is a turn-key HTML-based "engine" for dashboards. Besides a nice looking layout engine, it provides a plugin architecture for creating datasources (which fetch data) and widgets (which display data)— freeboard then does all the work to connect the two together. Another feature of freeboard is its ability to run entirely in the browser as a single-page static web app without the need for a server. The feature makes it extremely attractive as a front-end for embedded devices which may have limited ability to serve complex and dynamic web pages.
The code here is the client-side portion of what you see when you visit a freeboard at http://freeboard.io. It does not include any of the server-side code for user management, saving to a database or public/private functionality— this is left up to you to implement should you want to use freeboard as an online service.
### How to Use
Freeboard can be run entirely from a local hard drive. Simply download/clone the repository and open index.html. When using Chrome, you may run into issues with CORS when accessing JSON based APIs if you load from your local hard-drive— in this case you can switch to using JSONP or load index.html and run from a local or remote web server.
1. git clone https://github.com/Freeboard/freeboard.git
2. cd freeboard
3. npm install
4. grunt
Then run a index.html or index-dev.html through a webserver.
### API
While freeboard runs as a stand-alone app out of the box, you can augment and control it from javascript with a simple API. All API calls are made on the `freeboard` singleton object.
-------
**freeboard.initialize(allowEdit, [callback])**
Must be called first to initialize freeboard.
> **allowEdit** (boolean) - Sets the initial state of freeboard to allow or disallow editing.
> **callback** (function) - Function that will be called back when freeboard has finished initializing.
-------
**freeboard.newDashboard()**
Clear the contents of the freeboard and initialize a new dashboard.
-------
**freeboard.serialize()**
Serializes the current dashboard and returns a javascript object.
-------
**freeboard.loadDashboard(configuration, [callback])**
Load the dashboard from a serialized dashboard object.
> **configuration** (object) - A javascript object containing the configuration of a dashboard. Normally this will be an object that has been created and saved via the `freeboard.serialize()` function.
> **callback** (function) - Function that will be called back when the dashboard has finished loading.
-------
**freeboard.setEditing(editing, animate)**
Programatically control the editing state of the of dashboard.
> **editing** (bool) - Set to true or false to modify the view-only or editing state of the board.
> **animate** (function) - Set to true or false to animate the modification of the editing state. This animates the top-tab dropdown (the part where you can edit datasources and such).
-------
**freeboard.isEditing()**
Returns boolean depending on whether the dashboard is in in the view-only or edit state.
-------
**freeboard.loadDatasourcePlugin(plugin)**
Register a datasource plugin. See http://freeboard.github.io/freeboard/docs/plugin_example.html for information on creating plugins.
> **plugin** (object) - A plugin definition object as defined at http://freeboard.github.io/freeboard/docs/plugin_example.html
-------
**freeboard.loadWidgetPlugin(plugin)**
Register a widget plugin. See http://freeboard.github.io/freeboard/docs/plugin_example.html for information on creating plugins.
> **plugin** (object) - A plugin definition object as defined at http://freeboard.github.io/freeboard/docs/plugin_example.html
-------
**freeboard.showLoadingIndicator(show)**
Show/hide the loading indicator. The loading indicator will display an indicator over the entire board that can be useful when you have some code that takes a while and you want to give a visual indication and to prevent the user from modifying the board.
> **show** (boolean) - Set to true or false to show or hide the loading indicator.
-------
**freeboard.showDialog(contentElement, title, okButtonTitle, cancelButtonTitle, okCallback)**
Show a styled dialog box with custom content.
> **contentElement** (DOM or jquery element) - The DOM or jquery element to display within the content of the dialog box.
> **title** (string) - The title of the dialog box displayed on the top left.
> **okButtonTitle** (string) - The string to display in the button that will be used as the OK button. A null or undefined value will result in no button being displayed.
> **cancelButtonTitle** (string) - The string to display in the button that will be used as the Cancel button. A null or undefined value will result in no button being displayed.
> **okCallback** (function) - A function that will be called if the user presses the OK button.
-------
**freeboard.getDatasourceSettings(datasourceName)**
Returns an object with the current settings for a datasource or null if no datasource with the given name is found.
> **datasourceName** (string) - The name of a datasource in the dashboard.
-------
**freeboard.setDatasourceSettings(datasourceName, settings)**
Updates settings on a datasource.
> **datasourceName** (string) - The name of a datasource in the dashboard.
> **settings** (object) - An object of key-value pairs for the settings of the datasource. The values specified here will be combined with the current settings, so you do not need specify every setting if you only want to update one. To get a list of possible settings for a datasource, consult the datasource documentation or code, or call the freeboard.getDatasourceSettings function.
-------
**freeboard.on(eventName, callback)**
Attach to a global freeboard event.
> **eventName** (string) - The name of a global event. The following events are supported:
> **"dashboard_loaded"** - Occurs after a dashboard has been loaded.
> **"initialized"** - Occurs after freeboard has first been initialized.
> **callback** (function) - The callback function to be called when the event occurs.
-------
### Building Plugins
See http://freeboard.github.io/freeboard/docs/plugin_example.html for info on how to build plugins for freeboard.
### Testing Plugins
Just edit index.html and add a link to your javascript file near the end of the head.js script loader, like:
```javascript
...
"path/to/my/plugin/file.js",
$(function()
{ //DOM Ready
freeboard.initialize(true);
});
```
### Copyright
Copyright © 2013 Jim Heising (https://github.com/jheising)<br/>Copyright © 2013 Bug Labs, Inc. (http://buglabs.net)<br/>Licensed under the **MIT** license.
---
Copyright (c) 2016 Josh Cope
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# SlickNav v1.0.10
## Responsive Mobile Menu jQuery Plugin
[![Join the chat at https://gitter.im/ComputerWolf/SlickNav](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ComputerWolf/SlickNav?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/slicknav/badge?style=rounded)](https://www.jsdelivr.com/package/npm/slicknav)
### [SlickNav.io](http://slicknav.io)
### Features
* Multi-level menu support
* Flexible, simple markup
* Cross-browser compatibility
* Keyboard Accessible
* Degrades gracefully without JavaScript
* Creates ARIA compliant menu
* * *
### Usage
#### Include the CSS & JS
slicknav.css can be modified to fit website design
<link rel="stylesheet" href="SlickNav/dist/slicknav.min.css" />
<script src="SlickNav/dist/jquery.slicknav.min.js"></script>
#### Menu Markup
<ul id="menu">
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
<li><a href="#">item 4</a></li>
</ul>
#### Initialize
<script>
$(function(){
$('#menu').slicknav();
});
</script>
### Options
'label' : 'MENU', // Label for menu button. Use an empty string for no label.
'duplicate': true, // If true, the mobile menu is a copy of the original.
'duration': true, // The duration of the sliding animation.
'easingOpen': 'swing', // Easing used for open animations.
'easingClose': 'swing' // Easing used for close animations.
'closedSymbol': '&#9658;', // Character after collapsed parents.
'openedSymbol': '&#9660;', // Character after expanded parents.
'prependTo': 'body', // Element, jQuery object, or jQuery selector string to prepend the mobile menu to.
'appendTo': '', // Element, jQuery object, or jQuery selector string to append the mobile menu to. Takes precedence over prependTo.
'parentTag': 'a', // Element type for parent menu items.
'closeOnClick': false, // Close menu when a link is clicked.
'allowParentLinks': false // Allow clickable links as parent elements.
'nestedParentLinks': true // If false, parent links will be separated from the sub-menu toggle.
'showChildren': false // Show children of parent links by default.
'removeIds': true // Remove IDs from all menu elements. Defaults to false if duplicate set to false.
'removeClasses': false // Remove classes from all menu elements.
'brand': '' // Add branding to menu bar.
'animations': 'jquery' // Animation library. Currently supports "jquery" and "velocity".
### Callbacks
'init': function(){}, // Called after SlickNav creation
'beforeOpen': function(trigger){}, // Called before menu or sub-menu opened.
'beforeClose': function(trigger){} // Called before menu or sub-menu closed.
'afterOpen': function(trigger){} // Called after menu or sub-menu opened.
'afterClose': function(trigger){} // Called after menu or sub-menu closed.
### Methods
$('.menu').slicknav('toggle'); // Method to toggle the menu
$('.menu').slicknav('open'); // Method to open the menu
$('.menu').slicknav('close'); // Method to close the menu
### Animations
SlickNav will use jQuery for animations by default. If you wish to use Velocity.js for animating, be sure to include the library in your code before including SlickNav.
### Menu Display
Without any additional configuration, both the original and mobile menus will be displayed. It is recommended to use media queries to hide the original menu and display the mobile menu when appropriate. Modernizr or similar can be used for graceful degradation.
For example:
.slicknav_menu {
display:none;
}
@media screen and (max-width: 40em) {
/* #menu is the original menu */
.js #menu {
display:none;
}
.js .slicknav_menu {
display:block;
}
}
More examples at [SlickNav.io](http://slicknav.io)
### Browser Support
* Chrome
* Firefox
* Safari
* Opera
* IE7+
* Android Browser
* iOS Safari
{
"name": "slicknav",
"version": "1.0.8",
"authors": [
"Josh Cope"
],
"main": [
"dist/jquery.slicknav.js",
"dist/slicknav.css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": ">=1.7.0"
}
}
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width">
<title>SlickNav Demo - Responsive Mobile Nav Plugin for jQuery</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="../dist/slicknav.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body>
<p><b>Resize browser to view mobile menu</b></p>
Original Menu hidden on mobile
<ul id="menu">
<li>Parent 1
<ul>
<li><a href="#">item 3</a></li>
<li>Parent 3
<ul>
<li><a href="#">item 8</a></li>
<li><a href="#">item 9</a></li>
<li><a href="#">item 10</a></li>
</ul>
</li>
<li><a href="#">item 4</a></li>
</ul>
</li>
<li><a href="#">item 1</a></li>
<li>non-link item</li>
<li>Parent 2
<ul>
<li><a href="#">item 5</a></li>
<li><a href="#">item 6</a></li>
<li><a href="#">item 7</a></li>
</ul>
</li>
</ul>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="../dist/jquery.slicknav.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#menu').slicknav();
});
</script>
</body>
</html>
\ No newline at end of file
body {
font-family:Helvetica, Arial, sans-serif;
margin:0;
padding:0;
font-size:100%;
}
.slicknav_menu {
display:none;
}
@media screen and (max-width: 40em) {
.js #menu {
display:none;
}
.js .slicknav_menu {
display:block;
}
}
\ No newline at end of file
This diff is collapsed.
/*!
* SlickNav Responsive Mobile Menu v1.0.10
* (c) 2016 Josh Cope
* licensed under MIT
*/
!function(e,t,n){function a(t,n){this.element=t,this.settings=e.extend({},i,n),this.settings.duplicate||n.hasOwnProperty("removeIds")||(this.settings.removeIds=!1),this._defaults=i,this._name=s,this.init()}var i={label:"MENU",duplicate:!0,duration:200,easingOpen:"swing",easingClose:"swing",closedSymbol:"&#9658;",openedSymbol:"&#9660;",prependTo:"body",appendTo:"",parentTag:"a",closeOnClick:!1,allowParentLinks:!1,nestedParentLinks:!0,showChildren:!1,removeIds:!0,removeClasses:!1,removeStyles:!1,brand:"",animations:"jquery",init:function(){},beforeOpen:function(){},beforeClose:function(){},afterOpen:function(){},afterClose:function(){}},s="slicknav",o="slicknav",l={DOWN:40,ENTER:13,ESCAPE:27,LEFT:37,RIGHT:39,SPACE:32,TAB:9,UP:38};a.prototype.init=function(){var n,a,i=this,s=e(this.element),r=this.settings;if(r.duplicate?i.mobileNav=s.clone():i.mobileNav=s,r.removeIds&&(i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("id")})),r.removeClasses&&(i.mobileNav.removeAttr("class"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("class")})),r.removeStyles&&(i.mobileNav.removeAttr("style"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("style")})),n=o+"_icon",""===r.label&&(n+=" "+o+"_no-text"),"a"==r.parentTag&&(r.parentTag='a href="#"'),i.mobileNav.attr("class",o+"_nav"),a=e('<div class="'+o+'_menu"></div>'),""!==r.brand){var c=e('<div class="'+o+'_brand">'+r.brand+"</div>");e(a).append(c)}i.btn=e(["<"+r.parentTag+' aria-haspopup="true" role="button" tabindex="0" class="'+o+"_btn "+o+'_collapsed">','<span class="'+o+'_menutxt">'+r.label+"</span>",'<span class="'+n+'">','<span class="'+o+'_icon-bar"></span>','<span class="'+o+'_icon-bar"></span>','<span class="'+o+'_icon-bar"></span>',"</span>","</"+r.parentTag+">"].join("")),e(a).append(i.btn),""!==r.appendTo?e(r.appendTo).append(a):e(r.prependTo).prepend(a),a.append(i.mobileNav);var p=i.mobileNav.find("li");e(p).each(function(){var t=e(this),n={};if(n.children=t.children("ul").attr("role","menu"),t.data("menu",n),n.children.length>0){var a=t.contents(),s=!1,l=[];e(a).each(function(){return e(this).is("ul")?!1:(l.push(this),void(e(this).is("a")&&(s=!0)))});var c=e("<"+r.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+o+'_item"/>');if(r.allowParentLinks&&!r.nestedParentLinks&&s)e(l).wrapAll('<span class="'+o+"_parent-link "+o+'_row"/>').parent();else{var p=e(l).wrapAll(c).parent();p.addClass(o+"_row")}r.showChildren?t.addClass(o+"_open"):t.addClass(o+"_collapsed"),t.addClass(o+"_parent");var d=e('<span class="'+o+'_arrow">'+(r.showChildren?r.openedSymbol:r.closedSymbol)+"</span>");r.allowParentLinks&&!r.nestedParentLinks&&s&&(d=d.wrap(c).parent()),e(l).last().after(d)}else 0===t.children().length&&t.addClass(o+"_txtnode");t.children("a").attr("role","menuitem").click(function(t){r.closeOnClick&&!e(t.target).parent().closest("li").hasClass(o+"_parent")&&e(i.btn).click()}),r.closeOnClick&&r.allowParentLinks&&(t.children("a").children("a").click(function(t){e(i.btn).click()}),t.find("."+o+"_parent-link a:not(."+o+"_item)").click(function(t){e(i.btn).click()}))}),e(p).each(function(){var t=e(this).data("menu");r.showChildren||i._visibilityToggle(t.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(t).mousedown(function(){i._outlines(!1)}),e(t).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+o+"_item",function(t){t.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(t){var n=t||event;switch(n.keyCode){case l.ENTER:case l.SPACE:case l.DOWN:t.preventDefault(),n.keyCode===l.DOWN&&e(i.btn).hasClass(o+"_open")||i._menuToggle(),e(i.btn).next().find('[role="menuitem"]').first().focus()}}),i.mobileNav.on("keydown","."+o+"_item",function(t){var n=t||event;switch(n.keyCode){case l.ENTER:t.preventDefault(),i._itemClick(e(t.target));break;case l.RIGHT:t.preventDefault(),e(t.target).parent().hasClass(o+"_collapsed")&&i._itemClick(e(t.target)),e(t.target).next().find('[role="menuitem"]').first().focus()}}),i.mobileNav.on("keydown",'[role="menuitem"]',function(t){var n=t||event;switch(n.keyCode){case l.DOWN:t.preventDefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),r=s+1;a.length<=r&&(r=0);var c=a.eq(r);c.focus();break;case l.UP:t.preventDefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),c=a.eq(s-1);c.focus();break;case l.LEFT:if(t.preventDefault(),e(t.target).parent().parent().parent().hasClass(o+"_open")){var p=e(t.target).parent().parent().prev();p.focus(),i._itemClick(p)}else e(t.target).parent().parent().hasClass(o+"_nav")&&(i._menuToggle(),e(i.btn).focus());break;case l.ESCAPE:t.preventDefault(),i._menuToggle(),e(i.btn).focus()}}),r.allowParentLinks&&r.nestedParentLinks&&e("."+o+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var t=this,n=t.btn,a=t.mobileNav;n.hasClass(o+"_collapsed")?(n.removeClass(o+"_collapsed"),n.addClass(o+"_open")):(n.removeClass(o+"_open"),n.addClass(o+"_collapsed")),n.addClass(o+"_animating"),t._visibilityToggle(a,n.parent(),!0,n)},a.prototype._itemClick=function(e){var t=this,n=t.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+o+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(o+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(o+"_collapsed")?(a.arrow.html(n.openedSymbol),a.parent.removeClass(o+"_collapsed"),a.parent.addClass(o+"_open"),a.parent.addClass(o+"_animating"),t._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(n.closedSymbol),a.parent.addClass(o+"_collapsed"),a.parent.removeClass(o+"_open"),a.parent.addClass(o+"_animating"),t._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(t,n,a,i,s){function l(t,n){e(t).removeClass(o+"_animating"),e(n).removeClass(o+"_animating"),s||p.afterOpen(t)}function r(n,a){t.attr("aria-hidden","true"),d.attr("tabindex","-1"),c._setVisAttr(t,!0),t.hide(),e(n).removeClass(o+"_animating"),e(a).removeClass(o+"_animating"),s?"init"==n&&p.init():p.afterClose(n)}var c=this,p=c.settings,d=c._getActionItems(t),u=0;a&&(u=p.duration),t.hasClass(o+"_hidden")?(t.removeClass(o+"_hidden"),s||p.beforeOpen(i),"jquery"===p.animations?t.stop(!0,!0).slideDown(u,p.easingOpen,function(){l(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slideDown",{duration:u,easing:p.easingOpen,complete:function(){l(i,n)}}),t.attr("aria-hidden","false"),d.attr("tabindex","0"),c._setVisAttr(t,!1)):(t.addClass(o+"_hidden"),s||p.beforeClose(i),"jquery"===p.animations?t.stop(!0,!0).slideUp(u,this.settings.easingClose,function(){r(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slideUp",{duration:u,easing:p.easingClose,complete:function(){r(i,n)}}))},a.prototype._setVisAttr=function(t,n){var a=this,i=t.children("li").children("ul").not("."+o+"_hidden");n?i.each(function(){var t=e(this);t.attr("aria-hidden","true");var i=a._getActionItems(t);i.attr("tabindex","-1"),a._setVisAttr(t,n)}):i.each(function(){var t=e(this);t.attr("aria-hidden","false");var i=a._getActionItems(t);i.attr("tabindex","0"),a._setVisAttr(t,n)})},a.prototype._getActionItems=function(e){var t=e.data("menu");if(!t){t={};var n=e.children("li"),a=n.find("a");t.links=a.add(n.find("."+o+"_item")),e.data("menu",t)}return t.links},a.prototype._outlines=function(t){t?e("."+o+"_item, ."+o+"_btn").css("outline",""):e("."+o+"_item, ."+o+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(o+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(o+"_open")&&e._menuToggle()},e.fn[s]=function(t){var n=arguments;if(void 0===t||"object"==typeof t)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,t))});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){var i;return this.each(function(){var o=e.data(this,"plugin_"+s);o instanceof a&&"function"==typeof o[t]&&(i=o[t].apply(o,Array.prototype.slice.call(n,1)))}),void 0!==i?i:this}}}(jQuery,document,window);
\ No newline at end of file
/*!
* SlickNav Responsive Mobile Menu v1.0.10
* (c) 2016 Josh Cope
* licensed under MIT
*/
.slicknav_btn {
position: relative;
display: block;
vertical-align: middle;
float: right;
padding: 0.438em 0.625em 0.438em 0.625em;
line-height: 1.125em;
cursor: pointer; }
.slicknav_btn .slicknav_icon-bar + .slicknav_icon-bar {
margin-top: 0.188em; }
.slicknav_menu {
*zoom: 1; }
.slicknav_menu .slicknav_menutxt {
display: block;
line-height: 1.188em;
float: left; }
.slicknav_menu .slicknav_icon {
float: left;
width: 1.125em;
height: 0.875em;
margin: 0.188em 0 0 0.438em; }
.slicknav_menu .slicknav_icon:before {
background: transparent;
width: 1.125em;
height: 0.875em;
display: block;
content: "";
position: absolute; }
.slicknav_menu .slicknav_no-text {
margin: 0; }
.slicknav_menu .slicknav_icon-bar {
display: block;
width: 1.125em;
height: 0.125em;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.slicknav_menu:before {
content: " ";
display: table; }
.slicknav_menu:after {
content: " ";
display: table;
clear: both; }
.slicknav_nav {
clear: both; }
.slicknav_nav ul {
display: block; }
.slicknav_nav li {
display: block; }
.slicknav_nav .slicknav_arrow {
font-size: 0.8em;
margin: 0 0 0 0.4em; }
.slicknav_nav .slicknav_item {
cursor: pointer; }
.slicknav_nav .slicknav_item a {
display: inline; }
.slicknav_nav .slicknav_row {
display: block; }
.slicknav_nav a {
display: block; }
.slicknav_nav .slicknav_parent-link a {
display: inline; }
.slicknav_brand {
float: left; }
.slicknav_menu {
font-size: 16px;
box-sizing: border-box;
background: #4c4c4c;
padding: 5px; }
.slicknav_menu * {
box-sizing: border-box; }
.slicknav_menu .slicknav_menutxt {
color: #fff;
font-weight: bold;
text-shadow: 0 1px 3px #000; }
.slicknav_menu .slicknav_icon-bar {
background-color: #fff; }
.slicknav_btn {
margin: 5px 5px 6px;
text-decoration: none;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #222; }
.slicknav_nav {
color: #fff;
margin: 0;
padding: 0;
font-size: 0.875em;
list-style: none;
overflow: hidden; }
.slicknav_nav ul {
list-style: none;
overflow: hidden;
padding: 0;
margin: 0 0 0 20px; }
.slicknav_nav .slicknav_row {
padding: 5px 10px;
margin: 2px 5px; }
.slicknav_nav .slicknav_row:hover {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
background: #ccc;
color: #fff; }
.slicknav_nav a {
padding: 5px 10px;
margin: 2px 5px;
text-decoration: none;
color: #fff; }
.slicknav_nav a:hover {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
background: #ccc;
color: #222; }
.slicknav_nav .slicknav_txtnode {
margin-left: 15px; }
.slicknav_nav .slicknav_item a {
padding: 0;
margin: 0; }
.slicknav_nav .slicknav_parent-link a {
padding: 0;
margin: 0; }
.slicknav_brand {
color: #fff;
font-size: 18px;
line-height: 30px;
padding: 7px 12px;
height: 44px; }
/*!
* SlickNav Responsive Mobile Menu v1.0.10
* (c) 2016 Josh Cope
* licensed under MIT
*/.slicknav_btn,.slicknav_nav .slicknav_item{cursor:pointer}.slicknav_menu,.slicknav_menu *{box-sizing:border-box}.slicknav_btn{position:relative;display:block;vertical-align:middle;float:right;padding:.438em .625em;line-height:1.125em}.slicknav_btn .slicknav_icon-bar+.slicknav_icon-bar{margin-top:.188em}.slicknav_menu .slicknav_menutxt{display:block;line-height:1.188em;float:left;color:#fff;font-weight:700;text-shadow:0 1px 3px #000}.slicknav_menu .slicknav_icon{float:left;width:1.125em;height:.875em;margin:.188em 0 0 .438em}.slicknav_menu .slicknav_icon:before{background:0 0;width:1.125em;height:.875em;display:block;content:"";position:absolute}.slicknav_menu .slicknav_no-text{margin:0}.slicknav_menu .slicknav_icon-bar{display:block;width:1.125em;height:.125em;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.slicknav_menu:after,.slicknav_menu:before{content:" ";display:table}.slicknav_menu:after{clear:both}.slicknav_nav li,.slicknav_nav ul{display:block}.slicknav_nav .slicknav_arrow{font-size:.8em;margin:0 0 0 .4em}.slicknav_nav .slicknav_item a{display:inline}.slicknav_nav .slicknav_row,.slicknav_nav a{display:block}.slicknav_nav .slicknav_parent-link a{display:inline}.slicknav_menu{*zoom:1;font-size:16px;background:#4c4c4c;padding:5px}.slicknav_nav,.slicknav_nav ul{list-style:none;overflow:hidden;padding:0}.slicknav_menu .slicknav_icon-bar{background-color:#fff}.slicknav_btn{margin:5px 5px 6px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,.75);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#222}.slicknav_nav{clear:both;color:#fff;margin:0;font-size:.875em}.slicknav_nav ul{margin:0 0 0 20px}.slicknav_nav .slicknav_row,.slicknav_nav a{padding:5px 10px;margin:2px 5px}.slicknav_nav .slicknav_row:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#fff}.slicknav_nav a{text-decoration:none;color:#fff}.slicknav_nav a:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#222}.slicknav_nav .slicknav_txtnode{margin-left:15px}.slicknav_nav .slicknav_item a,.slicknav_nav .slicknav_parent-link a{padding:0;margin:0}.slicknav_brand{float:left;color:#fff;font-size:18px;line-height:30px;padding:7px 12px;height:44px}
\ No newline at end of file
var pkg = require('./package.json'),
gulp = require('gulp'),
header = require('gulp-header'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
minify = require('gulp-minify-css'),
plumber = require('gulp-plumber'),
banner = ['/*!',
' * SlickNav Responsive Mobile Menu v<%= pkg.version %>',
' * (c) <%= new Date().getFullYear() %> <%= pkg.author.name %>',
' * licensed under <%= pkg.licenses[0].type %>',
' */',
''].join('\n');
gulp.task('sass', function() {
gulp.src('scss/slicknav.scss')
.pipe(plumber())
.pipe(sass())
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('dist'))
.pipe(minify({compatibility: 'ie8'}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
gulp.watch('scss/**/*.scss', ['sass']);
gulp.watch('*.js', ['js']);
});
gulp.task('js', function() {
return gulp.src('jquery.slicknav.js')
.pipe(plumber())
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('dist'))
.pipe(uglify({preserveComments: 'some'}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['sass','js']);
This diff is collapsed.
{
"version": "1.0.10",
"name": "slicknav",
"description": "",
"keywords": [
"slicknav",
"menu",
"css",
"sass",
"scss",
"jquery",
"javascript",
"component",
"responsive",
"mobile"
],
"copyright": "Copyright 2016",
"homepage": "http://slicknav.com",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/titon/toolkit/blob/master/license.md"
}
],
"author": {
"name": "Josh Cope"
},
"repository": {
"type": "git",
"url": "https://github.com/ComputerWolf/SlickNav"
},
"devDependencies": {
"gulp": "^3.8.11",
"gulp-header": "^1.2.2",
"gulp-minify-css": "^1.1.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.1",
"gulp-uglify": "^1.2.0"
},
"dependencies" : {
"jquery": ">=1.7"
}
}
.slicknav_btn {
position: relative;
display: block;
vertical-align: middle;
float: right;
padding: 0.438em 0.625em 0.438em 0.625em;
line-height: 1.125em;
cursor: pointer;
.slicknav_icon-bar + .slicknav_icon-bar {
margin-top: 0.188em;
}
}
.slicknav_menu {
*zoom: 1;
.slicknav_menutxt {
display: block;
line-height: 1.188em;
float: left;
}
.slicknav_icon {
float: left;
width: 1.125em;
height: 0.875em;
margin: 0.188em 0 0 0.438em;
&:before { // Firefox Mobile v42 bugfix
background: transparent;
width: 1.125em;
height: 0.875em;
display: block;
content: "";
position: absolute;
}
}
.slicknav_no-text {
margin: 0;
}
.slicknav_icon-bar {
display: block;
width: 1.125em;
height: 0.125em;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
&:before {
content: " ";
display: table;
}
&:after {
content: " ";
display: table;
clear: both;
}
}
.slicknav_nav {
clear: both;
ul {
display: block;
}
li {
display: block;
}
.slicknav_arrow {
font-size: 0.8em;
margin: 0 0 0 0.4em;
}
.slicknav_item {
cursor: pointer;
a {
display: inline;
}
}
.slicknav_row {
display: block;
}
a {
display: block;
}
.slicknav_parent-link a {
display: inline;
}
}
.slicknav_brand {
float: left;
}
\ No newline at end of file
@import 'core';
@import 'theme';
\ No newline at end of file
//colors
$color_0: rgba(255, 255, 255, 0.75);
$color_btn: #222;
$color_text: #fff;
$color_shadow: #000;
$color_bg: #4c4c4c;
$color_hover_bg: #ccc;
$color_hover_text: #222;
.slicknav_menu {
font-size: 16px;
box-sizing: border-box;
background: $color_bg;
padding: 5px;
* {
box-sizing: border-box;
}
.slicknav_menutxt {
color: $color_text;
font-weight: bold;
text-shadow: 0 1px 3px $color_shadow;
}
.slicknav_icon-bar {
background-color: $color_text;
}
}
.slicknav_btn {
margin: 5px 5px 6px;
text-decoration: none;
text-shadow: 0 1px 1px $color_0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: $color_btn;
}
.slicknav_nav {
color: $color_text;
margin: 0;
padding: 0;
font-size: 0.875em;
list-style: none;
overflow: hidden;
ul {
list-style: none;
overflow: hidden;
padding: 0;
margin: 0 0 0 20px;
}
.slicknav_row {
padding: 5px 10px;
margin: 2px 5px;
&:hover {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
background: $color_hover_bg;
color: $color_text;
}
}
a {
padding: 5px 10px;
margin: 2px 5px;
text-decoration: none;
color: $color_text;
&:hover {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
background: $color_hover_bg;
color: $color_hover_text;
}
}
.slicknav_txtnode {
margin-left: 15px;
}
.slicknav_item a {
padding: 0;
margin: 0;
}
.slicknav_parent-link a {
padding: 0;
margin: 0;
}
}
.slicknav_brand {
color: $color_text;
font-size: 18px;
line-height: 30px;
padding: 7px 12px;
height: 44px;
}
\ No newline at end of file
@font-face {
font-family: 'Titillium Light';
font-style: normal;
font-weight: 200;
src: url('../fonts/titillium-web-v7-latin-200.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/titillium-web-v7-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/titillium-web-v7-latin-200.woff') format('woff'), /* Modern Browsers */
url('../fonts/titillium-web-v7-latin-200.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/titillium-web-v7-latin-200.svg#TitilliumWeb') format('svg'); /* Legacy iOS */
}
@font-face {
font-family: 'Titillium SemiBold';
font-style: normal;
font-weight: 600;
src: url('../fonts/titillium-web-v7-latin-600.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/titillium-web-v7-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/titillium-web-v7-latin-600.woff') format('woff'), /* Modern Browsers */
url('../fonts/titillium-web-v7-latin-600.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/titillium-web-v7-latin-600.svg#TitilliumWeb') format('svg'); /* Legacy iOS */
}
@font-face {
font-family: 'Titillium Bold';
font-style: normal;
font-weight: 700;
src: url('../fonts/titillium-web-v7-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/titillium-web-v7-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/titillium-web-v7-latin-700.woff') format('woff'), /* Modern Browsers */
url('../fonts/titillium-web-v7-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/titillium-web-v7-latin-700.svg#TitilliumWeb') format('svg'); /* Legacy iOS */
}
body {
font-family: "Titillium SemiBold";
background-color: #0c232d;
color: #cef4ff;
line-height: 20px;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
}
.tickLabel {
font-family: "Titillium SemiBold";
font-size: 13px;
color: #cef4ff;
}
.legend {
font-family: "Titillium SemiBold";
font-size: 16px;
background: #0B2d3c;
}
.legendLabel {
color: #cef4ff;
padding-left: 5px;
}
.col {
background: #ffffff !important;
}
.gridster .gs_w {
background: #123B4A;
padding: 0px;
margin: 0px;
overflow: hidden;
z-index: auto;
-webkit-touch-callout: text;
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.gridster header {
background-color: #0B2d3c;
height: 30px;
margin: 0;
padding: 0 10px 0 10px;
color: #8b8b8b;
text-transform: uppercase;
}
.sub-section {
padding: 0;
border-bottom: solid 1px #49707e;
position: relative;
overflow: hidden;
}
.indicator-light {
border-radius: 50%;
width: 22px;
height: 22px;
border: 2px solid #49707e !important;
float: left;
background-color: #0b2d3c !important;
margin-right: 8px !important;
}
.indicator-light.on {
border: 2px solid #cef4ff !important;
background-color: #09c96d !important;
box-shadow: 0px 0px 15px #89F944;
}
.indicator-text {
margin-top: 7px !important;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Titillium Bold" !important;
margin: 10px 0;
line-height: 20px;
color: #cef4ff;
text-rendering: optimizelegibility;
}
.tw-value {
font-family: "Titillium Light" !important;
position: relative;
bottom: 5px;
color: #cef4ff !important;
}
.widget {
padding: 2px 10px 5px 10px;
height: 100%;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
a {
color: #cef4ff;
text-decoration: none;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment