chore: mv asset
No files matched your search
@@ -14,8 +14,8 @@ import (
|
||||
var (
|
||||
// Conf 配置
|
||||
Conf Config
|
||||
// WorkDir 工作目录
|
||||
WorkDir string
|
||||
// EtcDir 工作目录
|
||||
EtcDir string
|
||||
)
|
||||
|
||||
// Config config
|
||||
@@ -50,11 +50,11 @@ func init() {
|
||||
|
||||
// 加载配置文件
|
||||
var err error
|
||||
WorkDir, err = config.WalkWorkDir()
|
||||
EtcDir, err = config.WorkEtcPath()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
path := filepath.Join(WorkDir, "etc", "app.yml")
|
||||
path := filepath.Join(EtcDir, "app.yml")
|
||||
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1000;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}var DIFF_DELETE=-1;var DIFF_INSERT=1;var DIFF_EQUAL=0;diff_match_patch.Diff;diff_match_patch.prototype.diff_main=function(b,a,d,f){if(typeof f=="undefined"){if(this.Diff_Timeout<=0){f=Number.MAX_VALUE}else{f=(new Date).getTime()+this.Diff_Timeout*1000}}var i=f;if(b==null||a==null){throw new Error("Null input. (diff_main)")}if(b==a){if(b){return[[DIFF_EQUAL,b]]}return[]}if(typeof d=="undefined"){d=true}var j=d;var e=this.diff_commonPrefix(b,a);var h=b.substring(0,e);b=b.substring(e);a=a.substring(e);e=this.diff_commonSuffix(b,a);var c=b.substring(b.length-e);b=b.substring(0,b.length-e);a=a.substring(0,a.length-e);var g=this.diff_compute_(b,a,j,i);if(h){g.unshift([DIFF_EQUAL,h])}if(c){g.push([DIFF_EQUAL,c])}this.diff_cleanupMerge(g);return g};diff_match_patch.prototype.diff_compute_=function(c,b,q,p){var j;if(!c){return[[DIFF_INSERT,b]]}if(!b){return[[DIFF_DELETE,c]]}var m=c.length>b.length?c:b;var d=c.length>b.length?b:c;var f=m.indexOf(d);if(f!=-1){j=[[DIFF_INSERT,m.substring(0,f)],[DIFF_EQUAL,d],[DIFF_INSERT,m.substring(f+d.length)]];if(c.length>b.length){j[0][0]=j[2][0]=DIFF_DELETE}return j}if(d.length==1){return[[DIFF_DELETE,c],[DIFF_INSERT,b]]}var a=this.diff_halfMatch_(c,b);if(a){var l=a[0];var h=a[1];var o=a[2];var n=a[3];var e=a[4];var k=this.diff_main(l,o,q,p);var g=this.diff_main(h,n,q,p);return k.concat([[DIFF_EQUAL,e]],g)}if(q&&c.length>100&&b.length>100){return this.diff_lineMode_(c,b,p)}return this.diff_bisect_(c,b,p)};diff_match_patch.prototype.diff_lineMode_=function(d,c,n){var k=this.diff_linesToChars_(d,c);d=k.chars1;c=k.chars2;var e=k.lineArray;var g=this.diff_main(d,c,false,n);this.diff_charsToLines_(g,e);this.diff_cleanupSemantic(g);g.push([DIFF_EQUAL,""]);var b=0;var m=0;var l=0;var i="";var h="";while(b<g.length){switch(g[b][0]){case DIFF_INSERT:l++;h+=g[b][1];break;case DIFF_DELETE:m++;i+=g[b][1];break;case DIFF_EQUAL:if(m>=1&&l>=1){g.splice(b-m-l,m+l);b=b-m-l;var k=this.diff_main(i,h,false,n);for(var f=k.length-1;f>=0;f--){g.splice(b,0,k[f])}b=b+k.length}l=0;m=0;i="";h="";break}b++}g.pop();return g};diff_match_patch.prototype.diff_bisect_=function(n,l,A){var v=n.length;var g=l.length;var h=Math.ceil((v+g)/2);var r=h;var o=2*h;var e=new Array(o);var b=new Array(o);for(var m=0;m<o;m++){e[m]=-1;b[m]=-1}e[r+1]=0;b[r+1]=0;var B=v-g;var i=(B%2!=0);var s=0;var p=0;var u=0;var t=0;for(var z=0;z<h;z++){if((new Date()).getTime()>A){break}for(var k=-z+s;k<=z-p;k+=2){var q=r+k;var y;if(k==-z||(k!=z&&e[q-1]<e[q+1])){y=e[q+1]}else{y=e[q-1]+1}var f=y-k;while(y<v&&f<g&&n.charAt(y)==l.charAt(f)){y++;f++}e[q]=y;if(y>v){p+=2}else{if(f>g){s+=2}else{if(i){var a=r+B-k;if(a>=0&&a<o&&b[a]!=-1){var w=v-b[a];if(y>=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}for(var j=-z+u;j<=z-t;j+=2){var a=r+j;var w;if(j==-z||(j!=z&&b[a-1]<b[a+1])){w=b[a+1]}else{w=b[a-1]+1}var c=w-j;while(w<v&&c<g&&n.charAt(v-w-1)==l.charAt(g-c-1)){w++;c++}b[a]=w;if(w>v){t+=2}else{if(c>g){u+=2}else{if(!i){var q=r+B-j;if(q>=0&&q<o&&e[q]!=-1){var y=e[q];var f=r+y-q;w=v-w;if(y>=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}}return[[DIFF_DELETE,n],[DIFF_INSERT,l]]};diff_match_patch.prototype.diff_bisectSplit_=function(d,c,i,h,k){var f=d.substring(0,i);var b=c.substring(0,h);var e=d.substring(i);var a=c.substring(h);var g=this.diff_main(f,b,false,k);var j=this.diff_main(e,a,false,k);return g.concat(j)};diff_match_patch.prototype.diff_linesToChars_=function(g,e){var d=[];var a={};d[0]="";function f(m){var k="";var i=0;var l=-1;var j=d.length;while(l<m.length-1){l=m.indexOf("\n",i);if(l==-1){l=m.length-1}var h=m.substring(i,l+1);i=l+1;if(a.hasOwnProperty?a.hasOwnProperty(h):(a[h]!==undefined)){k+=String.fromCharCode(a[h])}else{k+=String.fromCharCode(j);a[h]=j;d[j++]=h}}return k}var c=f(g);var b=f(e);return{chars1:c,chars2:b,lineArray:d}};diff_match_patch.prototype.diff_charsToLines_=function(e,b){for(var a=0;a<e.length;a++){var c=e[a][1];var d=[];for(var f=0;f<c.length;f++){d[f]=b[c.charCodeAt(f)]}e[a][1]=d.join("")}};diff_match_patch.prototype.diff_commonPrefix=function(e,d){if(!e||!d||e.charAt(0)!=d.charAt(0)){return 0}var b=0;var f=Math.min(e.length,d.length);var a=f;var c=0;while(b<a){if(e.substring(c,a)==d.substring(c,a)){b=a;c=b}else{f=a}a=Math.floor((f-b)/2+b)}return a};diff_match_patch.prototype.diff_commonSuffix=function(d,c){if(!d||!c||d.charAt(d.length-1)!=c.charAt(c.length-1)){return 0}var b=0;var e=Math.min(d.length,c.length);var a=e;var f=0;while(b<a){if(d.substring(d.length-a,d.length-f)==c.substring(c.length-a,c.length-f)){b=a;f=b}else{e=a}a=Math.floor((e-b)/2+b)}return a};diff_match_patch.prototype.diff_commonOverlap_=function(b,a){var g=b.length;var e=a.length;if(g==0||e==0){return 0}if(g>e){b=b.substring(g-e)}else{if(g<e){a=a.substring(0,g)}}var h=Math.min(g,e);if(b==a){return h}var d=0;var c=1;while(true){var f=b.substring(h-c);varLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
(function(){var b,a=[].slice;b=(function(){var h,g,e,j,f,d,c;c=function(k){return(k.charAt(0)).toUpperCase()+k.substring(1)};j=function(k){return k.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")};f=function(t,k,s){var q,o,n,r,p,m;if(t instanceof Array){if(k instanceof Array){for(q=o=0,r=t.length;o<r;q=++o){m=t[q];s=f(m,k[q],s)}}else{for(n=0,p=t.length;n<p;n++){m=t[n];s=f(m,k,s)}}}else{t=j(t);s=s.replace(new RegExp(t,"g"),k)}return s};e=function(k){return k.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};d=function(p,n){var q,m,k,o,l;if(n==null){n=null}if(n!=null){l="";for(m=k=0,o=n.length-1;0<=o?k<=o:k>=o;m=0<=o?++k:--k){q=n[m];q=j(q);l+=q}l="["+l+"]*";return p.replace(new RegExp("^"+l),"").replace(new RegExp(l+"$"),"")}else{return p.replace(/^\s*/,"").replace(/\s*$/,"")}};h=function(n){var q,p,o,m,l;l=[];if(n instanceof Array){for(o=p=0,m=n.length;p<m;o=++p){q=n[o];l.push(o)}}else{for(o in n){l.push(o)}}return l};g=function(m){var p,o,l,k,n;k=[];if(m instanceof Array){for(o=0,l=m.length;o<l;o++){n=m[o];k.push(n)}}else{for(p in m){n=m[p];k.push(n)}}return k};function i(){this.commonWhiteList="kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small";this.specialWhiteList={table:"table|tbody|thead|tfoot|tr|td|th"};this.hooks={}}i.prototype.makeHtml=function(l){var k;this.footnotes=[];this.definitions={};this.holders={};this.uniqid=(Math.ceil(Math.random()*10000000))+(Math.ceil(Math.random()*10000000));this.id=0;l=this.initText(l);k=this.parse(l);k=this.makeFootnotes(k);return this.call("makeHtml",k)};i.prototype.hook=function(l,k){if(this.hooks[l]==null){this.hooks[l]=[]}return this.hooks[l].push(k)};i.prototype.makeHolder=function(l){var k;k="|\r"+this.uniqid+this.id+"\r|";this.id+=1;this.holders[k]=l;return k};i.prototype.initText=function(k){return k.replace(/\t/g," ").replace(/\r/g,"")};i.prototype.makeFootnotes=function(l){var k,m;if(this.footnotes.length>0){l+='<div class="footnotes"><hr><ol>';k=1;while(m=this.footnotes.shift()){if(typeof m==="string"){m+=' <a href="#fnref-'+k+'" class="footnote-backref">↩</a>'}else{m[m.length-1]+=' <a href="#fnref-'+k+'" class="footnote-backref">↩</a>';m=m.length>1?this.parse(m.join("\n")):this.parseInline(m[0])}l+='<li id="fn-'+k+'">'+m+"</li>";k+=1}l+="</ol></div>"}return l};i.prototype.parse=function(v){var n,l,o,q,r,p,s,x,k,w,m,t,u;x=[];l=this.parseBlock(v,x);r="";for(p=0,s=l.length;p<s;p++){n=l[p];t=n[0],m=n[1],o=n[2],u=n[3];q=x.slice(m,o+1);k="parse"+c(t);q=this.call("before"+c(k),q,u);w=this[k](q,u);w=this.call("after"+c(k),w,u);r+=w}return r};i.prototype.call=function(){var m,q,l,k,o,n,p;n=arguments[0],m=2<=arguments.length?a.call(arguments,1):[];p=m[0];if(this.hooks[n]==null){return p}o=this.hooks[n];for(l=0,k=o.length;l<k;l++){q=o[l];p=q.apply(this,m);m[0]=p}return p};i.prototype.releaseHolder=function(m,k){var l;if(k==null){k=true}l=0;while((m.indexOf("\r"))>=0&&l<10){m=f(h(this.holders),g(this.holders),m);l+=1}if(k){this.holders={}}return m};i.prototype.parseInline=function(m,l,k,n){if(l==null){l=""}if(k==null){k=true}if(n==null){n=true}m=this.call("beforeParseInline",m);m=m.replace(/(^|[^\\])(`+)(.+?)\2/mg,(function(o){return function(){var p;p=1<=arguments.length?a.call(arguments,0):[];return p[1]+o.makeHolder("<code>"+(e(p[3]))+"</code>")}})(this));m=m.replace(/\\(.)/g,(function(o){return function(){var q,p;p=1<=arguments.length?a.call(arguments,0):[];q=e(p[1]);q=q.replace(/\$/g,"$");return o.makeHolder(q)}})(this));m=m.replace(/<(https?:\/\/.+)>/ig,(function(o){return function(){var q,r,p;r=1<=arguments.length?a.call(arguments,0):[];p=o.cleanUrl(r[1]);q=o.call("parseLink",r[1]);return o.makeHolder('<a href="'+p+'">'+q+"</a>")}})(this));m=m.replace(/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/ig,(function(o){return function(){var p;p=1<=arguments.length?a.call(arguments,0):[];if((("|"+o.commonWhiteList+"|"+l+"|").indexOf("|"+p[2].toLowerCase()+"|"))>=0){return o.makeHolder(p[0])}else{return e(p[0])}}})(this));m=f(["<",">"],["<",">"],m);m=m.replace(/\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,(function(o){return function(){var q,p;p=1<=arguments.length?a.call(arguments,0):[];q=o.footnotes.indexOf(p[1]);if(q<0){q=o.footnotes.length+1;o.footnotes.push(o.parseInline(p[1],"",false))}return o.makeHolder('<sup id="fnref-'+q+'"><a href="#fn-'+q+'" class="footnote-ref">'+q+"</a></sup>")}})(this));m=m.replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(function(o){return function(){var r,q,p;q=1<=arguments.length?a.call(arguments,0):[];r=o.escapeBracket(q[1]);p=o.escapeBracket(q[2]);p=o.cleanUrl(p);return o.makeHolder('<img src="'+p+'" alt="'+r+'" title="'+r+'">')}})(this));m=m.replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,(function(o){return function(){var r,q,p;q=1<=arguments.length?a.call(arguments,0):[];r=o.escapeBracket(q[1]);p=o.definitions[q[2]]!=null?'<img src="'+o.definitions[q[2]]+'" alt="'+r+'" title="'+r+'">':r;return o.makeHolder(p)}})(this));m=m.replace(/\[((?:[^\]]|\\\]|Line truncated
|
||||
@@ -0,0 +1,16 @@
|
||||
/* jQuery UI - v1.10.3 - 2013-10-16
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.datepicker.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-highlight.js
|
||||
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
||||
(function(b,f){var a=0,e=/^ui-id-\d+$/;b.ui=b.ui||{};b.extend(b.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});b.fn.extend({focus:(function(g){return function(h,i){return typeof h==="number"?this.each(function(){var j=this;setTimeout(function(){b(j).focus();if(i){i.call(j)}},h)}):g.apply(this,arguments)}})(b.fn.focus),scrollParent:function(){var g;if((b.ui.ie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){g=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.css(this,"position"))&&(/(auto|scroll)/).test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0)}else{g=this.parents().filter(function(){return(/(auto|scroll)/).test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0)}return(/fixed/).test(this.css("position"))||!g.length?b(document):g},zIndex:function(j){if(j!==f){return this.css("zIndex",j)}if(this.length){var h=b(this[0]),g,i;while(h.length&&h[0]!==document){g=h.css("position");if(g==="absolute"||g==="relative"||g==="fixed"){i=parseInt(h.css("zIndex"),10);if(!isNaN(i)&&i!==0){return i}}h=h.parent()}}return 0},uniqueId:function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++a)}})},removeUniqueId:function(){return this.each(function(){if(e.test(this.id)){b(this).removeAttr("id")}})}});function d(i,g){var k,j,h,l=i.nodeName.toLowerCase();if("area"===l){k=i.parentNode;j=k.name;if(!i.href||!j||k.nodeName.toLowerCase()!=="map"){return false}h=b("img[usemap=#"+j+"]")[0];return !!h&&c(h)}return(/input|select|textarea|button|object/.test(l)?!i.disabled:"a"===l?i.href||g:g)&&c(i)}function c(g){return b.expr.filters.visible(g)&&!b(g).parents().addBack().filter(function(){return b.css(this,"visibility")==="hidden"}).length}b.extend(b.expr[":"],{data:b.expr.createPseudo?b.expr.createPseudo(function(g){return function(h){return !!b.data(h,g)}}):function(j,h,g){return !!b.data(j,g[3])},focusable:function(g){return d(g,!isNaN(b.attr(g,"tabindex")))},tabbable:function(i){var g=b.attr(i,"tabindex"),h=isNaN(g);return(h||g>=0)&&d(i,!h)}});if(!b("<a>").outerWidth(1).jquery){b.each(["Width","Height"],function(j,g){var h=g==="Width"?["Left","Right"]:["Top","Bottom"],k=g.toLowerCase(),m={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};function l(o,n,i,p){b.each(h,function(){n-=parseFloat(b.css(o,"padding"+this))||0;if(i){n-=parseFloat(b.css(o,"border"+this+"Width"))||0}if(p){n-=parseFloat(b.css(o,"margin"+this))||0}});return n}b.fn["inner"+g]=function(i){if(i===f){return m["inner"+g].call(this)}return this.each(function(){b(this).css(k,l(this,i)+"px")})};b.fn["outer"+g]=function(i,n){if(typeof i!=="number"){return m["outer"+g].call(this,i)}return this.each(function(){b(this).css(k,l(this,i,true,n)+"px")})}})}if(!b.fn.addBack){b.fn.addBack=function(g){return this.add(g==null?this.prevObject:this.prevObject.filter(g))}}if(b("<a>").data("a-b","a").removeData("a-b").data("a-b")){b.fn.removeData=(function(g){return function(h){if(arguments.length){return g.call(this,b.camelCase(h))}else{return g.call(this)}}})(b.fn.removeData)}b.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());b.support.selectstart="onselectstart" in document.createElement("div");b.fn.extend({disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.extend(b.ui,{plugin:{add:function(h,j,l){var g,k=b.ui[h].prototype;for(g in l){k.plugins[g]=k.plugins[g]||[];k.plugins[g].push([j,l[g]])}},call:function(g,j,h){var k,l=g.plugins[j];if(!l||!g.element[0].parentNode||g.element[0].parentNode.nodeType===11){return}for(k=0;k<l.length;k++){if(g.options[l[k][0]]){l[k][1].apply(g.element,h)}}}},hasScroll:function(j,h){if(b(j).css("overflow")==="hidden"){return false}var g=(h&&h==="left")?"scrollLeft":"scrollTop",i=false;if(j[g]>0){return true}j[g]=1;i=(j[g]>0);j[g]=0;return i}})})(jQuery);(function(b,e){var a=0,d=Array.prototype.slice,c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)};b.widget=function(f,g,n){var k,l,i,m,h={},j=f.split(".")[0];f=f.split(".")[1];k=j+"-"+f;if(!n){n=g;g=b.Widget}b.expr[":"][k.toLowerCase()]=function(o){return !!b.data(o,k)};b[j]=b[j]||{};l=b[j][f];i=b[j][f]=function(o,p){if(!this._createWidget){return new i(o,p)}if(arguments.length){this._createWidget(o,p)}};b.extend(i,l,{version:n.version,_proto:b.extend({},n),_childConstructors:[]});m=new g();m.options=b.widget.extend({},m.options);b.each(n,function(p,o){if(!b.isFunction(o)){h[p]=o;return}h[p]=(funcLine truncated
|
||||
/*
|
||||
* jQuery Color Animations v2.1.2
|
||||
* https://github.com/jquery/jquery-color
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: Wed Jan 16 08:47:09 2013 -0600
|
||||
*/
|
||||
(function(r,g){var n="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",k=/^([\-+])=\s*(\d+\.?\d*)/,j=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1],s[2],s[3],s[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1]*2.55,s[2]*2.55,s[3]*2.55,s[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(s){return[s[1],s[2]/100,s[3]/100,s[4]]}}],h=r.Color=function(t,u,s,v){return new r.Color.fn.parse(t,u,s,v)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},q={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},p=h.support={},e=r("<p>")[0],d,o=r.each;e.style.cssText="background-color:rgba(1,1,1,.5)";p.rgba=e.style.backgroundColor.indexOf("rgba")>-1;o(m,function(s,t){t.cache="_"+s;t.props.alpha={idx:3,type:"percent",def:1}});function l(t,v,u){var s=q[v.type]||{};if(t==null){return(u||!v.def)?null:v.def}t=s.floor?~~t:parseFloat(t);if(isNaN(t)){return v.def}if(s.mod){return(t+s.mod)%s.mod}return 0>t?0:s.max<t?s.max:t}function i(s){var u=h(),t=u._rgba=[];s=s.toLowerCase();o(j,function(z,A){var x,y=A.re.exec(s),w=y&&A.parse(y),v=A.space||"rgba";if(w){x=u[v](w);u[m[v].cache]=x[m[v].cache];t=u._rgba=x._rgba;return false}});if(t.length){if(t.join()==="0,0,0,0"){r.extend(t,d.transparent)}return u}return d[s]}h.fn=r.extend(h.prototype,{parse:function(y,w,s,x){if(y===g){this._rgba=[null,null,null,null];return this}if(y.jquery||y.nodeType){y=r(y).css(w);w=g}var v=this,u=r.type(y),t=this._rgba=[];if(w!==g){y=[y,w,s,x];u="array"}if(u==="string"){return this.parse(i(y)||d._default)}if(u==="array"){o(m.rgba.props,function(z,A){t[A.idx]=l(y[A.idx],A)});return this}if(u==="object"){if(y instanceof h){o(m,function(z,A){if(y[A.cache]){v[A.cache]=y[A.cache].slice()}})}else{o(m,function(A,B){var z=B.cache;o(B.props,function(C,D){if(!v[z]&&B.to){if(C==="alpha"||y[C]==null){return}v[z]=B.to(v._rgba)}v[z][D.idx]=l(y[C],D,true)});if(v[z]&&r.inArray(null,v[z].slice(0,3))<0){v[z][3]=1;if(B.from){v._rgba=B.from(v[z])}}})}return this}},is:function(u){var s=h(u),v=true,t=this;o(m,function(w,y){var z,x=s[y.cache];if(x){z=t[y.cache]||y.to&&y.to(t._rgba)||[];o(y.props,function(A,B){if(x[B.idx]!=null){v=(x[B.idx]===z[B.idx]);return v}})}return v});return v},_space:function(){var s=[],t=this;o(m,function(u,v){if(t[v.cache]){s.push(u)}});return s.pop()},transition:function(t,z){var u=h(t),v=u._space(),w=m[v],x=this.alpha()===0?h("transparent"):this,y=x[w.cache]||w.to(x._rgba),s=y.slice();u=u[w.cache];o(w.props,function(D,F){var C=F.idx,B=y[C],A=u[C],E=q[F.type]||{};if(A===null){return}if(B===null){s[C]=A}else{if(E.mod){if(A-B>E.mod/2){B+=E.mod}else{if(B-A>E.mod/2){B-=E.mod}}}s[C]=l((A-B)*z+B,F)}});return this[v](s)},blend:function(v){if(this._rgba[3]===1){return this}var u=this._rgba.slice(),t=u.pop(),s=h(v)._rgba;return h(r.map(u,function(w,x){return(1-t)*s[x]+t*w}))},toRgbaString:function(){var t="rgba(",s=r.map(this._rgba,function(u,w){return u==null?(w>2?1:0):u});if(s[3]===1){s.pop();t="rgb("}return t+s.join()+")"},toHslaString:function(){var t="hsla(",s=r.map(this.hsla(),function(u,w){if(u==null){u=w>2?1:0}if(w&&w<3){u=Math.round(u*100)+"%"}return u});if(s[3]===1){s.pop();t="hsl("}return t+s.join()+")"},toHexString:function(s){var t=this._rgba.slice(),u=t.pop();if(s){t.push(~~(u*255))}return"#"+r.map(t,function(w){w=(w||0).toString(16);return w.length===1?"0"+w:w}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;function f(u,t,s){s=(s+1)%1;if(s*6<1){return u+(t-u)*s*6}if(s*2<1){return t}if(s*3<2){return u+(t-u)*((2/3)-s)*6}return u}m.hsla.to=function(v){if(v[0]==null||v[1]==null||v[2]==null){return[null,null,null,v[3]]}var t=v[0]/255,y=v[1]/255,z=v[2]/255,B=v[3],A=Math.max(t,y,z),w=Math.min(t,y,z),C=A-w,D=A+w,u=D*0.5,x,E;if(w===A){x=0}else{if(t===A){x=(60*(y-z)/C)+360}else{if(y===A){x=(60*(z-t)/C)+120}else{x=(60*(t-y)/C)+240}}}if(C===0){E=0}else{if(u<=0.5){E=C/D}else{E=C/(2-D)}}return[Math.round(x)%360,E,u,B==null?1:B]};m.hsla.from=function(x){if(x[0]==null||x[1]==null||x[2]==null){return[null,null,null,x[3]]}var w=x[0]/360,v=x[1],u=x[2],t=x[3],y=u<=0.5?u*(1+v):u+v-u*v,z=2*u-y;return[Math.round(f(z,y,w+(1/3))*255),Math.round(f(z,y,w)*255),Math.round(f(z,y,w-(1/3))*255),t]};o(m,functionLine truncated
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* jQuery JavaScript Library v2.1.1-rc2
|
||||
* http://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* http://sizzlejs.com/
|
||||
*
|
||||
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-04-21T20:27Z
|
||||
*/
|
||||
(function(b,a){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=b.document?a(b,true):function(c){if(!c.document){throw new Error("jQuery requires a window with a document")}return a(c)}}else{a(b)}}(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var document=window.document,version="2.1.1-rc2",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?(num<0?this[num+this.length]:this[num]):slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jQuery.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray,isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){return !jQuery.isArray(obj)&&obj-parseFloat(obj)>=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i<length;i++){value=callback.apply(obj[i],args);if(value===false){break}}}else{for(i in obj){value=callback.apply(obj[i],args);if(value===false){break}}}}else{if(isArray){for(;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}else{for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}}return obj},trim:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArraylike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray){for(;i<length;i++){vaLine truncated
|
||||
/*
|
||||
* Sizzle CSS Selector Engine v1.10.19
|
||||
* http://sizzlejs.com/
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation, Inc. and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2014-04-18
|
||||
*/
|
||||
(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-(new Date()),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},strundefined=typeof undefined,MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){var i=0,len=this.length;for(;i<len;i++){if(this[i]===elem){return i}}return -1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];if(!selector||typeof selector!=="string"){return results}if((nodeType=context.nodeType)!==1&&nodeType!==9){return[]}if(documentIsHTML&&!seed){if((match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else{if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else{if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType===9&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if((old=context.getAttribute("id"))){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return(cache[key+" "]=value)}return cache}function markFunction(fn){fn[expando]=tLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
var MXI_DEBUG=true;(function(b,g){var d={};function c(m,n){var l,j=[];for(var k=0;k<m.length;++k){l=d[m[k]]||e(m[k]);if(!l){throw"module definition dependecy not found: "+m[k]}j.push(l)}n.apply(null,j)}function h(k,j,i){if(typeof k!=="string"){throw"invalid module definition, module id must be defined and be a string"}if(j===g){throw"invalid module definition, dependencies must be specified"}if(i===g){throw"invalid module definition, definition function must be specified"}c(j,function(){d[k]=i.apply(null,arguments)})}function f(i){return !!d[i]}function e(l){var j=b;var i=l.split(/[.\/]/);for(var k=0;k<i.length;++k){if(!j[i[k]]){return}j=j[i[k]]}return j}function a(l){for(var k=0;k<l.length;k++){var m=b;var o=l[k];var j=o.split(/[.\/]/);for(var n=0;n<j.length-1;++n){if(m[j[n]]===g){m[j[n]]={}}m=m[j[n]]}m[j[j.length-1]]=d[o]}}h("moxie/core/utils/Basic",[],function(){var s=function(x){var w;if(x===w){return"undefined"}else{if(x===null){return"null"}else{if(x.nodeType){return"node"}}}return({}).toString.call(x).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};var n=function(x){var w;q(arguments,function(y,z){if(z>0){q(y,function(B,A){if(B!==w){if(s(x[A])===s(B)&&!!~v(s(B),["array","object"])){n(x[A],B)}else{x[A]=B}}})}});return x};var q=function(A,B){var z,x,w,y;if(A){if(s(A.length)==="number"){for(w=0,z=A.length;w<z;w++){if(B(A[w],w)===false){return}}}else{if(s(A)==="object"){for(x in A){if(A.hasOwnProperty(x)){if(B(A[x],x)===false){return}}}}}}};var t=function(w){var x;if(!w||s(w)!=="object"){return true}for(x in w){return false}return true};var l=function(x,w){var y=0,z=x.length;if(s(w)!=="function"){w=function(){}}if(!x||!x.length){w()}function A(B){if(s(x[B])==="function"){x[B](function(C){++B<z&&!C?A(B):w(C)})}}A(y)};var i=function(x,w){var z=0,y=x.length,A=new Array(y);q(x,function(C,B){C(function(E){if(E){return w(E)}var D=[].slice.call(arguments);D.shift();A[B]=D;z++;if(z===y){A.unshift(null);w.apply(this,A)}})})};var v=function(y,z){if(z){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(z,y)}for(var w=0,x=z.length;w<x;w++){if(z[w]===y){return w}}}return -1};var r=function(x,z){var y=[];if(s(x)!=="array"){x=[x]}if(s(z)!=="array"){z=[z]}for(var w in x){if(v(x[w],z)===-1){y.push(x[w])}}return y.length?y:false};var u=function(y,x){var w=[];q(y,function(z){if(v(z,x)!==-1){w.push(z)}});return w.length?w:null};var m=function(y){var x,w=[];for(x=0;x<y.length;x++){w[x]=y[x]}return w};var p=(function(){var w=0;return function(z){var x=new Date().getTime().toString(32),y;for(y=0;y<5;y++){x+=Math.floor(Math.random()*65535).toString(32)}return(z||"o_")+x+(w++).toString(32)}}());var j=function(w){if(!w){return w}return String.prototype.trim?String.prototype.trim.call(w):w.toString().replace(/^\s*/,"").replace(/\s*$/,"")};var k=function(w){if(typeof(w)!=="string"){return w}var y={t:1099511627776,g:1073741824,m:1048576,k:1024},x;w=/^([0-9\.]+)([tmgk]?)$/.exec(w.toLowerCase().replace(/[^0-9\.tmkg]/g,""));x=w[2];w=+w[1];if(y.hasOwnProperty(x)){w*=y[x]}return Math.floor(w)};var o=function(x){var w=[].slice.call(arguments,1);return x.replace(/%[a-z]/g,function(){var y=w.shift();return s(y)!=="undefined"?y:""})};return{guid:p,typeOf:s,extend:n,each:q,isEmptyObj:t,inSeries:l,inParallel:i,inArray:v,arrayDiff:r,arrayIntersect:u,toArray:m,trim:j,sprintf:o,parseSizeStr:k}});h("moxie/core/utils/Env",["moxie/core/utils/Basic"],function(m){var k=(function(s){var I="",H="?",C="function",u="undefined",q="object",r="major",D="model",t="name",z="type",x="vendor",F="version",o="architecture",v="console",B="mobile",G="tablet";var p={has:function(K,J){return J.toLowerCase().indexOf(K.toLowerCase())!==-1},lowerize:function(J){return J.toLowerCase()}};var E={rgx:function(){for(var T,N=0,M,L,K,J,O,P,Q=arguments;N<Q.length;N+=2){var S=Q[N],R=Q[N+1];if(typeof(T)===u){T={};for(K in R){J=R[K];if(typeof(J)===q){T[J[0]]=s}else{T[J]=s}}}for(M=L=0;M<S.length;M++){O=S[M].exec(this.getUA());if(!!O){for(K=0;K<R.length;K++){P=O[++L];J=R[K];if(typeof(J)===q&&J.length>0){if(J.length==2){if(typeof(J[1])==C){T[J[0]]=J[1].call(this,P)}else{T[J[0]]=J[1]}}else{if(J.length==3){if(typeof(J[1])===C&&!(J[1].exec&&J[1].test)){T[J[0]]=P?J[1].call(this,P,J[2]):s}else{T[J[0]]=P?P.replace(J[1],J[2]):s}}else{if(J.length==4){T[J[0]]=P?J[3].call(this,P.replace(J[1],J[2])):s}}}}else{T[J]=P?P:s}}break}}if(!!O){break}}return T},str:function(M,L){for(var K in L){if(typeof(L[K])===q&&L[K].length>0){for(var J=0;J<L[K].length;J++){if(p.has(L[K][J],M)){return(K===H)?s:K}}}else{if(p.has(L[K],M)){return(K===H)?s:K}}}return M}};var A={browser:{oldsafari:{major:{"1":["/8","/1","/3"],"2":"/4","?":"/"},version:{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0","2000":"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0","7":"NT 6.1","8":"NT 6.2","8.1":"NT 6.3",RT:"ARM"}}}};var y=Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
(function(){var a=new RegExp(["^(<\\/?(a|abbr|acronym|applet|area|b|basefont|","bdo|big|button|cite|code|del|dfn|em|figcaption|","font|i|iframe|img|input|ins|kbd|label|map|","mark|meter|object|param|progress|q|ruby|rp|rt|s|","samp|script|select|small|span|strike|strong|","sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|","<(br)\\s?\\/?>)$"].join(""),"i");if(!Array.indexOf){Array.prototype.indexOf=function(v){for(var u=0;u<this.length;u++){if(this[u]==v){return u}}return -1}}function m(u){return u.replace(/^\s+|\s+$/g,"")}function c(u){return u.replace(/\s+$/g,"")}function h(u){return u.replace(new RegExp("^(\\t|[ ]{1,4})","gm"),"")}function g(v,u){return v.indexOf(u)!=-1}function d(u,v){return u.replace(/<[^>]*>?/gi,function(w){return w.match(v)?w:""})}function b(u,B){var A={};for(var z=0;z<u.length;z++){A[u[z]]=u[z]}for(z=0;z<B.length;z++){A[B[z]]=B[z]}var w=[];for(var v in A){if(A.hasOwnProperty(v)){w.push(A[v])}}return w}function p(u){if(u.charAt(0)!="\x02"){u="\x02"+u}if(u.charAt(u.length-1)!="\x03"){u=u+"\x03"}return u}function k(u){if(u.charAt(0)=="\x02"){u=u.substr(1)}if(u.charAt(u.length-1)=="\x03"){u=u.substr(0,u.length-1)}return u}function t(v,u){return d(j(v,u),a)}function j(w,v){var u=v.blockGamutHookCallback(w);u=l(u);u=u.replace(/~D/g,"$$").replace(/~T/g,"~");u=v.previousPostConversion(u);return u}function r(u){return u.replace(/\\\|/g,"~I").replace(/\\:/g,"~i")}function q(u){return u.replace(/~I/g,"|").replace(/~i/g,":")}function l(u){u=u.replace(/~E(\d+)E/g,function(v,x){var w=parseInt(x);return String.fromCharCode(w)});return u}function i(u){return u.toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}Markdown.Extra=function(){this.converter=null;this.hashBlocks=[];this.footnotes={};this.usedFootnotes=[];this.attributeBlocks=false;this.googleCodePrettify=false;this.highlightJs=false;this.tableClass="";this.tabWidth=4};Markdown.Extra.init=function(y,w){var u=new Markdown.Extra();var A=[];var x=[];var z=[];var v=["unHashExtraBlocks"];w=w||{};w.extensions=w.extensions||["all"];if(g(w.extensions,"all")){w.extensions=["tables","fenced_code_gfm","def_list","attr_list","footnotes","smartypants","strikethrough","newlines"]}x.push("wrapHeaders");if(g(w.extensions,"attr_list")){A.push("hashFcbAttributeBlocks");x.push("hashHeaderAttributeBlocks");v.push("applyAttributeBlocks");u.attributeBlocks=true}if(g(w.extensions,"fenced_code_gfm")){x.push("fencedCodeBlocks");A.push("fencedCodeBlocks")}if(g(w.extensions,"tables")){x.push("tables")}if(g(w.extensions,"def_list")){x.push("definitionLists")}if(g(w.extensions,"footnotes")){A.push("stripFootnoteDefinitions");x.push("doFootnotes");v.push("printFootnotes")}if(g(w.extensions,"smartypants")){v.push("runSmartyPants")}if(g(w.extensions,"strikethrough")){z.push("strikethrough")}if(g(w.extensions,"newlines")){z.push("newlines")}y.hooks.chain("postNormalization",function(B){return u.doTransform(A,B)+"\n"});y.hooks.chain("preBlockGamut",function(C,B){u.blockGamutHookCallback=B;C=r(C);C=u.doTransform(x,C)+"\n";C=q(C);return C});y.hooks.chain("postSpanGamut",function(B){return u.doTransform(z,B)});u.previousPostConversion=y.hooks.postConversion;y.hooks.chain("postConversion",function(B){B=u.doTransform(v,B);u.hashBlocks=[];u.footnotes={};u.usedFootnotes=[];return B});if("highlighter" in w){u.googleCodePrettify=w.highlighter==="prettify";u.highlightJs=w.highlighter==="highlight"}if("table_class" in w){u.tableClass=w.table_class}u.converter=y;return u};Markdown.Extra.prototype.doTransform=function(u,w){for(var v=0;v<u.length;v++){w=this[u[v]](w)}return w};Markdown.Extra.prototype.hashExtraBlock=function(u){return"\n<p>~X"+(this.hashBlocks.push(u)-1)+"X</p>\n"};Markdown.Extra.prototype.hashExtraInline=function(u){return"~X"+(this.hashBlocks.push(u)-1)+"X"};Markdown.Extra.prototype.unHashExtraBlocks=function(w){var v=this;function u(){var x=false;w=w.replace(/(?:<p>)?~X(\d+)X(?:<\/p>)?/g,function(y,z){x=true;var A=parseInt(z,10);return v.hashBlocks[A]});if(x===true){u()}}u();return w};Markdown.Extra.prototype.wrapHeaders=function(v){function u(w){return"\n"+w+"\n"}v=v.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm,u);v=v.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm,u);v=v.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm,u);return v};var e="\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}";var o=new RegExp("^(#{1,6}.*#{0,6})[ \\t]+"+e+"[ \\t]*(?:\\n|0x03)","gm");var n=new RegExp("^(.*)[ \\t]+"+e+"[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))","gm");var f=new RegExp("^(```[ \\t]*[^{\\s]*)[ \\t]+"+e+"[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))","gm");Markdown.Extra.prototype.hashHeaderAttributeBlocks=function(w){var v=this;function u(y,z,x){return"<p>~XX"+(v.hashBlocks.push(x)-1)+"XX</p>\n"+z+"\n"}w=w.replace(o,u);w=w.replace(n,u);return w};Markdown.Extra.prototype.hashFcbAttributeBlocks=function(w){var v=this;function u(y,z,x){return"<p>~XX"+(v.hashBlocks.push(x)-1)+"XX</p>\n"+z+"\n"}return w.replace(f,u)};Markdown.Extra.prototype.applyAttributLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
var Markdown;if(typeof exports==="object"&&typeof require==="function"){Markdown=exports}else{Markdown={}}(function(){function c(e){return e}function d(e){return false}function b(){}b.prototype={chain:function(g,f){var e=this[g];if(!e){throw new Error("unknown hook "+g)}if(e===c){this[g]=f}else{this[g]=function(i){var h=Array.prototype.slice.call(arguments,0);h[0]=e.apply(null,h);return f.apply(null,h)}}},set:function(f,e){if(!this[f]){throw new Error("unknown hook "+f)}this[f]=e},addNoop:function(e){this[e]=c},addFalse:function(e){this[e]=d}};Markdown.HookCollection=b;function a(){}a.prototype={set:function(e,f){this["s_"+e]=f},get:function(e){return this["s_"+e]}};Markdown.Converter=function(Y){var l=this.hooks=new b();l.addNoop("plainLinkText");l.addNoop("preConversion");l.addNoop("postNormalization");l.addNoop("preBlockGamut");l.addNoop("postBlockGamut");l.addNoop("preSpanGamut");l.addNoop("postSpanGamut");l.addNoop("postConversion");var B;var q;var e;var F;Y=Y||{};var W=c,r=c;if(Y.nonAsciiLetters){(function(){var ac=/[Q\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376-\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0523\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0621-\u064a\u0660-\u0669\u066e-\u066f\u0671-\u06d3\u06d5\u06e5-\u06e6\u06ee-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07c0-\u07ea\u07f4-\u07f5\u07fa\u0904-\u0939\u093d\u0950\u0958-\u0961\u0966-\u096f\u0971-\u0972\u097b-\u097f\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc-\u09dd\u09df-\u09e1\u09e6-\u09f1\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a66-\u0a6f\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0-\u0ae1\u0ae6-\u0aef\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b35-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b66-\u0b6f\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0be6-\u0bef\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58-\u0c59\u0c60-\u0c61\u0c66-\u0c6f\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0-\u0ce1\u0ce6-\u0cef\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d3d\u0d60-\u0d61\u0d66-\u0d6f\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e46\u0e50-\u0e59\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0ed0-\u0ed9\u0edc-\u0edd\u0f00\u0f20-\u0f29\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f-\u1049\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u1090-\u1099\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1159\u115f-\u11a2\u11a8-\u11f9\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u17e0-\u17e9\u1810-\u1819\u1820-\u1877\u1880-\u18a8\u18aa\u1900-\u191c\u1946-\u196d\u1970-\u1974\u1980-\u19a9\u19c1-\u19c7\u19d0-\u19d9\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b50-\u1b59\u1b83-\u1ba0\u1bae-\u1bb9\u1c00-\u1c23\u1c40-\u1c49\u1c4d-\u1c7d\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u203f-\u2040\u2054\u2071\u207f\u2090-\u2094\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2183-\u2184\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2c6f\u2c71-\u2c7d\u2c80-\u2ce4\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3006\u3031-\u3035\u303b-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fc3\ua000-\ua48c\ua500-\ua60c\ua610-\ua62b\ua640-\ua65f\ua662-\ua66e\ua67f-\ua697\ua717-\ua71f\ua722-\ua788\ua78b-\ua78c\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8d0-\ua8d9\ua900-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa50-\uaa59\uac00-\ud7a3\uf900-\ufa2d\ufa30-\ufa6a\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe33-\ufe34\ufe4d-\ufe4f\ufe70-Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
(function(f,h,e){var d=f.setTimeout,g={};function a(j){var i=j.required_features,k={};function l(n,o,m){var p={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};if(p[n]){k[p[n]]=o}else{if(!m){k[n]=o}}}if(typeof(i)==="string"){c.each(i.split(/\s*,\s*/),function(m){l(m,true)})}else{if(typeof(i)==="object"){c.each(i,function(n,m){l(m,n)})}else{if(i===true){if(j.chunk_size>0){k.slice_blob=true}if(j.resize.enabled||!j.multipart){k.send_binary_string=true}c.each(j,function(n,m){l(m,!!n,true)})}}}return k}var c={VERSION:"2.1.8",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:h.mimes,ua:h.ua,typeOf:h.typeOf,extend:h.extend,guid:h.guid,get:function b(m){var k=[],l;if(h.typeOf(m)!=="array"){m=[m]}var j=m.length;while(j--){l=h.get(m[j]);if(l){k.push(l)}}return k.length?k:null},each:h.each,getPos:h.getPos,getSize:h.getSize,xmlEncode:function(j){var k={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g;return j?(""+j).replace(i,function(l){return k[l]?"&"+k[l]+";":l}):j},toArray:h.toArray,inArray:h.inArray,addI18n:h.addI18n,translate:h.translate,isEmptyObj:h.isEmptyObj,hasClass:h.hasClass,addClass:h.addClass,removeClass:h.removeClass,getStyle:h.getStyle,addEvent:h.addEvent,removeEvent:h.removeEvent,removeAllEvents:h.removeAllEvents,cleanName:function(j){var k,l;l=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(k=0;k<l.length;k+=2){j=j.replace(l[k],l[k+1])}j=j.replace(/\s+/g,"_");j=j.replace(/[^a-z0-9_\-\.]+/gi,"");return j},buildUrl:function(j,i){var k="";c.each(i,function(m,l){k+=(k?"&":"")+encodeURIComponent(l)+"="+encodeURIComponent(m)});if(k){j+=(j.indexOf("?")>0?"&":"?")+k}return j},formatSize:function(j){if(j===e||/\D/.test(j)){return c.translate("N/A")}function i(m,l){return Math.round(m*Math.pow(10,l))/Math.pow(10,l)}var k=Math.pow(1024,4);if(j>k){return i(j/k,1)+" "+c.translate("tb")}if(j>(k/=1024)){return i(j/k,1)+" "+c.translate("gb")}if(j>(k/=1024)){return i(j/k,1)+" "+c.translate("mb")}if(j>1024){return Math.round(j/1024)+" "+c.translate("kb")}return j+" "+c.translate("b")},parseSize:h.parseSizeStr,predictRuntime:function(k,j){var i,l;i=new c.Uploader(k);l=h.Runtime.thatCan(i.getOption().required_features,j||k.runtimes);i.destroy();return l},addFileFilter:function(j,i){g[j]=i}};c.addFileFilter("mime_types",function(k,j,i){if(k.length&&!k.regexp.test(j.name)){this.trigger("Error",{code:c.FILE_EXTENSION_ERROR,message:c.translate("File extension error."),file:j});i(false)}else{i(true)}});c.addFileFilter("max_file_size",function(l,j,i){var k;l=c.parseSize(l);if(j.size!==k&&l&&j.size>l){this.trigger("Error",{code:c.FILE_SIZE_ERROR,message:c.translate("File size error."),file:j});i(false)}else{i(true)}});c.addFileFilter("prevent_duplicates",function(l,j,i){if(l){var k=this.files.length;while(k--){if(j.name===this.files[k].name&&j.size===this.files[k].size){this.trigger("Error",{code:c.FILE_DUPLICATE_ERROR,message:c.translate("Duplicate file error."),file:j});i(false);return}}}i(true)});c.Uploader=function(l){var t=c.guid(),G,p=[],x={},F=[],w=[],C,J,n=false,v;function I(){var L,M=0,K;if(this.state==c.STARTED){for(K=0;K<p.length;K++){if(!L&&p[K].status==c.QUEUED){L=p[K];if(this.trigger("BeforeUpload",L)){L.status=c.UPLOADING;this.trigger("UploadFile",L)}}else{M++}}if(M==p.length){if(this.state!==c.STOPPED){this.state=c.STOPPED;this.trigger("StateChanged")}this.trigger("UploadComplete",p)}}}function k(K){K.percent=K.size>0?Math.ceil(K.loaded/K.size*100):100;j()}function j(){var L,K;J.reset();for(L=0;L<p.length;L++){K=p[L];if(K.size!==e){J.size+=K.origSize;J.loaded+=K.loaded*K.origSize/K.size}else{J.size=e}if(K.status==c.DONE){J.uploaded++}else{if(K.status==c.FAILED){J.failed++}else{J.queued++}}}if(J.size===e){J.percent=p.length>0?Math.ceil(J.uploaded/p.length*100):0}else{J.bytesPerSec=Math.ceil(J.loaded/((+new Date()-C||1)/1000));J.percent=J.size>0?Math.ceil(J.loaded/J.size*100):0}}function H(){var K=F[0]||w[0];if(K){return K.getRuntime().uid}return false}function E(L,K){if(L.ruid){var M=h.Runtime.getInfo(L.ruid);if(M){return M.can(K)}}return false}function y(){this.bind("FilesAdded FilesRemoved",function(K){K.trigger("QueueChanged");K.refresh()});this.bind("CancelUpload",i);this.bind("BeforeUpload",B);this.bind("UploadFile",D);this.bind("UploadProgress",u);this.bind("StateChanged",A);tLine truncated
|
||||
@@ -0,0 +1,3 @@
|
||||
/*!normalize.css v2.1.3 | MIT License | git.io/normalize */ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden],template{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a{background:transparent;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;}
|
||||
.container,.row [class*="col-"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.container{margin-left:auto;margin-right:auto;padding-left:10px;padding-right:10px;}.row{margin-right:-10px;margin-left:-10px;}.row [class*="col-"]{float:left;min-height:1px;padding-right:10px;padding-left:10px;}.row [class*="-push-"],.row [class*="-pull-"]{position:relative;}.col-mb-1{width:8.33333%;}.col-mb-2{width:16.66667%;}.col-mb-3{width:25%;}.col-mb-4{width:33.33333%;}.col-mb-5{width:41.66667%;}.col-mb-6{width:50%;}.col-mb-7{width:58.33333%;}.col-mb-8{width:66.66667%;}.col-mb-9{width:75%;}.col-mb-10{width:83.33333%;}.col-mb-11{width:91.66667%;}.col-mb-12{width:100%;}@media(min-width:768px){.container{max-width:728px;}.col-tb-1{width:8.33333%;}.col-tb-2{width:16.66667%;}.col-tb-3{width:25%;}.col-tb-4{width:33.33333%;}.col-tb-5{width:41.66667%;}.col-tb-6{width:50%;}.col-tb-7{width:58.33333%;}.col-tb-8{width:66.66667%;}.col-tb-9{width:75%;}.col-tb-10{width:83.33333%;}.col-tb-11{width:91.66667%;}.col-tb-12{width:100%;}.col-tb-offset-0{margin-left:0;}.col-tb-offset-1{margin-left:8.33333%;}.col-tb-offset-2{margin-left:16.66667%;}.col-tb-offset-3{margin-left:25%;}.col-tb-offset-4{margin-left:33.33333%;}.col-tb-offset-5{margin-left:41.66667%;}.col-tb-offset-6{margin-left:50%;}.col-tb-offset-7{margin-left:58.33333%;}.col-tb-offset-8{margin-left:66.66667%;}.col-tb-offset-9{margin-left:75%;}.col-tb-offset-10{margin-left:83.33333%;}.col-tb-offset-11{margin-left:91.66667%;}.col-tb-offset-12{margin-left:100%;}.col-tb-pull-0{right:0;}.col-tb-pull-1{right:8.33333%;}.col-tb-pull-2{right:16.66667%;}.col-tb-pull-3{right:25%;}.col-tb-pull-4{right:33.33333%;}.col-tb-pull-5{right:41.66667%;}.col-tb-pull-6{right:50%;}.col-tb-pull-7{right:58.33333%;}.col-tb-pull-8{right:66.66667%;}.col-tb-pull-9{right:75%;}.col-tb-pull-10{right:83.33333%;}.col-tb-pull-11{right:91.66667%;}.col-tb-pull-12{right:100%;}.col-tb-push-0{left:0;}.col-tb-push-1{left:8.33333%;}.col-tb-push-2{left:16.66667%;}.col-tb-push-3{left:25%;}.col-tb-push-4{left:33.33333%;}.col-tb-push-5{left:41.66667%;}.col-tb-push-6{left:50%;}.col-tb-push-7{left:58.33333%;}.col-tb-push-8{left:66.66667%;}.col-tb-push-9{left:75%;}.col-tb-push-10{left:83.33333%;}.col-tb-push-11{left:91.66667%;}.col-tb-push-12{left:100%;}}@media(min-width:992px){.container{max-width:952px;}.col-1{width:8.33333%;}.col-2{width:16.66667%;}.col-3{width:25%;}.col-4{width:33.33333%;}.col-5{width:41.66667%;}.col-6{width:50%;}.col-7{width:58.33333%;}.col-8{width:66.66667%;}.col-9{width:75%;}.col-10{width:83.33333%;}.col-11{width:91.66667%;}.col-12{width:100%;}.col-offset-0{margin-left:0;}.col-offset-1{margin-left:8.33333%;}.col-offset-2{margin-left:16.66667%;}.col-offset-3{margin-left:25%;}.col-offset-4{margin-left:33.33333%;}.col-offset-5{margin-left:41.66667%;}.col-offset-6{margin-left:50%;}.col-offset-7{margin-left:58.33333%;}.col-offset-8{margin-left:66.66667%;}.col-offset-9{margin-left:75%;}.col-offset-10{margin-left:83.33333%;}.col-offset-11{margin-left:91.66667%;}.col-offset-12{margin-left:100%;}.col-pull-0{right:0;}.col-pull-1{right:8.33333%;}.col-pull-2{right:16.66667%;}.col-pull-3{right:25%;}.col-pull-4{right:33.33333%;}.col-pull-5{right:41.66667%;}.col-pull-6{right:50%;}.col-pull-7{right:58.33333%;}.col-pull-8{right:66.66667%;}.col-pull-9{right:75%;}.col-pull-10{right:83.33333%;}.col-pull-11{right:91.66667%;}.col-pull-12{right:100%;}.col-push-0{left:0;}.col-push-1{left:8.33333%;}.col-push-2{left:16.66667%;}.col-push-3{left:25%;}.col-push-4{left:33.33333%;}.col-push-5{left:41.66667%;}.col-push-6{left:50%;}.col-push-7{left:58.33333%;}.col-push-8{left:66.66667%;}.col-push-9{left:75%;}.col-push-10{left:83.33333%;}.col-push-11{left:91.66667%;}.col-push-12{left:100%;}}@media(min-width:1200px){.container{max-width:1160px;}.col-wd-1{width:8.33333%;}.col-wd-2{width:16.66667%;}.col-wd-3{width:25%;}.col-wd-4{width:33.33333%;}.col-wd-5{width:41.66667%;}.col-wd-6{width:50%;}.col-wd-7{width:58.33333%;}.col-wd-8{width:66.66667%;}.col-wd-9{width:75%;}.col-wd-10{width:83.33333%;}.col-wd-11{width:91.66667%;}.col-wd-12{width:100%;}.col-wd-offset-0{margin-left:0;}.col-wd-offset-1{margin-left:8.33333%;}.col-wd-offset-2{margin-left:16.66667%;}.col-wd-offset-3{margin-left:25%;}.col-wd-offset-4{margin-left:33.33333%;}.col-wd-offset-5{margin-left:41.66667%;}.col-wd-offset-6{margin-left:50%;}.col-wd-offset-7{margin-left:58.33333%;}.col-wd-offset-8{margin-left:66.66667%;}.col-wd-offset-9{margin-left:75%;}.col-wd-offset-10{margin-left:83.33333%;}.col-wd-offset-11{margin-left:91.66667%;}.col-wd-offset-12{margin-left:100%;}.col-wd-pull-0{right:0;}.col-wd-pull-1{right:8.33333%;}.col-wd-pull-2{right:16.66667%;}.col-wd-pull-3{right:25%;}.col-wd-pull-4{right:33.33333%;}.col-wd-pull-5{right:41.66667%;}.col-wd-pull-6{right:50%;}.col-wd-pull-7{right:58.33333%;}.col-wd-pull-8{right:66.66667%;}.col-wd-pull-9{right:75%;}.col-wd-pull-10{right:83.33333%;}.col-wd-pull-11{right:91.66667%;}.col-wd-pull-12{right:100%;}.col-wd-pLine truncated
|
||||
@charset "UTF-8";html{height:100%;}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background:#F6F6F3;color:#444;font-size:87.5%;line-height:1.5;}a{color:#467B96;text-decoration:none;}a:hover{color:#499BC3;text-decoration:underline;}code,pre,.mono{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;}.p{margin:1em 0;}.body-100{height:100%;}a.balloon-button{display:inline-block;padding:0 6px;min-width:12px;height:18px;line-height:18px;background:#D8E7EE;font-size:.85714em;text-align:center;text-decoration:none;zoom:1;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;}a.button:hover,a.balloon-button:hover{background-color:#A5CADC;color:#FFF;text-decoration:none;}input[type=text],input[type=password],input[type=email],textarea{background:#FFF;border:1px solid #D9D9D6;padding:7px;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}textarea{resize:vertical;line-height:1.5;}input[type="radio"],input[type="checkbox"]{margin-right:3px;}input.text-s,textarea.text-s{padding:5px;}input.text-l,textarea.text-l{padding:10px;font-size:1.14286em;}.w-10{width:10%;}.w-20{width:20%;}.w-30{width:30%;}.w-40{width:40%;}.w-50{width:50%;}.w-60{width:60%;}.w-70{width:70%;}.w-80{width:80%;}.w-90{width:90%;}.w-100{width:100%;}select{border:1px solid #CCC;height:28px;}.btn,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{border:none;background-color:#E9E9E6;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;padding:0 12px;height:32px;color:#666;vertical-align:middle;zoom:1;}.btn:hover,#ui-datepicker-div .ui-datepicker-current:hover,#ui-datepicker-div .ui-datepicker-close:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#dbdbd6;}.btn:active,#ui-datepicker-div .ui-datepicker-current:active,#ui-datepicker-div .ui-datepicker-close:active,.btn.active,#ui-datepicker-div .active.ui-datepicker-current,#ui-datepicker-div .active.ui-datepicker-close{background-color:#d6d6d0;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{background-color:#f7f7f6;cursor:default;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{color:#999;}.btn-xs,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{padding:0 10px;height:25px;font-size:13px;}.btn-s{height:28px;}.btn-l{height:40px;font-size:1.14286em;font-weight:bold;}.primary{border:none;background-color:#467B96;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.primary:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#3c6a81;}.primary:active,.primary.active{background-color:#39647a;}.primary:disabled{background-color:#508cab;cursor:default;}.btn-group{display:inline-block;}.btn-warn{border:none;background-color:#B94A48;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.btn-warn:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#a4403f;}.btn-warn:active,.btn-warn.active{background-color:#9c3e3c;}.btn-warn:disabled{background-color:#c1605e;cursor:default;}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active,.btn-link.active{background-color:transparent;}.btn-drop{position:relative;}.dropdown-toggle{padding-right:8px;}.dropdown-menu{list-style:none;position:absolute;z-index:2;left:0;margin:0;padding:0;border:1px solid #D9D9D6;background:#FFF;text-align:left;min-width:108px;display:none;}.dropdown-menu li{white-space:nowrap;}.dropdown-menu li.multiline{padding:5px 12px 12px;}.dropdown-menu a{display:block;padding:5px 12px;color:#666;}.dropdown-menu a:hover{background:#F6F6F3;text-decoration:none!important;}.message{padding:8px 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.message a{font-weight:bold;text-decoration:underline;}.error{background:#FBE3E4;color:#8A1F11;}.error a{color:#8A1F11;}.notice{background:#FFF6BF;color:#8A6D3B;}.notice a{color:#8A6D3B;}.success{background:#E6EFC2;color:#264409;}.success a{color:#264409;}.balloon{display:inline-block;padding:0 4px;min-width:10px;height:14px;line-height:14px;background:#B9B9B6;vertical-align:text-top;text-align:center;font-size:12px;color:#FFF;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}.typecho-pager{list-style:none;float:right;margin:0;padding:0;line-height:1;text-align:center;zoom:1;}.typecho-pager li{display:inline-block;margin:0 3px;height:28px;line-height:28px;}.typecho-pager a{display:block;padding:0 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.typecho-pager a:hover{text-decoration:none;background:#E9E9E6;}.Line truncated
|
||||
@@ -0,0 +1,4 @@
|
||||
/* jQuery Timepicker Addon - v1.4 - 2013-08-11
|
||||
* http://trentrichardson.com/examples/timepicker
|
||||
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
|
||||
(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.4"}});var Timepicker=function(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:true,separator:" ",altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"};$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,opts){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){tp_inst._updateDateTime(dp_inst);if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!==""){tp_inst._updateDateTime(dp_inst)}if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=opts[i]||null}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:""));if(typeof(tp_inst._defaults.controlType)==="string"){if(tp_inst._defaults.controlType==="slider"&&typeof($.ui.slider)==="undefined"){tp_inst._defaults.controlType="select"}tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}else{tp_inst.control=tp_inst._defaults.controlType}var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];if(tp_inst._defaults.timezoneList!==null){timezoneList=tp_inst._defaults.timezoneList}var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&typeof timezoneList[0]!=="object"){for(;tzi<tzl;tzi++){tzv=timezoneList[tzi];timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)}}}tp_inst._defaults.timezoneList=timezoneList;tp_inst.timezone=tp_inst._defaults.timezone!==null?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):((new Date()).getTimezoneOffset()*-1);tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMaLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
(function(e){var c={method:"GET",contentType:"json",queryParam:"q",searchDelay:300,minChars:1,propertyToSearch:"name",jsonContainer:null,hintText:"Type in a search term",noResultsText:"No results",searchingText:"Searching...",deleteText:"×",animateDropdown:true,tokenLimit:null,tokenDelimiter:",",preventDuplicates:false,tokenValue:"id",prePopulate:null,processPrePopulate:false,idPrefix:"token-input-",resultsFormatter:function(g){return"<li>"+g[this.propertyToSearch]+"</li>"},tokenFormatter:function(g){return"<li><p>"+g[this.propertyToSearch]+"</p></li>"},onResult:null,onAdd:null,onDelete:null,onReady:null};var f={tokenList:"token-input-list",token:"token-input-token",tokenDelete:"token-input-delete-token",selectedToken:"token-input-selected-token",highlightedToken:"token-input-highlighted-token",dropdown:"token-input-dropdown",dropdownItem:"token-input-dropdown-item",dropdownItem2:"token-input-dropdown-item2",selectedDropdownItem:"token-input-selected-dropdown-item",inputToken:"token-input-input-token"};var d={BEFORE:0,AFTER:1,END:2};var a={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUMPAD_ENTER:108,COMMA:188};var b={init:function(g,h){var i=e.extend({},c,h||{});return this.each(function(){e(this).data("tokenInputObject",new e.TokenList(this,g,i))})},clear:function(){this.data("tokenInputObject").clear();return this},add:function(g){this.data("tokenInputObject").add(g);return this},remove:function(g){this.data("tokenInputObject").remove(g);return this},get:function(){return this.data("tokenInputObject").getTokens()}};e.fn.tokenInput=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{return b.init.apply(this,arguments)}};e.TokenList=function(i,s,Q){if(e.type(s)==="string"||e.type(s)==="function"){Q.url=s;var m=x();if(Q.crossDomain===undefined){if(m.indexOf("://")===-1){Q.crossDomain=false}else{Q.crossDomain=(location.href.split(/\/+/g)[1]!==m.split(/\/+/g)[1])}}}else{if(typeof(s)==="object"){Q.local_data=s}}if(Q.classes){Q.classes=e.extend({},f,Q.classes)}else{if(Q.theme){Q.classes={};e.each(f,function(V,W){Q.classes[V]=W+"-"+Q.theme})}else{Q.classes=f}}var E=[];var v=0;var r=new e.TokenList.Cache();var O;var L;var z=e('<input type="text" autocomplete="off">').css({outline:"none"}).attr("id",Q.idPrefix+i.id).focus(function(){if(Q.tokenLimit===null||Q.tokenLimit!==v){l()}}).blur(function(){F();e(this).val("")}).keydown(function(W){var Y;var V;switch(W.keyCode){case a.LEFT:case a.RIGHT:case a.UP:case a.DOWN:if(!e(this).val()){Y=n.prev();V=n.next();if((Y.length&&Y.get(0)===C)||(V.length&&V.get(0)===C)){if(W.keyCode===a.LEFT||W.keyCode===a.UP){I(e(C),d.BEFORE)}else{I(e(C),d.AFTER)}}else{if((W.keyCode===a.LEFT||W.keyCode===a.UP)&&Y.length){R(e(Y.get(0)))}else{if((W.keyCode===a.RIGHT||W.keyCode===a.DOWN)&&V.length){R(e(V.get(0)))}}}}else{var X=null;if(W.keyCode===a.DOWN||W.keyCode===a.RIGHT){X=e(N).next()}else{X=e(N).prev()}if(X.length){U(X)}return false}break;case a.BACKSPACE:Y=n.prev();if(!e(this).val().length){if(C){k(e(C));D.change()}else{if(Y.length){R(e(Y.get(0)))}}return false}else{if(e(this).val().length===1){F()}else{setTimeout(function(){B()},5)}}break;case a.TAB:case a.ENTER:case a.NUMPAD_ENTER:case a.COMMA:if(N){K(e(N).data("tokeninput"));D.change();return false}else{K(null);return false}break;case a.ESCAPE:F();return true;default:if(String.fromCharCode(W.which)){setTimeout(function(){B()},5)}break}});var D=e(i).hide().val("").focus(function(){z.focus()}).blur(function(){z.blur()});var C=null;var G=0;var N=null;var p=e("<ul />").addClass(Q.classes.tokenList).click(function(W){var V=e(W.target).closest("li");if(V&&V.get(0)&&e.data(V.get(0),"tokeninput")){T(V)}else{if(C){I(e(C),d.END)}z.focus()}}).mouseover(function(W){var V=e(W.target).closest("li");if(V&&C!==this){V.addClass(Q.classes.highlightedToken)}}).mouseout(function(W){var V=e(W.target).closest("li");if(V&&C!==this){V.removeClass(Q.classes.highlightedToken)}}).insertBefore(D);var n=e("<li />").addClass(Q.classes.inputToken).appendTo(p).append(z);var S=e("<div>").addClass(Q.classes.dropdown).appendTo("body").hide();var J=e("<tester/>").insertAfter(z).css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:z.css("fontSize"),fontFamily:z.css("fontFamily"),fontWeight:z.css("fontWeight"),letterSpacing:z.css("letterSpacing"),whiteSpace:"nowrap"});D.val("");var y=Q.prePopulate||D.data("pre");if(Q.processPrePopulate&&e.isFunction(Q.onResult)){y=Q.onResult.call(D,y)}if(y&&y.length){e.each(y,function(V,W){j(W);H()})}if(e.isFunction(Q.onReady)){Q.onReady.call()}this.clear=function(){p.children("li").each(function(){if(e(this).children("input").length===0){k(e(this))}})};this.add=function(V){K(V)};this.remove=function(V){p.children("li").each(function(){if(e(this).children("input").length===0){var Y=e(this).data("tokeninput");var W=true;for(var X in V){if(V[X]!==Y[X]){W=false;break}}if(W){k(e(this))}}})};this.getTokens=function(Line truncated
|
||||
@@ -0,0 +1,55 @@
|
||||
(function(a){a.Typecho={insertFileToEditor:function(c,b,d){},editorResize:function(c,b){$("#"+c).resizeable({minHeight:100,afterResize:function(d){$.post(b,{size:d})}})},uploadComplete:function(b){}}})(window);(function(a){a.fn.dropdownMenu=function(b){this.each(function(){var d=this,c=a.extend({menuEl:null,btnEl:null},b);a(c.btnEl,d).click(function(){var e=a(this);e.toggleClass("active");a(c.menuEl,d).toggle();return false})})};a.fn.resizeable=function(b){var c=a.extend({minHeight:100,afterResize:null},b);return this.each(function(){var d=a('<span class="resize"><i></i></span>').insertAfter(this),j,g=0,e=c.minHeight,l=this;function f(m){textarea=a(m.data.el);textarea.blur();g=k(m).y;j=textarea.height()-g;textarea.css("opacity",0.25);a(document).mousemove(i).mouseup(h);return false}function i(o){var m=k(o).y,n=j+m;if(g>=(m)){n-=5}g=m;n=Math.max(e,n);textarea.height(n+"px");if(n<e){h(o)}return false}function h(n){var m=textarea.outerHeight();a(document).unbind("mousemove",i).unbind("mouseup",h);textarea.css("opacity",1);textarea.focus();textarea=null;j=null;g=0;if(c.afterResize){c.afterResize.call(l,m)}}function k(m){return{x:m.clientX+document.documentElement.scrollLeft,y:m.clientY+document.documentElement.scrollTop}}d.bind("mousedown",{el:this},f)})};a.fn.tableSelectable=function(c){var e=this,d=a.extend({checkEl:null,rowEl:null,selectAllEl:null,actionEl:null},c);function b(g){var g=a(g),f=a(d.checkEl,g),h=f.prop("checked");if(!f.length){return}f.prop("checked",!h);if(h){g.removeClass("checked")}else{g.addClass("checked")}}a(d.rowEl,this).each(function(){a(d.checkEl,this).click(function(f){b(a(this).parents(d.rowEl))})}).click(function(h){var g=a(h.toElement?h.toElement:h.target),f=g.prop("tagName").toLowerCase();if(a.inArray(f,["input","textarea","a","button"])>=0&&"checkbox"!=g.attr("type")){h.stopPropagation()}else{b(this)}});a(d.selectAllEl).click(function(){var f=a(this),g=f.prop("checked");if(g){a(d.rowEl,e).each(function(){var h=a(this),i=a(d.checkEl,this).prop("checked",true);if(i.length>0){h.addClass("checked")}})}else{a(d.rowEl,e).each(function(){var h=a(this),i=a(d.checkEl,this).prop("checked",false);if(i.length>0){h.removeClass("checked")}})}});a(d.actionEl).click(function(){var f=a(this),g=f.attr("lang");if(!g||confirm(g)){e.parents("form").attr("action",f.attr("href")).submit()}return false})}})($);(function(){Typecho.Markdown=function(){this.writer=new stmd.HtmlRenderer();this.reader=new stmd.DocParser();var a=this.writer,b=a.renderInline;a.renderInline=function(c){if(c.t=="Softbreak"){c.t="Hardbreak"}return b.call(a,c)};this.hooks=new Markdown.HookCollection();this.hooks.addNoop("postConversion")};Typecho.Markdown.prototype.makeHtml=function(c){var b=this.reader.parse(c),a=this.writer.renderBlock(b);return this.hooks.postConversion(a)}})();(function(a){a.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(b){b=b||{};this.each(function(){this.tableDnDConfig={onDragStyle:b.onDragStyle,onDropStyle:b.onDropStyle,onDragClass:b.onDragClass?b.onDragClass:"tDnD_whileDrag",onDrop:b.onDrop,onDragStart:b.onDragStart,scrollAmount:b.scrollAmount?b.scrollAmount:5};a.tableDnD.makeDraggable(this);if(0==$("tfoot",this).length&&0<$("thead",this).length){var d=$("thead",this),e=$("th",d).length,i=$('<tfoot><tr><td style="padding:0;height:0;line-height:0;border:none" colspan="'+e+'"></td></tr></tfoot>').insertAfter(d),c=$("tr:last",this);if(c.parent().prop("tagName").toLowerCase()!="tfoot"){var j=$("td",c),g=j.height();j.height(g-i.outerHeight())}}});a(document).bind("mousemove",a.tableDnD.mousemove).bind("mouseup",a.tableDnD.mouseup);return this},makeDraggable:function(e){var f=e.rows;var c=e.tableDnDConfig;for(var d=0;d<f.length;d++){var b=$(f[d]).hasClass("nodrag");if(!b){a(f[d]).mousedown(function(g){if(g.target.tagName=="TD"){a.tableDnD.dragObject=this;a.tableDnD.currentTable=e;a.tableDnD.mouseOffset=a.tableDnD.getMouseOffset(this,g);if(c.onDragStart){c.onDragStart(e,this)}return false}}).css("cursor","move")}}},mouseCoords:function(b){if(b.pageX||b.pageY){return{x:b.pageX,y:b.pageY}}return{x:b.clientX+document.body.scrollLeft-document.body.clientLeft,y:b.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(e,d){d=d||window.event;var c=this.getPosition(e);var b=this.mouseCoords(d);return{x:b.x-c.x,y:b.y-c.y}},getPosition:function(d){var c=0;var b=0;if(d.offsetHeight==0){d=d.firstChild}while(d.offsetParent){c+=d.offsetLeft;b+=d.offsetTop;d=d.offsetParent}c+=d.offsetLeft;b+=d.offsetTop;return{x:c,y:b}},mousemove:function(h){if(a.tableDnD.dragObject==null){return}var e=a(a.tableDnD.dragObject);var c=a.tableDnD.currentTable.tableDnDConfig;var j=a.tableDnD.mouseCoords(h);var g=j.y-a.tableDnD.mouseOffset.y;var d=window.pageYOffset;if(document.all){if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){d=document.documentElement.scrollTop}else{if(typeof document.body!="undefined"){d=document.body.scrollTop}}}if(j.y-d<c.scrollAmoLine truncated
|
||||
/*
|
||||
* jQuery.ScrollTo
|
||||
* Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* Date: 4/09/2012
|
||||
*
|
||||
* @projectDescription Easy element scrolling using jQuery.
|
||||
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
||||
* @author Ariel Flesler
|
||||
* @version 1.4.3.1
|
||||
*
|
||||
* @id jQuery.scrollTo
|
||||
* @id jQuery.fn.scrollTo
|
||||
* @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
|
||||
* The different options for target are:
|
||||
* - A number position (will be applied to all axes).
|
||||
* - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
|
||||
* - A jQuery/DOM element ( logically, child of the element to scroll )
|
||||
* - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
|
||||
* - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
|
||||
* - A percentage of the container's dimension/s, for example: 50% to go to the middle.
|
||||
* - The string 'max' for go-to-end.
|
||||
* @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead.
|
||||
* @param {Object,Function} settings Optional set of settings or the onAfter callback.
|
||||
* @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
|
||||
* @option {Number, Function} duration The OVERALL length of the animation.
|
||||
* @option {String} easing The easing method for the animation.
|
||||
* @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
|
||||
* @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
|
||||
* @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
|
||||
* @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
|
||||
* @option {Function} onAfter Function to be called after the scrolling ends.
|
||||
* @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
|
||||
* @return {jQuery} Returns the same jQuery object, for chaining.
|
||||
*
|
||||
* @desc Scroll to a fixed position
|
||||
* @example $('div').scrollTo( 340 );
|
||||
*
|
||||
* @desc Scroll relatively to the actual position
|
||||
* @example $('div').scrollTo( '+=340px', { axis:'y' } );
|
||||
*
|
||||
* @desc Scroll using a selector (relative to the scrolled element)
|
||||
* @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
|
||||
*
|
||||
* @desc Scroll to a DOM element (same for jQuery object)
|
||||
* @example var second_child = document.getElementById('container').firstChild.nextSibling;
|
||||
* $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
|
||||
* alert('scrolled!!');
|
||||
* }});
|
||||
*
|
||||
* @desc Scroll on both axes, to different values
|
||||
* @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } );
|
||||
*/
|
||||
(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1,limit:true};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return/webkit/i.test(navigator.userAgent)||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){if(f==null){return}var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);if(!k.length){return}case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(d.limit&&/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);jQuery.fn.css2=jQuery.fn.css;jQuery.fn.css=function(){if(arguments.length){return jQuery.fn.css2.apply(this,arguments)}var b=["font-family","font-size","font-weight","font-style","color","box-sizing","text-transform","text-decoration","letter-spacing","box-shadow","line-height","text-align","vertical-align","direction","background-color","background-image","background-repeat","background-position","background-attachment","opacity","width","height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","position","display","visibility","z-index","overflow-x","overflow-y","white-space","clip","float","clear","cursor","list-style-image","list-style-position","list-style-type","marker-offset"];var a=b.length,d={};for(var c=0;c<a;c++){d[b[c]]=jQuery.fn.css2.call(this,b[c])}return d};
|
||||
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="110px" height="26px" viewBox="0 0 110 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>typecho-logo</title>
|
||||
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<path d="M34.75,5.288 C34.288,6.542 33.76,7.73 32.22,7.862 L32,9.468 L33.562,9.468 L33.562,15.342 C33.562,16.882 33.54,18.994 36.972,18.994 C38.006,18.994 39.106,18.686 39.766,18.224 L39.106,16.53 C38.754,16.75 38.204,16.992 37.61,16.992 C36.708,16.992 36.18,16.596 36.18,15.254 L36.18,9.468 L38.886,9.468 L39.106,7.62 L36.18,7.62 L36.18,5.288 L34.75,5.288 Z M48.258,18.268 C48.258,20.27 47.444,21.502 45.42,21.502 C44.76,21.502 44.276,21.436 43.858,21.282 C43.462,21.128 43.352,20.908 43.352,20.49 L43.352,19.434 L41.262,19.61 L41.262,22.668 C42.186,23.13 44.012,23.394 45.398,23.394 C48.676,23.394 50.502,21.898 50.502,18.268 L50.502,7.62 L46.63,7.62 L46.63,9.424 L47.334,9.468 C47.752,9.468 47.884,9.644 47.884,10.128 L47.884,14.11 C47.884,15.254 47.07,16.288 45.53,16.288 C44.122,16.288 43.902,15.276 43.902,13.934 L43.902,7.62 L40.03,7.62 L40.03,9.424 L40.734,9.468 C41.108,9.49 41.284,9.622 41.284,10.084 L41.284,14.506 C41.284,17.102 42.494,18.312 44.694,18.312 C46.146,18.312 47.488,17.696 48.258,16.596 L48.258,18.268 Z M54,20.776 C54,21.326 53.78,21.458 53.362,21.502 L52.636,21.568 L52.636,23.24 L58.312,23.24 L58.312,21.502 L56.53,21.414 L56.53,18.378 C57.102,18.73 58.026,19.016 58.884,19.016 C61.788,19.016 63.702,16.926 63.702,12.878 C63.702,8.94 62.162,7.29 59.72,7.29 C57.85,7.29 56.64,8.302 56.244,9.05 L56.244,7.62 L52.526,7.62 L52.526,9.402 L53.45,9.468 C53.868,9.468 54,9.644 54,10.128 L54,20.776 Z M60.974,13.098 C60.974,15.012 60.336,16.926 58.466,16.926 C57.894,16.926 57.102,16.75 56.53,16.376 L56.53,11.316 C56.53,10.304 57.498,9.424 58.752,9.424 C59.918,9.424 60.974,10.172 60.974,13.098 Z M70.786,7.29 C67.178,7.29 65.352,10.15 65.352,13.406 C65.352,16.684 66.804,18.972 70.544,18.972 C72.612,18.972 74.064,18.048 74.416,17.74 L73.58,15.958 C73.052,16.332 72.106,16.926 70.808,16.926 C68.938,16.926 68.19,15.76 68.102,14.33 C70.698,14.308 74.372,13.736 74.372,10.348 C74.372,8.39 72.942,7.29 70.786,7.29 Z M71.952,10.392 C71.952,12.086 69.642,12.46 68.014,12.482 C68.08,10.854 68.872,9.16 70.632,9.16 C71.424,9.16 71.952,9.578 71.952,10.392 Z M81.192,16.97 C79.234,16.97 78.354,15.43 78.354,13.032 C78.354,10.59 79.256,9.27 81.016,9.27 C81.346,9.27 81.61,9.314 81.874,9.402 C82.27,9.534 82.336,9.732 82.336,10.15 L82.336,11.206 L84.36,11.052 L84.36,8.192 C83.304,7.62 82.248,7.29 80.928,7.29 C78.442,7.29 75.692,8.83 75.692,13.296 C75.692,16.948 77.606,18.994 80.84,18.994 C82.468,18.994 83.81,18.422 84.668,17.718 L83.722,16.024 C82.82,16.684 82.05,16.97 81.192,16.97 Z M87.286,16.222 C87.286,16.772 87.066,16.904 86.648,16.948 L85.922,17.014 L85.922,18.686 L91.158,18.686 L91.158,16.926 L89.904,16.86 L89.904,11.536 C89.904,10.392 90.718,9.314 92.258,9.314 C93.666,9.314 93.974,10.348 93.974,11.69 L93.974,16.222 C93.974,16.772 93.754,16.904 93.336,16.948 L92.61,17.014 L92.61,18.686 L97.846,18.686 L97.846,16.926 L96.592,16.86 L96.592,11.118 C96.592,8.522 95.294,7.29 93.094,7.29 C91.642,7.29 90.542,7.972 89.882,8.918 L89.882,3 L85.966,3 L85.966,4.826 L86.736,4.87 C87.154,4.892 87.286,5.024 87.286,5.508 L87.286,16.222 Z M98.924,13.142 C98.924,17.124 100.86,19.016 103.808,19.016 C106.712,19.016 109.066,17.08 109.066,12.856 C109.066,7.796 105.788,7.29 104.16,7.29 C101.894,7.29 98.924,8.566 98.924,13.142 Z M103.984,17.08 C101.872,17.08 101.586,14.88 101.586,12.834 C101.586,10.722 102.29,9.226 104.028,9.226 C105.788,9.226 106.382,10.744 106.382,13.208 C106.382,15.496 105.7,17.08 103.984,17.08 Z" id="typecho" fill="#000000" sketch:type="MSShapeGroup"></path>
|
||||
<path d="M13,26 C3.36833333,26 0,22.631 0,13 C0,3.36866667 3.36833333,0 13,0 C22.6316667,0 26,3.36866667 26,13 C26,22.631 22.6316667,26 13,26 Z M6,9 L20,9 L20,7 L6,7 L6,9 Z M6,14 L16,14 L16,12 L6,12 L6,14 Z M6,19 L18,19 L18,17 L6,17 L6,19 Z" id="icon" fill="#000000" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<cross-domain-policy>
|
||||
<allow-access-from domain="*.{{.Host}}" />
|
||||
</cross-domain-policy>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{.Title}}</title>
|
||||
<link>https://{{.Host}}</link>
|
||||
<description>{{.SubTitle}}</description>
|
||||
<atom:link href="https://{{.Host}}/rss.html" rel="self" />
|
||||
<atom:link href="{{.FeedrURL}}" rel="hub" />
|
||||
<language>zh-CN</language>
|
||||
<lastBuildDate>{{.BuildDate}}</lastBuildDate>
|
||||
{{range .Articles}}
|
||||
<item>
|
||||
<title>{{.Title}}</title>
|
||||
<link>https://{{$.Host}}/post/{{.Slug}}.html</link>
|
||||
<comments>https://{{$.Host}}/post/{{.Slug}}.html#comments</comments>
|
||||
<guid>https://{{$.Host}}/post/{{.Slug}}.html</guid>
|
||||
<description>
|
||||
<![CDATA[{{imgtonormal .Content}}<p>本文链接:<a href="https://{{$.Host}}/post/{{.Slug}}.html">https://{{$.Host}}/post/{{.Slug}}.html</a>,<a href="https://{{$.Host}}/post/{{.Slug}}.html#comments">参与评论 »</a></p>]]>
|
||||
</description>
|
||||
<pubDate>{{dateformat .CreatedAt "Mon, 02 Jan 2006 15:04:05 -0700"}}</pubDate>
|
||||
</item>
|
||||
{{end}}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
|
||||
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>{{.BTitle}}</ShortName>
|
||||
<Description>{{.SubTitle}}</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Url type="text/html" method="get" template="https://{{.Host}}/search.html?q={searchTerms}" />
|
||||
<moz:SearchForm>https://{{.Host}}/search.html</moz:SearchForm>
|
||||
</OpenSearchDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Sitemap: https://{{.Host}}/sitemap.xml
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{{range .Articles}}
|
||||
<url>
|
||||
<loc>https://{{$.Host}}/post/{{.Slug}}.html</loc>
|
||||
<lastmod>{{dateformat .CreatedAt "2006-01-02"}}</lastmod>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
{{end}}
|
||||
</urlset>
|
||||
@@ -0,0 +1 @@
|
||||
{{define "notfound"}}<div id=content class=inner><article class="post post-404"><h1 class=title>404 - 什么也没有</h1><div class="entry-content"><p>你要找的东东不存在喔!</p><p>请检查 URL 拼写是否有误,或者通过<a href="/search.html"> 站内搜索 </a>搜一下吧~</p></div></article></div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
This is the place to put your project's website data if you are not using GitHub pages.
|
||||
@@ -0,0 +1 @@
|
||||
{{define "about"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}</div></article><section id=comments><h1 class=title>Comments</h1><div class=total_thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div></section>{{end}}</div>{{end}}
|
||||
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Title}}</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" href="/static/admin/style.css">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if lt IE 9]>
|
||||
<div class="alert alert-danger topframe" role="alert">你的浏览器实在<strong>太太太太太太旧了</strong>,放学别走,升级完浏览器再说 <a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
|
||||
<![endif]-->
|
||||
<script src="/static/admin/jquery.js"></script>
|
||||
<script src="/static/admin/jquery-ui.js"></script>
|
||||
<script src="/static/admin/typecho.js"></script>
|
||||
<div class="typecho-head-nav clearfix" role="navigation">
|
||||
<nav id="typecho-nav-list">
|
||||
<ul class="root {{if .Console}}focus{{end}}">
|
||||
<li class="parent"><a target="_self" href="/admin/profile">控制台</a></dt>
|
||||
</li>
|
||||
<ul class="child">
|
||||
<li {{if eq .Path "/admin/profile"}}class="focus" {{end}}><a target="_self" href="/admin/profile">个人设置</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="root {{if .Post}}focus{{end}}">
|
||||
<li class="parent"><a target="_self" href="/admin/write-post">撰写</a></dt>
|
||||
</li>
|
||||
<ul class="child">
|
||||
<li class="last {{if eq .Path "/admin/write-post"}}focus{{end}}"><a target="_self" href="/admin/write-post">撰写文章</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="root {{if .Manage}}focus{{end}}">
|
||||
<li class="parent"><a target="_self" href="/admin/manage-posts">管理</a></dt>
|
||||
</li>
|
||||
<ul class="child">
|
||||
<li {{if eq .Path "/admin/manage-posts"}}class="focus" {{end}}><a target="_self" href="/admin/manage-posts">文章</a></li>
|
||||
<li {{if eq .Path "/admin/manage-series"}}class="focus" {{end}}><a target="_self" href="/admin/manage-series">专题</a></li>
|
||||
{{if eq .Path "/admin/add-serie"}}<li class="focus"><a target="_self" href="/admin/add-serie">{{if .Edit}}编辑专题{{else}}新增专题{{end}}</a></li>{{end}}
|
||||
<li class="last {{if eq .Path "/admin/manage-tags"}}focus{{end}}"><a target="_self" href="/admin/manage-tags">标签</a></li>
|
||||
<li class="last {{if eq .Path "/admin/manage-draft"}}focus{{end}}"><a target="_self" href="/admin/manage-draft">草稿箱</a></li>
|
||||
<li class="last {{if eq .Path "/admin/manage-trash"}}focus{{end}}"><a target="_self" href="/admin/manage-trash">回收箱</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="root {{if .Setting}}focus{{end}}">
|
||||
<li class="parent"><a target="_self" href="/admin/options-general">设置</a></dt>
|
||||
</li>
|
||||
<ul class="child">
|
||||
<li {{if eq .Path "/admin/options-general"}}class="focus" {{end}}><a target="_self" href="/admin/options-general">基本</a></li>
|
||||
<li class="last {{if eq .Path "/admin/options-discussion"}}focus{{end}}"><a target="_self" href="/admin/options-discussion">阅读</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="operate">
|
||||
<a target="_self" title="{{.LastLogin}}" href="/admin/profile" class="author">{{.Author}}</a><a class="exit" href="/admin/login?logout=true">登出</a><a target="_blank" href="/">网站</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main">
|
||||
{{.LayoutContent}}
|
||||
</div>
|
||||
<div class="typecho-foot" role="contentinfo">
|
||||
<div class="copyright">
|
||||
<a href="http://typecho.org" class="i-logo-s">Typecho</a>
|
||||
<p>由 <a href="http://typecho.org">Typecho</a> 提供皮肤, 版本 1.0 (14.10.10)</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
$(document).ready(function() {
|
||||
// 处理消息机制
|
||||
(function () {
|
||||
cookies = {
|
||||
notice : $.cookie( 'notice'),
|
||||
noticeType : $.cookie( 'notice_type'),
|
||||
highlight : $.cookie('notice_highlight')
|
||||
},
|
||||
path = '/';
|
||||
|
||||
if (!!cookies.notice && 'success|notice|error'.indexOf(cookies.noticeType) >= 0) {
|
||||
var head = $('.typecho-head-nav'),
|
||||
p = $('<div class="message popup ' + cookies.noticeType + '">'
|
||||
+ '<ul><li>' + $.parseJSON(cookies.notice).join('</li><li>')
|
||||
+ '</li></ul></div>'), offset = 0;
|
||||
|
||||
if (head.length > 0) {
|
||||
p.insertAfter(head);
|
||||
offset = head.outerHeight();
|
||||
} else {
|
||||
p.prependTo(document.body);
|
||||
}
|
||||
|
||||
function checkScroll () {
|
||||
if ($(window).scrollTop() >= offset) {
|
||||
p.css({
|
||||
'position' : 'fixed',
|
||||
'top' : 0
|
||||
});
|
||||
} else {
|
||||
p.css({
|
||||
'position' : 'absolute',
|
||||
'top' : offset
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(window).scroll(function () {
|
||||
checkScroll();
|
||||
});
|
||||
|
||||
checkScroll();
|
||||
|
||||
p.slideDown(function () {
|
||||
var t = $(this), color = '#C6D880';
|
||||
|
||||
if (t.hasClass('error')) {
|
||||
color = '#FBC2C4';
|
||||
} else if (t.hasClass('notice')) {
|
||||
color = '#FFD324';
|
||||
}
|
||||
|
||||
t.effect('highlight', {color : color})
|
||||
.delay(5000).slideUp(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$.cookie('notice', null, {path : path});
|
||||
$.cookie('notice_type', null, {path : path});
|
||||
}
|
||||
|
||||
if (cookies.highlight) {
|
||||
$('#' + cookies.highlight).effect('highlight', 1000);
|
||||
$.cookie('notice_highlight', null, {path : path});
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
// 导航菜单 tab 聚焦时展开下拉菜单
|
||||
(function () {
|
||||
$('#typecho-nav-list').find('.parent a').focus(function() {
|
||||
$('#typecho-nav-list').find('.child').hide();
|
||||
$(this).parents('.root').find('.child').show();
|
||||
});
|
||||
$('.operate').find('a').focus(function() {
|
||||
$('#typecho-nav-list').find('.child').hide();
|
||||
});
|
||||
})();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "admin-discussion"}}
|
||||
|
||||
{{end}}
|
||||
@@ -0,0 +1,81 @@
|
||||
{{define "admin-draft"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>草稿箱</h2>
|
||||
</div>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
<div class="col-mb-12" role="main">
|
||||
<form method="post" name="manage_draft" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="此草稿箱下的所有内容将被永久删除, 你确认要删除这些文章吗?" href="/admin/api/draft-delete">删除</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" />
|
||||
<col width="40%" />
|
||||
<col width="" />
|
||||
<col width="12%" />
|
||||
<col width="14%" />
|
||||
<col width="14%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>标题</th>
|
||||
<th>作者</th>
|
||||
<th>专题</th>
|
||||
<th>创建</th>
|
||||
<th>保存</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .List}}
|
||||
<tr id="mid-article-{{.ID}}">
|
||||
<td>
|
||||
<input type="checkbox" value="{{.ID}}" name="mid[]" />
|
||||
</td>
|
||||
<td><a href="/admin/write-post?cid={{.ID}}">{{.Title}}</a></td>
|
||||
<td>{{.Author}}</td>
|
||||
<td>{{if gt .SerieID 0}}专题ID:{{.SerieID}}{{else}}--{{end}}</td>
|
||||
<td>{{dateformat .CreatedAt "2006/01/02 15:04"}}</td>
|
||||
<td>{{dateformat .UpdatedAt "2006/01/02 15:04"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
$(document).ready(function() {
|
||||
$('.typecho-list-table').tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'tr',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a,button.btn-operate'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "admin-general"}}
|
||||
|
||||
{{end}}
|
||||
@@ -0,0 +1,38 @@
|
||||
<!Doctype html>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name=viewport>
|
||||
<meta name=robots content="noindex, nofollow">
|
||||
<title>登录 | {{.BTitle}}</title>
|
||||
<link rel=stylesheet href="/static/admin/style.css">
|
||||
</head>
|
||||
|
||||
<body class="body-100">
|
||||
<div class="typecho-login-wrap">
|
||||
<div class="typecho-login">
|
||||
<h1><a href="/">{{.BTitle}}</a></h1>
|
||||
<form action="/admin/login" method=post>
|
||||
<p>
|
||||
<label for=user class="sr-only">用户名</label>
|
||||
<input type=text id=user name=user placeholder="用户名" class="text-l w-100">
|
||||
</p>
|
||||
<p>
|
||||
<label for=password class="sr-only">密码</label>
|
||||
<input type=password id=password name=password class="text-l w-100" placeholder="密码">
|
||||
</p>
|
||||
<!-- <p>
|
||||
<label for=code class="sr-only">两步验证</label>
|
||||
<input type=text id=code name=code class="text-l w-100" placeholder="两步验证">
|
||||
</p> -->
|
||||
<p class=submit>
|
||||
<button type=submit class="btn btn-l w-100 primary">登录</button>
|
||||
</p>
|
||||
</form>
|
||||
<p class="more-link">管理后台皮肤来自于<a href="http://typecho.org" target=_blank>Typecho</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,846 @@
|
||||
{{define "admin-post"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
{{if .Edit}}<h2>编辑 {{.Edit.Title}}</h2>{{else}}<h2>撰写文章</h2>{{end}}
|
||||
</div>
|
||||
<div class="row typecho-page-main typecho-post-area" role="form">
|
||||
<form action="/admin/api/post-add" method="post" name="write_post">
|
||||
<div class="col-mb-12 col-tb-9" role="main">
|
||||
{{if .Edit.IsDraft}}<cite class="edit-draft-notice">你正在编辑的是草稿, 你也可以 <a href="/admin/draft-delete?cid={{.Edit.ID}}">删除它</a></cite>{{end}}
|
||||
<p class="title">
|
||||
<label for="title" class="sr-only">标题</label>
|
||||
<input type="text" id="title" name="title" autocomplete="off" {{with .Edit}}value="{{.Title}}"{{end}} placeholder="标题" class="w-100 text title" />
|
||||
</p>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only">网址缩略名</label>
|
||||
https://{{.Domain}}/post/<input type="text" id="slug" name="slug" autocomplete="off" {{with .Edit}}value="{{.Slug}}" {{end}} class="mono" />.html </p>
|
||||
<p>
|
||||
<label for="text" class="sr-only">文章内容</label>
|
||||
<textarea style="height: 350px" autocomplete="off" id="text" name="text" class="w-100 mono">{{with .Edit}}{{.Content}}{{end}}</textarea>
|
||||
</p>
|
||||
<p class="submit clearfix">
|
||||
<span class="right">
|
||||
<input type="hidden" name="cid" {{with .Edit}}value="{{.ID}}"{{end}} />
|
||||
<button type="submit" name="do" value="save" id="btn-save" class="btn">保存草稿</button>
|
||||
<button type="submit" name="do" value="publish" class="btn primary" id="btn-submit">发布文章</button>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id="edit-secondary" class="col-mb-12 col-tb-3" role="complementary">
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<li class="active w-50"><a href="#tab-advance">选项</a></li>
|
||||
<li class="w-50"><a href="#tab-files" id="tab-files-btn">上传</a></li>
|
||||
</ul>
|
||||
<div id="tab-advance" class="tab-content">
|
||||
<section class="typecho-post-option" role="application">
|
||||
<label for="date" class="typecho-label">发布日期</label>
|
||||
<p>
|
||||
<input class="typecho-date w-100" type="text" name="date" id="date" {{with .Edit}}value="{{dateformat .CreatedAt "2006-01-02 15:04"}}"{{end}} />
|
||||
</p>
|
||||
</section>
|
||||
<section class="typecho-post-option category-option">
|
||||
<label class="typecho-label">专题</label>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="radio" id="serie-0" value="0" name="serie" checked="true"/>
|
||||
<label for="serie-0">默认专题</label>
|
||||
</li>
|
||||
{{range $k,$v:=.Series}}
|
||||
<li>
|
||||
<input type="radio" id="serie-{{$v.ID}}" value="{{$v.ID}}" name="serie" {{with $.Edit}}{{if eq .SerieID $v.ID}}checked="true"{{end}}{{end}}/>
|
||||
<label for="serie-{{$v.ID}}">{{$v.Name}}</label>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</section>
|
||||
<section class="typecho-post-option">
|
||||
<label for="token-input-tags" class="typecho-label">标签</label>
|
||||
<p>
|
||||
<input id="tags" name="tags" type="text" {{with .Edit}}value="{{join .Tags ","}}"{{end}} class="w-100 text" />
|
||||
</p>
|
||||
</section>
|
||||
<section class="typecho-post-option category-option">
|
||||
<label class="typecho-label">其它选项</label>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="checkbox" id="update" value="true" name="update" />
|
||||
<label for="update">变动很大(更新时间)?</label>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<!-- end #tab-advance -->
|
||||
<div id="tab-files" class="tab-content hidden">
|
||||
<div id="upload-panel" class="p">
|
||||
<div class="upload-area" draggable="true">拖放文件到这里
|
||||
<br>或者 <a href="###" class="upload-file">选择文件上传</a></div>
|
||||
<ul id="file-list">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end #tab-files -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
$(document).ready(function() {
|
||||
var error = $('.typecho-option .error:first');
|
||||
|
||||
if (error.length > 0) {
|
||||
$('html,body').scrollTop(error.parents('.typecho-option').offset().top);
|
||||
}
|
||||
|
||||
$('form').submit(function() {
|
||||
if (this.submitted) {
|
||||
return false;
|
||||
} else {
|
||||
this.submitted = true;
|
||||
}
|
||||
});
|
||||
|
||||
$('label input[type=text]').click(function(e) {
|
||||
var check = $('#' + $(this).parents('label').attr('for'));
|
||||
check.prop('checked', true);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script src="/static/admin/timepicker.js"></script>
|
||||
<script src="/static/admin/tokeninput.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// 日期时间控件
|
||||
$('#date').mask('9999-99-99 99:99').datetimepicker({
|
||||
currentText: '现在',
|
||||
prevText: '上一月',
|
||||
nextText: '下一月',
|
||||
monthNames: ['一月', '二月', '三月', '四月',
|
||||
'五月', '六月', '七月', '八月',
|
||||
'九月', '十月', '十一月', '十二月'
|
||||
],
|
||||
dayNames: ['星期日', '星期一', '星期二',
|
||||
'星期三', '星期四', '星期五', '星期六'
|
||||
],
|
||||
dayNamesShort: ['周日', '周一', '周二', '周三',
|
||||
'周四', '周五', '周六'
|
||||
],
|
||||
dayNamesMin: ['日', '一', '二', '三',
|
||||
'四', '五', '六'
|
||||
],
|
||||
closeText: '完成',
|
||||
timeOnlyTitle: '选择时间',
|
||||
timeText: '时间',
|
||||
hourText: '时',
|
||||
amNames: ['上午', 'A'],
|
||||
pmNames: ['下午', 'P'],
|
||||
minuteText: '分',
|
||||
secondText: '秒',
|
||||
|
||||
dateFormat: 'yy-mm-dd',
|
||||
hour: (new Date()).getHours(),
|
||||
minute: (new Date()).getMinutes()
|
||||
});
|
||||
|
||||
// 聚焦
|
||||
$('#title').select();
|
||||
|
||||
// tag autocomplete 提示
|
||||
var tags = $('#tags'),
|
||||
tagsPre = [];
|
||||
|
||||
if (tags.length > 0) {
|
||||
var items = tags.val().split(','),
|
||||
result = [];
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var tag = items[i];
|
||||
|
||||
if (!tag) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tagsPre.push({
|
||||
id: tag,
|
||||
tags: tag
|
||||
});
|
||||
}
|
||||
|
||||
tags.tokenInput({{.Tags}}, {
|
||||
propertyToSearch: 'tags',
|
||||
tokenValue: 'tags',
|
||||
searchDelay: 0,
|
||||
preventDuplicates: true,
|
||||
animateDropdown: false,
|
||||
hintText: '请输入标签名',
|
||||
noResultsText: '此标签不存在, 按回车创建',
|
||||
prePopulate: tagsPre,
|
||||
|
||||
onResult: function(result, query) {
|
||||
if (!query) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
result = [];
|
||||
}
|
||||
|
||||
if (!result[0] || result[0]['id'] != query) {
|
||||
result.unshift({
|
||||
id: query,
|
||||
tags: query
|
||||
});
|
||||
}
|
||||
|
||||
return result.slice(0, 5);
|
||||
}
|
||||
});
|
||||
|
||||
// tag autocomplete 提示宽度设置
|
||||
$('#token-input-tags').focus(function() {
|
||||
var t = $('.token-input-dropdown'),
|
||||
offset = t.outerWidth() - t.width();
|
||||
t.width($('.token-input-list').outerWidth() - offset);
|
||||
});
|
||||
}
|
||||
|
||||
// 缩略名自适应宽度
|
||||
var slug = $('#slug');
|
||||
|
||||
if (slug.length > 0) {
|
||||
var wrap = $('<div />').css({
|
||||
'position': 'relative',
|
||||
'display': 'inline-block'
|
||||
}),
|
||||
justifySlug = $('<pre />').css({
|
||||
'display': 'block',
|
||||
'visibility': 'hidden',
|
||||
'height': slug.height(),
|
||||
'padding': '0 2px',
|
||||
'margin': 0
|
||||
}).insertAfter(slug.wrap(wrap).css({
|
||||
'left': 0,
|
||||
'top': 0,
|
||||
'minWidth': '5px',
|
||||
'position': 'absolute',
|
||||
'width': '100%'
|
||||
})),
|
||||
originalWidth = slug.width();
|
||||
|
||||
function justifySlugWidth() {
|
||||
var val = slug.val();
|
||||
justifySlug.text(val.length > 0 ? val : ' ');
|
||||
}
|
||||
|
||||
slug.bind('input propertychange', justifySlugWidth);
|
||||
justifySlugWidth();
|
||||
}
|
||||
|
||||
// 原始的插入图片和文件
|
||||
Typecho.insertFileToEditor = function(file, url, isImage) {
|
||||
var textarea = $('#text'),
|
||||
sel = textarea.getSelection(),
|
||||
html = isImage ? '<img src="' + url + '" alt="' + file + '" />' : '<a href="' + url + '">' + file + '</a>',
|
||||
offset = (sel ? sel.start : 0) + html.length;
|
||||
|
||||
textarea.replaceSelection(html);
|
||||
textarea.setSelection(offset, offset);
|
||||
};
|
||||
|
||||
var submitted = false,
|
||||
form = $('form[name=write_post],form[name=write_page]').submit(function() {
|
||||
submitted = true;
|
||||
}),
|
||||
savedData = null;
|
||||
|
||||
// 自动保存
|
||||
var locked = false,
|
||||
formAction = form.attr('action'),
|
||||
idInput = $('input[name=cid]'),
|
||||
cid = idInput.val(),
|
||||
autoSave = $('<span id="auto-save-message" class="left"></span>').prependTo('.submit'),
|
||||
autoSaveOnce = !!cid,
|
||||
lastSaveTime = null;
|
||||
|
||||
function autoSaveListener() {
|
||||
setInterval(function() {
|
||||
var data = form.serialize();
|
||||
|
||||
if (savedData != data && !locked) {
|
||||
locked = true;
|
||||
|
||||
autoSave.text('正在保存');
|
||||
$.post(formAction, data + '&do=auto', function(o) {
|
||||
savedData = data;
|
||||
lastSaveTime = o.time;
|
||||
idInput.val(o.cid);
|
||||
autoSave.text('已保存' + ' (' + o.time + ')').effect('highlight', 1000);
|
||||
locked = false;
|
||||
}, 'json');
|
||||
}
|
||||
}, 20000);
|
||||
}
|
||||
|
||||
if (autoSaveOnce) {
|
||||
savedData = form.serialize();
|
||||
autoSaveListener();
|
||||
}
|
||||
|
||||
$('#text').bind('input propertychange', function() {
|
||||
if (!locked) {
|
||||
autoSave.text('尚未保存' + (lastSaveTime ? ' (上次保存时间: ' + lastSaveTime + ')' : ''));
|
||||
}
|
||||
|
||||
if (!autoSaveOnce) {
|
||||
autoSaveOnce = true;
|
||||
autoSaveListener();
|
||||
}
|
||||
});
|
||||
|
||||
// 自动检测离开页
|
||||
var lastData = form.serialize();
|
||||
|
||||
$(window).bind('beforeunload', function() {
|
||||
if (!!savedData) {
|
||||
lastData = savedData;
|
||||
}
|
||||
|
||||
if (form.serialize() != lastData && !submitted) {
|
||||
return '内容已经改变尚未保存, 您确认要离开此页面吗?';
|
||||
}
|
||||
});
|
||||
|
||||
// 控制选项和附件的切换
|
||||
var fileUploadInit = false;
|
||||
$('#edit-secondary .typecho-option-tabs li').click(function() {
|
||||
$('#edit-secondary .typecho-option-tabs li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.tab-content').addClass('hidden');
|
||||
|
||||
var selected_tab = $(this).find('a').attr('href'),
|
||||
selected_el = $(selected_tab).removeClass('hidden');
|
||||
|
||||
if (!fileUploadInit) {
|
||||
selected_el.trigger('init');
|
||||
fileUploadInit = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// 自动隐藏密码框
|
||||
$('#visibility').change(function() {
|
||||
var val = $(this).val(),
|
||||
password = $('#post-password');
|
||||
|
||||
if ('password' == val) {
|
||||
password.removeClass('hidden');
|
||||
} else {
|
||||
password.addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// 草稿删除确认
|
||||
$('.edit-draft-notice a').click(function () {
|
||||
if (confirm('您确认要删除这份草稿吗?')) {
|
||||
window.location.href = $(this).attr('href');
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/static/admin/hyperdown.js"></script>
|
||||
<script src="/static/admin/pagedown.js"></script>
|
||||
<script src="/static/admin/pagedown-extra.js"></script>
|
||||
<script src="/static/admin/diff.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var textarea = $('#text'),
|
||||
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent()),
|
||||
preview = $('<div id="wmd-preview" class="wmd-hidetab" />').insertAfter('.editor');
|
||||
|
||||
var options = {},
|
||||
isMarkdown = 1;
|
||||
|
||||
options.strings = {
|
||||
bold: '加粗 <strong> Ctrl+B',
|
||||
boldexample: '加粗文字',
|
||||
|
||||
italic: '斜体 <em> Ctrl+I',
|
||||
italicexample: '斜体文字',
|
||||
|
||||
link: '链接 <a> Ctrl+L',
|
||||
linkdescription: '请输入链接描述',
|
||||
|
||||
quote: '引用 <blockquote> Ctrl+Q',
|
||||
quoteexample: '引用文字',
|
||||
|
||||
code: '代码 <pre><code> Ctrl+K',
|
||||
codeexample: '请输入代码',
|
||||
|
||||
image: '图片 <img> Ctrl+G',
|
||||
imagedescription: '请输入图片描述',
|
||||
|
||||
olist: '数字列表 <ol> Ctrl+O',
|
||||
ulist: '普通列表 <ul> Ctrl+U',
|
||||
litem: '列表项目',
|
||||
|
||||
heading: '标题 <h1>/<h2> Ctrl+H',
|
||||
headingexample: '标题文字',
|
||||
|
||||
hr: '分割线 <hr> Ctrl+R',
|
||||
more: '摘要分割线 <!--more--> Ctrl+M',
|
||||
|
||||
undo: '撤销 - Ctrl+Z',
|
||||
redo: '重做 - Ctrl+Y',
|
||||
redomac: '重做 - Ctrl+Shift+Z',
|
||||
|
||||
fullscreen: '全屏 - Ctrl+J',
|
||||
exitFullscreen: '退出全屏 - Ctrl+E',
|
||||
fullscreenUnsupport: '此浏览器不支持全屏操作',
|
||||
|
||||
imagedialog: '<p><b>插入图片</b></p><p>请在下方的输入框内输入要插入的远程图片地址</p><p>您也可以使用附件功能插入上传的本地图片</p>',
|
||||
linkdialog: '<p><b>插入链接</b></p><p>请在下方的输入框内输入要插入的链接地址</p>',
|
||||
|
||||
ok: '确定',
|
||||
cancel: '取消',
|
||||
|
||||
help: 'Markdown语法帮助'
|
||||
};
|
||||
|
||||
var converter = new HyperDown(),
|
||||
editor = new Markdown.Editor(converter, '', options),
|
||||
diffMatch = new diff_match_patch(), last = '', preview = $('#wmd-preview'),
|
||||
mark = '@mark' + Math.ceil(Math.random() * 100000000) + '@',
|
||||
span = '<span class="diff" />',
|
||||
cache = {};
|
||||
|
||||
|
||||
// 自动跟随
|
||||
converter.hook('makeHtml', function (html) {
|
||||
// convert all comment
|
||||
html = html.replace(/<!--(.+?)-->/g, '<!--$1-->');
|
||||
|
||||
if (html.indexOf('<!--more-->') > 0) {
|
||||
var parts = html.split(/\s*<\!\-\-more\-\->\s*/),
|
||||
summary = parts.shift(),
|
||||
details = parts.join('');
|
||||
|
||||
html = '<div class="summary">' + summary + '</div>'
|
||||
+ '<div class="details">' + details + '</div>';
|
||||
}
|
||||
|
||||
|
||||
var diffs = diffMatch.diff_main(last, html);
|
||||
last = html;
|
||||
|
||||
if (diffs.length > 0) {
|
||||
var stack = [], markStr = mark;
|
||||
|
||||
for (var i = 0; i < diffs.length; i ++) {
|
||||
var diff = diffs[i], op = diff[0], str = diff[1]
|
||||
sp = str.lastIndexOf('<'), ep = str.lastIndexOf('>');
|
||||
|
||||
if (op != 0) {
|
||||
if (sp >=0 && sp > ep) {
|
||||
if (op > 0) {
|
||||
stack.push(str.substring(0, sp) + markStr + str.substring(sp));
|
||||
} else {
|
||||
var lastStr = stack[stack.length - 1], lastSp = lastStr.lastIndexOf('<');
|
||||
stack[stack.length - 1] = lastStr.substring(0, lastSp) + markStr + lastStr.substring(lastSp);
|
||||
}
|
||||
} else {
|
||||
if (op > 0) {
|
||||
stack.push(str + markStr);
|
||||
} else {
|
||||
stack.push(markStr);
|
||||
}
|
||||
}
|
||||
|
||||
markStr = '';
|
||||
} else {
|
||||
stack.push(str);
|
||||
}
|
||||
}
|
||||
|
||||
html = stack.join('');
|
||||
|
||||
if (!markStr) {
|
||||
var pos = html.indexOf(mark), prev = html.substring(0, pos),
|
||||
next = html.substr(pos + mark.length),
|
||||
sp = prev.lastIndexOf('<'), ep = prev.lastIndexOf('>');
|
||||
|
||||
if (sp >= 0 && sp > ep) {
|
||||
html = prev.substring(0, sp) + span + prev.substring(sp) + next;
|
||||
} else {
|
||||
html = prev + span + next;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 替换img
|
||||
html = html.replace(/<(img)\s+([^>]*)\s*src="([^"]+)"([^>]*)>/ig, function (all, tag, prefix, src, suffix) {
|
||||
if (!cache[src]) {
|
||||
cache[src] = false;
|
||||
} else {
|
||||
return '<span class="cache" data-width="' + cache[src][0] + '" data-height="' + cache[src][1] + '" '
|
||||
+ 'style="background:url(' + src + ') no-repeat left top; width:'
|
||||
+ cache[src][0] + 'px; height:' + cache[src][1] + 'px; display: inline-block; max-width: 100%;'
|
||||
+ '-webkit-background-size: contain;-moz-background-size: contain;-o-background-size: contain;background-size: contain;" />';
|
||||
}
|
||||
|
||||
return all;
|
||||
});
|
||||
|
||||
// 替换block
|
||||
html = html.replace(/<(iframe|embed)\s+([^>]*)>/ig, function (all, tag, src) {
|
||||
if (src[src.length - 1] == '/') {
|
||||
src = src.substring(0, src.length - 1);
|
||||
}
|
||||
|
||||
return '<div style="background: #ddd; height: 40px; overflow: hidden; line-height: 40px; text-align: center; font-size: 12px; color: #777">'
|
||||
+ tag + ' : ' + $.trim(src) + '</div>';
|
||||
});
|
||||
|
||||
return html;
|
||||
});
|
||||
|
||||
function cacheResize() {
|
||||
var t = $(this), w = parseInt(t.data('width')), h = parseInt(t.data('height')),
|
||||
ow = t.width();
|
||||
|
||||
t.height(h * ow / w);
|
||||
}
|
||||
|
||||
var to;
|
||||
editor.hooks.chain('onPreviewRefresh', function () {
|
||||
var diff = $('.diff', preview), scrolled = false;
|
||||
|
||||
if (to) {
|
||||
clearTimeout(to);
|
||||
}
|
||||
|
||||
$('img', preview).load(function () {
|
||||
var t = $(this), src = t.attr('src');
|
||||
|
||||
if (scrolled) {
|
||||
preview.scrollTo(diff, {
|
||||
offset : - 50
|
||||
});
|
||||
}
|
||||
|
||||
if (!!src && !cache[src]) {
|
||||
cache[src] = [this.width, this.height];
|
||||
}
|
||||
});
|
||||
|
||||
$('.cache', preview).resize(cacheResize).each(cacheResize);
|
||||
|
||||
var changed = $('.diff', preview).parent();
|
||||
if (!changed.is(preview)) {
|
||||
changed.css('background-color', 'rgba(255,230,0,0.5)');
|
||||
to = setTimeout(function () {
|
||||
changed.css('background-color', 'transparent');
|
||||
}, 4500);
|
||||
}
|
||||
|
||||
if (diff.length > 0) {
|
||||
var p = diff.position(), lh = diff.parent().css('line-height');
|
||||
lh = !!lh ? parseInt(lh) : 0;
|
||||
|
||||
if (p.top < 0 || p.top > preview.height() - lh) {
|
||||
preview.scrollTo(diff, {
|
||||
offset : - 50
|
||||
});
|
||||
scrolled = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var input = $('#text'), th = textarea.height(), ph = preview.height(),
|
||||
uploadBtn = $('<button type="button" id="btn-fullscreen-upload" class="btn btn-link">'
|
||||
+ '<i class="i-upload">附件</i></button>')
|
||||
.prependTo('.submit .right')
|
||||
.click(function() {
|
||||
$('a', $('.typecho-option-tabs li').not('.active')).trigger('click');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.typecho-option-tabs li').click(function () {
|
||||
uploadBtn.find('i').toggleClass('i-upload-active',
|
||||
$('#tab-files-btn', this).length > 0);
|
||||
});
|
||||
|
||||
editor.hooks.chain('enterFakeFullScreen', function () {
|
||||
th = textarea.height();
|
||||
ph = preview.height();
|
||||
$(document.body).addClass('fullscreen');
|
||||
var h = $(window).height() - toolbar.outerHeight();
|
||||
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
});
|
||||
|
||||
editor.hooks.chain('enterFullScreen', function () {
|
||||
$(document.body).addClass('fullscreen');
|
||||
|
||||
var h = window.screen.height - toolbar.outerHeight();
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
});
|
||||
|
||||
editor.hooks.chain('exitFullScreen', function () {
|
||||
$(document.body).removeClass('fullscreen');
|
||||
textarea.height(th);
|
||||
preview.height(ph);
|
||||
});
|
||||
|
||||
function initMarkdown() {
|
||||
editor.run();
|
||||
|
||||
var imageButton = $('#wmd-image-button'),
|
||||
linkButton = $('#wmd-link-button');
|
||||
|
||||
Typecho.insertFileToEditor = function (file, url, isImage) {
|
||||
var button = isImage ? imageButton : linkButton;
|
||||
|
||||
options.strings[isImage ? 'imagename' : 'linkname'] = file;
|
||||
button.trigger('click');
|
||||
|
||||
var checkDialog = setInterval(function () {
|
||||
if ($('.wmd-prompt-dialog').length > 0) {
|
||||
$('.wmd-prompt-dialog input').val(url).select();
|
||||
clearInterval(checkDialog);
|
||||
checkDialog = null;
|
||||
}
|
||||
}, 10);
|
||||
};
|
||||
|
||||
Typecho.uploadComplete = function (file) {
|
||||
Typecho.insertFileToEditor(file.title, file.url, file.isImage);
|
||||
};
|
||||
|
||||
// 编辑预览切换
|
||||
var edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active">撰写</a><a href="#wmd-preview">预览</a></div>'),
|
||||
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
|
||||
|
||||
$(".wmd-edittab a").click(function() {
|
||||
$(".wmd-edittab a").removeClass('active');
|
||||
$(this).addClass("active");
|
||||
$("#wmd-editarea, #wmd-preview").addClass("wmd-hidetab");
|
||||
|
||||
var selected_tab = $(this).attr("href"),
|
||||
selected_el = $(selected_tab).removeClass("wmd-hidetab");
|
||||
|
||||
// 预览时隐藏编辑器按钮
|
||||
if (selected_tab == "#wmd-preview") {
|
||||
$("#wmd-button-row").addClass("wmd-visualhide");
|
||||
} else {
|
||||
$("#wmd-button-row").removeClass("wmd-visualhide");
|
||||
}
|
||||
|
||||
// 预览和编辑窗口高度一致
|
||||
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
initMarkdown();
|
||||
});
|
||||
</script>
|
||||
<script src="/static/admin/moxie.js"></script>
|
||||
<script src="/static/admin/plupload.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
function updateAttacmentNumber () {
|
||||
var btn = $('#tab-files-btn'),
|
||||
balloon = $('.balloon', btn),
|
||||
count = $('#file-list li .insert').length;
|
||||
|
||||
if (count > 0) {
|
||||
if (!balloon.length) {
|
||||
btn.html($.trim(btn.html()) + ' ');
|
||||
balloon = $('<span class="balloon"></span>').appendTo(btn);
|
||||
}
|
||||
|
||||
balloon.html(count);
|
||||
} else if (0 == count && balloon.length > 0) {
|
||||
balloon.remove();
|
||||
}
|
||||
}
|
||||
|
||||
$('.upload-area').bind({
|
||||
dragenter : function () {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
dragover : function (e) {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
drop : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragend : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragleave : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
}
|
||||
});
|
||||
|
||||
updateAttacmentNumber();
|
||||
|
||||
function fileUploadStart (file) {
|
||||
$('<li id="' + file.id + '" class="loading">'
|
||||
+ file.name + '</li>').appendTo('#file-list');
|
||||
}
|
||||
|
||||
function fileUploadError (error) {
|
||||
var file = error.file, code = error.code, word;
|
||||
|
||||
switch (code) {
|
||||
case plupload.FILE_SIZE_ERROR:
|
||||
word = '文件大小超过限制';
|
||||
break;
|
||||
case plupload.FILE_EXTENSION_ERROR:
|
||||
word = '文件扩展名不被支持';
|
||||
break;
|
||||
case plupload.FILE_DUPLICATE_ERROR:
|
||||
word = '文件已经上传过';
|
||||
break;
|
||||
case plupload.HTTP_ERROR:
|
||||
default:
|
||||
word = '上传出现错误';
|
||||
break;
|
||||
}
|
||||
|
||||
var fileError = '%s 上传失败'.replace('%s', file.name),
|
||||
li, exist = $('#' + file.id);
|
||||
|
||||
if (exist.length > 0) {
|
||||
li = exist.removeClass('loading').html(fileError);
|
||||
} else {
|
||||
li = $('<li>' + fileError + '<br />' + word + '</li>').appendTo('#file-list');
|
||||
}
|
||||
|
||||
li.effect('highlight', {color : '#FBC2C4'}, 2000, function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// fix issue #341
|
||||
this.removeFile(file);
|
||||
}
|
||||
|
||||
var completeFile = null;
|
||||
function fileUploadComplete (id, data) {
|
||||
var li = $('#' + id).removeClass('loading').data('title', data.title)
|
||||
.data('url', data.url)
|
||||
.data('image', data.isImage)
|
||||
.html('<input type="hidden" name="attachment[]" value="' + data.title + '" />'
|
||||
+ '<a class="insert" target="_blank" href="###" title="点击插入文件">' + data.title + '</a><div class="info">' + data.bytes
|
||||
+ ' <a class="file" target="_blank" href="'
|
||||
+ data.url + '" title="查看"><i class="i-edit"></i></a>'
|
||||
+ ' <a class="delete" href="###" title="删除"><i class="i-delete"></i></a></div>')
|
||||
.effect('highlight', 1000);
|
||||
|
||||
attachInsertEvent(li);
|
||||
attachDeleteEvent(li);
|
||||
updateAttacmentNumber();
|
||||
|
||||
if (!completeFile) {
|
||||
completeFile = data;
|
||||
}
|
||||
}
|
||||
|
||||
$('#tab-files').bind('init', function () {
|
||||
var uploader = new plupload.Uploader({
|
||||
browse_button : $('.upload-file').get(0),
|
||||
url : '/admin/api/file-upload',
|
||||
runtimes : 'html5,flash,html4',
|
||||
flash_swf_url : '/static/admin/Moxie.swf',
|
||||
drop_element : $('.upload-area').get(0),
|
||||
filters : {
|
||||
max_file_size : '2mb',
|
||||
prevent_duplicates : true
|
||||
},
|
||||
|
||||
init : {
|
||||
FilesAdded : function (up, files) {
|
||||
for (var i = 0; i < files.length; i ++) {
|
||||
fileUploadStart(files[i]);
|
||||
}
|
||||
|
||||
completeFile = null;
|
||||
uploader.start();
|
||||
},
|
||||
|
||||
UploadComplete : function () {
|
||||
if (completeFile) {
|
||||
Typecho.uploadComplete(completeFile);
|
||||
}
|
||||
},
|
||||
|
||||
FileUploaded : function (up, file, result) {
|
||||
if (200 == result.status) {
|
||||
var data = $.parseJSON(result.response);
|
||||
if (data) {
|
||||
fileUploadComplete(file.id, data);
|
||||
uploader.removeFile(file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fileUploadError.call(uploader, {
|
||||
code : plupload.HTTP_ERROR,
|
||||
file : file
|
||||
});
|
||||
},
|
||||
|
||||
Error : function (up, error) {
|
||||
fileUploadError.call(uploader, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uploader.init();
|
||||
});
|
||||
|
||||
function attachInsertEvent (el) {
|
||||
$('.insert', el).click(function () {
|
||||
var t = $(this), p = t.parents('li');
|
||||
Typecho.insertFileToEditor(t.text(), p.data('url'), p.data('image'));
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function attachDeleteEvent (el) {
|
||||
var file = $('a.insert', el).text();
|
||||
$('.delete', el).click(function () {
|
||||
if (confirm('确认要删除文件 %s 吗?'.replace('%s', file))) {
|
||||
var title = $(this).parents('li').data('title');
|
||||
$.post('/admin/api/file-delete',
|
||||
{'title' : title},
|
||||
function () {
|
||||
$(el).fadeOut(function () {
|
||||
$(this).remove();
|
||||
updateAttacmentNumber();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$('#file-list li').each(function () {
|
||||
attachInsertEvent(this);
|
||||
attachDeleteEvent(this);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,125 @@
|
||||
{{define "admin-posts"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>管理文章<a href="/admin/write-post">新增</a></h2>
|
||||
</div>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="你确认要删除这些文章吗?" href="/admin/api/post-delete">删除</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
{{if or .KW (gt .Serie 0)}}<a href="/admin/manage-posts">« 取消筛选</a>{{end}}
|
||||
<input type="text" class="text-s" placeholder="请输入关键字" value="{{if .KW}}{{.KW}}{{end}}" name="keywords" />
|
||||
<select name="serie">
|
||||
<option value="">所有专题</option>
|
||||
{{range .Series}}
|
||||
<option {{if eq $.Serie .ID}}selected{{end}} value="{{.ID}}">{{.Name}}
|
||||
{{end}}
|
||||
</select>
|
||||
<button type="submit" class="btn btn-s">筛选</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- end .typecho-list-operate -->
|
||||
<form method="post" name="manage_posts" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" />
|
||||
<col width="6%" />
|
||||
<col width="40%" />
|
||||
<col width="" />
|
||||
<col width="12%" />
|
||||
<col width="14%" />
|
||||
<col width="14%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>标题</th>
|
||||
<th>作者</th>
|
||||
<th>专题</th>
|
||||
<th>创建</th>
|
||||
<th>更新</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .List}}
|
||||
<tr id="post-{{.ID}}">
|
||||
<td>
|
||||
<input type="checkbox" value="{{.ID}}" name="cid[]" />
|
||||
</td>
|
||||
<td><a href="/post/{{.Slug}}.html#comments" class="balloon-button size-1">{{.Count}}</a></td>
|
||||
<td>
|
||||
<a href="/admin/write-post?cid={{.ID}}">{{.Title}}</a>
|
||||
<a target="_blank" href="/post/{{.Slug}}.html" title="浏览 {{.Title}}"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>{{.Author}}</td>
|
||||
<td>{{if gt .SerieID 0}}专题ID:{{.SerieID}}{{else}}--{{end}}</td>
|
||||
<td>{{dateformat .CreatedAt "06/01/02 15:04"}}</td>
|
||||
<td>{{dateformat .UpdatedAt "06/01/02 15:04"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<!-- end .operate-form -->
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="你确认要删除这些文章吗?" href="/admin/api/post-delete">删除</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="typecho-pager">
|
||||
{{if .Prev}}<li class="prev"><a href="/admin/manage-posts?{{html .Prev}}">«</a></li>{{end}}
|
||||
{{range $k,$v := .PP}}
|
||||
<li {{if eq $.Cur $k}}class="current"{{end}}><a href="/admin/manage-posts?{{html $v}}">{{$k}}</a></li>
|
||||
{{end}}
|
||||
{{if .Next}}<li class="next"><a href="/admin/manage-posts?{{html .Next}}">»</a></li>{{end}}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<!-- end .typecho-list-operate -->
|
||||
</div>
|
||||
<!-- end .typecho-list -->
|
||||
</div>
|
||||
<!-- end .typecho-page-main -->
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
$(document).ready(function() {
|
||||
$('.typecho-list-table').tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'tr',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a,button.btn-operate'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,166 @@
|
||||
{{define "admin-profile"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>个人设置</h2>
|
||||
</div>
|
||||
{{with .Ei}}
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-3">
|
||||
<p>
|
||||
<img class="profile-avatar" src="//{{$.Qiniu.Domain}}/static/img/avatar.png" alt="{{.Blogger.BlogName}}" />
|
||||
</p>
|
||||
<h2>{{.Blogger.BlogName}}</h2>
|
||||
<p>{{.Blogger.SubTitle}}</p>
|
||||
<p>最后登录: {{dateformat .Account.LoginAt "2006/01/02 15:04"}}</p>
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-6 col-tb-offset-1 typecho-content-panel" role="form">
|
||||
<section>
|
||||
<h3>账号信息</h3>
|
||||
<form action="/admin/api/account" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="info-0-1">
|
||||
个人邮箱</label>
|
||||
<input id="info-0-1" name="email" type="text" class="text" value="{{.Account.Email}}" />
|
||||
<p class="description">
|
||||
用于发送告警邮件及其它通知, 建议填写, 如: example@163.com.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="info-0-2">
|
||||
移动电话</label>
|
||||
<input id="info-0-2" name="phoneNumber" type="text" class="text" value="{{.Account.PhoneN}}" />
|
||||
<p class="description">
|
||||
选择填写, 如: +8615123456789.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="info-0-3">
|
||||
家庭住址</label>
|
||||
<input id="info-0-3" name="address" type="text" class="text" value="{{.Account.Address}}" />
|
||||
<p class="description">
|
||||
选择填写, 如: xx省xx市xx区(县)xxxx小区xxx号.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option typecho-option-submit">
|
||||
<li>
|
||||
<button type="submit" class="btn primary">
|
||||
更新账号信息</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</section>
|
||||
<br>
|
||||
<section>
|
||||
<h3>博客信息</h3>
|
||||
<form action="/admin/api/blog" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-1">
|
||||
博客昵称 *</label>
|
||||
<input id="blog-0-1" name="blogName" type="text" class="text" value="{{.Blogger.BlogName}}" />
|
||||
<p class="description">
|
||||
用户昵称可以与用户名不同, 用于前台显示.
|
||||
<br />如果你将此项留空, 将默认使用登录用户名.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-2">
|
||||
标题显示 *</label>
|
||||
<input id="blog-0-2" name="bTitle" type="text" class="text" value="{{.Blogger.BTitle}}" />
|
||||
<p class="description">
|
||||
用于所有页面的title组成, 如: Deepzz's Blog</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-3">
|
||||
个人格言</label>
|
||||
<input id="blog-0-3" name="subTitle" type="text" class="text" value="{{.Blogger.SubTitle}}" />
|
||||
<p class="description">
|
||||
简介或格言, 如: 生活百般滋味, 人生需要笑对.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-4">
|
||||
备案号</label>
|
||||
<input id="blog-0-4" name="beiAn" type="text" class="text" value="{{.Blogger.BeiAn}}" />
|
||||
<p class="description">
|
||||
用于底部显示, 不添加则不显示, 如: 蜀 ICP 备 16021362 号</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-5">
|
||||
专题前说</label>
|
||||
<textarea id="blog-0-5" name="seriessay">{{.Blogger.SeriesSay}}</textarea>
|
||||
<p class="description">
|
||||
此文字用于专题前述, 会在专题最前方显示.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="blog-0-6">
|
||||
归档前说</label>
|
||||
<textarea id="blog-0-6" name="archivessay">{{.Blogger.ArchivesSay}}</textarea>
|
||||
<p class="description">
|
||||
此文字用于归档前述, 会在归档最前方显示.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option typecho-option-submit" id="typecho-option-item-submit-4">
|
||||
<li>
|
||||
<button type="submit" class="btn primary">
|
||||
更新博客信息</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</section>
|
||||
<br>
|
||||
<section id="change-password">
|
||||
<h3>密码修改</h3>
|
||||
<form action="/admin/api/password" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<ul class="typecho-option" id="typecho-option-item-oldpwd-11">
|
||||
<li>
|
||||
<label class="typecho-label" for="password-0-11">
|
||||
原始密码</label>
|
||||
<input id="password-0-11" name="old" type="password" class="w-60" />
|
||||
<p class="description">
|
||||
该账户旧密码.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option" id="typecho-option-item-newpwd-12">
|
||||
<li>
|
||||
<label class="typecho-label" for="password-0-12">
|
||||
用户密码</label>
|
||||
<input id="password-0-12" name="new" type="password" class="w-60" />
|
||||
<p class="description">
|
||||
为此用户分配一个密码.
|
||||
<br />建议使用特殊字符与字母、数字的混编样式,以增加系统安全性.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option" id="typecho-option-item-confirm-13">
|
||||
<li>
|
||||
<label class="typecho-label" for="confirm-0-13">
|
||||
用户密码确认</label>
|
||||
<input id="confirm-0-13" name="confirm" type="password" class="w-60" />
|
||||
<p class="description">
|
||||
请确认你的密码, 与上面输入的密码保持一致.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option typecho-option-submit" id="typecho-option-item-submit-14">
|
||||
<li>
|
||||
<button type="submit" class="btn primary">
|
||||
更新密码</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,74 @@
|
||||
{{define "admin-serie"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
{{if .Edit}}
|
||||
<h2>编辑 {{with .Edit}}{{.Name}}{{end}}</h2>
|
||||
{{else}}
|
||||
<h2>新增专题</h2>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-6 col-tb-offset-3">
|
||||
<form action="/admin/api/serie-add" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<ul class="typecho-option" id="typecho-option-item-name-0">
|
||||
<li>
|
||||
<label class="typecho-label" for="name-0-1">
|
||||
专题名称 *</label>
|
||||
<input id="name-0-1" name="name" type="text" class="text" {{with .Edit}}value="{{.Name}}"{{end}} />
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option" id="typecho-option-item-slug-1">
|
||||
<li>
|
||||
<label class="typecho-label" for="slug-0-2">
|
||||
专题缩略名</label>
|
||||
<input id="slug-0-2" name="slug" type="text" class="text" {{with .Edit}}value="{{.Slug}}"{{end}} />
|
||||
<p class="description">
|
||||
专题缩略名用于创建友好的链接形式, 建议使用字母, 数字, 下划线和横杠.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option" id="typecho-option-item-description-3">
|
||||
<li>
|
||||
<label class="typecho-label" for="description-0-3">
|
||||
专题描述</label>
|
||||
<textarea id="description-0-3" name="description">{{with .Edit}}{{.Desc}}{{end}} </textarea>
|
||||
<p class="description">
|
||||
此文字用于描述专题, 在有的主题中它会被显示.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" name="mid" {{with .Edit}}value="{{.ID}}"{{end}} />
|
||||
<ul class="typecho-option typecho-option-submit" id="typecho-option-item--6">
|
||||
<li>
|
||||
<button type="submit" class="btn primary">
|
||||
{{if .Edit}}更新专题{{else}}新增专题{{end}}</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var error = $('.typecho-option .error:first');
|
||||
|
||||
if (error.length > 0) {
|
||||
$('html,body').scrollTop(error.parents('.typecho-option').offset().top);
|
||||
}
|
||||
|
||||
$('form').submit(function () {
|
||||
if (this.submitted) {
|
||||
return false;
|
||||
} else {
|
||||
this.submitted = true;
|
||||
}
|
||||
});
|
||||
|
||||
$('label input[type=text]').click(function (e) {
|
||||
var check = $('#' + $(this).parents('label').attr('for'));
|
||||
check.prop('checked', true);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,110 @@
|
||||
{{define "admin-series"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>管理专题<a href="/admin/add-serie">新增</a></h2>
|
||||
</div>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
<div class="col-mb-12" role="main">
|
||||
<form method="post" name="manage_categories" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="此分类下的所有内容将被删除, 你确认要删除这些分类吗?" href="/admin/api/serie-delete">删除</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" />
|
||||
<col width="10%" />
|
||||
<col width="45%" />
|
||||
<col width="30%" />
|
||||
<col width="10%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th> </th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>创建</th>
|
||||
<th>文章数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .List}}
|
||||
<tr id="mid-category-{{.ID}}">
|
||||
<td>
|
||||
<input type="checkbox" value="{{.ID}}" name="mid[]" />
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<a href="/admin/add-serie?mid={{.ID}}">{{.Name}}</a>
|
||||
<a target="_blank" href="/series.html#toc-{{.ID}}" title="浏览 {{.Name}}"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>{{dateformat .CreatedAt "2006/01/02 15:04"}}</td>
|
||||
<td><a class="balloon-button left size-50" href="#">{{len .Articles}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$(document).ready(function() {
|
||||
var table = $('.typecho-list-table').tableDnD({
|
||||
onDrop: function() {
|
||||
var ids = [];
|
||||
|
||||
$('input[type=checkbox]', table).each(function() {
|
||||
ids.push($(this).val());
|
||||
});
|
||||
|
||||
$.post('/admin/api/move',
|
||||
$.param({
|
||||
mid: ids
|
||||
}));
|
||||
|
||||
$('tr', table).each(function(i) {
|
||||
if (i % 2) {
|
||||
$(this).addClass('even');
|
||||
} else {
|
||||
$(this).removeClass('even');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
table.tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'tr',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function() {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,58 @@
|
||||
{{define "admin-tags"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>管理标签</h2>
|
||||
</div>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
<form method="post" name="manage_tags" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<!-- <ul class="dropdown-menu"> -->
|
||||
<!-- <li><a lang="你确认要删除这些标签吗?" href="/admin/api/tag-delete">删除</a></li> -->
|
||||
<!-- </ul> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="typecho-list-notable tag-list clearfix">
|
||||
{{range $k,$v:=.List}}
|
||||
<li class="size-5"><input type="checkbox" name="mid[]" />{{$k}}<i class="i-edit"></i></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-4" role="form">
|
||||
<p> 夏雷在天际回响<br> 纸船在水中荡漾<br> 时间就这么走了<br> 远离了三年的学堂<br> <br> 是否还记得前排的那个姑凉<br> 如今你又彷徨在谁的身旁<br> 那时我们都太迷茫<br> 沉醉在青春路上<br> <br> 嘴角扬起的微笑<br> 那是我们最美好的时光<br> 那个女孩的嘴角<br> 深深地印在我的胸膛<br> <br> 青春是多么昂扬<br> 奏响生命的乐章<br> 雨中漫步的时光<br> 在记忆流逝中远航<br> <br> 别了,我亲爱的课堂<br> 别了,我最好的同窗<br> 别了,敬爱三年的师长<br> 我多么希望,记忆停留归航<br> 2016/9.9殇星<br> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.typecho-list-notable').tableSelectable({
|
||||
checkEl : 'input[type=checkbox]',
|
||||
rowEl : 'li',
|
||||
selectAllEl : '.typecho-table-select-all',
|
||||
actionEl : '.dropdown-menu a'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl : '.dropdown-toggle',
|
||||
menuEl : '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function () {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{define "admin-trash"}}
|
||||
<div class="body container">
|
||||
<div class="typecho-page-title">
|
||||
<h2>回收箱</h2>
|
||||
</div>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
<div class="col-mb-12" role="main">
|
||||
<form method="post" name="manage_trash" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only">全选</i>
|
||||
<input type="checkbox" class="typecho-table-select-all" />
|
||||
</label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only">操作</i>选中项 <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="你确认要恢复该文章到草稿箱吗?" href="/admin/api/trash-recover">恢复</a></li>
|
||||
<li><a lang="此回收箱下的所有内容将被删除, 你确认要删除这些文章吗?" href="/admin/api/trash-delete">删除</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" />
|
||||
<col width="40%" />
|
||||
<col width="" />
|
||||
<col width="12%" />
|
||||
<col width="14%" />
|
||||
<col width="14%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>标题</th>
|
||||
<th>作者</th>
|
||||
<th>专题</th>
|
||||
<th>创建</th>
|
||||
<th>删除</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .List}}
|
||||
<tr id="mid-article-{{.ID}}">
|
||||
<td>
|
||||
<input type="checkbox" value="{{.ID}}" name="mid[]" />
|
||||
</td>
|
||||
<td>{{.Title}}</td>
|
||||
<td>{{.Author}}</td>
|
||||
<td>{{if gt .SerieID 0}}专题ID:{{.SerieID}}{{else}}--{{end}}</td>
|
||||
<td>{{dateformat .CreatedAt "2006/01/02 15:04"}}</td>
|
||||
<td>{{dateformat .DeletedAt "2006/01/02 15:04"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
$(document).ready(function() {
|
||||
$('.typecho-list-table').tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'tr',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a,button.btn-operate'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "archives"}}<div id=content class=inner><article class="post post-archives"><h1 class=title>归档</h1><div class="entry-content">{{str2html .Article}}</div></article></div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "article"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><div class=meta><div class=date><time itemprop=datePublished content="{{dateformat .CreatedAt "2006-01-02T15:04:05Z07:00"}}">{{dateformat .CreatedAt "Jan 02, 2006"}}</time></div><div class="date-modified"><time itemprop=dateModified content="{{dateformat .UpdatedAt "2006-01-02T15:04:05Z07:00"}}">{{dateformat .UpdatedAt "Jan 02, 2006"}}</time></div><div class=comment><a href="#comments">{{.Count}} Comments</a></div></div><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody>{{str2html .Header}}{{str2html .Content}}<p>本文链接:<a rel="bookmark" title="Permalink to {{.Title}}" href="//{{$.Domain}}/post/{{.Slug}}.html" itemprop="url">https://{{$.Domain}}/post/{{.Slug}}.html</a>,<a href="//{{$.Domain}}/post/{{.Slug}}.html#comments">参与评论 »</a></p><p>--<acronym title="End of File">EOF</acronym>--</p><p class="post-info">发表于 <span class="date">{{dateformat .CreatedAt "2006-01-02 15:04:05"}}</span>{{if gt (.Tags|len) 0}},并被添加「{{range $index, $elem := .Tags}}{{if gt $index 0}}、{{end}}<a href="/search.html?q=tag:{{$elem}}">{{$elem}}</a>{{end}}」标签{{end}}{{if .UpdatedAt|isnotzero}},最后修改于 <span class="date">{{dateformat .UpdatedAt "2006-01-02 15:04:05"}}</span>{{end}}。</p>{{with $.Copyright}}<p class="copyright-info">{{str2html $.Copyright}}<a href="//{{$.Domain}}/post/about.html#toc_1">更多说明 »</a></p>{{end}}{{if gt $.Days 100}}<p class="expire-tips">提醒:本文最后更新于 {{$.Days}} 天前,文中所描述的信息可能已发生改变,请谨慎使用。</p>{{end}}{{with $.Serie}}<div class="entry-series"><h3>专题「{{.Name}}」的其它文章 <a href="/series.html#toc-{{.ID}}" title="更多">»</a></h3><ul>{{range .Articles}}{{if ne .ID $.Article.ID}}<li><a href="/post/{{.Slug}}.html">{{.Title}}</a> <span class="date">({{dateformat .CreatedAt "Jan 02, 2006"}})</span></li>{{end}}{{end}}</ul></div>{{end}}</div></article><nav class="page-navi">{{with .Prev}}<a href="/post/{{.Slug}}.html" class=prev>« {{.Title}}</a>{{end}}{{with .Next}}<a href="/post/{{.Slug}}.html" class=next>{{.Title}} »</a>{{end}}</nav><section id=comments><h1 class=title>Comments</h1><div class=total_thread data-identifier="post-{{.Slug}}" data-url="https://{{$.Domain}}/post/{{.Slug}}.html"></div></section>{{end}}</div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "blogroll"}}<div id=content class=inner>{{with .Article}}<article class="post post-{{.ID}}" itemscope itemtype="http://schema.org/Article"><h1 class=title itemprop=headline>{{.Title}}</h1><div class="entry-content" itemprop=articleBody><style>.links.ssl li{position:relative;padding-left:22px}.links.ssl li::before{content:'';display:block;position:absolute;top:6px;left:0;width:16px;height:16px;background-size:16px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAD/0lEQVR4Ab2XA5hjOxTHO9batrdce8yrtW2b9dgq1jae1vbueOpn2zbzcoqP06luJ993epXk/0vOOUnK8abkq6Ttb1r2UY8+PJzx4L1DZY8/PrzrxYqySYqsXeEcf5Z+I9r3WlI0MjfzVoKx4Gnaj4XP0pDd/sl/kvq1/HJsxXSxcHP7Hs1bsS4+fSt3RXkt9ZVaz6DyehqpDTTSWI3503bF7+sopDEyqOBxqnks02Mia+IzxTyp1jwZlVSRVlHpS3F3qfWDV49I7TZmFNGdP4rqHj1LIhDn3Es2qfU0Kq0hAfLncVN7pvksTq0fNH+fxSZeVkN+kbSk/0xnddt1jYyanyGSaoz031BfpaO+5U7qyPVavAe3VdeSavIzq3gt+RUe0Qg3Z2wFnol/wSXSl+NuRzQPCfIKYGnOCDn4FHf2H71+8CJP2q7fN3Y/xIrWxKCYWX0SPBZv2SkyPOd+qlFVTyH5lfjaiGYhwZ607y1o07e0mvxBraPRhiMTD3qecsPbDsDB9CtE93ylUMLxouy+EHNLjdsrriXoIluGBrrdMDAoMHjslB7RkGoQ1ROm95wRGBQQFBwSGOqu4fqBC7OGlWuNDKwTH3Qf3KpLUHBgSKPCe8/u5G0+Lri343S0Hk/7e0UVxH9gslfi3ttxepJu59loo7sG9TNvJX5RXEn8hwH+FF+KfQ2/N6zbxz11+9Gl1g0C3Hm/5GB+VRyOeArSDvIZ7mEWIJg8NlU9beurGveFDe7zq+LRa9/cndsgwPU3C09kPYq2Lq+Y/C/xC7FPdpyZdAuT3/HW8EzcVF5NMJRUEdZ+oX/TF7eXOgM4BhWAfFX5aA2HpdK2a1SE4mpCJZ4JB8DiRgEg8meJBWs5LBY8E+fBBW4DzJEJN3s12u5RUQ29x+645HeAntzW3fIfp9bMkQv2NDlAL17rbtn3kusdy+88pXB3UwGAeA8Qh82n8Gka2mue3HQANvEkPYhDmmnNDMK74Va/uKBF27DQlWWjFH1Fbfs4F+dv9UsQtu0a2XrrsQmnD745FSmvJ1RNmNFrEr7Wldc7F2cVIGFxP/rw29MQPoxal2ks/BdcnYuzDBASFhQ0cw9/J5wNi+ynYbjC8ywxf4sTXfaDEIvZIJ4TIA4j3wTvmwrAAbH70NvTfnFn5H5Lw1FEt+Fw9RvAbIlgA6ub0ZnoC24DwL8ffJwSswmAT0Q3SmtcAxyHCvgYhnIfpnyGITJnywQ78Oay21ubLRVsx2cLbXEF8Xvh87TGAW6+U3gq8+FElP80GRU+T0HlOhKp9L5bWT2B148Ua79Zjyciy9dOTkTnKwqogidp76mqZnyjqpzxNdumrp75bfa9lNqK1272d2j+D+LY/CDPYPo9AAAAAElFTkSuQmCC)}.links li .more{color:#999;font-size:14px}</style>{{str2html .Content}}<p>注:为了节约本站用户的宝贵时间,长期无法访问的链接会被移除!另本站只有友情链接,不接受链接交换。</p></div></article>{{end}}</div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
<!Doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name=viewport><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name=referrer content=always><meta name=robots content="noindex, nofollow, noarchive"><title>{{.Title}}</title><style type="text/css">*{margin:0;padding:0}html,body{height:100%}body{background:#fff;color:#2a2e2e;font-size:15px;font-family:"Helvetica Neue",arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::selection,::-moz-selection,::-webkit-selection{background-color:#2479CC;color:#eee}h3{font-size:1.3em;line-height:1.5;margin:15px 30px;text-align:center}a{color:#2479CC;text-decoration:none}.card{margin:15px 25px;text-align:left}.submit input,.submit textarea{-webkit-appearance:none;border:1px solid #bbb;border-radius:1px;font-size:15px;height:20px;line-height:20px;margin-left:10px;padding:6px 8px}.submit span{position:relative;top:8px}.submit li{display:-webkit-box;display:-ms-flexbox;display:flex;margin:15px 0}.submit textarea{height:130px}.submit .line{-webkit-box-flex:1;display:block;-ms-flex:1;flex:1}.submit .btn-submit{-webkit-appearance:none;background:#12b0e6;border:none;border-radius:0;box-shadow:inset 0 -5px 20px rgba(0,0,0,.1);color:#fff;cursor:pointer;display:block;font-size:14px;line-height:1;padding:0.625em .5em;width:100%}.submit li.tips{color:#999;font-size:14px}</style></head><body><header><h3>对「{{.ATitle}}」发表评论</h3></header><div class=bd><div class="card submit"><form onsubmit="return false" id="create-post"><ul><li><span>昵称:</span><input class=line name=author_name required placeholder="昵称会被公开显示"><li><span>邮箱:</span><input class=line name=author_email type=email required placeholder="邮箱不会公开显示"><li><span>内容:</span><textarea class="line" name="message" required placeholder="请不要发表无意义的评论内容"></textarea><li><input type=hidden name=thread value="{{.Thread}}"><input type=hidden name=parent value=""><input type=hidden name=identifier value="post-{{.Slug}}"><input type=hidden name=next value=""><button class="btn-submit" type=submit>立即发表</button><li class=tips>注:通过本表单提交的数据,会原样转发给 Disqus,本站不做任何存储和记录。<li><a href="#close" onclick="window.close();void(0)">放弃评论</a></ul></form></div></div><footer></footer><script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js" ></script><script>!function(a){function e(){try{localStorage.author_name=$('[name="author_name"]').val(),localStorage.author_email=$('[name="author_email"]').val()}catch(a){}}function t(){$('[name="author_name"]').val(localStorage.author_name),$('[name="author_email"]').val(localStorage.author_email),["author_name","author_email","message"].some(function(a){var e=$('[name="'+a+'"]');return e.val()?void 0:e.focus()})}var o=!1;$("#create-post").on("submit",function(e){if(e.preventDefault(),!o){o=!0;var t=$(".tips");t.html("提交中..."),$.post("/disqus/create",$("#create-post").serialize()).then(function(e){o=!1,e.errno?t.html("提交失败:"+e.errmsg):($(".btn-submit").prop("disabled",!0),t.html("提交成功!本窗口即将关闭。"),setTimeout(function(){try{a.opener.location.hash="comment-"+e.data.id,a.opener.TotalThread.currentServer.insertItem(e.data),a.close()}catch(t){a.close()}},1e3))})}}),t(),$('[name="author_name"], [name="author_email"]').on("change",e)}(this)</script></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
{{define "home"}}<div id="content" class="inner">{{range .List}}<article class="post post-list"><div class="meta"><div class="date"><time>{{dateformat .CreatedAt "Jan 02, 2006"}}</time></div><div class="comment"><a href="/post/{{.Slug}}.html#comments">{{.Count}} Comments</a></div></div><h1 class="title"><a href="/post/{{.Slug}}.html">{{.Title}}</a></h1><div class="entry-content"><p>{{str2html .Excerpt}}[...]</p><p><a href="/post/{{.Slug}}.html" class="more-link">继续阅读 »</a></p></div></article>{{end}}<nav class="page-navi">{{if gt .Prev 0}}<a href="?pn={{.Prev}}" class="prev">« 上一页</a>{{end}}{{if gt .Next 0}}<a href="?pn={{.Next}}" class="next">下一页 »</a>{{end}}<div class="center"><a href="/archives.html">博客归档</a></div></nav></div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><title>{{.Title}}</title>{{.AdSense}}<script>!function(n,t){function e(){o("nls",1)}function c(){t.documentElement.style.display="none",u(),location.reload()}function r(n){var t="";try{t=f[n]||"",t.length<99&&c()}catch(e){u()}return t}function i(n,t){try{f[n]=t,t!==f[n]&&u()}catch(e){u()}}function o(n,e){var c=999;e||(c=-1),c=new Date(+new Date+864e5*c).toGMTString();var r=n+"="+e+";path=/;secure;expires="+c;t.cookie=r}function a(n){var e=t.getElementById(n).innerHTML;i(n,e)}function l(e,c){var i=r(e),o=t.createElement(c?"script":"style");return n.execScript&&c?n.execScript(i):(o.innerHTML=i,void t.head.appendChild(o))}function u(){o("v",0)}var f,h=function(){},d=n.L={h:h,l:h,c:h};try{f=localStorage,d.h=a,d.l=l,d.c=o}catch(p){e()}}(this,document);</script>{{if .Version}}<script>L.c('v', {{.Version}})</script>{{end}}<link rel="apple-touch-icon" href="//{{.Qiniu.Domain}}/static/img/favicon.ico"><link rel="search" type="application/opensearchdescription+xml" href="//{{.Domain}}/opensearch.xml" title="{{.BTitle}}">{{if .Version}}<style id="blog_css">{{template "blog_css" .}}</style><script>L.h('blog_css')</script>{{else}}<script>L.l("blog_css")</script>{{end}}<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="//{{.Domain}}/rss.html"><meta name="description" content="{{.Description}}"><meta name="twitter:card" content={{.Twitter.Card}}><meta name="twitter:site" content="@{{.Twitter.Site}}"><meta name="twitter:title" content="{{.Title}}"><meta name="twitter:description" content="{{.Description}}"><meta name="twitter:image" content="https://{{.Twitter.Image}}"></head><body><div class="container"><div class="left-col"><div class="intrude-less"><header id="header" class="inner"><div class="profilepic"><a href="/"></a></div><h1><a href="/">{{.BlogName}}</a></h1><p class="subtitle">{{.SubTitle}}</p><nav id="main-nav"><ul><li {{if eq .Path "/"}}class="on" {{end}}><a href="/"><span>首页</span></a></li><li {{if eq .Path "/series.html"}}class="on" {{end}}><a href="/series.html"><span>专题</span></a></li><li {{if eq .Path "/archives.html"}}class="on" {{end}}><a href="/archives.html"><span>归档</span></a></li><li {{if eq .Path "/post/blogroll.html"}}class="on" {{end}}><a href="/post/blogroll.html"><span>友链</span></a></li><li {{if eq .Path "/post/about.html"}}class="on" {{end}}><a href="/post/about.html"><span>关于</span></a></li></ul></nav><nav id="sub-nav"><div class="social"><a target="_blank" class="twitter external" rel="nofollow" href="//{{.Twitter.Address}}" title="Twitter" aria-label="Twitter">Twitter</a><a target="_blank" class="rss" href="//{{.Domain}}/rss.html" title="RSS 订阅" aria-label="RSS 订阅">RSS</a><a class="search" href="/search.html" title="站内搜索" aria-label="站内搜索">Search</a></div></nav></header></div></div><div class="mid-col"><div class="mid-col-container">{{.LayoutContent}}</div><footer id=footer class=inner>© {{.CopyYear}} - {{.BTitle}}{{if .BeiAn}} - <a target="_blank" rel="nofollow designer" class="external beian" href="https://beian.miit.gov.cn">{{.BeiAn}}</a>{{end}}<br>Powered by <a target=_blank href="//github.com/eiblog/eiblog">Eiblog</a> & <a target=_blank rel="nofollow designer" class=external href="//github.com/deepzz0">Deepzz</a></footer></div></div><input type=hidden id=CURRENT_PAGE value="{{.CurrentPage}}"><input type=hidden id=CDN_DOMAIN value="//{{.Qiniu.Domain}}">{{if .Version}}<script id="ana_js">{{template "ana_js"}}</script><script>L.h('ana_js')</script>{{else}}<script>L.l('ana_js', 1)</script>{{end}}{{if .Version}}<script id="jq_js">{{template "jq_js"}}</script><script>L.h('jq_js')</script>{{else}}<script>L.l('jq_js', 1)</script>{{end}}{{if .Version}}<script id="hl_js">{{template "hl_js"}}</script><script>L.h('hl_js')</script>{{else}}<script>L.l('hl_js', 1)</script>{{end}}{{if .Version}}<script id="blog_js">{{template "blog_js" .}}</script><script>L.h('blog_js')</script>{{else}}<script>L.l('blog_js', 1)</script>{{end}}</body></html>
|
||||
@@ -0,0 +1 @@
|
||||
{{define "search"}}<div id="content" class="inner"><article class="post post-search"><h1 class="title">站内搜索</h1><div class="entry-content"><div id="search"><form action="/search.html"><div class="wrapper"><input maxlength="80" placeholder="请输入关键字..." id="keyword" name="q" {{if .Word}}value="{{.Word}}"{{end}} type="search" required></div><input class="submit" type="submit" value="搜索"></form></div><div id="searchResult">{{if .Word}}{{with .SearchResult}}{{if gt (.Hits.Hits|len) 0}}<div class="info">本次搜索共找到结果 {{.Hits.Total}} 条 (用时 {{.Took}} 秒)</div>{{range .Hits.Hits}}<div class="item"><div class="title"><a href="/post/{{.Source.Slug}}.html">{{if .Highlight.Title}}{{str2html (join .Highlight.Title "")}}{{else}}{{.Source.Title}}{{end}}</a></div><div class="desc">{{if .Source.Img}}<div class="img"><img data-src="{{.Source.Img}}?imageView2/1/w/216/h/162"></div>{{end}}<div class="summary"><span class="date">{{dateformat .Source.Date "2006-01-02"}}</span> ... {{str2html (join .Highlight.Content "...")}} ...</div></div></div>{{end}}{{else}}<div class="no-result">没有找到任何结果,请更换查询词试试~</div><div class="item"><div class="title">或者试试 Google 站内搜索:<a target="_blank" href="//www.google.com/#q=site:{{$.Domain}} {{$.Word}}">site:{{$.Domain}} {{$.Word}}</a></div></div>{{end}}{{end}}{{else}}<div class="hot-words">热搜词:{{range .HotWords}}<a href="?q={{.}}">{{.}}</a>{{end}}</div><div class="intro"><p>支持的搜索格式:</p><ol><li>输入关键词全文搜索:<a href="?q=Let's Encrypt">Let's Encrypt</a>;</li><li>指定时间段搜索:<a href="?q=date:2016">date:2016</a>、<a href="?q=date:2016-10">date:2016-10</a>;</li><li>指定标签搜索:<a href="?q=tag:github">tag:github</a>、<a href="?q=tag:HTTPS">tag:HTTPS</a>;</li><li>组合搜索:<a href="?q=date:2016 tag:docker">date:2016 tag:docker</a>;</li></ol></div>{{end}}</div></div></article>{{if or .Prev .Next}}<nav class="page-navi">{{with .Prev}}<a href="?{{html .}}" class="prev">« 上一页</a>{{end}}{{with .Next}}<a href="?{{html .}}" class="next">下一页 »</a>{{end}}</nav>{{end}}</div>{{end}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "series"}}<div id=content class=inner><article class="post post-series"><h1 class=title>专题</h1><div class="entry-content">{{str2html .Article}}</div></article></div>{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "ana_js"}}
|
||||
!function(e,n,o){var t=e.screen,a=encodeURIComponent,r=["dt="+a(n.title),"dr="+a(n.referrer),"ul="+(o.language||o.browserLanguage).toLowerCase(),"sd="+t.colorDepth+"-bit","sr="+t.width+"x"+t.height,"_="+ +new Date],i="?"+r.join("&");e.__beacon_img=new Image,e.__beacon_img.src="/beacon.html"+i}(window,document,navigator,location);
|
||||
{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "blog_css"}}
|
||||
*{margin:0;padding:0}html,body{height:100%}body{background:#ddd;color:#666;font-size:14px;font-family:"-apple-system","Open Sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif}::selection,::-moz-selection,::-webkit-selection{background-color:#2479cc;color:#eee}h1{font-size:2em}h3{font-size:1.3em}h4{font-size:1.1em}a{color:#2479cc;text-decoration:none}article{border-bottom:1px solid #ddd;border-top:1px solid #fff;padding:30px 0;position:relative}.container{max-width:1600px;min-height:100%;position:relative}.global-tips{display:none}.left-col{background-color:#50514c;background-image:url(//{{.Qiniu.Domain}}/static/img/bg04.jpg);background-size:cover;height:100%;position:fixed;width:270px}.mid-col{background:#fff;left:0;margin-left:270px;min-height:100%;position:absolute;right:0}article .meta{color:#555;float:right;font-size:.9em;line-height:2;position:relative;text-align:right;width:auto}article .meta a{color:#999}article h1.title{color:#333;font-size:2em;font-weight:300;line-height:35px;margin-bottom:25px}article h1.title a{color:#333;transition:color .3s}.mid-col .mid-col-container{padding:0 70px 0 40px}article .meta .date,article .meta .comment,article .meta .tags{position:relative}article .meta .date-modified{display:none}article h1.title a:hover{color:#2479cc}#header{border-bottom:0;height:auto;line-height:30px;margin-left:50px;padding:30px 0;width:100%}#main-nav{margin-left:0}#main-nav,#sub-nav{float:none;margin-top:15px}#sub-nav{position:relative}#content{margin:0 auto;width:100%}#header a{color:#efefef;text-shadow:0 1px #666;transition:color .3s}#header h1{float:none;font-weight:300;font-size:30px}#main-nav ul li{display:block;margin-left:0;position:relative}#header .subtitle{color:#ccc}#sub-nav .social{margin-bottom:10px}#header a:hover{color:#ccc}#header .profilepic a{background-image:url("{{getavatar .Qiniu.Domain}}");background-size:100% 100%;border-radius:50%;display:block;height:160px;margin:15px 0 20px -10px;width:160px}#sub-nav .social a{background-size:20px 20px;background-position:center center;background-repeat:no-repeat;border-radius:50%;display:inline-block;height:28px;margin:0 6px 15px;opacity:.75;text-indent:-9999px;transition:opacity .3s;vertical-align:middle;width:28px}#sub-nav .social a:hover{opacity:1}#sub-nav .social a:first-of-type{margin-left:0}#sub-nav .social a:last-of-type{margin-right:0}#sub-nav .social a.twitter{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAABOklEQVR4Ae3QM4DXYQCH8W+2m7Jt15Ztc8u29myba1O2NbXlmrJ11nP8+31/GO+uz/psj7z6jzYsZBPL6KogylBM3tCDS/wDkrjNIOWgC4MorgC2MlgWLCXSesZzCWinAEoA0FAG9MOsE1VorFw0AiCd/orBF2Klc4HT3KaDctGQgF2RY+iETTzlFUAx/hDwlfmhxFjMrigS6wmXwGnG0kCiO2aTFI17xPrES8zmKhzt2MRo3uPdGIWjOgDxeNdOkbiCH/EUVyTq48cZxWIQ3g2TCTXZwT/c/ZAJpbnOOeJwN01mrMaLZ7JjO+5qywljeMRHErEZL3cM4Cdmy+SGFhzCZobMqM5E1rCM/TzB5gXdZEMZ+vMYu7cslDuqMZcrfCUkleccoL+8ozHjWcsujnGIDcyjF2VV8GUCCH5vOpRoTxYAAAAASUVORK5CYII=");background-color:#55cff8;border:1px solid #55cff8}#sub-nav .social a.search{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAB6klEQVR4Ac3RM4AdURSA4RPbto06tm3btm3b7GLbttOsjWdrPG9OdFejRZWv/a8vqDM2s46nNot7vSusA5KrQfYk13CvYt6IXvwtiIKBuuWYnJAXsia+hPcEqhBtrsVZ2bu96EFN3LufpUGPfwCivoDNVQG00I0wHfqVY4GtG93G3Ne9mY/CNLGgRYxFgjdYOkMG9tkSptbDoMY3JW2PpCKgYGuLqWy1QYk3/YsSx5UFVdxAJPxnQc7eEgl6HmjiXpAv9cTlliXnWvwnaCkMmhxDkTA0liX2PPnpH6AjujIStsGyFHzwL/hugQ5P/qCHXHSGLIl3/wXqLuhwFsQAecYpskSfJX8cDTri6iBh7C1LrnmpqZLOCeYgkVBTlpJqIcGdAU1iHDlnkkqkPyHB9wBVuB8J5zqVbG+FhIiGrqDg24gprP5CoIa/hancuxNKQCpDk8BdTOWcBuqYIpIXUwWpwBXHButSzw76OWZARX1sAOrYWpIdsyDIfq8D6gylqFc6E3kkJOp7I9DiGMeFoQL9JLkeVQVpTMF/bwLaTB08O9inQqgQzf6kb7pWmpqTr6yNPiQk7nNjyD6+NlJIiKKnGWQfVZO3IyG9h5z4VEFwkTP8gJz5UoWNQhQDTBvIqeS2zA77SPgv/AJ8KLqSzEcuZAAAAABJRU5ErkJggg==");background-color:#afb6ca;border:1px solid #afb6ca}#sub-nav .social a.rss{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAABd0lEQVR4Ae3UA+zXQRiA8Tfbtm3briHbtm03ZLuGbNsas227hvik27v7ffH33Gd+hvNJhCEbc5lCRyqTXMKCPnzlHRfYyhgqEUdCi3PYPrOeehIaHMTtLv0kpDiPt3s0lpCgFff5hLetxJeQICaZacBMbuL0mlISGpRgOU7NJXRIyyICdZDQohQ3sDUTP5RkNXPpRj5xYC22QuKNMxhcY3TgdWYKis9EFy8cxvaNMWJhBoqdwVxldZncotiKooq4MQov1UTxROsL8UI6qjDBNZNK1jajWos/anEBW3ox2KjtifhzbdptrSncM/PFUFCDta7WtkLcyEJj6ojBAjB+Ete1D5+IJoEYrj9ADlPugNFPDF5qKyc2qoF6RNS/rbKWS2KwWNtAsbEbW01TH2jJZkozLSvFxklsTV2voJ0pRbQcFRs9sCXRO2EwzZTUWm5KIPZi0ERbdm1rTImu5as40YFFTKd4QBvIcpazgFxamv0ty2ggf/33CwQ70ADWDdQbAAAAAElFTkSuQmCC");background-color:#ef7522;border:1px solid #ef7522}#sub-nav .social a.twitter:hover{border:1px solid #24c1f6}#sub-nav .social a.search:hover{border:1px solid #909ab6}#sub-nav .social a.rss:hover{border:1px solid #cf5d0f}article input.runcode,article button{-webkit-appearance:none;background:#12b0e6;border:0;border-radius:0;box-shadow:inset 0 -5px 20px rgba(0,0,0,.1);color:#fff;cursor:pointer;font-size:14px;line-height:1;margin-top:10px;padding:.625em .5em}article button{mLine truncated
|
||||
{{end}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{define "blog_js"}}
|
||||
var stringProto=String.prototype;stringProto.stripTags=function(){return this.replace(/<[^>]*>/gi,"")},stringProto.decode4Html=function(){var t=document.createElement("div");return t.innerHTML=this.stripTags(),t.childNodes[0]?t.childNodes[0].nodeValue||"":""},stringProto.queryUrl=function(t){var a=this.replace(/^[^?=]*\?/gi,"").split("#")[0],e={};return a.replace(/(^|&)([^&=]+)=([^&]*)/g,function(t,a,n,i){try{n=decodeURIComponent(n)}catch(o){}try{i=decodeURIComponent(i)}catch(o){}n in e?e[n] instanceof Array?e[n].push(i):e[n]=[e[n],i]:e[n]=/\[\]$/.test(n)?[i]:i}),t?e[t]:e},function(t){t.disqus_shortname="{{.Disqus.ShortName}}",$.each(["CURRENT_PAGE","CDN_DOMAIN"],function(a,e){t[e]="";var n=$("#"+e);n&&(t[e]=n.val())})}(this),function(t){function a(a){var e,n,i={selector:null,height:200};i=$.extend(i,a),e=i.height,n=function(){var a=$(t).scrollTop(),n=$(t).height()+a;$(i.selector).find("img[data-src]").each(function(){var t=$(this);setTimeout(function(){var i,o=t.offset(),s=t.height();o.top>n+e||o.top+s<a-e||(i=t.data("src"),i&&(t.on("load",function(){t.addClass("loaded")}),t.attr("src",i),t.removeAttr("data-src")))},0)})},$(t).on("resize",n),$(t).on("scroll",n),n()}t.lazyLoad=a}(this),function(t){$(function(){$(".entry-content pre").each(function(t){var a,e,n,i=$(this),o=i.find("code");if(o.length&&o.prop("className")&&(o.hasClass("language-html")&&(a="__HTML_CODE_"+t,o.prop("id",a),e=$('<input data-id="'+a+'" type="button" class="runcode" value="在新窗口运行以上代码" />'),e.insertAfter(i)),o.html().split("\n").length>3&&o.prop("className").indexOf("language")>-1)){switch(n=o.prop("className").replace("language-","").toUpperCase()){case"XML":n="HTML";break;case"SHELL":n="BASH"}$('<b class="name">'+n+"</a>").insertBefore(o)}}),$(".entry-content input.runcode").each(function(){var a=$(this);a.click(function(a){var e,n,i;a.preventDefault(),e=$("#"+$(this).data("id")).html().stripTags().decode4Html(),n=t.open("","_preview",""),i=n.document,i.open(),i.write(e),i.close()})}),$(".entry-content > pre code").each(function(i,block){hljs.highlightBlock(block)})})}(this),function(){$(function(){$(".entry-content img[data-replace]").each(function(){var t=$(this);t.click(function(){var a,e,n,i,o=1000*(t.data("dur")||20);t.css("cursor")&&(a="/static/img/blank.gif",e=t.prop("src"),n=t.data("replace"),t.prop("src",a),t.css("cursor",""),i=new Image,i.onload=function(){t.prop("src",n),setTimeout(function(){t.prop("src",e),t.css("cursor","pointer")},o)},i.src=n)}),t.css("cursor","pointer")})})}(this),function(t){var a=function(){var e=[],n="comment_type",i=function(){if(!t.atob){return 1}try{t.postMessage("ping","*")}catch(a){return 2}return 0};return{addService:function(t){e.push(t)},clear:function(){localStorage.removeItem(n)},init:function(t){var o,r,s,c;return e.length?t.length?(o=t.data("url")||location.href,r=t.data("identifier"),o&&r?i()?void t.html("很抱歉,本站评论功能只支持这些浏览器:Chrome、Firefox、Safari、Opera、Edge、IE11+。"):(s=function(i){var c,l=e[i];l&&(c=$("<div>").prop("id",l.id),t.append(c),l.init(c,o,r),l.check(function(t){t?(c.hide(),s(++i)):(l.load(),localStorage[n]=i,a.currentServer=l)},c,o,r))},c=0,localStorage.comment_type&&(c=parseInt(localStorage[n],10)||0),c=Math.min(e.length-1,c),c=Math.max(c,0),void s(c)):void alert("没有找到评论所需标记!")):void alert("没有找到评论容器!"):void alert("没有找到可用的服务!")}}}();t.TotalThread=a}(this),function(t){var a=function(){var a=!1;return{id:"disqus_thread",check:function(a){var e,n,i=["https://c.disquscdn.com/favicon.ico","https://disqus.com/favicon.ico"],o=0,r=0,s=function(){o==i.length&&a(r==o?0:1)};for(t.__disqus_img=[],e=function(a){var e=new Image,n=setTimeout(function(){e.onerror=e.onload=null,o++,s()},2500);e.onerror=function(){clearTimeout(n),o++,s()},e.onload=function(){clearTimeout(n),o++,r++,s()},e.src=i[a]+"?"+ +new Date,t.__disqus_img[a]=e},n=0;n<i.length;n++){e(n)}},load:function(){if(!a){a=!0;var e=this;t.disqus_config=function(){this.page.url=e.url,this.page.identifier=e.identifier},$.ajax({url:"//{{.Disqus.ShortName}}.disqus.com/embed.js",dataType:"script",cache:!0})}},init:function(t,a,e){t.html("评论完整模式加载中...<br /><br />注:如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理。"),this.elThread=t,this.url=a,this.identifier=e}}}();t.TotalThread.addService(a)}(this),function(t){var a=function(){var e=!1,n=function(e,n){var i,o,r=!1,s="",c=function(a){var e='<li class="post '+(a.isDeleted?"minimized":"")+'" id="post-'+a.id+'"><div class="post-content clearfix"><div class="indicator"></div><div class="avatar"><div class="user">'+(a.url?'<a href="'+a.url+'"><img data-src="'+a.avatar+'" /></a>':'<img data-src="'+t.CDN_DOMAIN+'/static/img/default_avatar.png" />')+'</div></div><div class="post-body"><header class="post-header"><span class="post-byline"><span class="author publisher-anchor-color">'+(a.url?'<a href="'+a.Line truncated
|
||||
{{end}}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{define "hl_js"}}
|
||||
/*! highlight.js v9.6.0 | BSD3 License | git.io/hljslicense */
|
||||
!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+w.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"<br>":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOfLine truncated
|
||||
{{end}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{define "jq_js"}}
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||jt;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=Bt.type(e);return"function"===n||Bt.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){return Bt.isFunction(t)?Bt.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?Bt.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Bt.grep(e,function(e){return Ft.call(t,e)>-1!==n}):oe.test(t)?Bt.filter(t,e,n):(t=Bt.filter(t,e),Bt.grep(e,function(e){return Ft.call(t,e)>-1!==n&&1===e.nodeType}))}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return Bt.each(e.match(fe)||[],function(e,n){t[n]=!0}),t}function a(e){return e}function u(e){throw e}function l(e,t,n){var r;try{e&&Bt.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&Bt.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function c(){jt.removeEventListener("DOMContentLoaded",c),e.removeEventListener("load",c),Bt.ready()}function f(){this.expando=Bt.expando+f.uid++}function p(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:ye.test(e)?JSON.parse(e):e}function d(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(xe,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=p(n)}catch(i){}ve.set(e,t,n)}else n=void 0;return n}function h(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return Bt.css(e,t,"")},u=a(),l=n&&n[3]||(Bt.cssNumber[t]?"":"px"),c=(Bt.cssNumber[t]||"px"!==l&&+u)&&we.exec(Bt.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,Bt.style(e,t,c+l);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function g(e){var t,n=e.ownerDocument,r=e.nodeName,i=ke[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=Bt.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ke[r]=i,i)}function m(e,t){for(var n,r,i=[],o=0,s=e.length;s>o;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=me.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ce(r)&&(i[o]=g(r))):"none"!==n&&(i[o]="none",me.set(r,"display",n)));for(o=0;s>o;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function v(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&Bt.nodeName(e,t)?Bt.merge([e],n):n}function y(e,t){for(var n=0,r=e.length;r>n;n++)me.set(e[n],"globalEval",!t||me.get(t[n],"globalEval"))}function x(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;h>d;d++)if(o=e[d],o||0===o)if("object"===Bt.type(o))Bt.merge(p,o.nodeType?[o]:o);else if(Ae.test(o)){for(s=s||f.appendChild(t.createElement("div")),a=(Se.exec(o)||["",""])[1].toLowerCase(),u=je[a]||je._default,s.innerHTML=u[1]+Bt.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;Bt.merge(p,s.childNodes),s=f.firstChild,s.textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&Bt.inArray(o,r)>-1)i&&i.push(o);else if(l=Bt.contains(o.ownerDocument,o),s=v(f.appendChild(o),"script"),l&&y(s),n)for(c=0;o=s[c++];)De.test(o.type||"")&&n.push(o);return f}function b(){return!0}function w(){return!1}function T(){try{return jt.activeElement}catch(e){}}function C(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)C(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=w;else if(!i)return e;return 1===o&&(s=i,i=function(e){return Bt().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=Bt.guid++)),e.each(function(){Bt.event.add(this,t,i,r,n)})}function E(e,t){return Bt.nodeName(e,"table")&&Bt.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){var t=Me.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function S(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(me.hasData(e)&&(o=me.access(e),s=me.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)Bt.event.add(t,i,l[i][n])}ve.hasData(e)&&(a=ve.access(e),u=Bt.extend({},a),ve.set(t,u))}}function D(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ne.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function j(e,t,r,i){t=Lt.apply([],t);var o,s,a,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=Bt.isFunction(h);if(g||p>1&&"string"==typeof h&&!Wt.checkClone&&Re.test(h))return e.each(functLine truncated
|
||||
n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===F},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},C.pseudos.nth=C.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=u(w);return p.prototype=C.filters=C.pseudos,C.setFilters=new p,N=t.tokenize=function(e,n){var r,i,o,s,a,u,l,c=X[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=C.preFilter;a;){(!r||(i=ue.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=le.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ae," ")}),a=a.slice(r.length));for(s in C.filter)!(i=de[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):X(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=N(e)),n=t.length;n--;)o=x(t[n]),o[W]?r.push(o):i.push(o);o=U(e,b(i,r)),o.selector=e}return o},D=t.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,c=!r&&N(e=l.selector||e);if(n=n||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&O&&C.relative[o[1].type]){if(t=(C.find.ID(s.matches[0].replace(xe,be),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(s=o[i],!C.relative[a=s.type]);)if((u=C.find[a])&&(r=u(s.matches[0].replace(xe,be),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return K.apply(n,r),n;break}}return(l||S(e,c))(r,t,!O,n,!t||ye.test(e)&&f(t.parentNode)||t),n},T.sortStable=W.split("").sort(V).join("")===W,T.detectDuplicates=!!q,L(),T.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e),Bt.find=ee,Bt.expr=ee.selectors,Bt.expr[":"]=Bt.expr.pseudos,Bt.uniqueSort=Bt.unique=ee.uniqueSort,Bt.text=ee.getText,Bt.isXMLDoc=ee.isXML,Bt.contains=ee.contains,Bt.escapeSelector=ee.escape,te=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Bt(e).is(n))break;r.push(e)}return r},ne=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},re=Bt.expr.match.needsContext,ie=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,oe=/^.[^:#\[\.,]*$/,Bt.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Bt.find.matchesSelector(r,e)?[r]:[]:Bt.find.matches(e,Bt.grep(t,function(e){return 1===e.nodeType}))},Bt.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Bt(e).filter(function(){for(t=0;r>t;t++)if(Bt.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;r>t;t++)Bt.find(e,i[t],n);return r>1?Bt.uniqueSort(n):n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&re.test(e)?Bt(e):e||[],!1).length}}),ae=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,ue=Bt.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||se,"string"==typeof e){if(r="<"===e[0]&&Line truncated
|
||||
|
||||
if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Je.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&Bt.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=me.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Bt.timers,s=r?r.length:0;for(n.finish=!0,Bt.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Bt.each(["toggle","show","hide"],function(e,t){var n=Bt.fn[t];Bt.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(W(t,!0),e,r,i)}}),Bt.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Bt.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Bt.timers=[],Bt.fx.tick=function(){var e,t=0,n=Bt.timers;for(Ge=Bt.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Bt.fx.stop(),Ge=void 0},Bt.fx.timer=function(e){Bt.timers.push(e),e()?Bt.fx.start():Bt.timers.pop()},Bt.fx.interval=13,Bt.fx.start=function(){Ye||(Ye=e.requestAnimationFrame?e.requestAnimationFrame(M):e.setInterval(Bt.fx.tick,Bt.fx.interval))},Bt.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(Ye):e.clearInterval(Ye),Ye=null},Bt.fx.speeds={slow:600,fast:200,_default:400},Bt.fn.delay=function(t,n){return t=Bt.fx?Bt.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=jt.createElement("input"),t=jt.createElement("select"),n=t.appendChild(jt.createElement("option"));e.type="checkbox",Wt.checkOn=""!==e.value,Wt.optSelected=n.selected,e=jt.createElement("input"),e.value="t",e.type="radio",Wt.radioValue="t"===e.value}(),Ze=Bt.expr.attrHandle,Bt.fn.extend({attr:function(e,t){return he(this,Bt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Bt.removeAttr(this,e)})}}),Bt.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Bt.prop(e,t,n):(1===o&&Bt.isXMLDoc(e)||(i=Bt.attrHooks[t.toLowerCase()]||(Bt.expr.match.bool.test(t)?Ke:void 0)),void 0!==n?null===n?void Bt.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Bt.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!Wt.radioValue&&"radio"===t&&Bt.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(fe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Ke={set:function(e,t,n){return t===!1?Bt.removeAttr(e,n):e.setAttribute(n,n),n}},Bt.each(Bt.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ze[t]||Bt.find.attr;Ze[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=Ze[s],Ze[s]=i,i=null!=n(e,t,r)?s:null,Ze[s]=o),i}}),et=/^(?:input|select|textarea|button)$/i,tt=/^(?:a|area)$/i,Bt.fn.extend({prop:function(e,t){return he(this,Bt.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Bt.propFix[e]||e]})}}),Bt.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Bt.isXMLDoc(e)||(t=Bt.propFix[t]||t,i=Bt.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Bt.find.attr(e,"tabindex");return t?parseInt(t,10):et.test(e.nodeName)||tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),Wt.optSelected||(Bt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Bt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Bt.propFix[this.toLowerCase()]=this}),Bt.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(Bt.isFunction(e))return this.each(function(t){Bt(this).addClass(e.call(this,t,U(this)))});if("string"==typeof e&&e)for(t=e.match(fe)||[];n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=X(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(Bt.isFunction(e))return this.each(function(t){Bt(this).removeClass(e.call(this,t,U(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(fe)||[];n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=X(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){vLine truncated
|
||||
{{end}}
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
var xmlTmpl *template.Template
|
||||
|
||||
func init() {
|
||||
root := filepath.Join(config.WorkDir, "website", "template", "*.xml")
|
||||
root := filepath.Join(config.EtcDir, "template", "*.xml")
|
||||
|
||||
var err error
|
||||
xmlTmpl, err = template.New("").Funcs(template.FuncMap{
|
||||
|
||||
@@ -17,17 +17,10 @@ var htmlTmpl *template.Template
|
||||
|
||||
func init() {
|
||||
htmlTmpl = template.New("eiblog").Funcs(tools.TplFuncMap)
|
||||
root := filepath.Join(config.WorkDir, "website")
|
||||
root := filepath.Join(config.EtcDir, "website")
|
||||
files := tools.ReadDirFiles(root, func(fi fs.DirEntry) bool {
|
||||
name := fi.Name()
|
||||
if strings.HasPrefix(name, ".") {
|
||||
return true
|
||||
}
|
||||
// should not read template dir
|
||||
if fi.IsDir() && name == "template" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
// should not read dir & .DS_Store
|
||||
return strings.HasPrefix(fi.Name(), ".") || fi.IsDir()
|
||||
})
|
||||
_, err := htmlTmpl.ParseFiles(files...)
|
||||
if err != nil {
|
||||
|
||||
@@ -43,7 +43,7 @@ func runHTTPServer(endRun chan error) {
|
||||
swag.RegisterRoutes(e)
|
||||
|
||||
// static files, page
|
||||
e.Static("/static", filepath.Join(config.WorkDir, "assets"))
|
||||
e.Static("/static", filepath.Join(config.EtcDir, "assets"))
|
||||
|
||||
// static files
|
||||
file.RegisterRoutes(e)
|
||||
|
||||