trahald 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. data/.gitignore +2 -1
  2. data/.travis.yml +16 -0
  3. data/Gemfile.lock +58 -0
  4. data/README.md +29 -8
  5. data/lib/public/lib/markdown/markdown.js +1616 -0
  6. data/lib/public/lib/masonry/jquery.masonry.min.js +10 -0
  7. data/lib/public/lib/reveal/markdown.js +151 -0
  8. data/lib/public/lib/reveal/showdown.js +62 -0
  9. data/lib/public/lib/reveal/theme/beige.css +142 -0
  10. data/lib/public/lib/reveal/theme/default.css +150 -0
  11. data/lib/public/lib/reveal/theme/moon.css +142 -0
  12. data/lib/public/lib/reveal/theme/night.css +130 -0
  13. data/lib/public/lib/reveal/theme/serif.css +130 -0
  14. data/lib/public/lib/reveal/theme/simple.css +132 -0
  15. data/lib/public/lib/reveal/theme/sky.css +136 -0
  16. data/lib/public/lib/reveal/theme/solarized.css +142 -0
  17. data/lib/trahald.rb +90 -11
  18. data/lib/trahald/.redis-client.rb.swn +0 -0
  19. data/lib/trahald/article.rb +34 -0
  20. data/lib/trahald/backend-base.rb +13 -0
  21. data/lib/trahald/git.rb +46 -1
  22. data/lib/trahald/markdown-body.rb +44 -0
  23. data/lib/trahald/redis-client.rb +33 -9
  24. data/lib/trahald/version.rb +1 -1
  25. data/lib/views/edit.slim +47 -10
  26. data/lib/views/fd.scss +22 -0
  27. data/lib/views/header.slim +13 -0
  28. data/lib/views/layout.slim +7 -4
  29. data/lib/views/list.slim +3 -1
  30. data/lib/views/page.slim +5 -8
  31. data/lib/views/slide.slim +37 -0
  32. data/lib/views/style.scss +3 -1
  33. data/lib/views/summary.slim +36 -0
  34. data/lib/views/tab.slim +10 -0
  35. data/lib/views/tab_edit.slim +10 -0
  36. data/spec/git_spec.rb +3 -23
  37. data/spec/redis-client_spec.rb +3 -25
  38. data/spec/spec_helper.rb +2 -1
  39. data/spec/support/shared_examples_for_backends.rb +38 -0
  40. data/trahald.gemspec +1 -0
  41. metadata +44 -4
