Jump to 0.3.1

This commit is contained in:
Wu Cheng-Han
2015-07-02 00:10:20 +08:00
parent f7f8c901f4
commit 10c9811fc5
49 changed files with 2336 additions and 448 deletions

View File

@@ -57,7 +57,7 @@
cm.operation(function() {
for (var i = ranges.length - 1; i >= 0; i--)
cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");
cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+input");
});
}

File diff suppressed because one or more lines are too long

View File

@@ -1318,11 +1318,13 @@
minimal = hasCopyEvent &&
(range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);
var content = minimal ? "-" : selected || cm.getSelection();
this.textarea.value = content;
if(!this.composing)
this.textarea.value = content;
if (cm.state.focused) selectInput(this.textarea);
if (ie && ie_version >= 9) this.hasSelection = content;
} else if (!typing) {
this.prevInput = this.textarea.value = "";
if(!this.composing)
this.prevInput = this.textarea.value = "";
if (ie && ie_version >= 9) this.hasSelection = null;
}
this.inaccurateSelection = minimal;

View File

@@ -0,0 +1 @@
.hljs{display:block;background:white;padding:0.5em;color:#333333;overflow-x:auto;-webkit-text-size-adjust:none}.hljs-comment,.bash .hljs-shebang,.java .hljs-javadoc,.javascript .hljs-javadoc{color:#969896}.hljs-string,.apache .hljs-sqbracket,.coffeescript .hljs-subst,.coffeescript .hljs-regexp,.cpp .hljs-preprocessor,.c .hljs-preprocessor,.javascript .hljs-regexp,.json .hljs-attribute,.makefile .hljs-variable,.markdown .hljs-value,.markdown .hljs-link_label,.markdown .hljs-strong,.markdown .hljs-emphasis,.markdown .hljs-blockquote,.nginx .hljs-regexp,.nginx .hljs-number,.objectivec .hljs-preprocessor .hljs-title,.perl .hljs-regexp,.php .hljs-regexp,.xml .hljs-value,.less .hljs-built_in,.scss .hljs-built_in{color:#df5000}.hljs-keyword,.css .hljs-at_rule,.css .hljs-important,.http .hljs-request,.ini .hljs-setting,.java .hljs-javadoctag,.javascript .hljs-tag,.javascript .hljs-javadoctag,.nginx .hljs-title,.objectivec .hljs-preprocessor,.php .hljs-phpdoc,.sql .hljs-built_in,.less .hljs-tag,.less .hljs-at_rule,.scss .hljs-tag,.scss .hljs-at_rule,.scss .hljs-important,.stylus .hljs-at_rule,.go .hljs-typename,.swift .hljs-preprocessor{color:#a71d5d}.apache .hljs-common,.apache .hljs-cbracket,.apache .hljs-keyword,.bash .hljs-literal,.bash .hljs-built_in,.coffeescript .hljs-literal,.coffeescript .hljs-built_in,.coffeescript .hljs-number,.cpp .hljs-number,.cpp .hljs-built_in,.c .hljs-number,.c .hljs-built_in,.cs .hljs-number,.cs .hljs-built_in,.css .hljs-attribute,.css .hljs-hexcolor,.css .hljs-number,.css .hljs-function,.http .hljs-literal,.http .hljs-attribute,.java .hljs-number,.javascript .hljs-built_in,.javascript .hljs-literal,.javascript .hljs-number,.json .hljs-number,.makefile .hljs-keyword,.markdown .hljs-link_reference,.nginx .hljs-built_in,.objectivec .hljs-literal,.objectivec .hljs-number,.objectivec .hljs-built_in,.php .hljs-literal,.php .hljs-number,.python .hljs-number,.ruby .hljs-prompt,.ruby .hljs-constant,.ruby .hljs-number,.ruby .hljs-subst .hljs-keyword,.ruby .hljs-symbol,.sql .hljs-number,.puppet .hljs-function,.less .hljs-number,.less .hljs-hexcolor,.less .hljs-function,.less .hljs-attribute,.scss .hljs-preprocessor,.scss .hljs-number,.scss .hljs-hexcolor,.scss .hljs-function,.scss .hljs-attribute,.stylus .hljs-number,.stylus .hljs-hexcolor,.stylus .hljs-attribute,.stylus .hljs-params,.go .hljs-built_in,.go .hljs-constant,.swift .hljs-built_in,.swift .hljs-number{color:#0086b3}.apache .hljs-tag,.cs .hljs-xmlDocTag,.css .hljs-tag,.xml .hljs-title,.stylus .hljs-tag{color:#63a35c}.bash .hljs-variable,.cs .hljs-preprocessor,.cs .hljs-preprocessor .hljs-keyword,.css .hljs-attr_selector,.css .hljs-value,.ini .hljs-value,.ini .hljs-keyword,.javascript .hljs-tag .hljs-title,.makefile .hljs-constant,.nginx .hljs-variable,.xml .hljs-tag,.scss .hljs-variable{color:#333333}.bash .hljs-title,.coffeescript .hljs-title,.cpp .hljs-title,.c .hljs-title,.cs .hljs-title,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo,.ini .hljs-title,.java .hljs-title,.javascript .hljs-title,.makefile .hljs-title,.objectivec .hljs-title,.perl .hljs-sub,.php .hljs-title,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-parent,.ruby .hljs-title,.xml .hljs-attribute,.puppet .hljs-title,.less .hljs-id,.less .hljs-pseudo,.less .hljs-class,.scss .hljs-id,.scss .hljs-pseudo,.scss .hljs-class,.stylus .hljs-class,.stylus .hljs-id,.stylus .hljs-pseudo,.stylus .hljs-title,.swift .hljs-title,.diff .hljs-chunk{color:#795da3}.coffeescript .hljs-reserved,.coffeescript .hljs-attribute{color:#1d3e81}.diff .hljs-chunk{font-weight:bold}.diff .hljs-addition{color:#55a532;background-color:#eaffea}.diff .hljs-deletion{color:#bd2c00;background-color:#ffecec}.markdown .hljs-link_url{text-decoration:underline}

View File

@@ -1 +1 @@
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.hljs-comment,.diff .hljs-header,.hljs-javadoc{color:#998;font-style:italic}.hljs-keyword,.css .rule .hljs-keyword,.hljs-winutils,.nginx .hljs-title,.hljs-subst,.hljs-request,.hljs-status{color:#333;font-weight:bold}.hljs-number,.hljs-hexcolor,.ruby .hljs-constant{color:#008080}.hljs-string,.hljs-tag .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula{color:#d14}.hljs-title,.hljs-id,.scss .hljs-preprocessor{color:#900;font-weight:bold}.hljs-list .hljs-keyword,.hljs-subst{font-weight:normal}.hljs-class .hljs-title,.hljs-type,.vhdl .hljs-literal,.tex .hljs-command{color:#458;font-weight:bold}.hljs-tag,.hljs-tag .hljs-title,.hljs-rules .hljs-property,.django .hljs-tag .hljs-keyword{color:#000080;font-weight:normal}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:#008080}.hljs-regexp{color:#009926}.hljs-symbol,.ruby .hljs-symbol .hljs-string,.lisp .hljs-keyword,.clojure .hljs-keyword,.scheme .hljs-keyword,.tex .hljs-special,.hljs-prompt{color:#990073}.hljs-built_in{color:#0086b3}.hljs-preprocessor,.hljs-pragma,.hljs-pi,.hljs-doctype,.hljs-shebang,.hljs-cdata{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.hljs-comment,.diff .hljs-header{color:#998;font-style:italic}.hljs-keyword,.css .rule .hljs-keyword,.hljs-winutils,.nginx .hljs-title,.hljs-subst,.hljs-request,.hljs-status{color:#333;font-weight:bold}.hljs-number,.hljs-hexcolor,.ruby .hljs-constant{color:#008080}.hljs-string,.hljs-tag .hljs-value,.hljs-doctag,.tex .hljs-formula{color:#d14}.hljs-title,.hljs-id,.scss .hljs-preprocessor{color:#900;font-weight:bold}.hljs-list .hljs-keyword,.hljs-subst{font-weight:normal}.hljs-class .hljs-title,.hljs-type,.vhdl .hljs-literal,.tex .hljs-command{color:#458;font-weight:bold}.hljs-tag,.hljs-tag .hljs-title,.hljs-rule .hljs-property,.django .hljs-tag .hljs-keyword{color:#000080;font-weight:normal}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.hljs-name{color:#008080}.hljs-regexp{color:#009926}.hljs-symbol,.ruby .hljs-symbol .hljs-string,.lisp .hljs-keyword,.clojure .hljs-keyword,.scheme .hljs-keyword,.tex .hljs-special,.hljs-prompt{color:#990073}.hljs-built_in{color:#0086b3}.hljs-preprocessor,.hljs-pragma,.hljs-pi,.hljs-doctype,.hljs-shebang,.hljs-cdata{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}

File diff suppressed because one or more lines are too long

View File

@@ -88,6 +88,8 @@
return false;
}
});
return inlineattach;
};
inlineAttachment.editors.codemirror4 = codeMirrorEditor4;

