From 5d8ab8a60278f4ae24ab479371cb2fffe320f84b Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 7 Sep 2014 21:49:44 -0700 Subject: [PATCH 01/70] deleted --- js/highlight.pack.js | 1 - site/js/highlight.pack.js | 1 - 2 files changed, 2 deletions(-) delete mode 100644 js/highlight.pack.js delete mode 100644 site/js/highlight.pack.js diff --git a/js/highlight.pack.js b/js/highlight.pack.js deleted file mode 100644 index 5807522f..00000000 --- a/js/highlight.pack.js +++ /dev/null @@ -1 +0,0 @@ -var hljs=new function(){function k(v){return v.replace(/&/gm,"&").replace(//gm,">")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset"}function E(G){F+=""}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+=""}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+=""}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"
")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}); \ No newline at end of file diff --git a/site/js/highlight.pack.js b/site/js/highlight.pack.js deleted file mode 100644 index 5807522f..00000000 --- a/site/js/highlight.pack.js +++ /dev/null @@ -1 +0,0 @@ -var hljs=new function(){function k(v){return v.replace(/&/gm,"&").replace(//gm,">")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset"}function E(G){F+=""}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+=""}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+=""}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"
")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}); \ No newline at end of file From 37babb3188dd8e1c4bd6f8b8f6760ebb810c0d40 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Mon, 8 Sep 2014 16:49:40 -0700 Subject: [PATCH 02/70] gahh --- js/sheetsee.js | 2 +- site/js/sheetsee.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/sheetsee.js b/js/sheetsee.js index dcdddef3..ff3f52d8 100644 --- a/js/sheetsee.js +++ b/js/sheetsee.js @@ -25372,7 +25372,7 @@ function table(data, opts) { templateID = opts.tableDiv.replace("#", "") + "_template" } var template = $(templateID) - var tableContents = ich.fullTable_template({rows: data}) + var tableContents = ich[templateID]({rows: data}) $(opts.tableDiv).html(tableContents) } },{"icanhaz":2}]},{},[1]) diff --git a/site/js/sheetsee.js b/site/js/sheetsee.js index dcdddef3..ff3f52d8 100644 --- a/site/js/sheetsee.js +++ b/site/js/sheetsee.js @@ -25372,7 +25372,7 @@ function table(data, opts) { templateID = opts.tableDiv.replace("#", "") + "_template" } var template = $(templateID) - var tableContents = ich.fullTable_template({rows: data}) + var tableContents = ich[templateID]({rows: data}) $(opts.tableDiv).html(tableContents) } },{"icanhaz":2}]},{},[1]) From 21710227a4794a623d92661cc8ceb6fb606305f4 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 1 Oct 2014 23:40:15 -0700 Subject: [PATCH 03/70] fix id pattern, fixes #61 the tables now use _template to identify the templates from the divs --- demos/demo-table.html | 2 +- site/demos/demo-table.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/demo-table.html b/demos/demo-table.html index 4efffd6a..da9ad7a3 100644 --- a/demos/demo-table.html +++ b/demos/demo-table.html @@ -78,7 +78,7 @@

Home Page - - diff --git a/site/demos/demo-map.html b/site/demos/demo-map.html index 51c292b2..e8df0411 100644 --- a/site/demos/demo-map.html +++ b/site/demos/demo-map.html @@ -78,7 +78,7 @@

