diff --git a/ckanext/ozwillo_theme/fanstatic/off-canvas.js b/ckanext/ozwillo_theme/fanstatic/off-canvas.js new file mode 100644 index 0000000..de9dc50 --- /dev/null +++ b/ckanext/ozwillo_theme/fanstatic/off-canvas.js @@ -0,0 +1,162 @@ +/** + *------------------------------------------------------------------------------ + * @package T3 Framework for Joomla! + *------------------------------------------------------------------------------ + * @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + * @authors JoomlArt, JoomlaBamboo, (contribute to this project at github + * & Google group to become co-author) + * @Google group: https://groups.google.com/forum/#!forum/t3fw + * @Link: http://t3-framework.org + *------------------------------------------------------------------------------ + */ + +jQuery (document).ready(function($){ + // fix for old ie + if (/MSIE\s([\d.]+)/.test(navigator.userAgent) ? new Number(RegExp.$1) < 10 : false) { + $('html').addClass ('old-ie'); + } else if(/constructor/i.test(window.HTMLElement)){ + $('html').addClass('safari'); + } + + var $wrapper = $('body'), + $inner = $('.t3-wrapper'), + $toggles = $('.off-canvas-toggle'), + $offcanvas = $('.t3-off-canvas'), + $close = $('.t3-off-canvas .close'), + $btn=null, + $nav=null, + direction = 'left', + $fixed = null; + // no wrapper, just exit + if (!$wrapper.length) return ; + + // add effect class for nav + $toggles.each (function () { + var $this = $(this), + $nav = $($this.data('nav')), + effect = $this.data('effect'), + direction = ($('html').attr('dir') == 'rtl' && $this.data('pos')!='right') || ($('html').attr('dir') != 'rtl' && $this.data('pos')=='right') ? 'right':'left'; + $nav.addClass (effect).addClass ('off-canvas-'+direction); + + // move to outside wrapper-content + var inside_effect = ['off-canvas-effect-3','off-canvas-effect-16','off-canvas-effect-7','off-canvas-effect-8','off-canvas-effect-14']; + if ($.inArray(effect, inside_effect) == -1) { + $inner.before($nav); + } else { + $inner.prepend($nav); + } + }); + + $toggles.on('click', function(e){ + + stopBubble (e); + + if ($wrapper.hasClass ('off-canvas-open')) { + oc_hide (e); + return false; + } + + $btn = $(this); + $nav = $($btn.data('nav')); + $fixed = $inner.find('*').filter (function() {return $(this).css("position") === 'fixed';}); + + $nav.addClass ('off-canvas-current'); + + direction = ($('html').attr('dir') == 'rtl' && $btn.data('pos')!='right') || ($('html').attr('dir') != 'rtl' && $btn.data('pos')=='right') ? 'right':'left'; + + // add direction class to body + // $('html').removeClass ('off-canvas-left off-canvas-right').addClass ('off-canvas-' + direction); + + $offcanvas.height($(window).height()); + + // disable scroll event + var events = $(window).data('events'); + if (events && events.scroll && events.scroll.length) { + // store current handler for scroll + var handlers = []; + for (var i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.ttf b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..ed9372f Binary files /dev/null and b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.ttf differ diff --git a/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8b280b9 Binary files /dev/null and b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff differ diff --git a/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff2 b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..3311d58 Binary files /dev/null and b/ckanext/ozwillo_theme/public/fonts/fontawesome-webfont.woff2 differ diff --git a/ckanext/ozwillo_theme/templates/base.html b/ckanext/ozwillo_theme/templates/base.html index 35c2dcd..cc2433e 100644 --- a/ckanext/ozwillo_theme/templates/base.html +++ b/ckanext/ozwillo_theme/templates/base.html @@ -21,6 +21,8 @@ {% resource 'theme/plugins.system.t3.base-bs3.less.off-canvas.less.css' %} {% resource 'theme/templates.t3_bs3_blank.less.off-canvas.less.css' %} {% resource 'theme/template.css' %} + {% resource 'theme/off-canvas.js' %} + {% endblock %} {% block links %} diff --git a/ckanext/ozwillo_theme/templates/header.html b/ckanext/ozwillo_theme/templates/header.html index 6c671fa..545a754 100644 --- a/ckanext/ozwillo_theme/templates/header.html +++ b/ckanext/ozwillo_theme/templates/header.html @@ -7,7 +7,7 @@ -