View File

@@ -352,7 +352,7 @@
inlineAttachment.prototype.onFileInserted = function(file, id) {
if (this.settings.onFileReceived.call(this, file) !== false) {
this.lastValue = this.settings.progressText.replace(this.filenameTag, id);
this.editor.insertValue(this.lastValue);
this.editor.insertValue(this.lastValue + "\n");
}
};

View File

@@ -250,9 +250,13 @@ if (typeof jQuery === 'undefined') {
if (context || context === '') {
if (isString(context)) { text = context; }
var cursor = editor.getCursor();
text = editor.getLine(cursor.line).slice(0, cursor.ch);
var match = text.match(strategy.match);
if (match) { return [strategy, match[strategy.index], match]; }
var line = editor.getLine(cursor.line);
var linematch = line.match(strategy.match);
if(linematch) {
text = line.slice(0, cursor.ch);
var textmatch = text.match(strategy.match);
if (textmatch) { return [strategy, textmatch[strategy.index], textmatch]; }
}
}
}
return []
@@ -315,12 +319,14 @@ if (typeof jQuery === 'undefined') {
};
var dropdownViews = {};
$(document).on('click', function (e) {
/*
$(document).on('mousedown', function (e) {
var id = e.originalEvent && e.originalEvent.keepTextCompleteDropdown;
$.each(dropdownViews, function (key, view) {
if (key !== id) { view.deactivate(); }
});
});
*/
// Dropdown view
// =============
@@ -335,6 +341,7 @@ if (typeof jQuery === 'undefined') {
this._data = []; // zipped data.
this.$inputEl = $(element);
this.option = option;
this.tap = false;
// Override setPosition method.
if (option.listPosition) { this.setPosition = option.listPosition; }
@@ -499,7 +506,18 @@ if (typeof jQuery === 'undefined') {
// ---------------
_bindEvents: function () {
this.$el.on('touchstart.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this));
this.$inputEl.on('blur', $.proxy(this.deactivate, this));
this.$el.on('touchstart.' + this.id, '.textcomplete-item', $.proxy(function(e) {
this.tap = true;
}, this));
this.$el.on('touchmove.' + this.id, '.textcomplete-item', $.proxy(function(e) {
this.tap = false;
}, this));
this.$el.on('touchend.' + this.id, '.textcomplete-item', $.proxy(function(e) {
if(e.cancelable && this.tap) {
this._onClick(e);
}
}, this));
this.$el.on('mousedown.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this));
this.$el.on('mouseover.' + this.id, '.textcomplete-item', $.proxy(this._onMouseover, this));
this.$inputEl.on('keydown.' + this.id, $.proxy(this._onKeydown, this));
@@ -819,6 +837,7 @@ if (typeof jQuery === 'undefined') {
this.id = completer.id + this.constructor.name;
this.completer = completer;
this.option = option;
this.lastCurosr = null;
if (this.option.debounce) {
this._onKeyup = debounce(this._onKeyup, this.option.debounce);
@@ -866,12 +885,20 @@ if (typeof jQuery === 'undefined') {
// ---------------
_bindEvents: function () {
editor.on('cursorActivity', $.proxy(this._onKeyup, this));
$('.CodeMirror').on('touchend.' + this.id, $.proxy(this._onKeyup, this));
$('.CodeMirror').on('mouseup.' + this.id, $.proxy(this._onKeyup, this));
$(editor.getInputField()).on('focus', $.proxy(this._onKeyup, this));
this.$el.on('keyup.' + this.id, $.proxy(this._onKeyup, this));
},
_onKeyup: function (e) {
var focus = (e.type == 'focus');
var cursor = editor.getCursor();
var samePos = (cursor == this.lastCursor);
if (this._skipSearch(e)) { return; }
this.completer.trigger(this.getTextFromHeadToCaret(), true);
this.completer.trigger(this.getTextFromHeadToCaret(), focus ? false : samePos);
this.lastCursor = cursor;
},
// Suppress searching if it returns true.

8
public/vendor/jquery.mousewheel.min.js vendored Executable file
View File

@@ -0,0 +1,8 @@
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 3.1.11
*
* Requires: jQuery 1.2.2+
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b)["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||(c=a("body")),parseInt(c.css("fontSize"),10)},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});

121
public/vendor/md-toc.js vendored Executable file
View File

@@ -0,0 +1,121 @@
/**
* md-toc.js v1.0.2
* https://github.com/yijian166/md-toc.js
*/
(function (window) {
function Toc(id, options) {
this.el = document.getElementById(id);
if (!this.el) return;
this.options = options || {};
this.tocLevel = parseInt(options.level) || 0;
this.tocClass = options['class'] || 'toc';
this.tocTop = parseInt(options.top) || 0;
this.elChilds = this.el.children;
if (!this.elChilds.length) return;
this._init();
}
Toc.prototype._init = function () {
this._collectTitleElements();
this._createTocContent();
this._showToc();
};
Toc.prototype._collectTitleElements = function () {
this._elTitlesNames = [],
this.elTitleElements = [];
for (var i = 1; i < 7; i++) {
if (this.el.getElementsByTagName('h' + i).length) {
this._elTitlesNames.push('h' + i);
}
}
this._elTitlesNames.length = this._elTitlesNames.length > this.tocLevel ? this.tocLevel : this._elTitlesNames.length;
for (var j = 0; j < this.elChilds.length; j++) {
this._elChildName = this.elChilds[j].tagName.toLowerCase();
if (this._elTitlesNames.toString().match(this._elChildName)) {
this.elTitleElements.push(this.elChilds[j]);
}
}
};
Toc.prototype._createTocContent = function () {
this._elTitleElementsLen = this.elTitleElements.length;
if (!this._elTitleElementsLen) return;
this.tocContent = '';
this._tempLists = [];
var url = location.origin + location.pathname;
for (var i = 0; i < this._elTitleElementsLen; i++) {
var j = i + 1;
this._elTitleElement = this.elTitleElements[i];
this._elTitleElementName = this._elTitleElement.tagName;
this._elTitleElementText = this._elTitleElement.innerHTML.replace(/<(?:.|\n)*?>/gm, '');
var id = this._elTitleElement.getAttribute('id');
if (!id) {
this._elTitleElement.setAttribute('id', 'tip' + i);
id = '#tip' + i;
} else {
id = '#' + id;
}
this.tocContent += '<li><a href="' + id + '">' + this._elTitleElementText + '</a>';
if (j != this._elTitleElementsLen) {
this._elNextTitleElementName = this.elTitleElements[j].tagName;
if (this._elTitleElementName != this._elNextTitleElementName) {
var checkColse = false,
y = 1;
for (var t = this._tempLists.length - 1; t >= 0; t--) {
if (this._tempLists[t].tagName == this._elNextTitleElementName) {
checkColse = true;
break;
}
y++;
}
if (checkColse) {
this.tocContent += new Array(y + 1).join('</li></ul>');
this._tempLists.length = this._tempLists.length - y;
} else {
this._tempLists.push(this._elTitleElement);
this.tocContent += '<ul class="nav">';
}
} else {
this.tocContent += '</li>';
}
} else {
if (this._tempLists.length) {
this.tocContent += new Array(this._tempLists.length + 1).join('</li></ul>');
} else {
this.tocContent += '</li>';
}
}
}
this.tocContent = '<ul class="nav">' + this.tocContent + '</ul>';
};
Toc.prototype._showToc = function () {
this.toc = document.createElement('div');
this.toc.innerHTML = this.tocContent;
this.toc.setAttribute('class', this.tocClass);
if (!this.options.targetId) {
this.el.appendChild(this.toc);
} else {
document.getElementById(this.options.targetId).appendChild(this.toc);
}
var self = this;
if (this.tocTop > -1) {
window.onscroll = function () {
var t = document.documentElement.scrollTop || document.body.scrollTop;
if (t < self.tocTop) {
self.toc.setAttribute('style', 'position:absolute;top:' + self.tocTop + 'px;');
} else {
self.toc.setAttribute('style', 'position:fixed;top:10px;');
}
}
}
};
window.Toc = Toc;
})(window);

1
public/vendor/md5.min.js vendored Executable file
View File

@@ -0,0 +1 @@
!function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"function"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);

125
public/vendor/showup/showup.css vendored Executable file
View File

@@ -0,0 +1,125 @@
/*
* Showup.js jQuery Plugin
* http://github.com/jonschlinkert/showup
*
* Copyright (c) 2013 Jon Schlinkert, contributors
* Licensed under the MIT License (MIT).
*/
/**
* Docs navbar transitions effects
*/
.navbar-tall,
.navbar-show {
-webkit-transition: -webkit-transform .3s;
-moz-transition: -moz-transform .3s;
-o-transition: -o-transform .3s;
transition: transform .3s;
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
transform: translate(0, 0);
}
.navbar-hide {
-webkit-transition: -webkit-transform .2s;
-moz-transition: -moz-transform .2s;
-o-transition: -o-transform .2s;
transition: transform .2s;
-webkit-transform: translate(0, -60px);
-ms-transform: translate(0, -60px);
transform: translate(0, -60px);
}
.navbar-tall,
.navbar-short,
.navbar-tall .navbar-brand,
.navbar-short .navbar-brand,
.navbar-tall .navbar-nav > li > a,
.navbar-short .navbar-nav > li > a {
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
}
.navbar-short {
min-height: 40px;
}
.navbar-short .navbar-brand {
font-size: 16px;
padding: 13px 15px 10px;
}
.navbar-short .navbar-nav > li > a {
padding-top: 12px;
padding-bottom: 12px;
}
.navbar-tall {
min-height: 70px;
}
.navbar-tall .navbar-brand {
font-size: 24px;
padding: 25px 15px;
}
.navbar-tall .navbar-nav > li > a {
padding-top: 25px;
}
/**
* Docs Buttons
*/
/* Fixed button, bottom right */
.btn-fixed-bottom {
position: fixed;
bottom: 30px;
display: none;
z-index: 5;
width: 40px;
height: 40px;
}
/* Toggles navbar classes */
.btn-hide-show {
margin-right: 10px;
}
/* Light theme */
.btn-light {
color: #555;
background-color: rgba(0, 0, 0,.1);
}
.btn-light:hover {
color: #111;
background-color: rgba(0, 0, 0,.25);
}
/* Dark theme */
.btn-dark {
color: #fff;
background-color: rgba(0, 0, 0,.5);
}
.btn-dark:hover {
color: #fff;
background-color: rgba(0, 0, 0,.9);
}
/* Buttons displayed throughout the content */
.btn-showup {
position: relative;
color: #fff;
font-weight: normal;
background-color: #463265;
border-color: #3F2961;
}
.btn-showup:hover,
.btn-showup:focus {
color: #fff;
outline: none;
background-color: #39235A;
border-color: #39235A;
}

87
public/vendor/showup/showup.js vendored Executable file
View File

@@ -0,0 +1,87 @@
/*
* Showup.js jQuery Plugin
* http://github.com/jonschlinkert/showup
*
* Copyright (c) 2013 Jon Schlinkert, contributors
* Licensed under the MIT License (MIT).
*/
(function( $ ) {
$.fn.showUp = function(ele, options) {
options = options || {};
var target = $(ele);
var down = options.down || 'navbar-hide';
var up = options.up || 'navbar-show';
var btnHideShow = options.btnHideShow || '.btn-hide-show';
var hideOffset = options.offset || 60;
var previousScroll = 0;
var isHide = false;
$(window).scroll(function () {
checkScrollTop();
});
$(window).resize(function () {
checkScrollTop();
});
$(window).mousewheel(function () {
checkScrollTop();
});
function checkScrollTop()
{
target.clearQueue();
target.stop();
var currentScroll = $(this).scrollTop();
if (currentScroll > hideOffset) {
if(Math.abs(previousScroll - currentScroll) < 50) return;
if (currentScroll > previousScroll) {
// Action on scroll down
target.removeClass(up).addClass(down);
} else if (currentScroll < previousScroll) {
// Action on scroll up
target.removeClass(down).addClass(up);
}
} else {
target.removeClass(down).addClass(up);
}
previousScroll = $(this).scrollTop();
}
// Toggle visibility of target on click
$(btnHideShow).click(function () {
if (target.hasClass(down)) {
target.removeClass(down).addClass(up);
} else {
target.removeClass(up).addClass(down);
}
});
};
})( jQuery );
// TODO: make customizable
$(document).ready(function () {
var duration = 420;
var showOffset = 220;
var btnFixed = '.btn-fixed-bottom';
var btnToTopClass = '.back-to-top';
$(window).scroll(function () {
if ($(this).scrollTop() > showOffset) {
$(btnFixed).fadeIn(duration);
} else {
$(btnFixed).fadeOut(duration);
}
});
$(btnToTopClass).click(function (event) {
event.preventDefault();
$('html, body').animate({
scrollTop: 0
}, duration);
return false;
});
});