Home Page + "
  • {{placename}}

  • " var geoJSON = Sheetsee.createGeoJSON(data, optionsJSON) var map = Sheetsee.loadMap("map") - Sheetsee.addTileLayer(map, 'examples.map-20v6611k') + Sheetsee.addTileLayer(map, 'jllord.n7aml2bc') Sheetsee.addMarkerLayer(geoJSON, map, template) } @@ -87,7 +87,7 @@

    Home Page var geojson = Sheetsee.createGeoJSON(data, opts) var plytemplate = "

    {{description}}

    " var shapesmap = Sheetsee.loadMap("shapesmap") - Sheetsee.addTileLayer(shapesmap, 'examples.map-20v6611k') + Sheetsee.addTileLayer(shapesmap, 'jllord.n7aml2bc') Sheetsee.addMarkerLayer(geojson, shapesmap, plytemplate) } diff --git a/site/docs/sheetsee-maps.html b/site/docs/sheetsee-maps.html index fe5a9391..895eb895 100644 --- a/site/docs/sheetsee-maps.html +++ b/site/docs/sheetsee-maps.html @@ -64,9 +64,9 @@

    Sheetsee.loadMap(mapDiv)

    Sheetsee.addTileLayer(map, tileLayer)

    To add a tile layer (aka a custom map scheme/design/background) you'll use this function which takes in your map and the source of the tileLayer. This source can be a Mapbox id, a URL to a TileJSON or your own generated TileJSON. See Mapbox's Documentation for more information.

    -
    Sheetsee.addTileLayer(map, 'examples.map-20v6611k')
    +
    Sheetsee.addTileLayer(map, 'jllord.n7aml2bc')
     
    -

    You can add tiles from awesome mapmakers like Stamen or create your own in Mapbox's Tilemill or online.

    +

    You can add tiles from awesome mapmakers like Stamen or create your own in Mapbox's Tilemill or online.

    Sheetsee.addMarkerLayer(geoJSON, map)

    To add makers, lines or shapes to your map, use this function and pass in your geoJSON so that it can get the coordinates and your map so that it places the markers there. You can customize what the content in your marker's popup looks like with a popupTemplate, which is an ICanHaz.js template in HTML and can reference the column headers you included in your optionsJSON.

    var markerLayer = Sheetsee.addMarkerLayer(geoJSON, map, popupTemplate)
    @@ -90,7 +90,7 @@ 
     </script>
     

    Learn more about the things you can do with ICanHaz.js.

    -

    View Demo

    +

    View Demo

    From 0d1dd3abab82c132e1686e5ed8b3d248603ecd44 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 19:13:12 -0400 Subject: [PATCH 43/70] Update raw files --- docs/basics.md | 12 +++++------- docs/building.md | 16 +++++++--------- docs/index.md | 22 +++++++++------------- 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/docs/basics.md b/docs/basics.md index 47cf5eb6..2d70e025 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -9,18 +9,16 @@ Spreadsheets are a great _lightweight_ databases. Google Spreadsheets in particu 3. Create a place holder `
    `, with `id`, in your HTML the map or table you want. 4. Create templates for tables in ` diff --git a/docs/building.md b/docs/building.md index 0d93df90..84c15cf1 100644 --- a/docs/building.md +++ b/docs/building.md @@ -2,20 +2,18 @@ You can customize your Sheetsee build with just the parts you want to use, for example to only include the mapping module or only the tables module. If you want to just use the full version, you can grab it here at [github.com/jlord/sheetsee.js](https://github.com/jlord/sheetsee.js/blob/master/js/sheetsee.js). -All bundle comes with [Mustache.js](https://mustache.github.io) and [Leaflet.js](http://leafletjs.com). Additionally, you'll need to also include [Tabletop.js](https://github.com/jsoma/tabletop) your HTML head like so: +All builds come with [Mustache.js](https://mustache.github.io) and [Leaflet.js](http://leafletjs.com). Additionally, you'll need to link to [Tabletop.js](https://github.com/jsoma/tabletop) your HTML head like so: ```HTML - - + + ``` **To build a custom Sheetsee you'll need [Node.js](http://www.nodejs.org) on your computer familiarity with the command line.** -#### Get Node/NPM +Download Node.js from [nodejs.org/download](http://nodejs.org/download). For most users you can just download the Mac _.pkg_ or Windows _.msi_. Follow the install instructions; both include npm. Then install `sheetsee`. -Download Node.js from [nodejs.org/download](http://nodejs.org/download). For most users you can just download the Mac _.pkg_ or Windows _.msi_. Follow the install instructions, both include NPM. Once they're installed, proceed: - -## Install `sheetsee` from NPM +## Install `sheetsee` from npm The `sheetsee` (with no '.js') module is the tool for building custom Sheetsee builds. Install `sheetsee` globally and then run it within the folder of your soon-to-be Sheetsee project. _Install globally_ @@ -36,6 +34,6 @@ Here are the options for the different modules. If you want save the generated f - `-t` or `-tables` for tables - `--save` to write out the file* -_* otherwise, defaults to standardout on your console which you can_ `| pbcopy` +_* otherwise, defaults to standard out on your console which you can_ `| pbcopy` -So for instance, `sheetsee -m -t --save` will build you a Sheetsee.js with the basic **data** functions, the **map** and **tables** sections built in and save it as a file named **sheetsee.js**. Running `sheetsee -m -t | pbcopy` will save the output to your clipboard. +So for instance, `sheetsee -m --save` will build you a Sheetsee with the basic **data** functions and the **map** section, leaving out the tables section. It will save it as a file named '**sheetsee.js**'. Running `sheetsee -m | pbcopy` will save the output to your clipboard. diff --git a/docs/index.md b/docs/index.md index f6f4a26c..9f997dc4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,27 +1,27 @@ ![sheetseeimg](https://raw.github.com/jlord/sheetsee-cache/master/img/sheetsee-03.png) -**Sheetsee.js** is a client-side library for connecting Google Spreadsheets to a website and visualizing the information in tables, maps and charts. +**Sheetsee.js** is a client-side library for connecting Google Spreadsheets to a website and visualizing the information in tables and maps. ## Modules -Each of **sheetsee.js**'s features are divided into modules. Use just the parts you need; see docs on [building](./docs/building.md). If you don't want to build your own, you can just use the full library which includes all modules, it's [here on GitHub](http://www.github.com/jlord/sheetsee.js). +Each of Sheetsee's functions are divided into modules. Use just the parts you need; see docs on [building](./docs/building.md). If you don't want to build your own, you can just use the full library which includes all modules, it's [here on GitHub](http://www.github.com/jlord/sheetsee.js). | Module | Contains | Docs | | ------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------- | -| **sheetsee-core** | **Included in any build**. Gets you started and has the working-with-your-data functions. | [Doc](./docs/sheetsee-core.md) | +| **sheetsee** | Command line module for make a custom build of Sheetsee. | [Doc](./docs/building.md) | +| **sheetsee-core** | **Included in all builds**. Has helpful working-with-your-data functions. | [Doc](./docs/sheetsee-core.md) | | **sheetsee-tables** | Contains everything you'll need to create a table including sortable columns, pagination and search.| [Doc](./docs/sheetsee-tables.md) | -| **sheetsee-maps** | For making maps with your point, line or polygon spreadsheet data. Built on Mapbox.js. | [Doc](./docs/sheetsee-maps.md) | -| **sheetsee-charts** | Includes 3 basic d3 charts: bar, line and pie. You can also [use your own](docs/custom-charts.md). | [Doc](./docs/sheetsee-charts.md) | +| **sheetsee-maps** | For making maps with your point, line or polygon spreadsheet data. Built with Leaflet.js. | [Doc](./docs/sheetsee-maps.md) | ## Spreadsheets!? -Google Spreadsheets can be used as simple and collaborative databases, they make getting a data driven site going much easier than traditional databases. Read more about using spreadsheets for databases [here](./docs/basics.md). +Google Spreadsheets can be used as simple and collaborative databases, they make getting a data driven site going much easier than traditional databases. [Read more](./docs/basics.md) about using spreadsheets for databases. ## In the Wild -What can you make with **Sheetsee.js**? Lots of things, here are some examples: +What can you make with Sheetsee? Lots of things, here are some examples: - [Hack-Spots](http://jlord.github.io/hack-spots) - [Combine with IFTTT](http://jlord.us/instagram/) @@ -29,9 +29,9 @@ What can you make with **Sheetsee.js**? Lots of things, here are some examples: **List your sheetsee project here: file an [issue or pull request](http://www.github.com/jlord/sheetsee.js).** -# Resources & Documentation +## Resources & Documentation -More resources on using Sheetsee.js: +More resources on using Sheetsee: | Getting Started | Ideas | Use | Demos | | --- | --- | --- | --- | @@ -39,7 +39,3 @@ More resources on using Sheetsee.js: | [Building Sheetsee](./docs/building.md) | [Tips!](./docs/tips.md) | [Sheetsee-tables](./docs/sheetsee-tables.md) | [Table Demo](./demos/demo-table.html) | | [Basics](./docs/basics.md) | [Custom charts](./docs/custom-charts.md) | [Sheetsee-maps](./docs/sheetsee-maps.md) | [Map Demo](./demos/demo-map.html) | | | | [Sheetsee-charts](./docs/sheetsee-charts.md) | [Chart Demo](./demos/demo-chart.html) | - -## Note on New Google Spreadsheets - -Google recently updated their Google Spreadsheets and the API. For a bit this was breaking things using the old API, including Tabletop. This has been fixed and the latest version of tabletop.js works on both old and new spreadsheets. **Be sure to include at least version 1.3.4 in your project.** From 7ec395f49b7b61d80de767e46210af1d30b993e3 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 19:13:16 -0400 Subject: [PATCH 44/70] Build --- docs/about.html | 82 +++++++++++++++++++++ docs/basics.html | 121 ++++++++++++++++++++++++++++++ docs/building.html | 78 ++++++++++++++++++++ docs/changelog.html | 93 +++++++++++++++++++++++ docs/fork-n-go.html | 75 +++++++++++++++++++ docs/sheetsee-core.html | 150 ++++++++++++++++++++++++++++++++++++++ docs/sheetsee-maps.html | 112 ++++++++++++++++++++++++++++ docs/sheetsee-tables.html | 141 +++++++++++++++++++++++++++++++++++ docs/tips.html | 114 +++++++++++++++++++++++++++++ index.html | 137 ++++++++++++++++++++++++++++++++++ 10 files changed, 1103 insertions(+) create mode 100644 docs/about.html create mode 100644 docs/basics.html create mode 100644 docs/building.html create mode 100644 docs/changelog.html create mode 100644 docs/fork-n-go.html create mode 100644 docs/sheetsee-core.html create mode 100644 docs/sheetsee-maps.html create mode 100644 docs/sheetsee-tables.html create mode 100644 docs/tips.html create mode 100644 index.html diff --git a/docs/about.html b/docs/about.html new file mode 100644 index 00000000..4cf5e863 --- /dev/null +++ b/docs/about.html @@ -0,0 +1,82 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    About

    +

    Sheetsee.js began as a part of a Code for America 2012 Fellowship project. The original idea was to make a way for cities to easily publish and maintain budget data themselves. Originally, the JavaScript was part of a WordPress theme that could be connected to a spreadsheet, allowing new pages to be created with charts, maps and tables automatically generated from the data.

    +

    In early 2013, after the CfA Fellowship and through a grant from Mozilla Open News, the JavaScript bits were pulled out to make it a standalone open source library: sheetsee.js.

    +

    Since then there have been a few updates to the library but it was not until 2017 when Sheetsee got it's next major upgrade.

    +

    In Spring of 2017 Sheetsee was cleaned up and downsized. Charting support and some dependencies were removed to make maintenance and overall size better.

    +

    Dependencies

    +

    Sheetsee comes into play after you use Tabletop.js, a library that handles the messy interactions with the Google Spreadsheets API for you and returns a lovely array of your data. At the end of the day, however, Sheetsee just wants an array of JSON data, if you have some on hand already, you can use Sheetsee too :)

    +

    Mustache, Leaflet

    +

    Sheetsee uses the Mustache.js library for templates in sheetsee-tables and map popups in sheetsee-maps. The maps are generated using the Leaflet.js library.

    +

    Hacked on Openly

    + +

    Contact & Contribute

    +

    Issues with this website can be opened on the sheetsee.js repository. Otherwise, if your issue falls specifically with one of the modules, you can file it on its particular repo:

    + +

    Thanks, y'all

    +

    Thanks to Code for America for providing the platform me to build the first version of sheetsee.js for Macon, Georgia.

    +

    Thanks to Dan Sinker at Open News for having faith and getting things together to make this Code Sprint happen and thanks to Matt Green at WBEZ for being a willing partner.

    +

    Thanks to Max Ogden for emotional support, teaching me JavaScript and answering lots of questions.

    +

    Thanks to all the authors and contributors to Tabletop.js, Leaflet.js and Mustache.js. Thanks to Google and the Internet for existing and to all those who've written tutorials or asked or answered a question on StackOverflow.

    +

    Thanks to Mom and Dad for getting a computer in 1996 and the mIRC scripts I started writing that I suppose would eventually lead me here.

    + + + +
    + + + diff --git a/docs/basics.html b/docs/basics.html new file mode 100644 index 00000000..feee8bc8 --- /dev/null +++ b/docs/basics.html @@ -0,0 +1,121 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    Spreadsheets as Databases

    +

    Spreadsheets are a great lightweight databases. Google Spreadsheets in particular are easy to work with and share, making this unlike most traditional database setups. That being said, traditional databases are great for bigger, more secure jobs. If you're storing lots and lots and lots of information, or storing sensitive or complex information—the spreadsheet is not for you. But if you're working on small to medium sized personal or community projects, try a spreadsheet!

    +

    The Short & Sweet

    +
      +
    1. Link to Sheetsee.js and Tabletop.js in your HTML head.
    2. +
    3. Link to sheetsee's default stylesheet, sss.css.
    4. +
    5. Create a place holder <div>, with id, in your HTML the map or table you want.
    6. +
    7. Create templates for tables in <script> tags with an id matching the <div> plus _template.
    8. +
    9. Inside of another <script> tag initialize Tabletop.js. Once it fetches your spreadsheet data, pass it onto Sheetsee.
      document.addEventListener('DOMContentLoaded', function() {
      +var URL = 'YOURSPREADSHEETSKEYHERE'
      +Tabletop.init({key: URL, callback: callback, simpleSheet: true})
      +})
      +
      +
    10. +
    11. Define the function that Tabletop.js calls when it returns with the data. This function will contain all the Sheetsee.js methods you want to use.
      function callback (data) {
      +// All the Sheetsee things you want to do!
      +}
      +
      +
    12. +
    13. Set it and forget. Now all you need to do is edit the spreadsheet and visitors will get the latest information every time they load the page.
    14. +
    +

    Bare Minimum Setup

    +

    Ignoring some HTML things to conserve space, you get the point. This is a basic setup:

    +
    <html>
    +  <head>
    +    <meta charset="utf-8">
    +    <script type="text/javascript" src="js/tabletop.js"></script>
    +    <script type="text/javascript" src='js/sheetsee.js'></script>
    +    <link rel="stylesheet" type="text/css" href="css/sss.css">
    +  </head>
    +  <body>
    +  <div id="placeholder"></div>
    +
    +  <script id="placeholder" type="text/html">
    +    // template if you so desire!
    +  </script>
    +
    +  <script type="text/javascript">
    +    document.addEventListener('DOMContentLoaded', function () {
    +        var URL = 'YOURSPREADSHEETSKEYHERE'
    +        Tabletop.init( { key: URL, callback: myData, simpleSheet: true } )
    +    })
    +    function myData (data) {
    +      // All the sheetsee things you want to do!
    +    }
    +  </script>
    +  </body>
    +</html>
    +
    +

    Your Data

    +

    sheetsee

    +

    Your Google Spreadsheet should be set up with row one as your column headers. Row two and beyond should be your data. Each header and row becomes an object in the final array that Tabletop.js delivers of your data.

    +

    sheetsee

    +

    There shouldn't be any breaks or horizontal organization in the spreadsheet. But, feel free to format the style of your spreadsheet as you wish; borders, fonts and colors and such do not transfer or affect your data exporting.

    +
    [{"name":"Coco","breed":"Teacup Maltese","kind":"Dog","cuddlability":"5","lat":"37.74832","long":"-122.402158","picurl":"http://distilleryimage8.s3.amazonaws.com/98580826813011e2bbe622000a9f1270_7.jpg","hexcolor":"#ECECEC","rowNumber":1}...]
    +

    Hexcolor

    +

    sheetsee

    +

    You can add a column to your spreadsheet with the heading hexcolor (case insensitive) and add colors to be used in maps. The color scheme is up to you, all you need to do is fill the column with hexidecimal color values. This color picker by Devin Hunt is really nice. #Funtip: Coloring the background of the cell it's hexcolor brings delight!

    +

    Geocoding

    +

    If you intend to map your data and only have addresses you'll need to geocode the addresses into lat/long coordinates. Mapbox built a plugin that does this for you in Google Docs. You can also use websites like latlong.net to get the coordinates and paste them into rows with column headers lat and long.

    +

    Publishing Your Spreadsheet

    +

    sheetsee

    +

    You need to do this in order to generate a unique key for your spreadsheet, which Tabletop.js will use to get your spreadsheet data. In your Google Spreadsheet, click File > Publish to the Web. Then in the next window click Start Publishing; it will then turn into a Stop Publishing button.

    +

    sheetsee

    +

    You should have an address in a box at the bottom, your key is the portion between the = and the &. You'll retrieve this later when you hook up your site to the spreadsheet. Actually, you technically can use the whole URL, but it's so long...

    +

    CSS

    +

    Sheetsee.js comes with a bare minimum stylesheet, sss.css, which contains elements you'll want to style when using the feature they correspond to. Use it if you want, or as a starting off point to create your own styles.

    + + + +
    + + + diff --git a/docs/building.html b/docs/building.html new file mode 100644 index 00000000..7ff9710e --- /dev/null +++ b/docs/building.html @@ -0,0 +1,78 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    Right-sizing

    +

    You can customize your Sheetsee build with just the parts you want to use, for example to only include the mapping module or only the tables module. If you want to just use the full version, you can grab it here at github.com/jlord/sheetsee.js.

    +

    All builds come with Mustache.js and Leaflet.js. Additionally, you'll need to link to Tabletop.js your HTML head like so:

    +
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.5.1/tabletop.min.js"></script>
    +<script src="js/sheetsee.js"></script>
    +
    +

    To build a custom Sheetsee you'll need Node.js on your computer familiarity with the command line.

    +

    Download Node.js from nodejs.org/download. For most users you can just download the Mac .pkg or Windows .msi. Follow the install instructions; both include npm. Then install sheetsee.

    +

    Install sheetsee from npm

    +

    The sheetsee (with no '.js') module is the tool for building custom Sheetsee builds. Install sheetsee globally and then run it within the folder of your soon-to-be Sheetsee project.

    +

    Install globally

    +
    npm install -g sheetsee
    +
    +

    Run from within a project folder

    +
    sheetsee [options]
    +
    +

    Here are the options for the different modules. If you want save the generated file as sheetsee.js then add the --save option.

    +
      +
    • -m or -maps for maps
    • +
    • -t or -tables for tables
    • +
    • --save to write out the file*
    • +
    +

    * otherwise, defaults to standard out on your console which you can | pbcopy

    +

    So for instance, sheetsee -m --save will build you a Sheetsee with the basic data functions and the map section, leaving out the tables section. It will save it as a file named 'sheetsee.js'. Running sheetsee -m | pbcopy will save the output to your clipboard.

    + + + +
    + + + diff --git a/docs/changelog.html b/docs/changelog.html new file mode 100644 index 00000000..51e25760 --- /dev/null +++ b/docs/changelog.html @@ -0,0 +1,93 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    March 2017 Sheetsee v4

    +

    sheetsee-core changes

    +

    Methods for charts have been removed:

    +
      +
    • Sheetsee.makeColorArrayOfObject(data, colors)
    • +
    • Sheetsee.addUnitsLabels(arrayObj, oldLabel, oldUnits)
    • +
    +

    May 10, 2014, Sheetsee v3

    +

    Better Table Template Options

    +

    Updated sheetsee-tables to allow you to re-use a template (rather than duplicating it for each different table you wanted to create). Previously it assumed your HTML table div id matched your script template id. This means that you can pass in an extra key/value pair in your table options into Sheetsee.maketable(). The new pair it takes is: "templateID" : "yourtemplateid". Example below, full sheetsee-tables documentation here.

    +
    var tableOptions = {
    +                    "data": gData,
    +                    "pagination": 10,
    +                    "tableDiv": "#fullTable",
    +                    "filterDiv": "#fullTableFilter",
    +                    "templateID": "tableTemplte"
    +                    }
    +Sheetsee.makeTable(tableOptions)
    +
    +

    May 2014

    +

    Important Google Spreadsheets & Tabletop News

    +

    Google recently updated their Google Spreadsheets and the API. For a bit this was breaking things using the old API, including Tabletop. This has been fixed and the latest version of tabletop.js works on both old and new spreadsheets. Be sure to include at least version 1.3.4 in your project.

    +

    August 13, 2013

    +

    Charting Intake

    +

    D3 charts need an array of objects, and something to chart: the thing itself (aka labels) and the corresponding value (aka units). Your data usually contains more than D3 needs to make the chart, so you have to tell it what to chart from your data to chart.

    +

    Previously Sheetsee required you pass your data through a function, addUnitsAndLabels() which took in your data and the things you wanted to chart, reformatted your data for you so that you could pass it into one of the d3 charts. This is one more step than actually needs to happen.

    +

    Now Sheetsee just asks for what you want your labels and units to be in the options you give it when calling the chart function. It then sorts the data correctly on the inside of the chart function. Yay, easier!

    +
    var options = {
    +  labels: "name",
    +  units: "cuddleability",
    +  m: [60, 60, 30, 150],
    +  w: 600, h: 400,
    +  div: "#barChart",
    +  xaxis: "no. of pennies",
    +  hiColor: "#FF317D"
    +}
    +
    +

    Thanks @maxogden for the help with this.

    +

    Started doing this changelong pretty late in the game.

    + + + +
    + + + diff --git a/docs/fork-n-go.html b/docs/fork-n-go.html new file mode 100644 index 00000000..e6213146 --- /dev/null +++ b/docs/fork-n-go.html @@ -0,0 +1,75 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    Fork-n-Go

    +

    +

    A Fork-n-Go project is a project on GitHub that in a few clicks, starting with a fork, gives another user a live website that they control with an easy to swap-for-your-own Google Spreadsheet database.

    +

    Two awesome things that make this possible: Forking, the tool on GitHub that allows you to copy a public repository onto your account, and GitHub Pages, GitHub's free web hosting service for every repository, account and organization.

    +

    I've built a whole other website on the idea with lots of examples: jlord.github.io/forkngo

    +
    +

    How

    +

    To have a website for a repository hosted by GitHub Pages all you need is to have webfiles uploaded and to tell GitHub the name of the branch you want it to host (in your repository's settings).

    +

    So Sheetsee.js projects, hosted on GitHub, can easily be forked and connected to another spreadsheet giving another user a live website of their own—with data they control—really easily.

    +

    Example

    +

    A Fork-n-Go example from my blog post on the topic:

    +

    Hack Spots Fork-n-Go

    +

    I made this website to collect hack spots all over the world from friends and friends of friends (the spreadsheet is wide open, so you can add some, too!). It’s using sheetsee to power the table, map and other elements of the page. Its source is in this repo, with just a gh-pages branch. To create an instance of this site for yourself all you need to do:

    +
      +
    • Create a Google spreadsheet with the same headers (just copy and paste header row from the original). Click File > Publish to Web, then Start Publishing.
    • +
    • Fork the original repository.
    • +
    • Edit the HTML file directly on GitHub.com to replace the original spreadsheet’s unique key with your spreadsheet’s key (found in your spreadsheet’s URL). +Commit your change.
    • +
    +

    Now you have the same site connected to a spreadsheet that you manage — it’s live and can be found at yourGitHubName.github.io/theReposName.

    +

    forkcommit

    + + + +
    + + + diff --git a/docs/sheetsee-core.html b/docs/sheetsee-core.html new file mode 100644 index 00000000..b97718b1 --- /dev/null +++ b/docs/sheetsee-core.html @@ -0,0 +1,150 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    sheetsee-core

    +

    This module is included in every Sheetsee build. It contains methods for basic data manipulation you might want to do.

    +

    Working With Your Data

    +

    Sheetsee pairs with Tabletop.js which will fetch the data from your spreadsheet and return it as an array of objects. You'll use these methods from Sheetsee after you have that data.

    +

    Methods

    +

    Here are the functions you can use!

    +

    Sheetsee.getKeywordCount(data, keyword)

    +
      +
    • data array of objects
    • +
    • keyword string
    • +
    • Returns number
    • +
    +

    Given your data and keyword to search by, this function returns the number of times it occurs throughout all of the data.

    +
    getGroupCount(data, 'cat')
    +// returns a number
    +
    +

    Sheetsee.getKeyword(data, keyword)

    +
      +
    • data array of objects
    • +
    • keyword string
    • +
    • Returns number
    • +
    +

    Given your data and a keyword to search by, this function returns every row which contains a match to the keyword.

    +
    getKeyword(data, 'cat')
    +// returns array of objects
    +
    +

    Sheetsee.getColumnTotal(data, column)

    +
      +
    • data array of objects
    • +
    • column string
    • +
    • Returns number
    • +
    +

    Use only with columns of numbers

    +

    Given your data and column header, this function sums each cell in that column and returns the value.

    +
    getColumnTotal(data, 'cuddlability')
    +// returns number
    +
    +

    Sheetsee.getColumnAverage(data, column)

    +
      +
    • data array of objects
    • +
    • column string
    • +
    • Returns number
    • +
    +

    Given your data and column header, this function returns the average value of every cell in the column.

    +
    getColumnAverage(data, 'cuddlability')
    +// returns number
    +
    +

    Sheetsee.getMin(data, column)

    +
      +
    • data array of objects
    • +
    • column string
    • +
    • Returns array
    • +
    +

    Given your data and column header, this function returns an array of the rows with the lowest values within the specified column.

    +
    getMin(data, 'cuddlability')
    +// returns array
    +
    +

    Sheetsee.getMax(data, column)

    +
      +
    • data array of objects
    • +
    • column string
    • +
    • Returns array
    • +
    +

    Given your data and column header, this function returns an array of the rows with the highest values within the specified column.

    +
    getMin(data, 'cuddlability')
    +// returns array of objects
    +
    +

    Sheetsee.getMatches(data, filter, column)

    +
      +
    • data array of objects
    • +
    • filter string
    • +
    • column string
    • +
    • Returns array
    • +
    +

    Takes data, a filter term to search by within a column and returns every row that matches,

    +
    getMatches(data, 'dog', 'kind')
    +// returns array of objects
    +// [{'name': 'coco', 'kind': 'dog'...}, {'name': 'wolfgang', 'kind': 'dog'...},{'name': 'cooc', 'kind': 'dog'...} ]
    +
    +

    Sheetsee.getOccurance(data, column)

    +
      +
    • data array of objects
    • +
    • column string
    • +
    • Returns object
    • +
    +

    Takes data column header and returns an object with key/value pairs of how often an item occurs in the column.

    +
    getOccurance(data, 'kind')
    +// Returns an object
    +// {'dog': 3, 'cat': 3}
    +
    +

    Math

    +

    Don't Forget JavaScript Math! Create variables that are the sums, differences, multiples and so forth of others. Lots of info on that here on MDN.

    +
    var profit09 = Sheetsee.getColumnTotal(data, '2009')
    +var profit10 = Sheetsee.getColumnTotal(data, '2010')
    +var difference = profit09 - profit10
    +
    + + + +
    + + + diff --git a/docs/sheetsee-maps.html b/docs/sheetsee-maps.html new file mode 100644 index 00000000..c25a4e2d --- /dev/null +++ b/docs/sheetsee-maps.html @@ -0,0 +1,112 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    sheetsee-maps

    +

    see: jlord.github.io/sheetsee.js +demo: maps

    +

    Sheetsee uses this module to handle maps in your projects. This module uses (and includes) Leaflet.js to make maps of your points, polygons, lines or multipolygons (all coordinate based). Details on what that actually looks like here. It uses (and includes) Mustache.js templates for marker popups.

    +

    Maps: Polygons and Lines

    +

    Sheetsee-maps supports polygons and lines; so long as you have the correct coordinate structure in your cells. More details for coordinates of lines and polygons in geoJSON are here, but briefly:

    +

    A linestring:

    +
    [-122.41722106933594, 37.7663045891584], [-122.40477561950684, 37.77695634643178]
    +
    +

    A polygon:

    +
    [-122.41790771484375, 37.740381166384914], [-122.41790771484375, 37.74520008134973], [-122.40966796874999, 37.74520008134973],[-122.40966796874999, 37.740381166384914], [-122.41790771484375, 37.740381166384914]
    +
    +

    A Multipolygon:

    +
    [[-122.431640625, 37.79106586542567], [-122.431640625, 37.797441398913286], [-122.42666244506835, 37.797441398913286],[-122.42666244506835, 37.79106586542567], [-122.431640625, 37.79106586542567]],
    +[[-122.43352890014648, 37.78197638783258], [-122.43352890014648, 37.789031004883654], [-122.42443084716797, 37.789031004883654], [-122.42443084716797, 37.78197638783258], [-122.43352890014648, 37.78197638783258]]
    +
    +

    To Use

    +

    This module is used as a part of Sheetsee.js. You can download the full version or build your own with a command line tool.

    +

    You'll create a little bit of HTML and then some JavaScript in your HTML to use this. You can customize marker color, popup content and enable/disable clustering in your map.

    +

    Methods

    +

    Here are the functions you can use!

    +

    Sheetsee.createGeoJSON(data, optionsJSON)

    +
      +
    • data JSON array of data
    • +
    • optionsJSON array of strings, spreadsheet column title
    • +
    +

    If you'd like to just generate geoJSON from a spreadsheet you can use this method.

    +

    This takes in your spreadsheet data in JSON format (which you can get with Tabletop.js)and the parts of your data, optionsJSON, that you plan on including in your map's popups. These will be column headers in your spreadsheet in an array of strings.

    +

    If you're not going to have popups on your markers, don't worry about it then and just pass in your data (by default it will use all the row's information).

    +
    var optionsJSON = ['name', 'breed', 'cuddlability']
    +var geoJSON = Sheetsee.createGeoJSON(data, optionsJSON)
    +
    +

    It will return an array in the special geoJSON format that map making things love.

    +

    Sheetsee.loadMap(mapOptions)

    +
      +
    • object required object
        +
      • data your spreadsheet data array required
      • +
      • mapDiv the id of the div in your HTML to contain the map required
      • +
      • geoJSONincludes array of strings of column headers to include in popups
      • +
      • template HTML/Mustache template for popups
      • +
      • cluster a true/false boolean, do you want your markers clustered
      • +
      • hexcolor pick one color for your markers
      • +
      +
    • +
    +
    var mapOptions = {
    +  data: data, // required
    +  mapDiv: 'map', //required
    +  geoJSONincludes: ['Name', 'Animal', 'Rating'], // optional
    +  template: '<p>{{Name}}—{{Animal}}—{{Rating}}</p>', // optional
    +  cluster: true, // optional
    +  hexcolor: '#e91e63' // optional
    +}
    +
    +var map = Sheetsee.loadMap("map")
    +
    +

    Marker colors

    +

    If you create a column title hexcolor in your spreadsheet and fill each cell with hex color codes, those will be used to color your markers. If you define a color in hexcolors in the options you pass to your map it will override colors in the spreadsheet data.

    + + + +
    + + + diff --git a/docs/sheetsee-tables.html b/docs/sheetsee-tables.html new file mode 100644 index 00000000..aede1fa1 --- /dev/null +++ b/docs/sheetsee-tables.html @@ -0,0 +1,141 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    sheetsee-tables

    +

    Sheetsee uses this module to make tables. With this module you can create tables of your spreadsheet data that are sortable, searchable and paginate-able.

    +

    You'll need a placeholder <div> in your html, a <script> mustache template and a <script> that initiates the table.

    +

    Your HTML Placeholder

    +

    This is as simple as an empty <div> with an id.

    +

    Your Template

    +

    Your template is the mockup of what you'd like your table to look like and what content it should show. The style is up to you! It is a mustache template inside of <script> tags.

    +

    The id of the template should be the same as the HTML placeholder it corresponds to but with "_template" on the end.

    +

    Sorting

    +

    If you want users to be able to click on headers and sort that column, your template must include table headers with the class tHeader.

    +

    You can then style .tHeader in your CSS to make them look how you want.

    +

    Your Script

    +

    You'll want to set your table options and pass them into Sheetsee.makeTable(). If you want to add a search/filter, pass your options into Sheetsee.initiateTableFilter().

    +

    Methods

    +

    Functions for you to use! There are just two :tada:

    +

    Sheetsee.makeTable(tableOptions)

    +

    You pass in an object containing:

    +
      +
    • data array your data from Tabletop.js
    • +
    • pagination number how many rows displayed at one time, defaults to all
    • +
    • tableDiv string the <div> id placeholder in your HTML, includes the hash #
    • +
    • filterDiv string the <div> id containing your <input> filter if using search, includes the hash #
    • +
    • templateID string the id of your <script> tag with the template, defaults to assume it's the same as tableDiv + _template.
    • +
    +
    var tableOptions = {
    +  "data": data,
    +  "pagination": 10,
    +  "tableDiv": "#fullTable",
    +  "filterDiv": "#fullTableFilter",
    +  "templateID": "fullTable"
    +}
    +Sheetsee.makeTable(tableOptions)
    +
    +

    Pagination

    +

    If you do not put in a number for pagination, by default it will show all of the data at once. With pagination, HTML will be added at the bottom of your table for navigation, which you can style in your CSS:

    +

    HTML

    +
    <div id='Pagination' currentPage class='table-pagination'>
    +  Showing page {{currentPage}} of {{totalPages}}
    +  <a class='pagination-pre'>Previous</a><a class='pagination-next'>Next</a>
    +</div>
    +
    +

    CSS

    +
    #Pagination {}
    +.pagination-next {}
    +.pagination-pre {}
    +.no-pag {}
    +
    +

    Sheetsee.initiateTableFilter(tableOptions)

    +

    If you want to have an input to allow users to search/filter the data in the table, you'll add an input to your HTML. Give it an id and if you want add placeholder text:

    +
    <input id="tableFilter" type="text" placeholder="filter by.."></input>
    +
    +

    Then you'll pass your tableOptions object into this method:

    +
    Sheetsee.initiateTableFilter(tableOptions)
    +
    +

    You should also add a 'clear' button using the .clear CSS class.

    +
    <a href="#" class=".clear">Clear</a>
    +
    +

    Example

    +

    HTML

    +
    <input id="siteTableFilter" type="text"></input><a href="#" class=".clear">Clear</a>
    +<div id="siteTable"></div>
    +
    +

    Template

    +
    <script id="tableTemplate" type="text/html">
    +    <table>
    +    <tr><th class="tHeader">City</th><th class="tHeader">Place Name</th><th class="tHeader">Year</th><th class="tHeader">Image</th></tr>
    +      {{#rows}}
    +        <tr><td>{{city}}</td><td>{{placename}}</td><td>{{year}}</td><td>{{image}}</td></tr>
    +      {{/rows}}
    +  </table>
    +</script>
    +
    +

    JavaScript

    +
    <script type="text/javascript">
    +  document.addEventListener('DOMContentLoaded', function() {
    +    var tableOptions = {
    +      "data": data,
    +      "pagination": 10,
    +      "tableDiv": "#siteTable",
    +      "filterDiv": "#siteTableFilter",
    +      "templateID": "tableTemplate"
    +    }
    +    Sheetsee.makeTable(tableOptions)
    +    Sheetsee.initiateTableFilter(tableOptions)
    +  })
    +</script>
    +
    + + + +
    + + + diff --git a/docs/tips.html b/docs/tips.html new file mode 100644 index 00000000..2eb9f40a --- /dev/null +++ b/docs/tips.html @@ -0,0 +1,114 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    Tips

    +

    A few things to think about beyond maps and tables.

    +

    Mustache

    +

    You can use templates for more than just tables. Use them to create lists ol, ul; array of images... You'll need a placeholder <div> in your HTML, a <script> for your template. In your Tabletop.js callback use Mustache to pass your data into the template and add it to the DOM.

    +

    HTML

    +
    <div id="divID"></div>
    +
    +

    Template

    +
    <script id="divID_template" type="text/html">
    +  {{#rows}}
    +    <div><img class="photo" src="{{some-variable}}"></div>
    +  {{/rows}}
    +</script>
    +
    +

    Script

    +
    <script type="text/html">
    +  document.addEventListener('DOMContentLoaded', function() {
    +    var URL = 'YOURSPREADSHEETSKEYHERE'
    +    Tabletop.init({key: URL, callback: showData, simpleSheet: true})
    +  })
    +
    +  function showData (data) {
    +    var template = document.querySelector('divID_template').innerHTML
    +    var html = Sheetsee.Mustache.render(template, {'rows': data})
    +    document.getElementByID('divID').innerHTML = html
    +  }
    +</script>
    +
    +

    non-table example

    +

    lib

    +

    Query Strings

    +

    If your spreadsheet contains address information, using templates (Sheetsee uses Mustache.js), you can embed those elements into a query string (aka a search URL) like Google Maps URL or Yelp. If you search for a location in Google Maps, you'll notice it creates a URL for that search.

    +

    So, if you have information in your spreadsheet that would go inside a query string, make a template for inserting them into a link on your page.

    +

    The basic elements are: a spreadsheet with address info + HTML template to create the query string.

    +

    The Sheetsee Hack-Spots is an example that does such a thing. Here is the spreadsheet, with address information:

    +

    img

    +

    In the HTML template for the table on the Hack-Spots page, the button’s links look like this:

    +
    <a class="button" href="https://maps.google.com/maps?q={{address}},{{city}},{{state}}" target="_blank">View in Google Maps</a>
    +<a class="button" href="http://www.yelp.com/search?find_desc={{name}}&find_loc={{city}},{{state}}" target="_blank">Find on Yelp</a>
    +
    +

    Above we're inserting the address, city, and state details from the spreadsheet into the structure of a query string for Google maps and Yelp. You can figure out the query string of a service by just using it (type in an address in Google Maps) and looking at the resulting URL.

    +

    With a some CSS and such, the resulting website has a table with the hack spots and a button for viewing in Google Maps or Yelp:

    +

    img

    +

    When the page builds, it creates the correct link for each row. When someone clicks on the buttons it takes them directly to the Google Map search result for that address. BAM!

    +

    IFTTT

    +

    Ifttt.com offers lots of options sending data from your actions (Twitter, Instagram, GitHub, Pocket...) to Google Spreadsheets.

    +

    Row Numbers

    +

    When Tabletop.js returns your spreadsheet data, it adds a key/value of rownumber. This is great to use when you need to uniquely match or find a row in your data.

    +

    Images

    +

    Your spreadsheet can contain URLs to images which you can use to display the images on the page you build. Your template would look something like this:

    +
    <img src='{{imgurl}}'/>
    +
    +

    Data as Classes

    +

    You can use your data as classes to style with CSS. For instance, if you had data about recipes and a column called 'Taste' that contained either 'savory' or 'sweet'. In a table of the recipes you could do something like:

    +
    <tr><td class="{{taste}}"></tr>
    +
    +

    Then in your CSS:

    +
    td .savory {}
    +td .sweet {}
    +
    + + + +
    + + + diff --git a/index.html b/index.html new file mode 100644 index 00000000..62bf4b2e --- /dev/null +++ b/index.html @@ -0,0 +1,137 @@ + + + + + Sheetsee.js + + + + + + + + + + + +
    +

    sheetseeimg

    +

    Sheetsee.js is a client-side library for connecting Google Spreadsheets to a website and visualizing the information in tables and maps.

    +

    Modules

    +

    Each of Sheetsee's functions are divided into modules. Use just the parts you need; see docs on building. If you don't want to build your own, you can just use the full library which includes all modules, it's here on GitHub.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ModuleContainsDocs
    sheetseeCommand line module for make a custom build of Sheetsee.Doc
    sheetsee-coreIncluded in all builds. Has helpful working-with-your-data functions.Doc
    sheetsee-tablesContains everything you'll need to create a table including sortable columns, pagination and search.Doc
    sheetsee-mapsFor making maps with your point, line or polygon spreadsheet data. Built with Leaflet.js.Doc
    +

    Spreadsheets!?

    +

    Google Spreadsheets can be used as simple and collaborative databases, they make getting a data driven site going much easier than traditional databases. Read more about using spreadsheets for databases.

    +

    In the Wild

    +

    What can you make with Sheetsee? Lots of things, here are some examples:

    + +

    List your sheetsee project here: file an issue or pull request.

    +

    Resources & Documentation

    +

    More resources on using Sheetsee:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Getting StartedIdeasUseDemos
    About Sheetsee.jsFork-n-GoSheetsee-coreTable Demo
    Building SheetseeTips!Sheetsee-tablesTable Demo
    BasicsCustom chartsSheetsee-mapsMap Demo
    Sheetsee-chartsChart Demo
    + + + +
    + + + From 7bd7072c3790c7aaa95e13bcaa88cb9f511638bd Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 19:15:57 -0400 Subject: [PATCH 45/70] Remove footer link --- scripts/template.hbs | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/template.hbs b/scripts/template.hbs index ad005e86..4c31cce2 100644 --- a/scripts/template.hbs +++ b/scripts/template.hbs @@ -33,7 +33,6 @@

    Use

      From 291bf98d221922328b962d30f24dd36ff6cd07fa Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 19:16:07 -0400 Subject: [PATCH 46/70] Remove local dep --- assets/tabletop1.3.4.js | 474 ---------------------------------------- 1 file changed, 474 deletions(-) delete mode 100644 assets/tabletop1.3.4.js diff --git a/assets/tabletop1.3.4.js b/assets/tabletop1.3.4.js deleted file mode 100644 index 0e5612be..00000000 --- a/assets/tabletop1.3.4.js +++ /dev/null @@ -1,474 +0,0 @@ -(function(global) { - "use strict"; - - var inNodeJS = false; - if (typeof module !== 'undefined' && module.exports) { - inNodeJS = true; - var request = require('request'); - } - - var supportsCORS = false; - var inLegacyIE = false; - try { - var testXHR = new XMLHttpRequest(); - if (typeof testXHR.withCredentials !== 'undefined') { - supportsCORS = true; - } else { - if ("XDomainRequest" in window) { - supportsCORS = true; - inLegacyIE = true; - } - } - } catch (e) { } - - // Create a simple indexOf function for support - // of older browsers. Uses native indexOf if - // available. Code similar to underscores. - // By making a separate function, instead of adding - // to the prototype, we will not break bad for loops - // in older browsers - var indexOfProto = Array.prototype.indexOf; - var ttIndexOf = function(array, item) { - var i = 0, l = array.length; - - if (indexOfProto && array.indexOf === indexOfProto) return array.indexOf(item); - for (; i < l; i++) if (array[i] === item) return i; - return -1; - }; - - /* - Initialize with Tabletop.init( { key: '0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc' } ) - OR! - Initialize with Tabletop.init( { key: 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc&output=html&widget=true' } ) - OR! - Initialize with Tabletop.init('0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc') - */ - - var Tabletop = function(options) { - // Make sure Tabletop is being used as a constructor no matter what. - if(!this || !(this instanceof Tabletop)) { - return new Tabletop(options); - } - - if(typeof(options) === 'string') { - options = { key : options }; - } - - this.callback = options.callback; - this.wanted = options.wanted || []; - this.key = options.key; - this.simpleSheet = !!options.simpleSheet; - this.parseNumbers = !!options.parseNumbers; - this.wait = !!options.wait; - this.reverse = !!options.reverse; - this.postProcess = options.postProcess; - this.debug = !!options.debug; - this.query = options.query || ''; - this.orderby = options.orderby; - this.endpoint = options.endpoint || "https://spreadsheets.google.com"; - this.singleton = !!options.singleton; - this.simple_url = !!options.simple_url; - this.callbackContext = options.callbackContext; - - if(typeof(options.proxy) !== 'undefined') { - // Remove trailing slash, it will break the app - this.endpoint = options.proxy.replace(/\/$/,''); - this.simple_url = true; - this.singleton = true; - // Let's only use CORS (straight JSON request) when - // fetching straight from Google - supportsCORS = false - } - - this.parameterize = options.parameterize || false; - - if(this.singleton) { - if(typeof(Tabletop.singleton) !== 'undefined') { - this.log("WARNING! Tabletop singleton already defined"); - } - Tabletop.singleton = this; - } - - /* Be friendly about what you accept */ - if(/key=/.test(this.key)) { - this.log("You passed an old Google Docs url as the key! Attempting to parse."); - this.key = this.key.match("key=(.*?)&")[1]; - } - - if(/pubhtml/.test(this.key)) { - this.log("You passed a new Google Spreadsheets url as the key! Attempting to parse."); - this.key = this.key.match("d\\/(.*?)\\/pubhtml")[1]; - } - - if(!this.key) { - this.log("You need to pass Tabletop a key!"); - return; - } - - this.log("Initializing with key " + this.key); - - this.models = {}; - this.model_names = []; - - this.base_json_path = "/feeds/worksheets/" + this.key + "/public/basic?alt="; - - if (inNodeJS || supportsCORS) { - this.base_json_path += 'json'; - } else { - this.base_json_path += 'json-in-script'; - } - - if(!this.wait) { - this.fetch(); - } - }; - - // A global storage for callbacks. - Tabletop.callbacks = {}; - - // Backwards compatibility. - Tabletop.init = function(options) { - return new Tabletop(options); - }; - - Tabletop.sheets = function() { - this.log("Times have changed! You'll want to use var tabletop = Tabletop.init(...); tabletop.sheets(...); instead of Tabletop.sheets(...)"); - }; - - Tabletop.prototype = { - - fetch: function(callback) { - if(typeof(callback) !== "undefined") { - this.callback = callback; - } - this.requestData(this.base_json_path, this.loadSheets); - }, - - /* - This will call the environment appropriate request method. - - In browser it will use JSON-P, in node it will use request() - */ - requestData: function(path, callback) { - if (inNodeJS) { - this.serverSideFetch(path, callback); - } else { - //CORS only works in IE8/9 across the same protocol - //You must have your server on HTTPS to talk to Google, or it'll fall back on injection - var protocol = this.endpoint.split("//").shift() || "http"; - if (supportsCORS && (!inLegacyIE || protocol === location.protocol)) { - this.xhrFetch(path, callback); - } else { - this.injectScript(path, callback); - } - } - }, - - /* - Use Cross-Origin XMLHttpRequest to get the data in browsers that support it. - */ - xhrFetch: function(path, callback) { - //support IE8's separate cross-domain object - var xhr = inLegacyIE ? new XDomainRequest() : new XMLHttpRequest(); - xhr.open("GET", this.endpoint + path); - var self = this; - xhr.onload = function() { - try { - var json = JSON.parse(xhr.responseText); - } catch (e) { - console.error(e); - } - callback.call(self, json); - }; - xhr.send(); - }, - - /* - Insert the URL into the page as a script tag. Once it's loaded the spreadsheet data - it triggers the callback. This helps you avoid cross-domain errors - http://code.google.com/apis/gdata/samples/spreadsheet_sample.html - - Let's be plain-Jane and not use jQuery or anything. - */ - injectScript: function(path, callback) { - var script = document.createElement('script'); - var callbackName; - - if(this.singleton) { - if(callback === this.loadSheets) { - callbackName = 'Tabletop.singleton.loadSheets'; - } else if (callback === this.loadSheet) { - callbackName = 'Tabletop.singleton.loadSheet'; - } - } else { - var self = this; - callbackName = 'tt' + (+new Date()) + (Math.floor(Math.random()*100000)); - // Create a temp callback which will get removed once it has executed, - // this allows multiple instances of Tabletop to coexist. - Tabletop.callbacks[ callbackName ] = function () { - var args = Array.prototype.slice.call( arguments, 0 ); - callback.apply(self, args); - script.parentNode.removeChild(script); - delete Tabletop.callbacks[callbackName]; - }; - callbackName = 'Tabletop.callbacks.' + callbackName; - } - - var url = path + "&callback=" + callbackName; - - if(this.simple_url) { - // We've gone down a rabbit hole of passing injectScript the path, so let's - // just pull the sheet_id out of the path like the least efficient worker bees - if(path.indexOf("/list/") !== -1) { - script.src = this.endpoint + "/" + this.key + "-" + path.split("/")[4]; - } else { - script.src = this.endpoint + "/" + this.key; - } - } else { - script.src = this.endpoint + url; - } - - if (this.parameterize) { - script.src = this.parameterize + encodeURIComponent(script.src); - } - - document.getElementsByTagName('script')[0].parentNode.appendChild(script); - }, - - /* - This will only run if tabletop is being run in node.js - */ - serverSideFetch: function(path, callback) { - var self = this - request({url: this.endpoint + path, json: true}, function(err, resp, body) { - if (err) { - return console.error(err); - } - callback.call(self, body); - }); - }, - - /* - Is this a sheet you want to pull? - If { wanted: ["Sheet1"] } has been specified, only Sheet1 is imported - Pulls all sheets if none are specified - */ - isWanted: function(sheetName) { - if(this.wanted.length === 0) { - return true; - } else { - return (ttIndexOf(this.wanted, sheetName) !== -1); - } - }, - - /* - What gets send to the callback - if simpleSheet === true, then don't return an array of Tabletop.this.models, - only return the first one's elements - */ - data: function() { - // If the instance is being queried before the data's been fetched - // then return undefined. - if(this.model_names.length === 0) { - return undefined; - } - if(this.simpleSheet) { - if(this.model_names.length > 1 && this.debug) { - this.log("WARNING You have more than one sheet but are using simple sheet mode! Don't blame me when something goes wrong."); - } - return this.models[ this.model_names[0] ].all(); - } else { - return this.models; - } - }, - - /* - Add another sheet to the wanted list - */ - addWanted: function(sheet) { - if(ttIndexOf(this.wanted, sheet) === -1) { - this.wanted.push(sheet); - } - }, - - /* - Load all worksheets of the spreadsheet, turning each into a Tabletop Model. - Need to use injectScript because the worksheet view that you're working from - doesn't actually include the data. The list-based feed (/feeds/list/key..) does, though. - Calls back to loadSheet in order to get the real work done. - - Used as a callback for the worksheet-based JSON - */ - loadSheets: function(data) { - var i, ilen; - var toLoad = []; - this.foundSheetNames = []; - - for(i = 0, ilen = data.feed.entry.length; i < ilen ; i++) { - this.foundSheetNames.push(data.feed.entry[i].title.$t); - // Only pull in desired sheets to reduce loading - if( this.isWanted(data.feed.entry[i].content.$t) ) { - var linkIdx = data.feed.entry[i].link.length-1; - var sheet_id = data.feed.entry[i].link[linkIdx].href.split('/').pop(); - var json_path = "/feeds/list/" + this.key + "/" + sheet_id + "/public/values?alt=" - if (inNodeJS || supportsCORS) { - json_path += 'json'; - } else { - json_path += 'json-in-script'; - } - if(this.query) { - json_path += "&sq=" + this.query; - } - if(this.orderby) { - json_path += "&orderby=column:" + this.orderby.toLowerCase(); - } - if(this.reverse) { - json_path += "&reverse=true"; - } - toLoad.push(json_path); - } - } - - this.sheetsToLoad = toLoad.length; - for(i = 0, ilen = toLoad.length; i < ilen; i++) { - this.requestData(toLoad[i], this.loadSheet); - } - }, - - /* - Access layer for the this.models - .sheets() gets you all of the sheets - .sheets('Sheet1') gets you the sheet named Sheet1 - */ - sheets: function(sheetName) { - if(typeof sheetName === "undefined") { - return this.models; - } else { - if(typeof(this.models[ sheetName ]) === "undefined") { - // alert( "Can't find " + sheetName ); - return; - } else { - return this.models[ sheetName ]; - } - } - }, - - /* - Parse a single list-based worksheet, turning it into a Tabletop Model - - Used as a callback for the list-based JSON - */ - loadSheet: function(data) { - var model = new Tabletop.Model( { data: data, - parseNumbers: this.parseNumbers, - postProcess: this.postProcess, - tabletop: this } ); - this.models[ model.name ] = model; - if(ttIndexOf(this.model_names, model.name) === -1) { - this.model_names.push(model.name); - } - this.sheetsToLoad--; - if(this.sheetsToLoad === 0) - this.doCallback(); - }, - - /* - Execute the callback upon loading! Rely on this.data() because you might - only request certain pieces of data (i.e. simpleSheet mode) - Tests this.sheetsToLoad just in case a race condition happens to show up - */ - doCallback: function() { - if(this.sheetsToLoad === 0) { - this.callback.apply(this.callbackContext || this, [this.data(), this]); - } - }, - - log: function(msg) { - if(this.debug) { - if(typeof console !== "undefined" && typeof console.log !== "undefined") { - Function.prototype.apply.apply(console.log, [console, arguments]); - } - } - } - - }; - - /* - Tabletop.Model stores the attribute names and parses the worksheet data - to turn it into something worthwhile - - Options should be in the format { data: XXX }, with XXX being the list-based worksheet - */ - Tabletop.Model = function(options) { - var i, j, ilen, jlen; - this.column_names = []; - this.name = options.data.feed.title.$t; - this.elements = []; - this.raw = options.data; // A copy of the sheet's raw data, for accessing minutiae - - if(typeof(options.data.feed.entry) === 'undefined') { - options.tabletop.log("Missing data for " + this.name + ", make sure you didn't forget column headers"); - this.elements = []; - return; - } - - for(var key in options.data.feed.entry[0]){ - if(/^gsx/.test(key)) - this.column_names.push( key.replace("gsx$","") ); - } - - for(i = 0, ilen = options.data.feed.entry.length ; i < ilen; i++) { - var source = options.data.feed.entry[i]; - var element = {}; - for(var j = 0, jlen = this.column_names.length; j < jlen ; j++) { - var cell = source[ "gsx$" + this.column_names[j] ]; - if (typeof(cell) !== 'undefined') { - if(options.parseNumbers && cell.$t !== '' && !isNaN(cell.$t)) - element[ this.column_names[j] ] = +cell.$t; - else - element[ this.column_names[j] ] = cell.$t; - } else { - element[ this.column_names[j] ] = ''; - } - } - if(element.rowNumber === undefined) - element.rowNumber = i + 1; - if( options.postProcess ) - options.postProcess(element); - this.elements.push(element); - } - - }; - - Tabletop.Model.prototype = { - /* - Returns all of the elements (rows) of the worksheet as objects - */ - all: function() { - return this.elements; - }, - - /* - Return the elements as an array of arrays, instead of an array of objects - */ - toArray: function() { - var array = [], - i, j, ilen, jlen; - for(i = 0, ilen = this.elements.length; i < ilen; i++) { - var row = []; - for(j = 0, jlen = this.column_names.length; j < jlen ; j++) { - row.push( this.elements[i][ this.column_names[j] ] ); - } - array.push(row); - } - return array; - } - }; - - if(inNodeJS) { - module.exports = Tabletop; - } else { - global.Tabletop = Tabletop; - } - -})(this); From 21da950cba9a4e080c8d56d2bc01879ff323fb20 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 19:21:12 -0400 Subject: [PATCH 47/70] Build --- docs/about.html | 1 - docs/basics.html | 1 - docs/building.html | 1 - docs/changelog.html | 1 - docs/fork-n-go.html | 1 - docs/sheetsee-core.html | 1 - docs/sheetsee-maps.html | 1 - docs/sheetsee-tables.html | 1 - docs/tips.html | 1 - index.html | 1 - 10 files changed, 10 deletions(-) diff --git a/docs/about.html b/docs/about.html index 4cf5e863..4cff139c 100644 --- a/docs/about.html +++ b/docs/about.html @@ -61,7 +61,6 @@

      Demos

      Use

        diff --git a/docs/basics.html b/docs/basics.html index feee8bc8..31ca641f 100644 --- a/docs/basics.html +++ b/docs/basics.html @@ -100,7 +100,6 @@

        Demos

        Use

          diff --git a/docs/building.html b/docs/building.html index 7ff9710e..42ebc0c4 100644 --- a/docs/building.html +++ b/docs/building.html @@ -57,7 +57,6 @@

          Demos

          Use

            diff --git a/docs/changelog.html b/docs/changelog.html index 51e25760..1c09ca7d 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -72,7 +72,6 @@

            Demos

            Use

              diff --git a/docs/fork-n-go.html b/docs/fork-n-go.html index e6213146..275b497b 100644 --- a/docs/fork-n-go.html +++ b/docs/fork-n-go.html @@ -54,7 +54,6 @@

              Demos

              Use

                diff --git a/docs/sheetsee-core.html b/docs/sheetsee-core.html index b97718b1..3e7bcc4a 100644 --- a/docs/sheetsee-core.html +++ b/docs/sheetsee-core.html @@ -129,7 +129,6 @@

                Demos

                Use

                  diff --git a/docs/sheetsee-maps.html b/docs/sheetsee-maps.html index c25a4e2d..2c99a3ee 100644 --- a/docs/sheetsee-maps.html +++ b/docs/sheetsee-maps.html @@ -91,7 +91,6 @@

                  Demos

                  Use

                    diff --git a/docs/sheetsee-tables.html b/docs/sheetsee-tables.html index aede1fa1..337561fd 100644 --- a/docs/sheetsee-tables.html +++ b/docs/sheetsee-tables.html @@ -120,7 +120,6 @@

                    Demos

                    Use

                      diff --git a/docs/tips.html b/docs/tips.html index 2eb9f40a..7c4227fa 100644 --- a/docs/tips.html +++ b/docs/tips.html @@ -93,7 +93,6 @@

                      Demos

                      Use

                        diff --git a/index.html b/index.html index 62bf4b2e..3149b7b4 100644 --- a/index.html +++ b/index.html @@ -116,7 +116,6 @@

                        Demos

                        Use

                          From aa6cc64228227215aef1742de5793db69b3f7455 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 21:08:08 -0400 Subject: [PATCH 48/70] Update demos --- demos/demo-map.html | 53 +++++-------- demos/demo-table.html | 169 +++++++++++++++++------------------------- 2 files changed, 85 insertions(+), 137 deletions(-) diff --git a/demos/demo-map.html b/demos/demo-map.html index e8df0411..e49c5136 100644 --- a/demos/demo-map.html +++ b/demos/demo-map.html @@ -4,20 +4,17 @@ Sheetsee Maps Demo - - - - + + +
                          @@ -25,9 +22,6 @@

                          All Pennies Map

                          spreadsheet

                          View Source // View Documentation

                          -

                          Using linestrings, polygons and multipolygons

                          -
                          -

                          View Source // View Spreadsheet

                          +
                          diff --git a/demos/demo-table.html b/demos/demo-table.html index 7ff8116b..22e70075 100644 --- a/demos/demo-table.html +++ b/demos/demo-table.html @@ -4,11 +4,10 @@ Sheetsee Table Demo - - - + + - -
                          -

                          All Pennies

                          -

                          spreadsheet

                          - -

                          -

                          California Pennies

                          - -
                          -

                          Pretty Pennies

                          -
                          -

                          View Source // View Documentation

                          + +
                          +

                          All Pennies

                          +

                          spreadsheet

                          + + Clear +

                          +

                          View Source // View Documentation

                          - -
                          + +
                          - + - + - - - - + function showInfo (data) { + var tableOptions = { + "data": data, + "pagination": 10, + "tableDiv": "#fullTable", + "filterDiv": "#fullTableFilter" + } + Sheetsee.makeTable(tableOptions) + Sheetsee.initiateTableFilter(tableOptions) + } + + From 35931a260f9e3ac0a994335a5f6a4586eeba2802 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sun, 19 Mar 2017 21:22:41 -0400 Subject: [PATCH 49/70] Change footer --- demos/demo-map.html | 2 +- demos/demo-table.html | 2 +- docs/about.html | 2 +- docs/basics.html | 2 +- docs/building.html | 2 +- docs/changelog.html | 2 +- docs/fork-n-go.html | 2 +- docs/sheetsee-core.html | 2 +- docs/sheetsee-maps.html | 2 +- docs/sheetsee-tables.html | 2 +- docs/tips.html | 2 +- index.html | 2 +- scripts/template.hbs | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/demos/demo-map.html b/demos/demo-map.html index e49c5136..8f7bf514 100644 --- a/demos/demo-map.html +++ b/demos/demo-map.html @@ -52,7 +52,7 @@

                          Contact

                        • @jllord
                        • File an issue
                        -

                        Home Page

                        +

                        Home

    diff --git a/demos/demo-table.html b/demos/demo-table.html index 22e70075..2b614605 100644 --- a/demos/demo-table.html +++ b/demos/demo-table.html @@ -56,7 +56,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/about.html b/docs/about.html index 4cff139c..315bbfa3 100644 --- a/docs/about.html +++ b/docs/about.html @@ -73,7 +73,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/basics.html b/docs/basics.html index 31ca641f..4c33ce50 100644 --- a/docs/basics.html +++ b/docs/basics.html @@ -112,7 +112,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/building.html b/docs/building.html index 42ebc0c4..68efdf21 100644 --- a/docs/building.html +++ b/docs/building.html @@ -69,7 +69,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/changelog.html b/docs/changelog.html index 1c09ca7d..0e01c18d 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -84,7 +84,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/fork-n-go.html b/docs/fork-n-go.html index 275b497b..e63f573b 100644 --- a/docs/fork-n-go.html +++ b/docs/fork-n-go.html @@ -66,7 +66,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/sheetsee-core.html b/docs/sheetsee-core.html index 3e7bcc4a..67bb8538 100644 --- a/docs/sheetsee-core.html +++ b/docs/sheetsee-core.html @@ -141,7 +141,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/sheetsee-maps.html b/docs/sheetsee-maps.html index 2c99a3ee..a90fde9b 100644 --- a/docs/sheetsee-maps.html +++ b/docs/sheetsee-maps.html @@ -103,7 +103,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/sheetsee-tables.html b/docs/sheetsee-tables.html index 337561fd..dc22ea3c 100644 --- a/docs/sheetsee-tables.html +++ b/docs/sheetsee-tables.html @@ -132,7 +132,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/docs/tips.html b/docs/tips.html index 7c4227fa..98b6dcf0 100644 --- a/docs/tips.html +++ b/docs/tips.html @@ -105,7 +105,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/index.html b/index.html index 3149b7b4..7acba8ce 100644 --- a/index.html +++ b/index.html @@ -128,7 +128,7 @@

    Contact

  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    diff --git a/scripts/template.hbs b/scripts/template.hbs index 4c31cce2..a2f1bb70 100644 --- a/scripts/template.hbs +++ b/scripts/template.hbs @@ -45,7 +45,7 @@
  • @jllord
  • File an issue
  • -

    Home Page

    +

    Home

    From c9593705ad58e6011244d8a453f78d0cd5bf0226 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 21 Mar 2017 14:09:57 -0400 Subject: [PATCH 50/70] Update sheetsee link --- demos/demo-map.html | 2 +- demos/demo-table.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/demo-map.html b/demos/demo-map.html index 8f7bf514..31519c5d 100644 --- a/demos/demo-map.html +++ b/demos/demo-map.html @@ -8,7 +8,7 @@ - +