diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..4210bb2 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +twstat-genghis.chilijung.me diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c0ed24 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +Taiwanstat Genghis theme +========= + +This is a test Repo using [Genghis](https://github.com/Genghis-canner/genghis), which is a blog engine developed by [Canner team](https://github.com/Canner) + +And the theme is used to use in [Taiwanstat Official Site](http://taiwanstat.com/) + +## Usage + +#### Prerequisite + +- node +- npm + +Install `genghis`, `canner-core` + +``` +$ sudo npm install -g genghis +$ sudo npm install -g canner-core +``` + +run build blog + +``` +genghis blog.json [-w option for watch changes] +``` + +build pages + +``` +canner-core build page.js +``` + +[More Genghis Information](https://github.com/Genghis-canner/genghis) + +## License + +MIT diff --git a/about.md b/about.md new file mode 100644 index 0000000..0270cf3 --- /dev/null +++ b/about.md @@ -0,0 +1,3 @@ +生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。 + +讓我們來用數據看台灣! diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..cab37fc --- /dev/null +++ b/about/index.html @@ -0,0 +1,63 @@ + + + + + + + + 關於我們 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +

生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。

+

讓我們來用數據看台灣!

+ + + +
+
+ + + + +
+ + + + \ No newline at end of file diff --git "a/assets/article_images/2015-04-02/\346\227\245\346\234\210\346\275\255\346\227\245\345\207\272.jpeg" "b/assets/article_images/2015-04-02/\346\227\245\346\234\210\346\275\255\346\227\245\345\207\272.jpeg" new file mode 100644 index 0000000..a6f9a62 Binary files /dev/null and "b/assets/article_images/2015-04-02/\346\227\245\346\234\210\346\275\255\346\227\245\345\207\272.jpeg" differ diff --git a/assets/article_images/2015-04-29/power.png b/assets/article_images/2015-04-29/power.png new file mode 100644 index 0000000..68e5b7b Binary files /dev/null and b/assets/article_images/2015-04-29/power.png differ diff --git a/assets/images/author.jpg b/assets/images/author.jpg new file mode 100644 index 0000000..b7dfd2e Binary files /dev/null and b/assets/images/author.jpg differ diff --git a/assets/images/background_image.jpg b/assets/images/background_image.jpg new file mode 100644 index 0000000..b5af38f Binary files /dev/null and b/assets/images/background_image.jpg differ diff --git a/assets/images/cA4aKEIPQrerBnp1yGHv_IMG_9534-3-2.jpg b/assets/images/cA4aKEIPQrerBnp1yGHv_IMG_9534-3-2.jpg new file mode 100644 index 0000000..940daa2 Binary files /dev/null and b/assets/images/cA4aKEIPQrerBnp1yGHv_IMG_9534-3-2.jpg differ diff --git a/assets/images/cover.jpg b/assets/images/cover.jpg new file mode 100644 index 0000000..976a471 Binary files /dev/null and b/assets/images/cover.jpg differ diff --git a/assets/images/cover.png b/assets/images/cover.png new file mode 100644 index 0000000..9cdc3f8 Binary files /dev/null and b/assets/images/cover.png differ diff --git a/assets/images/df_logo.jpg b/assets/images/df_logo.jpg new file mode 100644 index 0000000..8c7460b Binary files /dev/null and b/assets/images/df_logo.jpg differ diff --git a/assets/images/long_cover.png b/assets/images/long_cover.png new file mode 100644 index 0000000..ba36c5e Binary files /dev/null and b/assets/images/long_cover.png differ diff --git a/assets/images/project/pm2.5.png b/assets/images/project/pm2.5.png new file mode 100644 index 0000000..e020b36 Binary files /dev/null and b/assets/images/project/pm2.5.png differ diff --git a/assets/images/project/power.png b/assets/images/project/power.png new file mode 100644 index 0000000..dd6e4a8 Binary files /dev/null and b/assets/images/project/power.png differ diff --git a/assets/images/project/price.png b/assets/images/project/price.png new file mode 100644 index 0000000..9bcc105 Binary files /dev/null and b/assets/images/project/price.png differ diff --git a/assets/images/project/psi.png b/assets/images/project/psi.png new file mode 100644 index 0000000..288a8ab Binary files /dev/null and b/assets/images/project/psi.png differ diff --git a/assets/images/project/reservoir.png b/assets/images/project/reservoir.png new file mode 100644 index 0000000..668eaf0 Binary files /dev/null and b/assets/images/project/reservoir.png differ diff --git a/assets/images/real_cover.png b/assets/images/real_cover.png new file mode 100644 index 0000000..d0c5b7d Binary files /dev/null and b/assets/images/real_cover.png differ diff --git a/assets/images/round-logo.png b/assets/images/round-logo.png new file mode 100644 index 0000000..12adb82 Binary files /dev/null and b/assets/images/round-logo.png differ diff --git a/assets/images/screenshot1.jpg b/assets/images/screenshot1.jpg new file mode 100644 index 0000000..79f5591 Binary files /dev/null and b/assets/images/screenshot1.jpg differ diff --git a/assets/images/screenshot2.jpg b/assets/images/screenshot2.jpg new file mode 100644 index 0000000..5ad1e1d Binary files /dev/null and b/assets/images/screenshot2.jpg differ diff --git a/assets/images/screenshot3.jpg b/assets/images/screenshot3.jpg new file mode 100644 index 0000000..29d115a Binary files /dev/null and b/assets/images/screenshot3.jpg differ diff --git a/assets/images/taiwanstat_cover.png b/assets/images/taiwanstat_cover.png new file mode 100644 index 0000000..b1c1852 Binary files /dev/null and b/assets/images/taiwanstat_cover.png differ diff --git a/assets/images/taiwanstat_cover1.png b/assets/images/taiwanstat_cover1.png new file mode 100644 index 0000000..3cec614 Binary files /dev/null and b/assets/images/taiwanstat_cover1.png differ diff --git a/assets/images/taiwanstat_thumb.png b/assets/images/taiwanstat_thumb.png new file mode 100644 index 0000000..658352d Binary files /dev/null and b/assets/images/taiwanstat_thumb.png differ diff --git a/assets/js/index.js b/assets/js/index.js new file mode 100644 index 0000000..fb5df83 --- /dev/null +++ b/assets/js/index.js @@ -0,0 +1,29 @@ +/** + * Main JS file for Casper behaviours + */ + +/*globals jQuery, document */ +(function ($) { + "use strict"; + + $(document).ready(function(){ + + $(".post-content").fitVids(); + + // Calculates Reading Time + $('.post-content').readingTime({ + readingTimeTarget: '.post-reading-time', + wordCountTarget: '.post-word-count', + }); + + // Creates Captions from Alt tags + $(".post-content img").each(function() { + // Let's put a caption if there is one + if($(this).attr("alt")) + $(this).wrap('
') + .after('
'+$(this).attr("alt")+'
'); + }); + + }); + +}(jQuery)); \ No newline at end of file diff --git a/assets/js/jquery.fitvids.js b/assets/js/jquery.fitvids.js new file mode 100644 index 0000000..a8551f6 --- /dev/null +++ b/assets/js/jquery.fitvids.js @@ -0,0 +1,74 @@ +/*global jQuery */ +/*jshint multistr:true browser:true */ +/*! +* FitVids 1.0.3 +* +* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com +* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ +* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ +* +* Date: Thu Sept 01 18:00:00 2011 -0500 +*/ + +(function( $ ){ + + "use strict"; + + $.fn.fitVids = function( options ) { + var settings = { + customSelector: null + }; + + if(!document.getElementById('fit-vids-style')) { + + var div = document.createElement('div'), + ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0], + cssStyles = '­'; + + div.className = 'fit-vids-style'; + div.id = 'fit-vids-style'; + div.style.display = 'none'; + div.innerHTML = cssStyles; + + ref.parentNode.insertBefore(div,ref); + + } + + if ( options ) { + $.extend( settings, options ); + } + + return this.each(function(){ + var selectors = [ + "iframe[src*='player.vimeo.com']", + "iframe[src*='youtube.com']", + "iframe[src*='youtube-nocookie.com']", + "iframe[src*='kickstarter.com'][src*='video.html']", + "object", + "embed" + ]; + + if (settings.customSelector) { + selectors.push(settings.customSelector); + } + + var $allVideos = $(this).find(selectors.join(',')); + $allVideos = $allVideos.not("object object"); // SwfObj conflict patch + + $allVideos.each(function(){ + var $this = $(this); + if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } + var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), + width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), + aspectRatio = height / width; + if(!$this.attr('id')){ + var videoID = 'fitvid' + Math.floor(Math.random()*999999); + $this.attr('id', videoID); + } + $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); + $this.removeAttr('height').removeAttr('width'); + }); + }); + }; +// Works with either jQuery or Zepto +})( window.jQuery || window.Zepto ); diff --git a/assets/js/min/highlight.pack-ck.js b/assets/js/min/highlight.pack-ck.js new file mode 100644 index 0000000..6419620 --- /dev/null +++ b/assets/js/min/highlight.pack-ck.js @@ -0,0 +1 @@ +var hljs=new function(){function e(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,t){var r=e&&e.exec(t);return r&&0==r.index}function n(e){return Array.prototype.map.call(e.childNodes,function(e){return 3==e.nodeType?N.useBR?e.nodeValue.replace(/\n/g,""):e.nodeValue:"br"==t(e)?"\n":n(e)}).join("")}function a(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return t=t.map(function(e){return e.replace(/^language-/,"")}),t.filter(function(e){return m(e)||"no-highlight"==e})[0]}function i(e,t){var r={};for(var n in e)r[n]=e[n];if(t)for(var n in t)r[n]=t[n];return r}function c(e){var r=[];return function n(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:"br"==t(i)?a+=1:1==i.nodeType&&(r.push({event:"start",offset:a,node:i}),a=n(i,a),r.push({event:"stop",offset:a,node:i}));return a}(e,0),r}function s(r,n,a){function i(){return r.length&&n.length?r[0].offset!=n[0].offset?r[0].offset"}function s(e){u+=""}function o(e){("start"==e.event?c:s)(e.node)}for(var l=0,u="",b=[];r.length||n.length;){var d=i();if(u+=e(a.substr(l,d[0].offset-l)),l=d[0].offset,d==r){b.reverse().forEach(s);do o(d.splice(0,1)[0]),d=i();while(d==r&&d.length&&d[0].offset==l);b.reverse().forEach(c)}else"start"==d[0].event?b.push(d[0].node):b.pop(),o(d.splice(0,1)[0])}return u+e(a.substr(l))}function o(e){function t(e){return e&&e.source||e}function r(r,n){return RegExp(t(r),"m"+(e.cI?"i":"")+(n?"g":""))}function n(a,c){function s(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");o[r[0]]=[t,r[1]?Number(r[1]):1]})}if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={};"string"==typeof a.k?s("keyword",a.k):Object.keys(a.k).forEach(function(e){s(e,a.k[e])}),a.k=o}a.lR=r(a.l||/\b[A-Za-z0-9_]+\b/,!0),c&&(a.bK&&(a.b=a.bK.split(" ").join("|")),a.b||(a.b=/\B|\b/),a.bR=r(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=r(a.e)),a.tE=t(a.e)||"",a.eW&&c.tE&&(a.tE+=(a.e?"|":"")+c.tE)),a.i&&(a.iR=r(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var l=[];a.c.forEach(function(e){e.v?e.v.forEach(function(t){l.push(i(e,t))}):l.push("self"==e?a:e)}),a.c=l,a.c.forEach(function(e){n(e,a)}),a.starts&&n(a.starts,c);var u=a.c.map(function(e){return e.bK?"\\.?\\b("+e.b+")\\b\\.?":e.b}).concat([a.tE]).concat([a.i]).map(t).filter(Boolean);a.t=u.length?r(u.join("|"),!0):{exec:function(e){return null}},a.continuation={}}}n(e)}function l(t,n,a,i){function c(e,t){for(var n=0;n";return i+=e+'">',i+t+c}function f(){var t=e(x);if(!k.k)return t;var r="",n=0;k.lR.lastIndex=0;for(var a=k.lR.exec(t);a;){r+=t.substr(n,a.index-n);var i=d(k,a);i?(C+=i[1],r+=p(i[0],a[0])):r+=a[0],n=k.lR.lastIndex,a=k.lR.exec(t)}return r+t.substr(n)}function g(){if(k.sL&&!v[k.sL])return e(x);var t=k.sL?l(k.sL,x,!0,k.continuation.top):u(x);return k.r>0&&(C+=t.r),"continuous"==k.subLanguageMode&&(k.continuation.top=t.top),p(t.language,t.value,!1,!0)}function h(){return void 0!==k.sL?g():f()}function w(t,r){var n=t.cN?p(t.cN,"",!0):"";t.rB?(M+=n,x=""):t.eB?(M+=e(r)+n,x=""):(M+=n,x=r),k=Object.create(t,{parent:{value:k}})}function _(t,r){if(x+=t,void 0===r)return M+=h(),0;var n=c(r,k);if(n)return M+=h(),w(n,r),n.rB?0:r.length;var a=s(k,r);if(a){var i=k;i.rE||i.eE||(x+=r),M+=h();do k.cN&&(M+=""),C+=k.r,k=k.parent;while(k!=a.parent);return i.eE&&(M+=e(r)),x="",a.starts&&w(a.starts,""),i.rE?0:r.length}if(b(r,k))throw new Error('Illegal lexeme "'+r+'" for mode "'+(k.cN||"")+'"');return x+=r,r.length||1}var y=m(t);if(!y)throw new Error('Unknown language: "'+t+'"');o(y);for(var k=i||y,M="",E=k;E!=y;E=E.parent)E.cN&&(M=p(E.cN,M,!0));var x="",C=0;try{for(var L,B,I=0;;){if(k.t.lastIndex=I,L=k.t.exec(n),!L)break;B=_(n.substr(I,L.index-I),L[0]),I=L.index+B}_(n.substr(I));for(var E=k;E.parent;E=E.parent)E.cN&&(M+="");return{r:C,value:M,language:t,top:k}}catch(S){if(-1!=S.message.indexOf("Illegal"))return{r:0,value:e(n)};throw S}}function u(t,r){r=r||N.languages||Object.keys(v);var n={r:0,value:e(t)},a=n;return r.forEach(function(e){if(m(e)){var r=l(e,t,!1);r.language=e,r.r>a.r&&(a=r),r.r>n.r&&(a=n,n=r)}}),a.language&&(n.second_best=a),n}function b(e){return N.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t,r,n){return t.replace(/\t/g,N.tabReplace)})),N.useBR&&(e=e.replace(/\n/g,"
")),e}function d(e){var t=n(e),r=a(e);if("no-highlight"!=r){var i=r?l(r,t,!0):u(t),o=c(e);if(o.length){var d=document.createElementNS("http://www.w3.org/1999/xhtml","pre");d.innerHTML=i.value,i.value=s(o,c(d),t)}i.value=b(i.value),e.innerHTML=i.value,e.className+=" hljs "+(!r&&i.language||""),e.result={language:i.language,re:i.r},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.r})}}function p(e){N=i(N,e)}function f(){if(!f.called){f.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,d)}}function g(){addEventListener("DOMContentLoaded",f,!1),addEventListener("load",f,!1)}function h(e,t){var r=v[e]=t(this);r.aliases&&r.aliases.forEach(function(t){w[t]=e})}function m(e){return v[e]||v[w[e]]}var N={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},v={},w={};this.highlight=l,this.highlightAuto=u,this.fixMarkup=b,this.highlightBlock=d,this.configure=p,this.initHighlighting=f,this.initHighlightingOnLoad=g,this.registerLanguage=h,this.getLanguage=m,this.inherit=i,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(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},n={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:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,r,n,t]}}),hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:t,c:[{cN:"comment",b:"///",e:"$",rB:!0,c:[{cN:"xmlDocTag",b:"///|"},{cN:"xmlDocTag",b:""}]},e.CLCM,e.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"protected public private internal",e:/[{;=]/,k:t,c:[{bK:"class namespace interface",starts:{c:[e.TM]}},{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM]}]}]}}),hljs.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",n={cN:"yardoctag",b:"@[A-Za-z]+"},a={cN:"comment",v:[{b:"#",e:"$",c:[n]},{b:"^\\=begin",e:"^\\=end",c:[n],r:10},{b:"^__END__",e:"\\n$"}]},i={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,i],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},s={cN:"params",b:"\\(",e:"\\)",k:r},o=[c,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},a]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:t}),s,a]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[c,{b:t}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,i],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];return i.c=o,s.c=o,{k:r,c:o}}),hljs.registerLanguage("diff",function(e){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(e){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},e.ASM,e.QSM,e.CLCM,e.CBLCLM,e.CNM,{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBLCLM,e.REGEXP_MODE,{b:/;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[e.CLCM,e.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}}),hljs.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},n={eW:!0,i:/]+/}]}]}]};return{aliases:["html"],cI:!0,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:[n],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[n],starts:{e:"",rE:!0,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},r,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:"[^ /><]+",r:0},n]}]}}),hljs.registerLanguage("markdown",function(e){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}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",e:"$",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:!0,eE:!0},{cN:"link_url",b:"\\s",e:"$"}]}]}}),hljs.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]};return{cI:!0,i:"[=/|']",c:[e.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:!0,eE:!0,r:0,c:[r,e.ASM,e.QSM,e.NM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBLCLM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[r,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}),hljs.registerLanguage("http",function(e){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:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}}),hljs.registerLanguage("java",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:t,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},e.CLCM,e.CBLCLM,e.ASM,e.QSM,{bK:"protected public private",e:/[{;=]/,k:t,c:[{cN:"class",bK:"class interface",eW:!0,i:/[:"<>]/,c:[{bK:"extends implements",r:10},e.UTM]},{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]}]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}),hljs.registerLanguage("php",function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"preprocessor",b:/<\?(php)?|\?>/},n={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},r]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},r,t,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBLCLM,n,a]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},n,a]}}),hljs.registerLanguage("python",function(e){var t={cN:"prompt",b:/^(>>>|\.\.\.) /},r={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},n={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},a={cN:"params",b:/\(/,e:/\)/,c:["self",t,n,r]},i={e:/:/,i:/[${=;\n]/,c:[e.UTM,a]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,n,r,e.HCM,e.inherit(i,{cN:"function",bK:"def",r:10}),e.inherit(i,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}}),hljs.registerLanguage("sql",function(e){return{cI:!0,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:!0,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM]},e.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}),hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}}),hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},n={b:"->{",e:"}"},a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]},i={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},c=[e.BE,r,a],s=[a,e.HCM,i,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},n,{cN:"string",c:c,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,i,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return r.c=s,n.c=s,{k:t,c:s}}),hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{k:t,l:r,i:""}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",k:n,l:r,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}}),hljs.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",n=e.inherit(e.TM,{b:r}),a={cN:"subst",b:/#\{/,e:/}/,k:t},i=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,a]},{b:/"/,e:/"/,c:[e.BE,a]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[a,e.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+r},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];return a.c=i,{k:t,c:i.concat([{cN:"comment",b:"###",e:"###"},e.HCM,{cN:"function",b:"("+r+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:!0,c:[n,{cN:"params",b:"\\(",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(i)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[n]},n]},{cN:"attribute",b:r+":",e:":",rB:!0,eE:!0,r:0}])}}),hljs.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},r={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[e.inherit(e.UTM,{starts:r})],r:0}],i:"[^\\s\\}]"}}),hljs.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],n={cN:"value",e:",",eW:!0,eE:!0,c:r,k:t},a={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:n}],i:"\\S"},i={b:"\\[",e:"\\]",c:[e.inherit(n,{cN:null})],i:"\\S"};return r.splice(r.length,0,a,i),{c:r,k:t,i:"\\S"}}),hljs.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{cI:!0,c:[e.HCM,{cN:"tag",b:""},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),hljs.registerLanguage("cpp",function(e){var t={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:t,i:"",i:"\\n"},e.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:t,r:10,c:["self"]}]}}),hljs.registerLanguage("makefile",function(e){var t={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[e.QSM,t]}]}}); \ No newline at end of file diff --git a/assets/js/min/index-ck.js b/assets/js/min/index-ck.js new file mode 100644 index 0000000..d0af1de --- /dev/null +++ b/assets/js/min/index-ck.js @@ -0,0 +1 @@ +!function(t){"use strict";t(document).ready(function(){t(".post-content").fitVids(),t(".content").readingTime({readingTimeTarget:".post-reading-time",wordCountTarget:".post-word-count"}),t(".post-content img").each(function(){t(this).attr("alt")&&t(this).wrap('
').after("
"+t(this).attr("alt")+"
")})})}(jQuery); \ No newline at end of file diff --git a/assets/js/min/jquery.fitvids-ck.js b/assets/js/min/jquery.fitvids-ck.js new file mode 100644 index 0000000..e7706a0 --- /dev/null +++ b/assets/js/min/jquery.fitvids-ck.js @@ -0,0 +1 @@ +!function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null};if(!document.getElementById("fit-vids-style")){var r=document.createElement("div"),a=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],o="­";r.className="fit-vids-style",r.id="fit-vids-style",r.style.display="none",r.innerHTML=o,a.parentNode.insertBefore(r,a)}return e&&t.extend(i,e),this.each(function(){var e=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];i.customSelector&&e.push(i.customSelector);var r=t(this).find(e.join(","));r=r.not("object object"),r.each(function(){var e=t(this);if(!("embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),r=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),a=i/r;if(!e.attr("id")){var o="fitvid"+Math.floor(999999*Math.random());e.attr("id",o)}e.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*a+"%"),e.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/assets/js/min/jquery.ghostHunter.min-ck.js b/assets/js/min/jquery.ghostHunter.min-ck.js new file mode 100644 index 0000000..d9accaf --- /dev/null +++ b/assets/js/min/jquery.ghostHunter.min-ck.js @@ -0,0 +1 @@ +!function(t){var e=function(t){var n=new e.Index;return n.pipeline.add(e.stopWordFilter,e.stemmer),t&&t.call(n,n),n};e.version="0.4.3","undefined"!=typeof module&&(module.exports=e),e.utils={},e.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),e.utils.zeroFillArray=function(){var t=[0];return function(e){for(;e>t.length;)t=t.concat(t);return t.slice(0,e)}}(),e.EventEmitter=function(){this.events={}},e.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},e.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},e.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},e.EventEmitter.prototype.hasHandler=function(t){return t in this.events},e.tokenizer=function(t){if(!arguments.length||null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return t.toLowerCase()});for(var e=(""+t).replace(/^\s+/,""),n=e.length-1;n>=0;n--)if(/\S/.test(e.charAt(n))){e=e.substring(0,n+1);break}return e.split(/\s+/).map(function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"").toLowerCase()})},e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions={},e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw Error("Cannot load un-registered function: "+t);n.add(i)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t)+1;this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);this._stack.splice(i,0,n)},e.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);this._stack.splice(e,1)},e.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(t){this.elements=t},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t,e=0,n=this.elements,i=n.length,o=0;i>o;o++)t=n[o],e+=t*t;return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(t){for(var e=this.elements,n=t.elements,i=e.length,o=0,r=0;i>r;r++)o+=e[r]*n[r];return o},e.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},e.Vector.prototype.toArray=function(){return this.elements},e.SortedSet=function(){this.length=0,this.elements=[]},e.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},e.SortedSet.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t)},this),this.length=this.elements.length},e.SortedSet.prototype.toArray=function(){return this.elements.slice()},e.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},e.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},e.SortedSet.prototype.indexOf=function(t,e,n){var e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return 1>=i?r===t?o:-1:t>r?this.indexOf(t,o,n):r>t?this.indexOf(t,e,o):r===t?o:void 0},e.SortedSet.prototype.locationFor=function(t,e,n){var e=e||0,n=n||this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];if(1>=i){if(r>t)return o;if(t>r)return o+1}return t>r?this.locationFor(t,o,n):r>t?this.locationFor(t,e,o):void 0},e.SortedSet.prototype.intersect=function(t){for(var n=new e.SortedSet,i=0,o=0,r=this.length,s=t.length,a=this.elements,l=t.elements;!(i>r-1||o>s-1);)a[i]!==l[o]?a[i]l[o]&&o++:(n.add(a[i]),i++,o++);return n},e.SortedSet.prototype.clone=function(){var t=new e.SortedSet;return t.elements=this.toArray(),t.length=t.elements.length,t},e.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},e.SortedSet.prototype.toJSON=function(){return this.toArray()},e.Index=function(){this._fields=[],this._ref="id",this.pipeline=new e.Pipeline,this.documentStore=new e.Store,this.tokenStore=new e.TokenStore,this.corpusTokens=new e.SortedSet,this.eventEmitter=new e.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},e.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},e.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},e.Index.load=function(t){t.version!==e.version&&e.utils.warn("version mismatch: current "+e.version+" importing "+t.version);var n=new this;return n._fields=t.fields,n._ref=t.ref,n.documentStore=e.Store.load(t.documentStore),n.tokenStore=e.TokenStore.load(t.tokenStore),n.corpusTokens=e.SortedSet.load(t.corpusTokens),n.pipeline=e.Pipeline.load(t.pipeline),n},e.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},e.Index.prototype.ref=function(t){return this._ref=t,this},e.Index.prototype.add=function(t,n){var i={},o=new e.SortedSet,r=t[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(e.tokenizer(t[n.name]));i[n.name]=r,e.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),e.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;o.length>s;s++){var a=o.elements[s],l=this._fields.reduce(function(t,e){var n=i[e.name].length;if(!n)return t;var o=i[e.name].filter(function(t){return t===a}).length;return t+o/n*e.boost},0);this.tokenStore.add(a,{ref:r,tf:l})}n&&this.eventEmitter.emit("add",t,this)},e.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},e.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},e.Index.prototype.idf=function(t){if(this._idfCache[t])return this._idfCache[t];var e=this.tokenStore.count(t),n=1;return e>0&&(n=1+Math.log(this.tokenStore.length/e)),this._idfCache[t]=n},e.Index.prototype.search=function(t){var n=this.pipeline.run(e.tokenizer(t)),i=e.utils.zeroFillArray(this.corpusTokens.length),o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(t,n,s){var a=1/s.length*this._fields.length*r,l=this,h=this.tokenStore.expand(t).reduce(function(n,o){var r=l.corpusTokens.indexOf(o),s=l.idf(o),h=1,u=new e.SortedSet;if(o!==t){var c=Math.max(3,o.length-t.length);h=1/Math.log(c)}return r>-1&&(i[r]=a*s*h),Object.keys(l.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new e.SortedSet);o.push(h)},this);var a=o.reduce(function(t,e){return t.intersect(e)}),l=new e.Vector(i);return a.map(function(t){return{ref:t,score:l.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},e.Index.prototype.documentVector=function(t){for(var n=this.documentStore.get(t),i=n.length,o=e.utils.zeroFillArray(this.corpusTokens.length),r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[t].tf,l=this.idf(s);o[this.corpusTokens.indexOf(s)]=a*l}return new e.Vector(o)},e.Index.prototype.toJSON=function(){return{version:e.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},e.Store=function(){this.store={},this.length=0},e.Store.load=function(t){var n=new this;return n.length=t.length,n.store=Object.keys(t.store).reduce(function(n,i){return n[i]=e.SortedSet.load(t.store[i]),n},{}),n},e.Store.prototype.set=function(t,e){this.store[t]=e,this.length=Object.keys(this.store).length},e.Store.prototype.get=function(t){return this.store[t]},e.Store.prototype.has=function(t){return t in this.store},e.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},e.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},e.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",l="^("+o+")?"+r+o+r+o,h="^("+o+")?"+i;return function(n){var r,u,c,f,p,d,m;if(3>n.length)return n;if(c=n.substr(0,1),"y"==c&&(n=c.toUpperCase()+n.substr(1)),f=/^(.+?)(ss|i)es$/,p=/^(.+?)([^s])s$/,f.test(n)?n=n.replace(f,"$1$2"):p.test(n)&&(n=n.replace(p,"$1$2")),f=/^(.+?)eed$/,p=/^(.+?)(ed|ing)$/,f.test(n)){var v=f.exec(n);f=RegExp(s),f.test(v[1])&&(f=/.$/,n=n.replace(f,""))}else if(p.test(n)){var v=p.exec(n);r=v[1],p=RegExp(h),p.test(r)&&(n=r,p=/(at|bl|iz)$/,d=RegExp("([^aeiouylsz])\\1$"),m=RegExp("^"+o+i+"[^aeiouwxy]$"),p.test(n)?n+="e":d.test(n)?(f=/.$/,n=n.replace(f,"")):m.test(n)&&(n+="e"))}if(f=/^(.+?)y$/,f.test(n)){var v=f.exec(n);r=v[1],f=RegExp(h),f.test(r)&&(n=r+"i")}if(f=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,f.test(n)){var v=f.exec(n);r=v[1],u=v[2],f=RegExp(s),f.test(r)&&(n=r+t[u])}if(f=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,f.test(n)){var v=f.exec(n);r=v[1],u=v[2],f=RegExp(s),f.test(r)&&(n=r+e[u])}if(f=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,p=/^(.+?)(s|t)(ion)$/,f.test(n)){var v=f.exec(n);r=v[1],f=RegExp(l),f.test(r)&&(n=r)}else if(p.test(n)){var v=p.exec(n);r=v[1]+v[2],p=RegExp(l),p.test(r)&&(n=r)}if(f=/^(.+?)e$/,f.test(n)){var v=f.exec(n);r=v[1],f=RegExp(l),p=RegExp(a),d=RegExp("^"+o+i+"[^aeiouwxy]$"),(f.test(r)||p.test(r)&&!d.test(r))&&(n=r)}return f=/ll$/,p=RegExp(l),f.test(n)&&p.test(n)&&(f=/.$/,n=n.replace(f,"")),"y"==c&&(n=c.toLowerCase()+n.substr(1)),n}}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),e.stopWordFilter=function(t){return-1===e.stopWordFilter.stopWords.indexOf(t)?t:void 0},e.stopWordFilter.stopWords=new e.SortedSet,e.stopWordFilter.stopWords.length=119,e.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),e.TokenStore=function(){this.root={docs:{}},this.length=0},e.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},e.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},e.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;t.length>n;n++){if(!e[t[n]])return!1;e=e[t[n]]}return!0},e.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var e=this.root,n=0;t.length>n;n++){if(!e[t[n]])return{};e=e[t[n]]}return e},e.TokenStore.prototype.get=function(t,e){return this.getNode(t,e).docs||{}},e.TokenStore.prototype.count=function(t,e){return Object.keys(this.get(t,e)).length},e.TokenStore.prototype.remove=function(t,e){if(t){for(var n=this.root,i=0;t.length>i;i++){if(!(t[i]in n))return;n=n[t[i]]}delete n.docs[e]}},e.TokenStore.prototype.expand=function(t,e){var n=this.getNode(t),i=n.docs||{},e=e||[];return Object.keys(i).length&&e.push(t),Object.keys(n).forEach(function(n){"docs"!==n&&e.concat(this.expand(t+n,e))},this),e},e.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},t.fn.ghostHunter=function(e){var i=t.extend({},t.fn.ghostHunter.defaults,e);return i.results?(n.init(this,i),n):void 0},t.fn.ghostHunter.defaults={results:!1,rss:"/rss",onKeyUp:!1,result_template:"

{{title}}

{{pubDate}}

",info_template:"

Number of posts found: {{amount}}

",displaySearchInfo:!0,zeroResultsInfo:!0};var n={isInit:!1,init:function(t,n){var i=this;this.target=t,this.rss=n.rss,this.results=n.results,this.blogData=[],this.result_template=n.result_template,this.info_template=n.info_template,this.zeroResultsInfo=n.zeroResultsInfo,this.displaySearchInfo=n.displaySearchInfo,this.index=e(function(){this.field("title",{boost:10}),this.field("description"),this.field("link"),this.field("pubDate"),this.ref("id")}),t.focus(function(){i.loadRSS()}),t.closest("form").submit(function(e){e.preventDefault(),i.find(t.val())}),n.onKeyUp&&(i.loadRSS(),t.keyup(function(){i.find(t.val())}))},loadRSS:function(){if(this.isInit)return!1;var e=this.index,n=this.rss,i=this.blogData;t.get(n,function(n){for(var o=t(n).find("item"),r=0;o&&r0)&&this.displaySearchInfo&&i.append(this.format(this.info_template,{amount:n.length}));for(var o=0;o0?o+d+" "+v:o+T);else{var f=d+":"+l;r.find(s).text(o+f)}""!==a&&void 0!==a&&r.find(a).text(m+n)};r.each(function(){null!=f&&null!=h?e.get(f,function(n){M(e("
").html(n).find(h).text())}):M(r.text())})}}(jQuery); \ No newline at end of file diff --git a/assets/js/readingTime.min.js b/assets/js/readingTime.min.js new file mode 100644 index 0000000..47f83e8 --- /dev/null +++ b/assets/js/readingTime.min.js @@ -0,0 +1,12 @@ +/*! + +Name: Reading Time +Dependencies: jQuery +Author: Michael Lynch +Author URL: http://michaelynch.com +Date Created: August 14, 2013 +Date Updated: January 24, 2014 +Licensed under the MIT license + +*/ +(function(e){e.fn.readingTime=function(t){if(!this.length){return this}var n={readingTimeTarget:".eta",wordCountTarget:null,wordsPerMinute:270,round:true,lang:"en",lessThanAMinuteString:"",prependTimeString:"",prependWordString:"",remotePath:null,remoteTarget:null};var r=this;var i=e(this);r.settings=e.extend({},n,t);var s=r.settings.readingTimeTarget;var o=r.settings.wordCountTarget;var u=r.settings.wordsPerMinute;var a=r.settings.round;var f=r.settings.lang;var l=r.settings.lessThanAMinuteString;var c=r.settings.prependTimeString;var h=r.settings.prependWordString;var p=r.settings.remotePath;var d=r.settings.remoteTarget;if(f=="fr"){var v=l||"Moins d'une minute";var m="min"}else if(f=="de"){var v=l||"Weniger als eine Minute";var m="min"}else if(f=="es"){var v=l||"Menos de un minuto";var m="min"}else if(f=="nl"){var v=l||"Minder dan een minuut";var m="min"}else{var v=l||"Less than a minute";var m="min"}var g=function(e){var t=e.split(" ").length;var n=u/60;var r=t/n;var f=Math.round(r/60);var l=Math.round(r-f*60);if(a===true){if(f>0){i.find(s).text(c+f+" "+m)}else{i.find(s).text(c+v)}}else{var p=f+":"+l;i.find(s).text(c+p)}if(o!==""&&o!==undefined){i.find(o).text(h+t)}};i.each(function(){if(p!=null&&d!=null){e.get(p,function(t){g(e("
").html(t).find(d).text())})}else{g(i.text())}})}})(jQuery) \ No newline at end of file diff --git a/blog.json b/blog.json new file mode 100644 index 0000000..7ec2109 --- /dev/null +++ b/blog.json @@ -0,0 +1,49 @@ +{ + "post_settings": { + "layout": "./layouts/post.html", + "path": "./opendata/post/", + "partials": ["./partials/head.js", "./partials/footer.js", "./partials/header.js", "./partials/javascripts.js"], + "title": "用數據看台灣", + "description": "生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。讓我們來用數據看台灣!", + "email": "contact@taiwanstat.com", + "logo": "/assets/images/taiwanstat_thumb.png", + "cover": "/assets/images/taiwanstat_cover1.png", + "name": "用數據看台灣團隊", + "author": "用數據看台灣團隊", + "author_image": "/assets/images/taiwanstat_thumb.png", + "url": "http://taiwanstat.com", + "facebook": { + "url": "https://facebook.com/taiwanstat", + "desc": "追蹤 Facebook 粉絲專業" + } + }, + "posts": [{ + "title": "用數據看台灣 官網正式上線。", + "date": "2015/04/02 22:33:12", + "categories": ["Facebook"], + "tags": ["milestone"], + "cover": "/assets/images/taiwanstat_cover.png", + "content": "./posts/2015-04-02-10000.md", + "url_name": "10000", + "author": "taiwanstat" + }, { + "title": "為什麼九蛙疊像已經全露,日月潭水庫卻仍然維持著看似較高的有效蓄水量呢?", + "date": "2015/04/02 21:34:38", + "categories": ["水庫"], + "tags": ["日月潭"], + "cover": "/assets/article_images/2015-04-02/日月潭日出.jpeg", + "content": "./posts/2015-04-02-Zintun-reservoir.md", + "url_name": "Zintun-reservoir", + "author": "taiwanstat" + },{ + "title": "如何評估電力可靠度?解釋電力名詞與缺電現狀", + "date": "2015/04/29 19:33:12", + "categories": ["electricity"], + "tags": ["power"], + "cover": "/assets/article_images/2015-04-29/power.png", + "content": "./posts/2015-04-29-description.md", + "url_name": "electricity-desc", + "author": "taiwanstat" + }] + +} diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..bea4bd0 --- /dev/null +++ b/css/index.css @@ -0,0 +1,35 @@ +.fb-plugin { + width : 70%; + text-align: center; + height: 100px; + margin-left: auto; + margin-right: auto; +} +.demo-card-wide.mdl-card { + width: 80%; + margin-right: auto; + margin-left: auto; + margin-top: 30px; + margin-bottom: 30px; +} +.demo-card-wide > .mdl-card__title { + color: #fff; + height: 400px; + opacity: 0.8; +} +.demo-card-wide > .mdl-card__menu { + color: #fff; +} +.demo-card-wide > .mdl-card__title:hover { + opacity: 1; +} + +.demo-card-wide > .mdl-card__menu { + color: #fff; +} + +.demo-card-wide > .mdl-card__title h2{ + background-color: #333; + color: #FFF; + padding: 5px; +} diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..effbad5 --- /dev/null +++ b/css/main.css @@ -0,0 +1,26 @@ +body, html { + margin: 0; + padding: 0; +} + +#round-logo { + margin-right: 20px; + width: 30px; +} + +#main-content { + padding: 20px; +} + +a { + text-decoration: none !important; +} + + +/** customize mdl **/ +.mdl-layout__header { + background-color: #029B6C !important; +} +.mdl-mini-footer { + padding: 20px 16px !important; +} diff --git a/css/normalize.css b/css/normalize.css new file mode 100644 index 0000000..562891a --- /dev/null +++ b/css/normalize.css @@ -0,0 +1,406 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/css/print.css b/css/print.css new file mode 100644 index 0000000..24de0c7 --- /dev/null +++ b/css/print.css @@ -0,0 +1,23 @@ +.article-image{ +page-break-after:never +} +.post-content, +.bottom-teaser.cf{ + padding-top:0!important +} +.bottom-teaser.cf{ + margin:0 +} +.post-reading, +.bottom-teaser.cf .isRight, +.cf.post-meta-text, +.post-meta center, +.post-image-image, +.bottom-closer, +.share, +.home-template .post-meta .post-tags-set, +.pagination, +.author-image, +.subscribe icon-feed{ + display:none; +} \ No newline at end of file diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..022378b --- /dev/null +++ b/feed.xml @@ -0,0 +1,30 @@ +--- +layout: null +--- + + + + {{ site.title | xml_escape }} + {{ site.description | xml_escape }} + {{ site.url }}{{ site.baseurl }}/ + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + Jekyll v{{ jekyll.version }} + {% for post in site.posts limit:10 %} + + {{ post.title | xml_escape }} + {{ post.content | xml_escape }} + {{ post.date | date_to_rfc822 }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {% for tag in post.tags %} + {{ tag | xml_escape }} + {% endfor %} + {% for cat in post.categories %} + {{ cat | xml_escape }} + {% endfor %} + + {% endfor %} + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..ef57a2b --- /dev/null +++ b/index.html @@ -0,0 +1,103 @@ + + + + + + + + 用數據看台灣首頁 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/js/header.js b/js/header.js new file mode 100644 index 0000000..d588647 --- /dev/null +++ b/js/header.js @@ -0,0 +1,41 @@ +"use strict"; + +(function(window, document, undefined) { + var str = '
' + str += '
' + str += '用數據看台灣' + str += '
' + str += '' + str += '
' + str += '
' + str += '
' + str += '用數據看台灣' + str += '' + str += '
' + + var mdl = '' + mdl += '' + mdl += '' + + var footer = '
' + footer += '' + footer += '
' + + $('head').append(mdl); + $('#layout-header').prepend(str); + $('#layout-header').append(footer); + + +})(window, document) diff --git a/layouts/default.html b/layouts/default.html new file mode 100644 index 0000000..505c00b --- /dev/null +++ b/layouts/default.html @@ -0,0 +1,36 @@ + + + + {{>head }} + + + + {{> header}} + +
+
+
+
+ + + {{#each site.pages}} + +
+
+

{{title}}

+
+
+ {{desc}} +
+
+
+ {{/each}} + + + + {{> footer}} + {{> javascripts}} + + + + diff --git a/layouts/page.html b/layouts/page.html new file mode 100644 index 0000000..06de6af --- /dev/null +++ b/layouts/page.html @@ -0,0 +1,12 @@ + + + + {{> head}} + + + {{> header}} +
+ {{> footer}} + {{> javascripts}} + + diff --git a/layouts/post.html b/layouts/post.html new file mode 100644 index 0000000..a6ebe90 --- /dev/null +++ b/layouts/post.html @@ -0,0 +1,94 @@ + + + {{> head}} + + {{> header}} +
+
+ {{#if cover}} +
+
+ Article Image +
+ +
+ {{else}} +
+ +
+
+
+
+ {{/if}} +
+
+ read +
+ +
+
+
+
+ +
+
Blog Logo
+

{{ site.author }}

+
+

發佈於

+
+
+
+ + +
+
+
+
+ + +
+ +
+
+ 圖片 +
+
+

{{ site.title }}

+

{{ site.description }}

+ 回到主畫面 +
+
+ {{> javascripts}} + + diff --git a/opendata/post/2015/04/02/10000.html b/opendata/post/2015/04/02/10000.html new file mode 100644 index 0000000..a81e670 --- /dev/null +++ b/opendata/post/2015/04/02/10000.html @@ -0,0 +1,189 @@ + + + + + + + + 用數據看台灣 官網正式上線。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ Article Image +
+ +
+
+
+ read +
+ +

在這短短的兩個禮拜內,我們收到許多各界的朋友們支持我們,給予我們很多很好的回饋。

+

我們 "用數據看台灣團隊" 真的非常開心。

+

如今我們也做了官網 http://taiwanstat.com/

+

我們之所以會開始這整個計畫,是因為我們相信我們可以把更多資料開放、公開,且讓更多台灣人可以了解到這塊地,所發生的一切,能夠帶給我們每一個台灣居民做更明智的選擇。

+

目前我們已完成了幾項重要的專案:

+ +

我們相信,當我們更認識自己生活在的這塊土地,我們才能有把握,更有自信的往前走,而且走向對這個國家最好的方向。

+

謝謝大家的支持。

+

這只是個開頭而已,我們將來會規劃非常多不同的主題做分析,做更進一步的探討。你們的支持是我們進步的最大動力,為了更好的台灣我們大家一起加油!

+ +
+
+
+ +
+
Blog Logo
+

用數據看台灣團隊

+
+

發佈於

+
+
+
+ + +
+
+
+
+ + +
+ +
+
+ 圖片 +
+
+

用數據看台灣

+

生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。讓我們來用數據看台灣!

+ 回到主畫面 +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/opendata/post/2015/04/02/Zintun-reservoir.html b/opendata/post/2015/04/02/Zintun-reservoir.html new file mode 100644 index 0000000..3803fe3 --- /dev/null +++ b/opendata/post/2015/04/02/Zintun-reservoir.html @@ -0,0 +1,191 @@ + + + + + + + + 為什麼九蛙疊像已經全露,日月潭水庫卻仍然維持著看似較高的有效蓄水量呢? + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ Article Image +
+ +
+
+
+ read +
+ +

依水利署網站的最新水情資訊日月潭滿水位為748.48(公尺),而今日(3/25)水位為744.44(公尺)。從日月潭國家風景區管理處資訊得知,最下面一隻青蛙的頭頂高度745.90(公尺),所以可以合理地得知的九蛙會露出潭面(同時九蛙位於碼頭附近)。

+

然而根據日月潭背景介紹,日月潭最大深度27(公尺),所以可以推論日月潭依然有一定的蓄水量,且由於日月潭水庫有提供發電使用,發電類型為抽蓄式水力發電,亦即日月潭的水會經管線送往明湖、明潭水庫透過高低水庫的落差發電,在白天尖峰時刻皆由日月潭放水至下池發電,而深夜時再從下池抽至上池,因此即使日月潭快乾了,比較低的明湖、明潭水庫還是有存水。 +但從水利署歷史資料得知,去年同一時期日月潭有效蓄水量為92.64%,可以明顯地發現今年實屬缺水年,同時日月潭水位不斷地下降,也會影響到下游的濁水溪農業發展,而上游霧社水庫也已缺水,日月潭水庫依然面臨缺水的危急。

+

水庫即時資訊:

+

http://water.taiwanstat.com/

+


+

資料來源/延伸閱讀:

+ +

圖片

+

"日月潭日出" 由 tksteven - self-work。 使用來自 維基共享資源創用CC 姓名標示-相同方式分享 2.5 條款授權。

+ +
+
+
+ +
+
Blog Logo
+

用數據看台灣團隊

+
+

發佈於

+
+
+
+ + +
+
+
+
+ + +
+ +
+
+ 圖片 +
+
+

用數據看台灣

+

生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。讓我們來用數據看台灣!

+ 回到主畫面 +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/opendata/post/2015/04/29/electricity-desc.html b/opendata/post/2015/04/29/electricity-desc.html new file mode 100644 index 0000000..2f7f4b9 --- /dev/null +++ b/opendata/post/2015/04/29/electricity-desc.html @@ -0,0 +1,214 @@ + + + + + + + + 如何評估電力可靠度?解釋電力名詞與缺電現狀 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ Article Image +
+ +
+
+
+ read +
+ +

前言

+

+今年台灣陷入了缺水危機,發生了數十年以來的旱災,然而隨著日子即將邁入高用電量的夏季,台灣卻遇到了一些不預期的發電機組事故,台電及經濟部能源局已於稍早表示今年5月底恐有限電危機[1]。由於用數據看台灣團隊在之前為大家製作了台灣用電即時資訊,在我們團隊討論過後,認為欲了解電力的情況,單看數據與圖表或許仍有些不足,可能會造成誤解,待需先了解電力相關的知識,因此用數據看台灣團隊整理了一些用電的相關名詞讓大家能更了解現況,以及以探討了為什麼今年會在這個時候特別缺電的原因。 +

+ +

如何評估電力指標?

+

一般來說評估一個用電系統的可靠度,可以分成兩大項目,(1)系統安全度(System Security):指能忍受系統設備事故發生不至於讓其他設備產生連鎖事故的能力(2)系統裕度(System Adequacy):指電力系統無論何時都有充足的發電及輸電能力。

+ +

而為了評估系統裕度,電業是透過可靠度指數來測量,像是台電的即時用電網頁每日提供了一項預評估電狀態的指標-「備轉容量率」,該方法為最廣泛採用的一中方式。那麼何為備轉容量率呢?在介紹這個名詞之前,我們先來介紹「備轉容量(Operating Reserve)」,根據定義:

+

備轉容量(Operating Reserve) =系統運轉淨尖峰能力-系統瞬時尖峰負載(瞬間值)。

+

係指當天實際可調度之發電容量,亦即系統每天的供電能力。而備轉容量率則是可由備轉容量推得:

+

備轉容量率(Percent Operating Reserve) =(系統運轉淨尖峰能力-系統瞬時尖峰負載(瞬間值))÷系統瞬時尖峰負載(瞬間值)×100%。

+

*系統運轉淨尖峰能力:扣除歲修、小修及故障機組容量、火力機組環保限制、輔機故障、氣溫變化、水力考慮水位、水文、灌溉及溢流等。

+ +

是用來衡量每日供電可靠度之指標,可參閱台電提供的下圖,以了解更多資訊。

+ +

圖片來源:台灣電力公司

+

台灣電網系統是如何配置的?

+

介紹完了評估用電可靠度的指標,讓我們介紹台灣的電網規劃,由於用數據看台灣團隊做的台灣即時用電資訊參照了台電提供的資訊,在台電提供的數據中,同時提供了北、中、南、東的即時區域發電與用電資料。然而雖然有各區域的資料,其實台灣的電網系統僅規劃成北、中、南三個地區,而為了維持各區域內的發電與用電,若區域內發電不足以供應用電需求時,是可以透過跨區輸電幹線輸送融通電力支援。如以103年為例:北部因為用電需求,在機組運轉與經濟調度的考慮下,導致需中南部部分電力南電北送因應。

+ +

103年尖峰日台電各區供電能力及負載占比 / 圖片來源:台灣電力公司

+

那麼為什麼台灣今年會比往年還缺電?

+

目前缺電的危機其實可以追朔到去年的核一廠歲修,由於從去年開始十二月中旬核一停機歲修,當時作業時遇到燃料把手鬆脫導致時程延誤,至今仍需待立法院報告後才可加入發電行列[2]。同時,今年又不幸遇到缺水危機,使得水力發電也無法正常運作,而四、五月同時也有許多發電廠進入歲修[3],又不幸地日前核三廠發生火警,使得二號機緊急停止運轉[4],因此現在的電力相較往年供應量減少,導致現在台灣進入了缺電的情況。

+ +


+

+[1] 今年5月供電吃緊 經濟部與台電盡最大努力確保供電 + +[2] 全球首例 核一廠燃料把手鬆脫 + +[3] 台電系統各機組發電量 + +[4] 核三二號機火警 +

+ +

+相關資料來源:
+台灣電力公司資訊揭露:http://www.taipower.com.tw/content/new_info/new_info01.aspx +Gordoncheng's Blog:漫談備用容量與備轉容量

+ +
+
+
+ +
+
Blog Logo
+

用數據看台灣團隊

+
+

發佈於

+
+
+
+ + +
+
+
+
+ + +
+ +
+
+ 圖片 +
+
+

用數據看台灣

+

生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。讓我們來用數據看台灣!

+ 回到主畫面 +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/page.js b/page.js new file mode 100644 index 0000000..dac22a0 --- /dev/null +++ b/page.js @@ -0,0 +1,83 @@ +var settings = require('./blog.json') +var lists = settings.posts; + +var path = require('path'); +var post_arr = []; + +lists.forEach(function(p) { + var date_reg = /(\d{4}\/\d{2}\/\d{2})\s+(\d{2}):(\d{2}):(\d{2})/g; + var d = date_reg.exec(p.date)[1] + post_arr.push({ + "item": p, + "full_path": path.join('./opendata/post/', d, p.url_name + '.html') + }) +}) + + +var sites = { + "title": "用數據看台灣", + "description": "生長在台灣的我們,很少從一個宏觀的角度看整個台灣的經濟、法律、交通、教育... ,而我們相信數據可以幫我們更了解我們身長在的這片土地上的一切。讓我們來用數據看台灣!", + "email": "contact@taiwanstat.com", + "logo": "/assets/images/taiwanstat_thumb.png", + "cover": "/assets/images/taiwanstat_cover1.png", + "name": "用數據看台灣團隊", + "author": "用數據看台灣團隊", + "author_image": "/assets/images/taiwanstat_thumb.png", + "url": "http://taiwanstat.com", + "facebook": { + "url": "https://facebook.com/taiwanstat", + "desc": "追蹤 Facebook 粉絲專業" + }, + "pages": [ + { + "title": "台灣開放資訊即時資訊系統", + "desc": "用最完整的圖表呈現,目前台灣的各種動態,包含天氣、水庫、犯罪等資訊。讓大家能夠知道我們現在台灣到底正在發生什麼事情。", + "cover": "/assets/images/real_cover.png", + "url": "http://real.taiwanstat.com/" + }, + { + "title": "台灣開放資訊統計資訊系統", + "desc": "利用各種圖表呈現臺灣經濟、教育、醫療、能源等議題長期的資料,帶給大家最一目了然的圖表呈現。讓大家能夠知道台灣這塊土地上的進幾年到底如何演變。", + "cover": "/assets/images/long_cover.png", + "url": "http://long.taiwanstat.com/" + }, + { + "title": "開放資料分析部落格", + "desc": "利用資料做更深入的探討與分析報導,帶給大家最齊全的數據分析圖表與解析。", + "cover": "/assets/images/cover.png", + "url": "http://taiwanstat.com/opendata/" + } + ] +} + +var posts = [{ + "layout": "./layouts/page.html", + "filename": "./about/index.html", + "partials": ["./partials/head.js", "./partials/footer.js", "./partials/header.js", "./partials/javascripts.js"], + "data": { + "title": "關於我們", + "content": "./about.md", + "site": sites + } +},{ + "layout": "./layouts/default.html", + "filename": "./index.html", + "partials": ["./partials/head.js", "./partials/footer.js", "./partials/header.js", "./partials/javascripts.js"], + "data": { + "title": "用數據看台灣首頁", + "site": sites + } +}] + +// ,{ +// "layout": "./layouts/default.html", +// "filename": "./index.html", +// "partials": ["./partials/head.js", "./partials/footer.js", "./partials/header.js", "./partials/javascripts.js"], +// "data": { +// "title": "用數據看台灣首頁", +// "site": sites, +// "posts": post_arr +// } +// } + +module.exports = posts; diff --git a/partials/footer.js b/partials/footer.js new file mode 100644 index 0000000..f1c4f86 --- /dev/null +++ b/partials/footer.js @@ -0,0 +1,6 @@ +var fs = require("fs"); + +module.exports= function (hbs) { + var footer = fs.readFileSync('./partials_tmp/footer.html', 'utf8'); + hbs.registerPartial('footer', footer); +} diff --git a/partials/head.js b/partials/head.js new file mode 100644 index 0000000..b49aa9d --- /dev/null +++ b/partials/head.js @@ -0,0 +1,6 @@ +var fs = require("fs"); + +module.exports= function (hbs) { + var head = fs.readFileSync('./partials_tmp/head.html', 'utf8') + hbs.registerPartial('head', head); +} diff --git a/partials/header.js b/partials/header.js new file mode 100644 index 0000000..2e39622 --- /dev/null +++ b/partials/header.js @@ -0,0 +1,6 @@ +var fs = require("fs"); + +module.exports= function (hbs) { + var header = fs.readFileSync('./partials_tmp/header.html', 'utf8'); + hbs.registerPartial('header', header); +} diff --git a/partials/javascripts.js b/partials/javascripts.js new file mode 100644 index 0000000..1242646 --- /dev/null +++ b/partials/javascripts.js @@ -0,0 +1,6 @@ +var fs = require("fs"); + +module.exports= function (hbs) { + var javascripts = fs.readFileSync('./partials_tmp/javascripts.html', 'utf8'); + hbs.registerPartial('javascripts', javascripts); +} diff --git a/partials_tmp/footer.html b/partials_tmp/footer.html new file mode 100644 index 0000000..3f9450a --- /dev/null +++ b/partials_tmp/footer.html @@ -0,0 +1,7 @@ + + + +
+ + + diff --git a/partials_tmp/head.html b/partials_tmp/head.html new file mode 100644 index 0000000..6e9a0f4 --- /dev/null +++ b/partials_tmp/head.html @@ -0,0 +1,30 @@ + + + + + + +{{#if title}}{{title}}{{else}} 用數據看台灣 {{/if}} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/partials_tmp/header.html b/partials_tmp/header.html new file mode 100644 index 0000000..39b5a87 --- /dev/null +++ b/partials_tmp/header.html @@ -0,0 +1,4 @@ + +
+
+ diff --git a/partials_tmp/javascripts.html b/partials_tmp/javascripts.html new file mode 100644 index 0000000..a6be469 --- /dev/null +++ b/partials_tmp/javascripts.html @@ -0,0 +1,13 @@ + +
+ diff --git a/posts/2015-04-02-10000.md b/posts/2015-04-02-10000.md new file mode 100644 index 0000000..e6f40a4 --- /dev/null +++ b/posts/2015-04-02-10000.md @@ -0,0 +1,22 @@ +在這短短的兩個禮拜內,我們收到許多各界的朋友們支持我們,給予我們很多很好的回饋。 + +我們 "用數據看台灣團隊" 真的非常開心。 + +如今我們也做了官網 [http://taiwanstat.com/](http://taiwanstat.com) + +我們之所以會開始這整個計畫,是因為我們相信我們可以把更多資料開放、公開,且讓更多台灣人可以了解到這塊地,所發生的一切,能夠帶給我們每一個台灣居民做更明智的選擇。 + +目前我們已完成了幾項重要的專案: + + - [即時水庫系統](http://water.taiwanstat.com/) + - [即時 PSI 空污系統](http://real.taiwanstat.com/air) + - [即時 PM 2.5 空污系統](http://real.taiwanstat.com/pm2.5/) + - [歷年物價指數變化](http://long.taiwanstat.com/price) + +我們相信,當我們更認識自己生活在的這塊土地,我們才能有把握,更有自信的往前走,而且走向對這個國家最好的方向。 + +謝謝大家的支持。 + +這只是個開頭而已,我們將來會規劃非常多不同的主題做分析,做更進一步的探討。你們的支持是我們進步的最大動力,為了更好的台灣我們大家一起加油! + + diff --git a/posts/2015-04-02-Zintun-reservoir.md b/posts/2015-04-02-Zintun-reservoir.md new file mode 100644 index 0000000..f2caf84 --- /dev/null +++ b/posts/2015-04-02-Zintun-reservoir.md @@ -0,0 +1,24 @@ +依水利署網站的最新水情資訊日月潭滿水位為748.48(公尺),而今日(3/25)水位為744.44(公尺)。從日月潭國家風景區管理處資訊得知,最下面一隻青蛙的頭頂高度745.90(公尺),所以可以合理地得知的九蛙會露出潭面(同時九蛙位於碼頭附近)。 + +然而根據日月潭背景介紹,日月潭最大深度27(公尺),所以可以推論日月潭依然有一定的蓄水量,且由於日月潭水庫有提供發電使用,發電類型為抽蓄式水力發電,亦即日月潭的水會經管線送往明湖、明潭水庫透過高低水庫的落差發電,在白天尖峰時刻皆由日月潭放水至下池發電,而深夜時再從下池抽至上池,因此即使日月潭快乾了,比較低的明湖、明潭水庫還是有存水。 +但從水利署歷史資料得知,去年同一時期日月潭有效蓄水量為92.64%,可以明顯地發現今年實屬缺水年,同時日月潭水位不斷地下降,也會影響到下游的濁水溪農業發展,而上游霧社水庫也已缺水,日月潭水庫依然面臨缺水的危急。 + + + +## 水庫即時資訊: + +[http://water.taiwanstat.com/](http://water.taiwanstat.com/) + +
+ +## 資料來源/延伸閱讀: + +- 經濟部水利署-日月潭水庫: [http://goo.gl/ACzC4f](http://goo.gl/ACzC4f) +- 日月潭水庫興建歷史: [http://goo.gl/DPBdQq](http://goo.gl/DPBdQq) +- 日月潭國家風景管理處-九蛙疊像: [http://goo.gl/CXjuXn](http://goo.gl/CXjuXn) +- 日月潭水力發電及水庫分佈: [http://goo.gl/7gO3Tk](http://goo.gl/7gO3Tk) +- 日月潭維基百科: [http://goo.gl/QUdBh5](http://goo.gl/QUdBh5) + +## 圖片 + +"日月潭日出" 由 tksteven - self-work。 使用來自 維基共享資源創用CC 姓名標示-相同方式分享 2.5 條款授權。 diff --git a/posts/2015-04-29-description.md b/posts/2015-04-29-description.md new file mode 100644 index 0000000..3ce5faa --- /dev/null +++ b/posts/2015-04-29-description.md @@ -0,0 +1,45 @@ +### 前言 + +

+今年台灣陷入了缺水危機,發生了數十年以來的旱災,然而隨著日子即將邁入高用電量的夏季,台灣卻遇到了一些不預期的發電機組事故,台電及經濟部能源局已於稍早表示今年5月底恐有限電危機[1]。由於用數據看台灣團隊在之前為大家製作了台灣用電即時資訊,在我們團隊討論過後,認為欲了解電力的情況,單看數據與圖表或許仍有些不足,可能會造成誤解,待需先了解電力相關的知識,因此用數據看台灣團隊整理了一些用電的相關名詞讓大家能更了解現況,以及以探討了為什麼今年會在這個時候特別缺電的原因。 +

+ +### 如何評估電力指標? + +

一般來說評估一個用電系統的可靠度,可以分成兩大項目,(1)系統安全度(System Security):指能忍受系統設備事故發生不至於讓其他設備產生連鎖事故的能力(2)系統裕度(System Adequacy):指電力系統無論何時都有充足的發電及輸電能力。

+ +

而為了評估系統裕度,電業是透過可靠度指數來測量,像是台電的即時用電網頁每日提供了一項預評估電狀態的指標-「備轉容量率」,該方法為最廣泛採用的一中方式。那麼何為備轉容量率呢?在介紹這個名詞之前,我們先來介紹「備轉容量(Operating Reserve)」,根據定義:

+

備轉容量(Operating Reserve) =系統運轉淨尖峰能力-系統瞬時尖峰負載(瞬間值)。

+

係指當天實際可調度之發電容量,亦即系統每天的供電能力。而備轉容量率則是可由備轉容量推得:

+

備轉容量率(Percent Operating Reserve) =(系統運轉淨尖峰能力-系統瞬時尖峰負載(瞬間值))÷系統瞬時尖峰負載(瞬間值)×100%。

+

*系統運轉淨尖峰能力:扣除歲修、小修及故障機組容量、火力機組環保限制、輔機故障、氣溫變化、水力考慮水位、水文、灌溉及溢流等。

+ +

是用來衡量每日供電可靠度之指標,可參閱台電提供的下圖,以了解更多資訊。

+ +圖片來源:台灣電力公司 + +### 台灣電網系統是如何配置的? + +

介紹完了評估用電可靠度的指標,讓我們介紹台灣的電網規劃,由於用數據看台灣團隊做的台灣即時用電資訊參照了台電提供的資訊,在台電提供的數據中,同時提供了北、中、南、東的即時區域發電與用電資料。然而雖然有各區域的資料,其實台灣的電網系統僅規劃成北、中、南三個地區,而為了維持各區域內的發電與用電,若區域內發電不足以供應用電需求時,是可以透過跨區輸電幹線輸送融通電力支援。如以103年為例:北部因為用電需求,在機組運轉與經濟調度的考慮下,導致需中南部部分電力南電北送因應。

+ +103年尖峰日台電各區供電能力及負載占比 / 圖片來源:台灣電力公司 + +### 那麼為什麼台灣今年會比往年還缺電? + +

目前缺電的危機其實可以追朔到去年的核一廠歲修,由於從去年開始十二月中旬核一停機歲修,當時作業時遇到燃料把手鬆脫導致時程延誤,至今仍需待立法院報告後才可加入發電行列[2]。同時,今年又不幸遇到缺水危機,使得水力發電也無法正常運作,而四、五月同時也有許多發電廠進入歲修[3],又不幸地日前核三廠發生火警,使得二號機緊急停止運轉[4],因此現在的電力相較往年供應量減少,導致現在台灣進入了缺電的情況。

+ +
+

+[1] 今年5月供電吃緊 經濟部與台電盡最大努力確保供電 + +[2] 全球首例 核一廠燃料把手鬆脫 + +[3] 台電系統各機組發電量 + +[4] 核三二號機火警 +

+ +

+相關資料來源:
+台灣電力公司資訊揭露:http://www.taipower.com.tw/content/new_info/new_info01.aspx +Gordoncheng's Blog:漫談備用容量與備轉容量