@@ -0,0 +1,10 @@
1
+ /**
2
+ * jQuery Masonry v2.1.08
3
+ * A dynamic layout plugin for jQuery
4
+ * The flip-side of CSS Floats
5
+ * http://masonry.desandro.com
6
+ *
7
+ * Licensed under the MIT license.
8
+ * Copyright 2012 David DeSandro
9
+ */
10
+ (function(e,t,n){"use strict";var r=t.event,i;r.special.smartresize={setup:function(){t(this).bind("resize",r.special.smartresize.handler)},teardown:function(){t(this).unbind("resize",r.special.smartresize.handler)},handler:function(e,t){var n=this,s=arguments;e.type="smartresize",i&&clearTimeout(i),i=setTimeout(function(){r.dispatch.apply(n,s)},t==="execAsap"?0:100)}},t.fn.smartresize=function(e){return e?this.bind("smartresize",e):this.trigger("smartresize",["execAsap"])},t.Mason=function(e,n){this.element=t(n),this._create(e),this._init()},t.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}},t.Mason.prototype={_filterFindBricks:function(e){var t=this.options.itemSelector;return t?e.filter(t).add(e.find(t)):e},_getBricks:function(e){var t=this._filterFindBricks(e).css({position:"absolute"}).addClass("masonry-brick");return t},_create:function(n){this.options=t.extend(!0,{},t.Mason.settings,n),this.styleQueue=[];var r=this.element[0].style;this.originalStyle={height:r.height||""};var i=this.options.containerStyle;for(var s in i)this.originalStyle[s]=r[s]||"";this.element.css(i),this.horizontalDirection=this.options.isRTL?"right":"left";var o=this.element.css("padding-"+this.horizontalDirection),u=this.element.css("padding-top");this.offset={x:o?parseInt(o,10):0,y:u?parseInt(u,10):0},this.isFluid=this.options.columnWidth&&typeof this.options.columnWidth=="function";var a=this;setTimeout(function(){a.element.addClass("masonry")},0),this.options.isResizable&&t(e).bind("smartresize.masonry",function(){a.resize()}),this.reloadItems()},_init:function(e){this._getColumns(),this._reLayout(e)},option:function(e,n){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))},layout:function(e,t){for(var n=0,r=e.length;n<r;n++)this._placeBrick(e[n]);var i={};i.height=Math.max.apply(Math,this.colYs);if(this.options.isFitWidth){var s=0;n=this.cols;while(--n){if(this.colYs[n]!==0)break;s++}i.width=(this.cols-s)*this.columnWidth-this.options.gutterWidth}this.styleQueue.push({$el:this.element,style:i});var o=this.isLaidOut?this.options.isAnimated?"animate":"css":"css",u=this.options.animationOptions,a;for(n=0,r=this.styleQueue.length;n<r;n++)a=this.styleQueue[n],a.$el[o](a.style,u);this.styleQueue=[],t&&t.call(e),this.isLaidOut=!0},_getColumns:function(){var e=this.options.isFitWidth?this.element.parent():this.element,t=e.width();this.columnWidth=this.isFluid?this.options.columnWidth(t):this.options.columnWidth||this.$bricks.outerWidth(!0)||t,this.columnWidth+=this.options.gutterWidth,this.cols=Math.floor((t+this.options.gutterWidth)/this.columnWidth),this.cols=Math.max(this.cols,1)},_placeBrick:function(e){var n=t(e),r,i,s,o,u;r=Math.ceil(n.outerWidth(!0)/this.columnWidth),r=Math.min(r,this.cols);if(r===1)s=this.colYs;else{i=this.cols+1-r,s=[];for(u=0;u<i;u++)o=this.colYs.slice(u,u+r),s[u]=Math.max.apply(Math,o)}var a=Math.min.apply(Math,s),f=0;for(var l=0,c=s.length;l<c;l++)if(s[l]===a){f=l;break}var h={top:a+this.offset.y};h[this.horizontalDirection]=this.columnWidth*f+this.offset.x,this.styleQueue.push({$el:n,style:h});var p=a+n.outerHeight(!0),d=this.cols+1-c;for(l=0;l<d;l++)this.colYs[f+l]=p},resize:function(){var e=this.cols;this._getColumns(),(this.isFluid||this.cols!==e)&&this._reLayout()},_reLayout:function(e){var t=this.cols;this.colYs=[];while(t--)this.colYs.push(0);this.layout(this.$bricks,e)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(e){this.reloadItems(),this._init(e)},appended:function(e,t,n){if(t){this._filterFindBricks(e).css({top:this.element.height()});var r=this;setTimeout(function(){r._appended(e,n)},1)}else this._appended(e,n)},_appended:function(e,t){var n=this._getBricks(e);this.$bricks=this.$bricks.add(n),this.layout(n,t)},remove:function(e){this.$bricks=this.$bricks.not(e),e.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="",this.style.top="",this.style.left=""});var n=this.element[0].style;for(var r in this.originalStyle)n[r]=this.originalStyle[r];this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"),t(e).unbind(".masonry")}},t.fn.imagesLoaded=function(e){function u(){e.call(n,r)}function a(e){var n=e.target;n.src!==s&&t.inArray(n,o)===-1&&(o.push(n),--i<=0&&(setTimeout(u),r.unbind(".imagesLoaded",a)))}var n=this,r=n.find("img").add(n.filter("img")),i=r.length,s="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",o=[];return i||u(),r.bind("load.imagesLoaded error.imagesLoaded",a).each(function(){var e=this.src;this.src=s,this.src=e}),n};var s=function(t){e.console&&e.console.error(t)};t.fn.masonry=function(e){if(typeof e=="string"){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var r=t.data(this,"masonry");if(!r){s("cannot call methods on masonry prior to initialization; attempted to call method '"+e+"'");return}if(!t.isFunction(r[e])||e.charAt(0)==="_"){s("no such method '"+e+"' for masonry instance");return}r[e].apply(r,n)})}else this.each(function(){var n=t.data(this,"masonry");n?(n.option(e||{}),n._init()):t.data(this,"masonry",new t.Mason(e,this))});return this}})(window,jQuery);
@@ -0,0 +1,151 @@
1
+ // From https://gist.github.com/1343518
2
+ // Modified by Hakim to handle Markdown indented with tabs
3
+ (function(){
4
+
5
+ if( typeof Showdown === 'undefined' ) {
6
+ throw 'The reveal.js Markdown plugin requires Showdown to be loaded';
7
+ }
8
+
9
+ var stripLeadingWhitespace = function(section) {
10
+
11
+ var template = section.querySelector( 'script' );
12
+
13
+ // strip leading whitespace so it isn't evaluated as code
14
+ var text = ( template || section ).textContent;
15
+
16
+ var leadingWs = text.match(/^\n?(\s*)/)[1].length,
17
+ leadingTabs = text.match(/^\n?(\t*)/)[1].length;
18
+
19
+ if( leadingTabs > 0 ) {
20
+ text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
21
+ }
22
+ else if( leadingWs > 1 ) {
23
+ text = text.replace( new RegExp('\\n? {' + leadingWs + '}','g'), '\n' );
24
+ }
25
+
26
+ return text;
27
+
28
+ };
29
+
30
+ var twrap = function(el) {
31
+ return '<script type="text/template">' + el + '</script>';
32
+ };
33
+
34
+ var slidifyMarkdown = function(markdown, separator, vertical) {
35
+
36
+ separator = separator || '^\n---\n$';
37
+
38
+ var reSeparator = new RegExp(separator + (vertical ? '|' + vertical : ''), 'mg'),
39
+ reHorSeparator = new RegExp(separator),
40
+ matches,
41
+ lastIndex = 0,
42
+ isHorizontal,
43
+ wasHorizontal = true,
44
+ content,
45
+ sectionStack = [],
46
+ markdownSections = '';
47
+
48
+ // iterate until all blocks between separators are stacked up
49
+ while( matches = reSeparator.exec(markdown) ) {
50
+
51
+ // determine direction (horizontal by default)
52
+ isHorizontal = reHorSeparator.test(matches[0]);
53
+
54
+ if( !isHorizontal && wasHorizontal ) {
55
+ // create vertical stack
56
+ sectionStack.push([]);
57
+ }
58
+
59
+ // pluck slide content from markdown input
60
+ content = markdown.substring(lastIndex, matches.index);
61
+
62
+ if( isHorizontal && wasHorizontal ) {
63
+ // add to horizontal stack
64
+ sectionStack.push(content);
65
+ } else {
66
+ // add to vertical stack
67
+ sectionStack[sectionStack.length-1].push(content);
68
+ }
69
+
70
+ lastIndex = reSeparator.lastIndex;
71
+ wasHorizontal = isHorizontal;
72
+
73
+ }
74
+
75
+ // add the remaining slide
76
+ (wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1]).push(markdown.substring(lastIndex));
77
+
78
+ // flatten the hierarchical stack, and insert <section data-markdown> tags
79
+ for( var k = 0, klen = sectionStack.length; k < klen; k++ ) {
80
+ markdownSections += typeof sectionStack[k] === 'string'
81
+ ? '<section data-markdown>' + twrap( sectionStack[k] ) + '</section>'
82
+ : '<section><section data-markdown>' + sectionStack[k].map(twrap).join('</section><section data-markdown>') + '</section></section>';
83
+ }
84
+
85
+ return markdownSections;
86
+ };
87
+
88
+ var querySlidingMarkdown = function() {
89
+
90
+ var sections = document.querySelectorAll( '[data-markdown]'),
91
+ section;
92
+
93
+ for( var j = 0, jlen = sections.length; j < jlen; j++ ) {
94
+
95
+ section = sections[j];
96
+
97
+ if( section.getAttribute('data-markdown').length ) {
98
+
99
+ var xhr = new XMLHttpRequest(),
100
+ url = section.getAttribute('data-markdown');
101
+
102
+ xhr.onreadystatechange = function () {
103
+ if( xhr.readyState === 4 ) {
104
+ section.outerHTML = slidifyMarkdown( xhr.responseText, section.getAttribute('data-separator'), section.getAttribute('data-vertical') );
105
+ }
106
+ };
107
+
108
+ xhr.open('GET', url, false);
109
+ xhr.send();
110
+
111
+ } else if( section.getAttribute('data-separator') ) {
112
+
113
+ var markdown = stripLeadingWhitespace(section);
114
+ section.outerHTML = slidifyMarkdown( markdown, section.getAttribute('data-separator'), section.getAttribute('data-vertical') );
115
+
116
+ }
117
+ }
118
+
119
+ };
120
+
121
+ var queryMarkdownSlides = function() {
122
+
123
+ var sections = document.querySelectorAll( '[data-markdown]');
124
+
125
+ for( var j = 0, jlen = sections.length; j < jlen; j++ ) {
126
+
127
+ makeHtml(sections[j]);
128
+
129
+ }
130
+
131
+ };
132
+
133
+ var makeHtml = function(section) {
134
+
135
+ var notes = section.querySelector( 'aside.notes' );
136
+
137
+ var markdown = stripLeadingWhitespace(section);
138
+
139
+ section.innerHTML = (new Showdown.converter()).makeHtml(markdown);
140
+
141
+ if( notes ) {
142
+ section.appendChild( notes );
143
+ }
144
+
145
+ };
146
+
147
+ querySlidingMarkdown();
148
+
149
+ queryMarkdownSlides();
150
+
151
+ })();
@@ -0,0 +1,62 @@
1
+ //
2
+ // showdown.js -- A javascript port of Markdown.
3
+ //
4
+ // Copyright (c) 2007 John Fraser.
5
+ //
6
+ // Original Markdown Copyright (c) 2004-2005 John Gruber
7
+ // <http://daringfireball.net/projects/markdown/>
8
+ //
9
+ // Redistributable under a BSD-style open source license.
10
+ // See license.txt for more information.
11
+ //
12
+ // The full source distribution is at:
13
+ //
14
+ // A A L
15
+ // T C A
16
+ // T K B
17
+ //
18
+ // <http://www.attacklab.net/>
19
+ //
20
+ //
21
+ // Wherever possible, Showdown is a straight, line-by-line port
22
+ // of the Perl version of Markdown.
23
+ //
24
+ // This is not a normal parser design; it's basically just a
25
+ // series of string substitutions. It's hard to read and
26
+ // maintain this way, but keeping Showdown close to the original
27
+ // design makes it easier to port new features.
28
+ //
29
+ // More importantly, Showdown behaves like markdown.pl in most
30
+ // edge cases. So web applications can do client-side preview
31
+ // in Javascript, and then build identical HTML on the server.
32
+ //
33
+ // This port needs the new RegExp functionality of ECMA 262,
34
+ // 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
35
+ // should do fine. Even with the new regular expression features,
36
+ // We do a lot of work to emulate Perl's regex functionality.
37
+ // The tricky changes in this file mostly have the "attacklab:"
38
+ // label. Major or self-explanatory changes don't.
39
+ //
40
+ // Smart diff tools like Araxis Merge will be able to match up
41
+ // this file with markdown.pl in a useful way. A little tweaking
42
+ // helps: in a copy of markdown.pl, replace "#" with "//" and
43
+ // replace "$text" with "text". Be sure to ignore whitespace
44
+ // and line endings.
45
+ //
46
+ //
47
+ // Showdown usage:
48
+ //
49
+ // var text = "Markdown *rocks*.";
50
+ //
51
+ // var converter = new Showdown.converter();
52
+ // var html = converter.makeHtml(text);
53
+ //
54
+ // alert(html);
55
+ //
56
+ // Note: move the sample code to the bottom of this
57
+ // file before uncommenting it.
58
+ //
59
+ //
60
+ // Showdown namespace
61
+ //
62
+ var Showdown={};Showdown.converter=function(){var a,b,c,d=0;this.makeHtml=function(d){return a=new Array,b=new Array,c=new Array,d=d.replace(/~/g,"~T"),d=d.replace(/\$/g,"~D"),d=d.replace(/\r\n/g,"\n"),d=d.replace(/\r/g,"\n"),d="\n\n"+d+"\n\n",d=F(d),d=d.replace(/^[ \t]+$/mg,""),d=f(d),d=e(d),d=h(d),d=D(d),d=d.replace(/~D/g,"$$"),d=d.replace(/~T/g,"~"),d};var e=function(c){var c=c.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,function(c,d,e,f,g){return d=d.toLowerCase(),a[d]=z(e),f?f+g:(g&&(b[d]=g.replace(/"/g,"&quot;")),"")});return c},f=function(a){a=a.replace(/\n/g,"\n\n");var b="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del",c="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,g),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,g),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,g),a=a.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,g),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,g),a=a.replace(/\n\n/g,"\n"),a},g=function(a,b){var d=b;return d=d.replace(/\n\n/g,"\n"),d=d.replace(/^\n/,""),d=d.replace(/\n+$/g,""),d="\n\n~K"+(c.push(d)-1)+"K\n\n",d},h=function(a){a=o(a);var b=t("<hr />");return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,b),a=q(a),a=s(a),a=r(a),a=x(a),a=f(a),a=y(a),a},i=function(a){return a=u(a),a=j(a),a=A(a),a=m(a),a=k(a),a=B(a),a=z(a),a=w(a),a=a.replace(/ +\n/g," <br />\n"),a},j=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=G(b,"\\`*_"),b}),a},k=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,l),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,l),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,l),a},l=function(c,d,e,f,g,h,i,j){j==undefined&&(j="");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(n==""){m==""&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m;if(a[m]!=undefined)n=a[m],b[m]!=undefined&&(o=b[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}}n=G(n,"*_");var p='<a href="'+n+'"';return o!=""&&(o=o.replace(/"/g,"&quot;"),o=G(o,"*_"),p+=' title="'+o+'"'),p+=">"+l+"</a>",p},m=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,n),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,n),a},n=function(c,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;o||(o="");if(n==""){m==""&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m;if(a[m]==undefined)return k;n=a[m],b[m]!=undefined&&(o=b[m])}l=l.replace(/"/g,"&quot;"),n=G(n,"*_");var p='<img src="'+n+'" alt="'+l+'"';return o=o.replace(/"/g,"&quot;"),o=G(o,"*_"),p+=' title="'+o+'"',p+=" />",p},o=function(a){function b(a){return a.replace(/[^\w]/g,"").toLowerCase()}return a=a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(a,c){return t('<h1 id="'+b(c)+'">'+i(c)+"</h1>")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return t('<h2 id="'+b(c)+'">'+i(c)+"</h2>")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return t("<h"+e+' id="'+b(d)+'">'+i(d)+"</h"+e+">")}),a},p,q=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return d?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?"ul":"ol";d=d.replace(/\n{2,}/g,"\n\n\n");var f=p(d);return f=f.replace(/\s+$/,""),f="<"+e+">"+f+"</"+e+">\n",f}):(b=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",f=f.replace(/\n{2,}/g,"\n\n\n"),h=p(f);return h=e+"<"+g+">\n"+h+"</"+g+">\n",h})),a=a.replace(/~0/,""),a};p=function(a){return d++,a=a.replace(/\n{2,}$/,"\n"),a+="~0",a=a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(a,b,c,d,e){var f=e,g=b,j=c;return g||f.search(/\n{2,}/)>-1?f=h(E(f)):(f=q(E(f)),f=f.replace(/\n$/,""),f=i(f)),"<li>"+f+"</li>\n"}),a=a.replace(/~0/g,""),d--,a};var r=function(a){return a+="~0",a=a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=v(E(d)),d=F(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="<pre><code>"+d+"\n</code></pre>",t(d)+e}),a=a.replace(/~0/,""),a},s=function(a){return a+="~0",a=a.replace(/\n```(.*)\n([^`]+)\n```/g,function(a,b,c){var d=b,e=c;return e=v(e),e=F(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="<pre><code class="+d+">"+e+"\n</code></pre>",t(e)}),a=a.replace(/~0/,""),a},t=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(c.push(a)-1)+"K\n\n"},u=function(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d,e){var f=d;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=v(f),b+"<code>"+f+"</code>"}),a},v=function(a){return a=a.replace(/&/g,"&amp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/>/g,"&gt;"),a=G(a,"*_{}[]\\",!1),a},w=function(a){return a=a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>"),a=a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>"),a},x=function(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=h(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^ /mg,"~0"),c=c.replace(/~0/g,""),c}),t("<blockquote>\n"+c+"\n</blockquote>")}),a},y=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");var b=a.split(/\n{2,}/g),d=new Array,e=b.length;for(var f=0;f<e;f++){var g=b[f];g.search(/~K(\d+)K/g)>=0?d.push(g):g.search(/\S/)>=0&&(g=i(g),g=g.replace(/^([ \t]*)/g,"<p>"),g+="</p>",d.push(g))}e=d.length;for(var f=0;f<e;f++)while(d[f].search(/~K(\d+)K/)>=0){var h=c[RegExp.$1];h=h.replace(/\$/g,"$$$$"),d[f]=d[f].replace(/~K\d+K/,h)}return d.join("\n\n")},z=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),a=a.replace(/<(?![a-z\/?\$!])/gi,"&lt;"),a},A=function(a){return a=a.replace(/\\(\\)/g,H),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,H),a},B=function(a){return a=a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>'),a=a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(a,b){return C(D(b))}),a},C=function(a){function b(a){var b="0123456789ABCDEF",c=a.charCodeAt(0);return b.charAt(c>>4)+b.charAt(c&15)}var c=[function(a){return"&#"+a.charCodeAt(0)+";"},function(a){return"&#x"+b(a)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if(a=="@")a=c[Math.floor(Math.random()*2)](a);else if(a!=":"){var b=Math.random();a=b>.9?c[2](a):b>.45?c[1](a):c[0](a)}return a}),a='<a href="'+a+'">'+a+"</a>",a=a.replace(/">.+:/g,'">'),a},D=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)}),a},E=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,""),a},F=function(a){return a=a.replace(/\t(?=\t)/g," "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b,c){var d=b,e=4-d.length%4;for(var f=0;f<e;f++)d+=" ";return d}),a=a.replace(/~A/g," "),a=a.replace(/~B/g,""),a},G=function(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,H),a},H=function(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}},typeof exports!="undefined"&&(exports=Showdown);
@@ -0,0 +1,142 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
2
+ /**
3
+ * Beige theme for reveal.js.
4
+ *
5
+ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
6
+ */
7
+ @font-face {
8
+ font-family: 'League Gothic';
9
+ src: url("../../lib/font/league_gothic-webfont.eot");
10
+ src: url("../../lib/font/league_gothic-webfont.eot?#iefix") format("embedded-opentype"), url("../../lib/font/league_gothic-webfont.woff") format("woff"), url("../../lib/font/league_gothic-webfont.ttf") format("truetype"), url("../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular") format("svg");
11
+ font-weight: normal;
12
+ font-style: normal; }
13
+
14
+ /*********************************************
15
+ * GLOBAL STYLES
16
+ *********************************************/
17
+ body {
18
+ background: #f7f2d3;
19
+ background: -moz-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
20
+ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, white), color-stop(100%, #f7f2d3));
21
+ background: -webkit-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
22
+ background: -o-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
23
+ background: -ms-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
24
+ background: radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
25
+ background-color: #f7f3de; }
26
+
27
+ .reveal {
28
+ font-family: "Lato", sans-serif;
29
+ font-size: 36px;
30
+ font-weight: 200;
31
+ letter-spacing: -0.02em;
32
+ color: #333333; }
33
+
34
+ ::selection {
35
+ color: white;
36
+ background: rgba(79, 64, 28, 0.99);
37
+ text-shadow: none; }
38
+
39
+ /*********************************************
40
+ * HEADERS
41
+ *********************************************/
42
+ .reveal h1,
43
+ .reveal h2,
44
+ .reveal h3,
45
+ .reveal h4,
46
+ .reveal h5,
47
+ .reveal h6 {
48
+ margin: 0 0 20px 0;
49
+ color: #333333;
50
+ font-family: "League Gothic", Impact, sans-serif;
51
+ line-height: 0.9em;
52
+ letter-spacing: 0.02em;
53
+ text-transform: uppercase;
54
+ text-shadow: none; }
55
+
56
+ .reveal h1 {
57
+ text-shadow: 0 1px 0 #cccccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbbbbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaaaaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
58
+
59
+ /*********************************************
60
+ * LINKS
61
+ *********************************************/
62
+ .reveal a:not(.image) {
63
+ color: #8b743d;
64
+ text-decoration: none;
65
+ -webkit-transition: color 0.15s ease;
66
+ -moz-transition: color 0.15s ease;
67
+ -ms-transition: color 0.15s ease;
68
+ -o-transition: color 0.15s ease;
69
+ transition: color 0.15s ease; }
70
+
71
+ .reveal a:not(.image):hover {
72
+ color: #c0a86e;
73
+ text-shadow: none;
74
+ border: none; }
75
+
76
+ .reveal .roll span:after {
77
+ color: #fff;
78
+ background: #564826; }
79
+
80
+ /*********************************************
81
+ * IMAGES
82
+ *********************************************/
83
+ .reveal section img {
84
+ margin: 15px 0px;
85
+ background: rgba(255, 255, 255, 0.12);
86
+ border: 4px solid #333333;
87
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
88
+ -webkit-transition: all 0.2s linear;
89
+ -moz-transition: all 0.2s linear;
90
+ -ms-transition: all 0.2s linear;
91
+ -o-transition: all 0.2s linear;
92
+ transition: all 0.2s linear; }
93
+
94
+ .reveal a:hover img {
95
+ background: rgba(255, 255, 255, 0.2);
96
+ border-color: #8b743d;
97
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
98
+
99
+ /*********************************************
100
+ * NAVIGATION CONTROLS
101
+ *********************************************/
102
+ .reveal .controls div.navigate-left,
103
+ .reveal .controls div.navigate-left.enabled {
104
+ border-right-color: #8b743d; }
105
+
106
+ .reveal .controls div.navigate-right,
107
+ .reveal .controls div.navigate-right.enabled {
108
+ border-left-color: #8b743d; }
109
+
110
+ .reveal .controls div.navigate-up,
111
+ .reveal .controls div.navigate-up.enabled {
112
+ border-bottom-color: #8b743d; }
113
+
114
+ .reveal .controls div.navigate-down,
115
+ .reveal .controls div.navigate-down.enabled {
116
+ border-top-color: #8b743d; }
117
+
118
+ .reveal .controls div.navigate-left.enabled:hover {
119
+ border-right-color: #c0a86e; }
120
+
121
+ .reveal .controls div.navigate-right.enabled:hover {
122
+ border-left-color: #c0a86e; }
123
+
124
+ .reveal .controls div.navigate-up.enabled:hover {
125
+ border-bottom-color: #c0a86e; }
126
+
127
+ .reveal .controls div.navigate-down.enabled:hover {
128
+ border-top-color: #c0a86e; }
129
+
130
+ /*********************************************
131
+ * PROGRESS BAR
132
+ *********************************************/
133
+ .reveal .progress {
134
+ background: rgba(0, 0, 0, 0.2); }
135
+
136
+ .reveal .progress span {
137
+ background: #8b743d;
138
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
139
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
140
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
141
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
142
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
@@ -0,0 +1,150 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
2
+ @import url(http://fonts.googleapis.com/css?family=Oswald:700);
3
+ /**
4
+ * Default theme for reveal.js.
5
+ *
6
+ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7
+ */
8
+ @font-face {
9
+ font-family: 'Oswald','Meiryo','メイリオ','ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro' sans-serif;
10
+ /*
11
+ font-family: 'League Gothic';
12
+ src: url("../../lib/font/league_gothic-webfont.eot");
13
+ src: url("../../lib/font/league_gothic-webfont.eot?#iefix") format("embedded-opentype"), url("../../lib/font/league_gothic-webfont.woff") format("woff"), url("../../lib/font/league_gothic-webfont.ttf") format("truetype"), url("../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular") format("svg");
14
+ font-weight: normal;
15
+ font-style: normal;
16
+ */
17
+
18
+ }
19
+
20
+ /*********************************************
21
+ * GLOBAL STYLES
22
+ *********************************************/
23
+ body {
24
+ background: #1c1e20;
25
+ background: -moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
26
+ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));
27
+ background: -webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
28
+ background: -o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
29
+ background: -ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
30
+ background: radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
31
+ background-color: #2b2b2b; }
32
+
33
+ .reveal {
34
+ font-family: "Lato", sans-serif;
35
+ font-size: 36px;
36
+ font-weight: 200;
37
+ letter-spacing: -0.02em;
38
+ color: #eeeeee; }
39
+
40
+ ::selection {
41
+ color: white;
42
+ background: #ff5e99;
43
+ text-shadow: none; }
44
+
45
+ /*********************************************
46
+ * HEADERS
47
+ *********************************************/
48
+ .reveal h1,
49
+ .reveal h2,
50
+ .reveal h3,
51
+ .reveal h4,
52
+ .reveal h5,
53
+ .reveal h6 {
54
+ margin: 0 0 20px 0;
55
+ color: #eeeeee;
56
+ font-family: 'Oswald','Meiryo','メイリオ','ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro' sans-serif;
57
+ /*font-family: "League Gothic", Impact, sans-serif;*/
58
+ line-height: 0.9em;
59
+ letter-spacing: 0.02em;
60
+ text-transform: uppercase;
61
+ font-weight: bolder;
62
+ text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); }
63
+
64
+ .reveal h1 {
65
+ text-shadow: 0 1px 0 #cccccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbbbbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaaaaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
66
+
67
+ /*********************************************
68
+ * LINKS
69
+ *********************************************/
70
+ .reveal a:not(.image) {
71
+ color: #13daec;
72
+ text-decoration: none;
73
+ -webkit-transition: color 0.15s ease;
74
+ -moz-transition: color 0.15s ease;
75
+ -ms-transition: color 0.15s ease;
76
+ -o-transition: color 0.15s ease;
77
+ transition: color 0.15s ease; }
78
+
79
+ .reveal a:not(.image):hover {
80
+ color: #71e9f4;
81
+ text-shadow: none;
82
+ border: none; }
83
+
84
+ .reveal .roll span:after {
85
+ color: #fff;
86
+ background: #0d99a5; }
87
+
88
+ /*********************************************
89
+ * IMAGES
90
+ *********************************************/
91
+ .reveal section img {
92
+ margin: 15px 0px;
93
+ background: rgba(255, 255, 255, 0.12);
94
+ border: 4px solid #eeeeee;
95
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
96
+ -webkit-transition: all 0.2s linear;
97
+ -moz-transition: all 0.2s linear;
98
+ -ms-transition: all 0.2s linear;
99
+ -o-transition: all 0.2s linear;
100
+ transition: all 0.2s linear; }
101
+
102
+ .reveal a:hover img {
103
+ background: rgba(255, 255, 255, 0.2);
104
+ border-color: #13daec;
105
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
106
+
107
+ /*********************************************
108
+ * NAVIGATION CONTROLS
109
+ *********************************************/
110
+ .reveal .controls div.navigate-left,
111
+ .reveal .controls div.navigate-left.enabled {
112
+ border-right-color: #13daec; }
113
+
114
+ .reveal .controls div.navigate-right,
115
+ .reveal .controls div.navigate-right.enabled {
116
+ border-left-color: #13daec; }
117
+
118
+ .reveal .controls div.navigate-up,
119
+ .reveal .controls div.navigate-up.enabled {
120
+ border-bottom-color: #13daec; }
121
+
122
+ .reveal .controls div.navigate-down,
123
+ .reveal .controls div.navigate-down.enabled {
124
+ border-top-color: #13daec; }
125
+
126
+ .reveal .controls div.navigate-left.enabled:hover {
127
+ border-right-color: #71e9f4; }
128
+
129
+ .reveal .controls div.navigate-right.enabled:hover {
130
+ border-left-color: #71e9f4; }
131
+
132
+ .reveal .controls div.navigate-up.enabled:hover {
133
+ border-bottom-color: #71e9f4; }
134
+
135
+ .reveal .controls div.navigate-down.enabled:hover {
136
+ border-top-color: #71e9f4; }
137
+
138
+ /*********************************************
139
+ * PROGRESS BAR
140
+ *********************************************/
141
+ .reveal .progress {
142
+ background: rgba(0, 0, 0, 0.2); }
143
+
144
+ .reveal .progress span {
145
+ background: #13daec;
146
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
147
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
148
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
149
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
150
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }