http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/jquery.scrollex.min.js ---------------------------------------------------------------------- diff --git a/content/assets/js/jquery.scrollex.min.js b/content/assets/js/jquery.scrollex.min.js new file mode 100644 index 0000000..c511a5c --- /dev/null +++ b/content/assets/js/jquery.scrollex.min.js @@ -0,0 +1,2 @@ +/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ +!function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r<this.length;r++)t(this[r]).scrollex(l);return s}if(s.data("_scrollexId"))return s;var a,u,h,c,p;switch(a=i++,u=jQuery.extend({top:0,bottom:0,delay:0,mode:"default",enter:null,leave:null,initialize:null,terminate:null,scroll:null},l),u.mode){case"top":h=function(t,e,n,i,o){return t>=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o> =e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n<this.length;n++)t(this[n]).unscrollex();return e}var i,l;return(i=e. data("_scrollexId"))?(l=o[i],window.clearTimeout(l.timeoutId),delete o[i],e.removeData("_scrollexId"),l.options.terminate&&l.options.terminate.apply(this),e):e}}(jQuery); \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/jquery.scrolly.min.js ---------------------------------------------------------------------- diff --git a/content/assets/js/jquery.scrolly.min.js b/content/assets/js/jquery.scrolly.min.js new file mode 100644 index 0000000..5d08850 --- /dev/null +++ b/content/assets/js/jquery.scrolly.min.js @@ -0,0 +1,2 @@ +/* jquery.scrolly v1.0.0-dev | (c) @ajlkn | MIT licensed */ +(function(e){function u(s,o){var u,a,f;if((u=e(s))[t]==0)return n;a=u[i]()[r];switch(o.anchor){case"middle":f=a-(e(window).height()-u.outerHeight())/2;break;default:case r:f=Math.max(a,0)}return typeof o[i]=="function"?f-=o[i]():f-=o[i],f}var t="length",n=null,r="top",i="offset",s="click.scrolly",o=e(window);e.fn.scrolly=function(i){var o,a,f,l,c=e(this);if(this[t]==0)return c;if(this[t]>1){for(o=0;o<this[t];o++)e(this[o]).scrolly(i);return c}l=n,f=c.attr("href");if(f.charAt(0)!="#"||f[t]<2)return c;a=jQuery.extend({anchor:r,easing:"swing",offset:0,parent:e("body,html"),pollOnce:!1,speed:1e3},i),a.pollOnce&&(l=u(f,a)),c.off(s).on(s,function(e){var t=l!==n?l:u(f,a);t!==n&&(e.preventDefault(),a.parent.stop().animate({scrollTop:t},a.speed,a.easing))})}})(jQuery); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/lightbox.js ---------------------------------------------------------------------- diff --git a/content/assets/js/lightbox.js b/content/assets/js/lightbox.js new file mode 100644 index 0000000..352bb86 --- /dev/null +++ b/content/assets/js/lightbox.js @@ -0,0 +1,453 @@ +/*! + * Lightbox v2.8.2 + * by Lokesh Dhakar + * + * More info: + * http://lokeshdhakar.com/projects/lightbox2/ + * + * Copyright 2007, 2015 Lokesh Dhakar + * Released under the MIT license + * https://github.com/lokesh/lightbox2/blob/master/LICENSE + */ + +// Uses Node, AMD or browser globals to create a module. +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require('jquery')); + } else { + // Browser globals (root is window) + root.lightbox = factory(root.jQuery); + } +}(this, function ($) { + + function Lightbox(options) { + this.album = []; + this.currentImageIndex = void 0; + this.init(); + + // options + this.options = $.extend({}, this.constructor.defaults); + this.option(options); + } + + // Descriptions of all options available on the demo site: + // http://lokeshdhakar.com/projects/lightbox2/index.html#options + Lightbox.defaults = { + albumLabel: 'Image %1 of %2', + alwaysShowNavOnTouchDevices: false, + fadeDuration: 500, + fitImagesInViewport: true, + // maxWidth: 800, + // maxHeight: 600, + positionFromTop: 50, + resizeDuration: 700, + showImageNumberLabel: true, + wrapAround: false, + disableScrolling: false + }; + + Lightbox.prototype.option = function(options) { + $.extend(this.options, options); + }; + + Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) { + return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages); + }; + + Lightbox.prototype.init = function() { + this.enable(); + this.build(); + }; + + // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes + // that contain 'lightbox'. When these are clicked, start lightbox. + Lightbox.prototype.enable = function() { + var self = this; + $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { + self.start($(event.currentTarget)); + return false; + }); + }; + + // Build html for the lightbox and the overlay. + // Attach event handlers to the new DOM elements. click click click + Lightbox.prototype.build = function() { + var self = this; + $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body')); + + // Cache jQuery objects + this.$lightbox = $('#lightbox'); + this.$overlay = $('#lightboxOverlay'); + this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); + this.$container = this.$lightbox.find('.lb-container'); + + // Store css values for future lookup + this.containerTopPadding = parseInt(this.$container.css('padding-top'), 10); + this.containerRightPadding = parseInt(this.$container.css('padding-right'), 10); + this.containerBottomPadding = parseInt(this.$container.css('padding-bottom'), 10); + this.containerLeftPadding = parseInt(this.$container.css('padding-left'), 10); + + // Attach event handlers to the newly minted DOM elements + this.$overlay.hide().on('click', function() { + self.end(); + return false; + }); + + this.$lightbox.hide().on('click', function(event) { + if ($(event.target).attr('id') === 'lightbox') { + self.end(); + } + return false; + }); + + this.$outerContainer.on('click', function(event) { + if ($(event.target).attr('id') === 'lightbox') { + self.end(); + } + return false; + }); + + this.$lightbox.find('.lb-prev').on('click', function() { + if (self.currentImageIndex === 0) { + self.changeImage(self.album.length - 1); + } else { + self.changeImage(self.currentImageIndex - 1); + } + return false; + }); + + this.$lightbox.find('.lb-next').on('click', function() { + if (self.currentImageIndex === self.album.length - 1) { + self.changeImage(0); + } else { + self.changeImage(self.currentImageIndex + 1); + } + return false; + }); + + this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { + self.end(); + return false; + }); + }; + + // Show overlay and lightbox. If the image is part of a set, add siblings to album array. + Lightbox.prototype.start = function($link) { + var self = this; + var $window = $(window); + + $window.on('resize', $.proxy(this.sizeOverlay, this)); + + $('select, object, embed').css({ + visibility: 'hidden' + }); + + this.sizeOverlay(); + + this.album = []; + var imageNumber = 0; + + function addToAlbum($link) { + self.album.push({ + link: $link.attr('href'), + title: $link.attr('data-title') || $link.attr('title') + }); + } + + // Support both data-lightbox attribute and rel attribute implementations + var dataLightboxValue = $link.attr('data-lightbox'); + var $links; + + if (dataLightboxValue) { + $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]'); + for (var i = 0; i < $links.length; i = ++i) { + addToAlbum($($links[i])); + if ($links[i] === $link[0]) { + imageNumber = i; + } + } + } else { + if ($link.attr('rel') === 'lightbox') { + // If image is not part of a set + addToAlbum($link); + } else { + // If image is part of a set + $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]'); + for (var j = 0; j < $links.length; j = ++j) { + addToAlbum($($links[j])); + if ($links[j] === $link[0]) { + imageNumber = j; + } + } + } + } + + // Position Lightbox + var top = $window.scrollTop() + this.options.positionFromTop; + var left = $window.scrollLeft(); + this.$lightbox.css({ + top: top + 'px', + left: left + 'px' + }).fadeIn(this.options.fadeDuration); + + // Disable scrolling of the page while open + if (this.options.disableScrolling) { + $('body').addClass('lb-disable-scrolling'); + } + + this.changeImage(imageNumber); + }; + + // Hide most UI elements in preparation for the animated resizing of the lightbox. + Lightbox.prototype.changeImage = function(imageNumber) { + var self = this; + + this.disableKeyboardNav(); + var $image = this.$lightbox.find('.lb-image'); + + this.$overlay.fadeIn(this.options.fadeDuration); + + $('.lb-loader').fadeIn('slow'); + this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); + + this.$outerContainer.addClass('animating'); + + // When image to show is preloaded, we send the width and height to sizeContainer() + var preloader = new Image(); + preloader.onload = function() { + var $preloader; + var imageHeight; + var imageWidth; + var maxImageHeight; + var maxImageWidth; + var windowHeight; + var windowWidth; + + $image.attr('src', self.album[imageNumber].link); + + $preloader = $(preloader); + + $image.width(preloader.width); + $image.height(preloader.height); + + if (self.options.fitImagesInViewport) { + // Fit image inside the viewport. + // Take into account the border around the image and an additional 10px gutter on each side. + + windowWidth = $(window).width(); + windowHeight = $(window).height(); + maxImageWidth = windowWidth - self.containerLeftPadding - self.containerRightPadding - 20; + maxImageHeight = windowHeight - self.containerTopPadding - self.containerBottomPadding - 120; + + // Check if image size is larger then maxWidth|maxHeight in settings + if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) { + maxImageWidth = self.options.maxWidth; + } + if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) { + maxImageHeight = self.options.maxHeight; + } + + // Is there a fitting issue? + if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { + if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { + imageWidth = maxImageWidth; + imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); + $image.width(imageWidth); + $image.height(imageHeight); + } else { + imageHeight = maxImageHeight; + imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); + $image.width(imageWidth); + $image.height(imageHeight); + } + } + } + self.sizeContainer($image.width(), $image.height()); + }; + + preloader.src = this.album[imageNumber].link; + this.currentImageIndex = imageNumber; + }; + + // Stretch overlay to fit the viewport + Lightbox.prototype.sizeOverlay = function() { + this.$overlay + .width($(document).width()) + .height($(document).height()); + }; + + // Animate the size of the lightbox to fit the image we are showing + Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { + var self = this; + + var oldWidth = this.$outerContainer.outerWidth(); + var oldHeight = this.$outerContainer.outerHeight(); + var newWidth = imageWidth + this.containerLeftPadding + this.containerRightPadding; + var newHeight = imageHeight + this.containerTopPadding + this.containerBottomPadding; + + function postResize() { + self.$lightbox.find('.lb-dataContainer').width(newWidth); + self.$lightbox.find('.lb-prevLink').height(newHeight); + self.$lightbox.find('.lb-nextLink').height(newHeight); + self.showImage(); + } + + if (oldWidth !== newWidth || oldHeight !== newHeight) { + this.$outerContainer.animate({ + width: newWidth, + height: newHeight + }, this.options.resizeDuration, 'swing', function() { + postResize(); + }); + } else { + postResize(); + } + }; + + // Display the image and its details and begin preload neighboring images. + Lightbox.prototype.showImage = function() { + this.$lightbox.find('.lb-loader').stop(true).hide(); + this.$lightbox.find('.lb-image').fadeIn('slow'); + + this.updateNav(); + this.updateDetails(); + this.preloadNeighboringImages(); + this.enableKeyboardNav(); + }; + + // Display previous and next navigation if appropriate. + Lightbox.prototype.updateNav = function() { + // Check to see if the browser supports touch events. If so, we take the conservative approach + // and assume that mouse hover events are not supported and always show prev/next navigation + // arrows in image sets. + var alwaysShowNav = false; + try { + document.createEvent('TouchEvent'); + alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false; + } catch (e) {} + + this.$lightbox.find('.lb-nav').show(); + + if (this.album.length > 1) { + if (this.options.wrapAround) { + if (alwaysShowNav) { + this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); + } + this.$lightbox.find('.lb-prev, .lb-next').show(); + } else { + if (this.currentImageIndex > 0) { + this.$lightbox.find('.lb-prev').show(); + if (alwaysShowNav) { + this.$lightbox.find('.lb-prev').css('opacity', '1'); + } + } + if (this.currentImageIndex < this.album.length - 1) { + this.$lightbox.find('.lb-next').show(); + if (alwaysShowNav) { + this.$lightbox.find('.lb-next').css('opacity', '1'); + } + } + } + } + }; + + // Display caption, image number, and closing button. + Lightbox.prototype.updateDetails = function() { + var self = this; + + // Enable anchor clicks in the injected caption html. + // Thanks Nate Wright for the fix. @https://github.com/NateWr + if (typeof this.album[this.currentImageIndex].title !== 'undefined' && + this.album[this.currentImageIndex].title !== '') { + this.$lightbox.find('.lb-caption') + .html(this.album[this.currentImageIndex].title) + .fadeIn('fast') + .find('a').on('click', function(event) { + if ($(this).attr('target') !== undefined) { + window.open($(this).attr('href'), $(this).attr('target')); + } else { + location.href = $(this).attr('href'); + } + }); + } + + if (this.album.length > 1 && this.options.showImageNumberLabel) { + var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length); + this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast'); + } else { + this.$lightbox.find('.lb-number').hide(); + } + + this.$outerContainer.removeClass('animating'); + + this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { + return self.sizeOverlay(); + }); + }; + + // Preload previous and next images in set. + Lightbox.prototype.preloadNeighboringImages = function() { + if (this.album.length > this.currentImageIndex + 1) { + var preloadNext = new Image(); + preloadNext.src = this.album[this.currentImageIndex + 1].link; + } + if (this.currentImageIndex > 0) { + var preloadPrev = new Image(); + preloadPrev.src = this.album[this.currentImageIndex - 1].link; + } + }; + + Lightbox.prototype.enableKeyboardNav = function() { + $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); + }; + + Lightbox.prototype.disableKeyboardNav = function() { + $(document).off('.keyboard'); + }; + + Lightbox.prototype.keyboardAction = function(event) { + var KEYCODE_ESC = 27; + var KEYCODE_LEFTARROW = 37; + var KEYCODE_RIGHTARROW = 39; + + var keycode = event.keyCode; + var key = String.fromCharCode(keycode).toLowerCase(); + if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { + this.end(); + } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { + if (this.currentImageIndex !== 0) { + this.changeImage(this.currentImageIndex - 1); + } else if (this.options.wrapAround && this.album.length > 1) { + this.changeImage(this.album.length - 1); + } + } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { + if (this.currentImageIndex !== this.album.length - 1) { + this.changeImage(this.currentImageIndex + 1); + } else if (this.options.wrapAround && this.album.length > 1) { + this.changeImage(0); + } + } + }; + + // Closing time. :-( + Lightbox.prototype.end = function() { + this.disableKeyboardNav(); + $(window).off('resize', this.sizeOverlay); + this.$lightbox.fadeOut(this.options.fadeDuration); + this.$overlay.fadeOut(this.options.fadeDuration); + $('select, object, embed').css({ + visibility: 'visible' + }); + if (this.options.disableScrolling) { + $('body').removeClass('lb-disable-scrolling'); + } + }; + + return new Lightbox(); +})); http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/main.js ---------------------------------------------------------------------- diff --git a/content/assets/js/main.js b/content/assets/js/main.js new file mode 100644 index 0000000..83b8f82 --- /dev/null +++ b/content/assets/js/main.js @@ -0,0 +1,139 @@ +/* + Stellar by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +(function($) { + + skel.breakpoints({ + xlarge: '(max-width: 1680px)', + large: '(max-width: 1280px)', + medium: '(max-width: 980px)', + small: '(max-width: 736px)', + xsmall: '(max-width: 480px)', + xxsmall: '(max-width: 360px)' + }); + + $(function() { + + var $window = $(window), + $body = $('body'), + $main = $('#main'); + + // Disable animations/transitions until the page has loaded. + $body.addClass('is-loading'); + + $window.on('load', function() { + window.setTimeout(function() { + $body.removeClass('is-loading'); + }, 100); + }); + + // Fix: Placeholder polyfill. + $('form').placeholder(); + + // Prioritize "important" elements on medium. + skel.on('+medium -medium', function() { + $.prioritize( + '.important\\28 medium\\29', + skel.breakpoint('medium').active + ); + }); + + // Nav. + var $nav = $('#nav'); + + if ($nav.length > 0) { + + // Shrink effect. + $main + .scrollex({ + mode: 'top', + enter: function() { + $nav.addClass('alt'); + }, + leave: function() { + $nav.removeClass('alt'); + }, + }); + + // Links. + var $nav_a = $nav.find('a'); + + $nav_a + .scrolly({ + speed: 1000, + offset: function() { return $nav.height(); } + }) + .on('click', function() { + + var $this = $(this); + + // External link? Bail. + if ($this.attr('href').charAt(0) != '#') + return; + + // Deactivate all links. + $nav_a + .removeClass('active') + .removeClass('active-locked'); + + // Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section). + $this + .addClass('active') + .addClass('active-locked'); + + }) + .each(function() { + + var $this = $(this), + id = $this.attr('href'), + $section = $(id); + + // No section for this link? Bail. + if ($section.length < 1) + return; + + // Scrollex. + $section.scrollex({ + mode: 'middle', + initialize: function() { + + // Deactivate section. + if (skel.canUse('transition')) + $section.addClass('inactive'); + + }, + enter: function() { + + // Activate section. + $section.removeClass('inactive'); + + // No locked links? Deactivate all links and activate this section's one. + if ($nav_a.filter('.active-locked').length == 0) { + + $nav_a.removeClass('active'); + $this.addClass('active'); + + } + + // Otherwise, if this section's link is the one that's locked, unlock it. + else if ($this.hasClass('active-locked')) + $this.removeClass('active-locked'); + + } + }); + + }); + + } + + // Scrolly. + $('.scrolly').scrolly({ + speed: 1000 + }); + + }); + +})(jQuery); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/skel.min.js ---------------------------------------------------------------------- diff --git a/content/assets/js/skel.min.js b/content/assets/js/skel.min.js new file mode 100644 index 0000000..6ca4bf1 --- /dev/null +++ b/content/assets/js/skel.min.js @@ -0,0 +1,2 @@ +/* skel.js v3.0.1 | (c) skel.io | MIT licensed */ +var skel=function(){"use strict";var t={breakpointIds:null,events:{},isInit:!1,obj:{attachments:{},breakpoints:{},head:null,states:{}},sd:"/",state:null,stateHandlers:{},stateId:"",vars:{},DOMReady:null,indexOf:null,isArray:null,iterate:null,matchesMedia:null,extend:function(e,n){t.iterate(n,function(i){t.isArray(n[i])?(t.isArray(e[i])||(e[i]=[]),t.extend(e[i],n[i])):"object"==typeof n[i]?("object"!=typeof e[i]&&(e[i]={}),t.extend(e[i],n[i])):e[i]=n[i]})},newStyle:function(t){var e=document.createElement("style");return e.type="text/css",e.innerHTML=t,e},_canUse:null,canUse:function(e){t._canUse||(t._canUse=document.createElement("div"));var n=t._canUse.style,i=e.charAt(0).toUpperCase()+e.slice(1);return e in n||"Moz"+i in n||"Webkit"+i in n||"O"+i in n||"ms"+i in n},on:function(e,n){var i=e.split(/[\s]+/);return t.iterate(i,function(e){var a=i[e];if(t.isInit){if("init"==a)return void n();if("change"==a)n();else{var r=a.charAt(0);if("+"==r||"!"==r){var o=a.substring(1);if(o in t.obj .breakpoints)if("+"==r&&t.obj.breakpoints[o].active)n();else if("!"==r&&!t.obj.breakpoints[o].active)return void n()}}}t.events[a]||(t.events[a]=[]),t.events[a].push(n)}),t},trigger:function(e){return t.events[e]&&0!=t.events[e].length?(t.iterate(t.events[e],function(n){t.events[e][n]()}),t):void 0},breakpoint:function(e){return t.obj.breakpoints[e]},breakpoints:function(e){function n(t,e){this.name=this.id=t,this.media=e,this.active=!1,this.wasActive=!1}return n.prototype.matches=function(){return t.matchesMedia(this.media)},n.prototype.sync=function(){this.wasActive=this.active,this.active=this.matches()},t.iterate(e,function(i){t.obj.breakpoints[i]=new n(i,e[i])}),window.setTimeout(function(){t.poll()},0),t},addStateHandler:function(e,n){t.stateHandlers[e]=n},callStateHandler:function(e){var n=t.stateHandlers[e]();t.iterate(n,function(e){t.state.attachments.push(n[e])})},changeState:function(e){t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].sync()}),t.vars.lastState Id=t.stateId,t.stateId=e,t.breakpointIds=t.stateId===t.sd?[]:t.stateId.substring(1).split(t.sd),t.obj.states[t.stateId]?t.state=t.obj.states[t.stateId]:(t.obj.states[t.stateId]={attachments:[]},t.state=t.obj.states[t.stateId],t.iterate(t.stateHandlers,t.callStateHandler)),t.detachAll(t.state.attachments),t.attachAll(t.state.attachments),t.vars.stateId=t.stateId,t.vars.state=t.state,t.trigger("change"),t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].active?t.obj.breakpoints[e].wasActive||t.trigger("+"+e):t.obj.breakpoints[e].wasActive&&t.trigger("-"+e)})},generateStateConfig:function(e,n){var i={};return t.extend(i,e),t.iterate(t.breakpointIds,function(e){t.extend(i,n[t.breakpointIds[e]])}),i},getStateId:function(){var e="";return t.iterate(t.obj.breakpoints,function(n){var i=t.obj.breakpoints[n];i.matches()&&(e+=t.sd+i.id)}),e},poll:function(){var e="";e=t.getStateId(),""===e&&(e=t.sd),e!==t.stateId&&t.changeState(e)},_attach:null,attach:function(e){var n=t.obj.head,i=e .element;return i.parentNode&&i.parentNode.tagName?!1:(t._attach||(t._attach=n.firstChild),n.insertBefore(i,t._attach.nextSibling),e.permanent&&(t._attach=i),!0)},attachAll:function(e){var n=[];t.iterate(e,function(t){n[e[t].priority]||(n[e[t].priority]=[]),n[e[t].priority].push(e[t])}),n.reverse(),t.iterate(n,function(e){t.iterate(n[e],function(i){t.attach(n[e][i])})})},detach:function(t){var e=t.element;return t.permanent||!e.parentNode||e.parentNode&&!e.parentNode.tagName?!1:(e.parentNode.removeChild(e),!0)},detachAll:function(e){var n={};t.iterate(e,function(t){n[e[t].id]=!0}),t.iterate(t.obj.attachments,function(e){e in n||t.detach(t.obj.attachments[e])})},attachment:function(e){return e in t.obj.attachments?t.obj.attachments[e]:null},newAttachment:function(e,n,i,a){return t.obj.attachments[e]={id:e,element:n,priority:i,permanent:a}},init:function(){t.initMethods(),t.initVars(),t.initEvents(),t.obj.head=document.getElementsByTagName("head")[0],t.isInit=!0,t.trigger("init")},ini tEvents:function(){t.on("resize",function(){t.poll()}),t.on("orientationChange",function(){t.poll()}),t.DOMReady(function(){t.trigger("ready")}),window.onload&&t.on("load",window.onload),window.onload=function(){t.trigger("load")},window.onresize&&t.on("resize",window.onresize),window.onresize=function(){t.trigger("resize")},window.onorientationchange&&t.on("orientationChange",window.onorientationchange),window.onorientationchange=function(){t.trigger("orientationChange")}},initMethods:function(){document.addEventListener?!function(e,n){t.DOMReady=n()}("domready",function(){function t(t){for(r=1;t=n.shift();)t()}var e,n=[],i=document,a="DOMContentLoaded",r=/^loaded|^c/.test(i.readyState);return i.addEventListener(a,e=function(){i.removeEventListener(a,e),t()}),function(t){r?t():n.push(t)}}):!function(e,n){t.DOMReady=n()}("domready",function(t){function e(t){for(h=1;t=i.shift();)t()}var n,i=[],a=!1,r=document,o=r.documentElement,s=o.doScroll,c="DOMContentLoaded",d="addEventListener", u="onreadystatechange",l="readyState",f=s?/^loaded|^c/:/^loaded|c/,h=f.test(r[l]);return r[d]&&r[d](c,n=function(){r.removeEventListener(c,n,a),e()},a),s&&r.attachEvent(u,n=function(){/^c/.test(r[l])&&(r.detachEvent(u,n),e())}),t=s?function(e){self!=top?h?e():i.push(e):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){t(e)},50)}e()}()}:function(t){h?t():i.push(t)}}),Array.prototype.indexOf?t.indexOf=function(t,e){return t.indexOf(e)}:t.indexOf=function(t,e){if("string"==typeof t)return t.indexOf(e);var n,i,a=e?e:0;if(!this)throw new TypeError;if(i=this.length,0===i||a>=i)return-1;for(0>a&&(a=i-Math.abs(a)),n=a;i>n;n++)if(this[n]===t)return n;return-1},Array.isArray?t.isArray=function(t){return Array.isArray(t)}:t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Object.keys?t.iterate=function(t,e){if(!t)return[];var n,i=Object.keys(t);for(n=0;i[n]&&e(i[n],t[i[n]])!==!1;n++);}:t.iterate=function(t,e){if(!t)return[];var n;for(n in t) if(Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])===!1)break},window.matchMedia?t.matchesMedia=function(t){return""==t?!0:window.matchMedia(t).matches}:window.styleMedia||window.media?t.matchesMedia=function(t){if(""==t)return!0;var e=window.styleMedia||window.media;return e.matchMedium(t||"all")}:window.getComputedStyle?t.matchesMedia=function(t){if(""==t)return!0;var e=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null;e.type="text/css",e.id="matchmediajs-test",n.parentNode.insertBefore(e,n),i="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle;var a="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=a:e.textContent=a,"1px"===i.width}:t.matchesMedia=function(t){if(""==t)return!0;var e,n,i,a,r={"min-width":null,"max-width":null},o=!1;for(i=t.split(/\s+and\s+/),e=0;e<i.length;e++)n=i[e],"("==n.charAt(0)&&(n=n.substring(1,n.length-1),a=n.split(/:\s+/),2==a.length&&(r[a[0].replac e(/^\s+|\s+$/g,"")]=parseInt(a[1]),o=!0));if(!o)return!1;var s=document.documentElement.clientWidth,c=document.documentElement.clientHeight;return null!==r["min-width"]&&s<r["min-width"]||null!==r["max-width"]&&s>r["max-width"]||null!==r["min-height"]&&c<r["min-height"]||null!==r["max-height"]&&c>r["max-height"]?!1:!0},navigator.userAgent.match(/MSIE ([0-9]+)/)&&RegExp.$1<9&&(t.newStyle=function(t){var e=document.createElement("span");return e.innerHTML=' <style type="text/css">'+t+"</style>",e})},initVars:function(){var e,n,i,a=navigator.userAgent;e="other",n=0,i=[["firefox",/Firefox\/([0-9\.]+)/],["bb",/BlackBerry.+Version\/([0-9\.]+)/],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/],["opera",/OPR\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)/],["edge",/Edge\/([0-9\.]+)/],["safari",/Version\/([0-9\.]+).+Safari/],["chrome",/Chrome\/([0-9\.]+)/],["ie",/MSIE ([0-9]+)/],["ie",/Trident\/.+rv:([0-9]+)/]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(RegExp.$1),!1):void 0}) ,t.vars.browser=e,t.vars.browserVersion=n,e="other",n=0,i=[["ios",/([0-9_]+) like Mac OS X/,function(t){return t.replace("_",".").replace("_","")}],["ios",/CPU like Mac OS X/,function(t){return 0}],["wp",/Windows Phone ([0-9\.]+)/,null],["android",/Android ([0-9\.]+)/,null],["mac",/Macintosh.+Mac OS X ([0-9_]+)/,function(t){return t.replace("_",".").replace("_","")}],["windows",/Windows NT ([0-9\.]+)/,null],["bb",/BlackBerry.+Version\/([0-9\.]+)/,null],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/,null]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(i[2]?i[2](RegExp.$1):RegExp.$1),!1):void 0}),t.vars.os=e,t.vars.osVersion=n,t.vars.IEVersion="ie"==t.vars.browser?t.vars.browserVersion:99,t.vars.touch="wp"==t.vars.os?navigator.msMaxTouchPoints>0:!!("ontouchstart"in window),t.vars.mobile="wp"==t.vars.os||"android"==t.vars.os||"ios"==t.vars.os||"bb"==t.vars.os}};return t.init(),t}();!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?m odule.exports=e():t.skel=e()}(this,function(){return skel}); http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/js/util.js ---------------------------------------------------------------------- diff --git a/content/assets/js/util.js b/content/assets/js/util.js new file mode 100644 index 0000000..ecf7b37 --- /dev/null +++ b/content/assets/js/util.js @@ -0,0 +1,587 @@ +(function($) { + + /** + * Generate an indented list of links from a nav. Meant for use with panel(). + * @return {jQuery} jQuery object. + */ + $.fn.navList = function() { + + var $this = $(this); + $a = $this.find('a'), + b = []; + + $a.each(function() { + + var $this = $(this), + indent = Math.max(0, $this.parents('li').length - 1), + href = $this.attr('href'), + target = $this.attr('target'); + + b.push( + '<a ' + + 'class="link depth-' + indent + '"' + + ( (typeof target !== 'undefined' && target != '') ? ' target="' + target + '"' : '') + + ( (typeof href !== 'undefined' && href != '') ? ' href="' + href + '"' : '') + + '>' + + '<span class="indent-' + indent + '"></span>' + + $this.text() + + '</a>' + ); + + }); + + return b.join(''); + + }; + + /** + * Panel-ify an element. + * @param {object} userConfig User config. + * @return {jQuery} jQuery object. + */ + $.fn.panel = function(userConfig) { + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).panel(userConfig); + + return $this; + + } + + // Vars. + var $this = $(this), + $body = $('body'), + $window = $(window), + id = $this.attr('id'), + config; + + // Config. + config = $.extend({ + + // Delay. + delay: 0, + + // Hide panel on link click. + hideOnClick: false, + + // Hide panel on escape keypress. + hideOnEscape: false, + + // Hide panel on swipe. + hideOnSwipe: false, + + // Reset scroll position on hide. + resetScroll: false, + + // Reset forms on hide. + resetForms: false, + + // Side of viewport the panel will appear. + side: null, + + // Target element for "class". + target: $this, + + // Class to toggle. + visibleClass: 'visible' + + }, userConfig); + + // Expand "target" if it's not a jQuery object already. + if (typeof config.target != 'jQuery') + config.target = $(config.target); + + // Panel. + + // Methods. + $this._hide = function(event) { + + // Already hidden? Bail. + if (!config.target.hasClass(config.visibleClass)) + return; + + // If an event was provided, cancel it. + if (event) { + + event.preventDefault(); + event.stopPropagation(); + + } + + // Hide. + config.target.removeClass(config.visibleClass); + + // Post-hide stuff. + window.setTimeout(function() { + + // Reset scroll position. + if (config.resetScroll) + $this.scrollTop(0); + + // Reset forms. + if (config.resetForms) + $this.find('form').each(function() { + this.reset(); + }); + + }, config.delay); + + }; + + // Vendor fixes. + $this + .css('-ms-overflow-style', '-ms-autohiding-scrollbar') + .css('-webkit-overflow-scrolling', 'touch'); + + // Hide on click. + if (config.hideOnClick) { + + $this.find('a') + .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); + + $this + .on('click', 'a', function(event) { + + var $a = $(this), + href = $a.attr('href'), + target = $a.attr('target'); + + if (!href || href == '#' || href == '' || href == '#' + id) + return; + + // Cancel original event. + event.preventDefault(); + event.stopPropagation(); + + // Hide panel. + $this._hide(); + + // Redirect to href. + window.setTimeout(function() { + + if (target == '_blank') + window.open(href); + else + window.location.href = href; + + }, config.delay + 10); + + }); + + } + + // Event: Touch stuff. + $this.on('touchstart', function(event) { + + $this.touchPosX = event.originalEvent.touches[0].pageX; + $this.touchPosY = event.originalEvent.touches[0].pageY; + + }) + + $this.on('touchmove', function(event) { + + if ($this.touchPosX === null + || $this.touchPosY === null) + return; + + var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, + diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, + th = $this.outerHeight(), + ts = ($this.get(0).scrollHeight - $this.scrollTop()); + + // Hide on swipe? + if (config.hideOnSwipe) { + + var result = false, + boundary = 20, + delta = 50; + + switch (config.side) { + + case 'left': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); + break; + + case 'right': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); + break; + + case 'top': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); + break; + + case 'bottom': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); + break; + + default: + break; + + } + + if (result) { + + $this.touchPosX = null; + $this.touchPosY = null; + $this._hide(); + + return false; + + } + + } + + // Prevent vertical scrolling past the top or bottom. + if (($this.scrollTop() < 0 && diffY < 0) + || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { + + event.preventDefault(); + event.stopPropagation(); + + } + + }); + + // Event: Prevent certain events inside the panel from bubbling. + $this.on('click touchend touchstart touchmove', function(event) { + event.stopPropagation(); + }); + + // Event: Hide panel if a child anchor tag pointing to its ID is clicked. + $this.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.removeClass(config.visibleClass); + + }); + + // Body. + + // Event: Hide panel on body click/tap. + $body.on('click touchend', function(event) { + $this._hide(event); + }); + + // Event: Toggle. + $body.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.toggleClass(config.visibleClass); + + }); + + // Window. + + // Event: Hide on ESC. + if (config.hideOnEscape) + $window.on('keydown', function(event) { + + if (event.keyCode == 27) + $this._hide(event); + + }); + + return $this; + + }; + + /** + * Apply "placeholder" attribute polyfill to one or more forms. + * @return {jQuery} jQuery object. + */ + $.fn.placeholder = function() { + + // Browser natively supports placeholders? Bail. + if (typeof (document.createElement('input')).placeholder != 'undefined') + return $(this); + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).placeholder(); + + return $this; + + } + + // Vars. + var $this = $(this); + + // Text, TextArea. + $this.find('input[type=text],textarea') + .each(function() { + + var i = $(this); + + if (i.val() == '' + || i.val() == i.attr('placeholder')) + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('blur', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == '') + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('focus', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == i.attr('placeholder')) + i + .removeClass('polyfill-placeholder') + .val(''); + + }); + + // Password. + $this.find('input[type=password]') + .each(function() { + + var i = $(this); + var x = $( + $('<div>') + .append(i.clone()) + .remove() + .html() + .replace(/type="password"/i, 'type="text"') + .replace(/type=password/i, 'type=text') + ); + + if (i.attr('id') != '') + x.attr('id', i.attr('id') + '-polyfill-field'); + + if (i.attr('name') != '') + x.attr('name', i.attr('name') + '-polyfill-field'); + + x.addClass('polyfill-placeholder') + .val(x.attr('placeholder')).insertAfter(i); + + if (i.val() == '') + i.hide(); + else + x.hide(); + + i + .on('blur', function(event) { + + event.preventDefault(); + + var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + + i.hide(); + x.show(); + + } + + }); + + x + .on('focus', function(event) { + + event.preventDefault(); + + var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); + + x.hide(); + + i + .show() + .focus(); + + }) + .on('keypress', function(event) { + + event.preventDefault(); + x.val(''); + + }); + + }); + + // Events. + $this + .on('submit', function() { + + $this.find('input[type=text],input[type=password],textarea') + .each(function(event) { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + i.attr('name', ''); + + if (i.val() == i.attr('placeholder')) { + + i.removeClass('polyfill-placeholder'); + i.val(''); + + } + + }); + + }) + .on('reset', function(event) { + + event.preventDefault(); + + $this.find('select') + .val($('option:first').val()); + + $this.find('input,textarea') + .each(function() { + + var i = $(this), + x; + + i.removeClass('polyfill-placeholder'); + + switch (this.type) { + + case 'submit': + case 'reset': + break; + + case 'password': + i.val(i.attr('defaultValue')); + + x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + i.hide(); + x.show(); + } + else { + i.show(); + x.hide(); + } + + break; + + case 'checkbox': + case 'radio': + i.attr('checked', i.attr('defaultValue')); + break; + + case 'text': + case 'textarea': + i.val(i.attr('defaultValue')); + + if (i.val() == '') { + i.addClass('polyfill-placeholder'); + i.val(i.attr('placeholder')); + } + + break; + + default: + i.val(i.attr('defaultValue')); + break; + + } + }); + + }); + + return $this; + + }; + + /** + * Moves elements to/from the first positions of their respective parents. + * @param {jQuery} $elements Elements (or selector) to move. + * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. + */ + $.prioritize = function($elements, condition) { + + var key = '__prioritize'; + + // Expand $elements if it's not already a jQuery object. + if (typeof $elements != 'jQuery') + $elements = $($elements); + + // Step through elements. + $elements.each(function() { + + var $e = $(this), $p, + $parent = $e.parent(); + + // No parent? Bail. + if ($parent.length == 0) + return; + + // Not moved? Move it. + if (!$e.data(key)) { + + // Condition is false? Bail. + if (!condition) + return; + + // Get placeholder (which will serve as our point of reference for when this element needs to move back). + $p = $e.prev(); + + // Couldn't find anything? Means this element's already at the top, so bail. + if ($p.length == 0) + return; + + // Move element to top of parent. + $e.prependTo($parent); + + // Mark element as moved. + $e.data(key, $p); + + } + + // Moved already? + else { + + // Condition is true? Bail. + if (condition) + return; + + $p = $e.data(key); + + // Move element back to its original location (using our placeholder). + $e.insertAfter($p); + + // Unmark element as moved. + $e.removeData(key); + + } + + }); + + }; + +})(jQuery); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/assets/main.css ---------------------------------------------------------------------- diff --git a/content/assets/main.css b/content/assets/main.css new file mode 100644 index 0000000..a19f9f9 --- /dev/null +++ b/content/assets/main.css @@ -0,0 +1,452 @@ +/** + * Reset some basic elements + */ +body, h1, h2, h3, h4, h5, h6, +p, blockquote, pre, hr, +dl, dd, ol, ul, figure { + margin: 0; + padding: 0; } + +/** + * Basic styling + */ +body { + font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #111; + background-color: #fdfdfd; + -webkit-text-size-adjust: 100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; + -o-font-feature-settings: "kern" 1; + font-feature-settings: "kern" 1; + font-kerning: normal; } + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +.highlight { + margin-bottom: 15px; } + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; } + +/** + * Figures + */ +figure > img { + display: block; } + +figcaption { + font-size: 14px; } + +/** + * Lists + */ +ul, ol { + margin-left: 30px; } + +li > ul, +li > ol { + margin-bottom: 0; } + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-weight: 400; } + +/** + * Links + */ +a { + color: #2a7ae2; + text-decoration: none; } + a:visited { + color: #1756a9; } + a:hover { + color: #111; + text-decoration: underline; } + +/** + * Blockquotes + */ +blockquote { + color: #828282; + border-left: 4px solid #e8e8e8; + padding-left: 15px; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; } + blockquote > :last-child { + margin-bottom: 0; } + +/** + * Code formatting + */ +pre, +code { + font-size: 15px; + border: 1px solid #e8e8e8; + border-radius: 3px; + background-color: #eef; } + +code { + padding: 1px 5px; } + +pre { + padding: 8px 12px; + overflow-x: auto; } + pre > code { + border: 0; + padding-right: 0; + padding-left: 0; } + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(800px - (30px * 2)); + max-width: calc(800px - (30px * 2)); + margin-right: auto; + margin-left: auto; + padding-right: 30px; + padding-left: 30px; } + @media screen and (max-width: 800px) { + .wrapper { + max-width: -webkit-calc(800px - (30px)); + max-width: calc(800px - (30px)); + padding-right: 15px; + padding-left: 15px; } } + +/** + * Clearfix + */ +.wrapper:after, .footer-col-wrapper:after { + content: ""; + display: table; + clear: both; } + +/** + * Icons + */ +.icon > svg { + display: inline-block; + vertical-align: middle; } + .icon > svg path { + fill: #828282; } + +/** + * Site header + */ +.site-header { + border-top: 5px solid #424242; + border-bottom: 1px solid #e8e8e8; + min-height: 56px; + position: relative; } + +.site-title { + font-size: 26px; + font-weight: 300; + line-height: 56px; + letter-spacing: -1px; + margin-bottom: 0; + float: left; } + .site-title, .site-title:visited { + color: #424242; } + +.site-nav { + float: right; + line-height: 56px; } + .site-nav .menu-icon { + display: none; } + .site-nav .page-link { + color: #111; + line-height: 1.5; } + .site-nav .page-link:not(:last-child) { + margin-right: 20px; } + @media screen and (max-width: 600px) { + .site-nav { + position: absolute; + top: 9px; + right: 15px; + background-color: #fdfdfd; + border: 1px solid #e8e8e8; + border-radius: 5px; + text-align: right; } + .site-nav .menu-icon { + display: block; + float: right; + width: 36px; + height: 26px; + line-height: 0; + padding-top: 10px; + text-align: center; } + .site-nav .menu-icon > svg path { + fill: #424242; } + .site-nav .trigger { + clear: both; + display: none; } + .site-nav:hover .trigger { + display: block; + padding-bottom: 5px; } + .site-nav .page-link { + display: block; + padding: 5px 10px; + margin-left: 20px; } + .site-nav .page-link:not(:last-child) { + margin-right: 0; } } + +/** + * Site footer + */ +.site-footer { + border-top: 1px solid #e8e8e8; + padding: 30px 0; } + +.footer-heading { + font-size: 18px; + margin-bottom: 15px; } + +.contact-list, +.social-media-list { + list-style: none; + margin-left: 0; } + +.footer-col-wrapper { + font-size: 15px; + color: #828282; + margin-left: -15px; } + +.footer-col { + float: left; + margin-bottom: 15px; + padding-left: 15px; } + +.footer-col-1 { + width: -webkit-calc(35% - (30px / 2)); + width: calc(35% - (30px / 2)); } + +.footer-col-2 { + width: -webkit-calc(20% - (30px / 2)); + width: calc(20% - (30px / 2)); } + +.footer-col-3 { + width: -webkit-calc(45% - (30px / 2)); + width: calc(45% - (30px / 2)); } + +@media screen and (max-width: 800px) { + .footer-col-1, + .footer-col-2 { + width: -webkit-calc(50% - (30px / 2)); + width: calc(50% - (30px / 2)); } + + .footer-col-3 { + width: -webkit-calc(100% - (30px / 2)); + width: calc(100% - (30px / 2)); } } +@media screen and (max-width: 600px) { + .footer-col { + float: none; + width: -webkit-calc(100% - (30px / 2)); + width: calc(100% - (30px / 2)); } } +/** + * Page content + */ +.page-content { + padding: 30px 0; } + +.page-heading { + font-size: 20px; } + +.post-list { + margin-left: 0; + list-style: none; } + .post-list > li { + margin-bottom: 30px; } + +.post-meta { + font-size: 14px; + color: #828282; } + +.post-link { + display: block; + font-size: 24px; } + +/** + * Posts + */ +.post-header { + margin-bottom: 30px; } + +.post-title { + font-size: 42px; + letter-spacing: -1px; + line-height: 1; } + @media screen and (max-width: 800px) { + .post-title { + font-size: 36px; } } + +.post-content { + margin-bottom: 30px; } + .post-content h2 { + font-size: 32px; } + @media screen and (max-width: 800px) { + .post-content h2 { + font-size: 28px; } } + .post-content h3 { + font-size: 26px; } + @media screen and (max-width: 800px) { + .post-content h3 { + font-size: 22px; } } + .post-content h4 { + font-size: 20px; } + @media screen and (max-width: 800px) { + .post-content h4 { + font-size: 18px; } } + +/** + * Syntax highlighting styles + */ +.highlight { + background: #fff; } + .highlighter-rouge .highlight { + background: #eef; } + .highlight .c { + color: #998; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + font-weight: bold; } + .highlight .o { + font-weight: bold; } + .highlight .cm { + color: #998; + font-style: italic; } + .highlight .cp { + color: #999; + font-weight: bold; } + .highlight .c1 { + color: #998; + font-style: italic; } + .highlight .cs { + color: #999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000; + background-color: #fdd; } + .highlight .gd .x { + color: #000; + background-color: #faa; } + .highlight .ge { + font-style: italic; } + .highlight .gr { + color: #a00; } + .highlight .gh { + color: #999; } + .highlight .gi { + color: #000; + background-color: #dfd; } + .highlight .gi .x { + color: #000; + background-color: #afa; } + .highlight .go { + color: #888; } + .highlight .gp { + color: #555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaa; } + .highlight .gt { + color: #a00; } + .highlight .kc { + font-weight: bold; } + .highlight .kd { + font-weight: bold; } + .highlight .kp { + font-weight: bold; } + .highlight .kr { + font-weight: bold; } + .highlight .kt { + color: #458; + font-weight: bold; } + .highlight .m { + color: #099; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #458; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #900; + font-weight: bold; } + .highlight .nf { + color: #900; + font-weight: bold; } + .highlight .nn { + color: #555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + font-weight: bold; } + .highlight .w { + color: #bbb; } + .highlight .mf { + color: #099; } + .highlight .mh { + color: #099; } + .highlight .mi { + color: #099; } + .highlight .mo { + color: #099; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #099; } http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/contribute.html ---------------------------------------------------------------------- diff --git a/content/contribute.html b/content/contribute.html index a1f9a98..d10d343 100644 --- a/content/contribute.html +++ b/content/contribute.html @@ -18,7 +18,7 @@ under the License. --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- Generated by Apache Maven Doxia at 2016-12-06 --> +<!-- Generated by Apache Maven Doxia at 2017-04-13 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> @@ -38,7 +38,7 @@ <script type="text/javascript" src="./js/fancybox/jquery.fancybox-1.3.4.js"></script> <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> <meta name="author" content="James Project Web Team" /> - <meta name="Date-Revision-yyyymmdd" content="20161206" /> + <meta name="Date-Revision-yyyymmdd" content="20170413" /> <meta http-equiv="Content-Language" content="en" /> <link title="DOAP" rel="meta" type="application/rdf+xml" href="http://james.apache.org//doap_james-project.rdf"/> @@ -78,19 +78,11 @@ <div class="xleft"> - <span id="publishDate">Last Published: 2016-12-06</span> + <span id="publishDate">Last Published: 2017-04-13</span> </div> <div class="xright"> <a href="index.html" title="Home">Home</a> | - <a href="server/index.html" title="Server">Server</a> - | - <a href="hupa/index.html" title="Hupa">Hupa</a> - | - <a href="protocols/index.html" title="Protocols">Protocols</a> - | - <a href="mailet/index.html" title="Mailets">Mailets</a> - | - <a href="mailbox/index.html" title="Mailbox">Mailbox</a> + <a href="documentation.html" title="James">James</a> | <a href="mime4j/index.html" title="Mime4J">Mime4J</a> | @@ -100,9 +92,7 @@ | <a href="jdkim/index.html" title="jDKIM">jDKIM</a> | - <a href="mpt/index.html" title="MPT">MPT</a> - | - <a href="postage/index.html" title="Postage">Postage</a> + <a href="hupa/index.html" title="Hupa">Hupa</a> </div> @@ -114,44 +104,58 @@ <div id="navcolumn"> - <h5>About James</h5> + <h5>James components</h5> <ul> - <li class="none"> - <a href="index.html" title="Overview">Overview</a> - </li> - <li class="none"> - <a href="newsarchive.html" title="News">News</a> - </li> - <li class="none"> + <li class="expanded"> + <a href="documentation.html" title="About James">About James</a> + <ul> + <li class="none"> <a href="mail.html" title="Mailing Lists">Mailing Lists</a> </li> - <li class="none"> + <li class="none"> <strong>Contributing</strong> </li> - <li class="none"> + <li class="none"> <a href="guidelines.html" title="Guidelines">Guidelines</a> </li> - <li class="none"> + <li class="none"> <a href="http://wiki.apache.org/james" title="Wiki">Wiki</a> </li> - <li class="none"> + <li class="none"> + <a href="https://issues.apache.org/jira/browse/JAMES" title="Issue tracker">Issue tracker</a> + </li> + <li class="none"> <a href="team-list.html" title="Who We Are">Who We Are</a> </li> - <li class="none"> + <li class="none"> <a href="license.html" title="License">License</a> </li> - <li class="none"> + <li class="none"> <a href="thanks.html" title="Thanks">Thanks</a> </li> - <li class="none"> + <li class="none"> <a href="support.html" title="Professional support">Professional support</a> </li> - </ul> - <h5>Download</h5> - <ul> - <li class="none"> - <a href="download.cgi" title="Releases">Releases</a> + <li class="none"> + <a href="download.cgi" title="Download releases">Download releases</a> </li> + </ul> + </li> + <li class="collapsed"> + <a href="server/index.html" title="Server">Server</a> + </li> + <li class="collapsed"> + <a href="mailet/index.html" title="Mailets">Mailets</a> + </li> + <li class="collapsed"> + <a href="mailbox/index.html" title="Mailbox">Mailbox</a> + </li> + <li class="collapsed"> + <a href="protocols/index.html" title="Protocols">Protocols</a> + </li> + <li class="collapsed"> + <a href="mpt/index.html" title="MPT">MPT</a> + </li> </ul> <h5>Apache Software Foundation</h5> <ul> @@ -223,14 +227,65 @@ </p> <p> - If you are new to this you may be interested in some of these - resources. + To keep you informed on James issues, subscribe to the relevant + <a class="externalLink" href="https://james.apache.org/mail.html">mailing lists</a> + <br /> + </p> + </div> + + +<div class="section"> +<h2>Reporting Bugs<a name="Reporting_Bugs"></a></h2> + +<p> + Many improvements come as a direct result of bug reports. + <br /> + To report a bug, please use the appropriate Bug Tracker JIRA link according + to the project you want to address: + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/JAMES">Server</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/MAILET">Mailet</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/MAILBOX">Mailbox</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/PROTOCOLS">Protocols</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/MPT">MPT</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/MIME4J">Mime4j</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/JSIEVE">jSieve</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/JSPF">jSPF</a> + <br /> + <a class="externalLink" href="https://issues.apache.org/jira/browse/JDKIM">jDKIM</a> <br /> - <a class="externalLink" href="http://jakarta.apache.org/site/guidelines.html">A good, full, summary of links to guidelines</a> + <a class="externalLink" href="https://issues.apache.org/jira/browse/HUPA">Hupa</a> <br /> - Subscribe to the relevant mailing lists (link on the left). + Once you are logged on the appropriate JIRA page, + click on the red Create button, then complete the + different fields as accurately as possible, so that + any user can reproduce the reported bug. + Also note that all your information must be readable + (use markedown). <br /> - <a class="externalLink" href="http://jakarta.apache.org/site/contributing.html">Craig R. McClanahan's advice how to get involved</a> + Then, you have to click on Create to submit your bug. + </p> + </div> + + +<div class="section"> +<h2>How to contribute to the code?<a name="How_to_contribute_to_the_code"></a></h2> + +<p> + Clone the source code of the project from its + <a class="externalLink" href="https://github.com/apache/james-project">Github</a> + or its <a class="externalLink" href="git://git.apache.org/james-project.git">apache git repository</a> + <br /> + Create your branch and name it with the JIRA ticket number. + Create a Pull Request with your branch name + and prefix its different commits with the same name. <br /> </p> </div> @@ -240,104 +295,37 @@ <h2>Code Patches<a name="Code_Patches"></a></h2> <p> - Patches should be submitted to the developers mailing list. + Patches should be attached to the corresponding JIRA issue. <br /> <b>Always</b> use diff -u to generate patches, so we can apply them using 'patch'. <br /> -<!-- // Update this for SVN - Make sure you are patching the latest cvs (the HEAD). - (You might - want to try 'cvs diff -u -w -b -rHEAD' against the checked out - module where - you have implemented the patch. - <br /> --> + <br /> Make sure the patch only contains what is intended, your checkout could be outdated. <br /> - Make your patch from the jakarta-james directory and make sure - it conforms - to the code standards, otherwise it may be ignored. It is OK to make a + Make sure it conforms to the code standards, otherwise it may be ignored. It is OK to make a single patch covering several files, but please only one issue at a time. <br /> - Prefix the mail subject with [PATCH] - <br /> Briefly outline the reason for your patch, the solution your patch implements, why a patch is needed and why your code will solve the problem. Note any bug numbers your patch addresses. <br /> - Submit the patch as an attachment to the mail, this - mail should - preferably be in either BASE64 or QuotedPrintable format, to - prevent line wrapping. - <br /> </p> <p> The reason for these rules is so that commiters can easily see what you are trying to achieve, - it is their resonsibility to manage the code and review submissions, + it is their responsibility to manage the code and review submissions, if you make it easy for them to see what you are doing your patch is more likely to - be commited quickly (or at all). - <br /> - </p> - </div> - - -<div class="section"> -<h2>Adding New Code<a name="Adding_New_Code"></a></h2> - -<p> - Like the principles for patch submission, mark your mail [PATCH] - and ensure - your submission conforms to the code standards. Provide a Brief outline - of - your intentions, as above, so that your code can be reviewed easily, and - a - note of any relevant bug numbers. - <br /> - New files must contain a reference to the Apache licence, copy - the header from an existing file. - <br /> - It also helps if you send your files in an archive (tar, zip) - which preserves directories, make it from the jakarta-james - directory so we can un-tar your files into the right place. - </p> - </div> - - -<div class="section"> -<h2>Reporting and Fixing Bugs<a name="Reporting_and_Fixing_Bugs"></a></h2> - -<p> - Many improvements come as a direct result of bug - reports, and contributed fixes, often by the same person. It is sometimes - said that Apache - projects evolve because users become so fed-up waiting for bugs to be - addressed that they - fix them themselves. :) - <br /> - If you report a bug, - <a class="externalLink" href="http://issues.apache.org/jira">here</a> - we'd appreciate it if you could send a mail to the users or - developers - mailing lists, so that we can discuss it with you, bugzilla isn't a great - way for mediating - communication. + be commited quickly. <br /> - If you want to fix a bug, please contribute your changes - according to the guidelines above, - in the Code Patches section. It is much simpler to deal with - submissions if they all come - through the same channel. If you still really want to attach patches to bug - submissions, please do send us a mail tagged [PATCH] too, so - that we notice your patch. </p> </div> @@ -381,10 +369,10 @@ maintained with the automated build. Once a build is done, the documentation can be further committed in the - <a class="externalLink" href="https://svn.apache.org/repos/asf/james/site/trunk"> + <a class="externalLink" href="https://git-wip-us.apache.org/repos/asf/james-site.git"> site module </a> - which will be automatically published via svnpubsub + which will be automatically published via gitpubsub to <a class="externalLink" href="http://james.apache.org">Apache James web site</a> . @@ -519,7 +507,7 @@ <hr/> </div> <div id="footer"> - <div class="xright">Copyright © 2006-2016 + <div class="xright">Copyright © 2006-2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_444444_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_444444_256x240.png b/content/css/custom-theme/images/ui-icons_444444_256x240.png new file mode 100644 index 0000000..a802263 Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_444444_256x240.png differ http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_555555_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_555555_256x240.png b/content/css/custom-theme/images/ui-icons_555555_256x240.png new file mode 100644 index 0000000..7009bf7 Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_555555_256x240.png differ http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_777620_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_777620_256x240.png b/content/css/custom-theme/images/ui-icons_777620_256x240.png new file mode 100644 index 0000000..e0a1fdf Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_777620_256x240.png differ http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_777777_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_777777_256x240.png b/content/css/custom-theme/images/ui-icons_777777_256x240.png new file mode 100644 index 0000000..8e26ee4 Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_777777_256x240.png differ http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_cc0000_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_cc0000_256x240.png b/content/css/custom-theme/images/ui-icons_cc0000_256x240.png new file mode 100644 index 0000000..2815430 Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_cc0000_256x240.png differ http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/css/custom-theme/images/ui-icons_ffffff_256x240.png ---------------------------------------------------------------------- diff --git a/content/css/custom-theme/images/ui-icons_ffffff_256x240.png b/content/css/custom-theme/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..4d66f59 Binary files /dev/null and b/content/css/custom-theme/images/ui-icons_ffffff_256x240.png differ --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org