character 0.1.0 → 1.0.0
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.
- checksums.yaml +7 -0
- data/.gitignore +4 -1
- data/.rspec +1 -0
- data/README.md +185 -14
- data/Rakefile +8 -1
- data/app/assets/images/character/logo.jpg +0 -0
- data/app/assets/javascripts/character.coffee +134 -0
- data/app/assets/javascripts/character/dashboard/_visitors.coffee +27 -0
- data/app/assets/javascripts/character/dashboard/layout.coffee +156 -0
- data/app/assets/javascripts/character/dashboard/module.coffee +51 -0
- data/app/assets/javascripts/character/generic/details.coffee +233 -0
- data/app/assets/javascripts/character/generic/helpers/compact_object.coffee +7 -0
- data/app/assets/javascripts/character/generic/helpers/data_inputs.coffee +21 -0
- data/app/assets/javascripts/character/generic/helpers/date_select.coffee +45 -0
- data/app/assets/javascripts/character/generic/helpers/editor.coffee +11 -0
- data/app/assets/javascripts/character/generic/helpers/redactor.coffee +38 -0
- data/app/assets/javascripts/character/generic/helpers/reorder.coffee +36 -0
- data/app/assets/javascripts/character/generic/layout.coffee +40 -0
- data/app/assets/javascripts/character/generic/list.coffee +214 -0
- data/app/assets/javascripts/character/generic/model.coffee +135 -0
- data/app/assets/javascripts/character/generic/module.coffee +157 -0
- data/app/assets/javascripts/character/images/module.coffee +148 -0
- data/app/assets/javascripts/character/pages/module.coffee +43 -0
- data/app/assets/javascripts/character/posts/module.coffee +113 -0
- data/app/assets/javascripts/character/settings/_admins.coffee +61 -0
- data/app/assets/javascripts/character/settings/_authors.coffee +56 -0
- data/app/assets/javascripts/character/settings/_categories.coffee +61 -0
- data/app/assets/javascripts/character/settings/_layout.coffee +7 -0
- data/app/assets/javascripts/character/settings/_redirects.coffee +56 -0
- data/app/assets/javascripts/character/settings/_website.coffee +7 -0
- data/app/assets/javascripts/character/settings/details.coffee +16 -0
- data/app/assets/javascripts/character/settings/layout.coffee +46 -0
- data/app/assets/javascripts/character/settings/module.coffee +78 -0
- data/app/assets/stylesheets/character.scss +37 -0
- data/app/assets/stylesheets/character/_admins.scss +30 -0
- data/app/assets/stylesheets/character/_authors.scss +30 -0
- data/app/assets/stylesheets/character/_categories.scss +32 -0
- data/app/assets/stylesheets/character/_dashboard.scss +143 -0
- data/app/assets/stylesheets/character/_posts.scss +93 -0
- data/app/assets/stylesheets/character/_redirects.scss +35 -0
- data/app/assets/stylesheets/character/base.scss +967 -0
- data/app/assets/stylesheets/character/typography.scss +29 -0
- data/app/controllers/character/api_controller.rb +170 -0
- data/app/controllers/character/application_controller.rb +37 -0
- data/app/controllers/character/settings_controller.rb +72 -0
- data/app/controllers/concerns/character/auth_concern.rb +41 -0
- data/app/controllers/concerns/character/instance_concern.rb +31 -0
- data/app/controllers/concerns/character/json_object_concern.rb +32 -0
- data/app/controllers/concerns/character/model_class_concern.rb +28 -0
- data/app/controllers/concerns/character/params_concern.rb +33 -0
- data/app/controllers/concerns/character/templates_concern.rb +32 -0
- data/app/controllers/concerns/not_found.rb +18 -0
- data/app/controllers/concerns/website_settings.rb +18 -0
- data/app/controllers/pages_controller.rb +8 -0
- data/app/controllers/posts_controller.rb +43 -0
- data/app/helpers/character_helper.rb +8 -0
- data/app/helpers/page_helper.rb +67 -0
- data/app/inputs/foundation_string_input.rb +44 -0
- data/app/inputs/foundation_switch_input.rb +35 -0
- data/app/models/character/image.rb +12 -0
- data/app/models/character/page.rb +21 -0
- data/app/models/character/post.rb +32 -12
- data/app/models/character/post_author.rb +22 -0
- data/app/models/character/post_category.rb +21 -0
- data/app/models/character/redirect.rb +15 -0
- data/app/models/character/settings/variable.rb +23 -0
- data/app/models/character/sitemap/sitemap_generator_helper.rb +15 -0
- data/app/models/character/user.rb +29 -0
- data/app/models/concerns/created_ago.rb +12 -0
- data/app/models/concerns/hideable.rb +27 -0
- data/app/models/concerns/orderable.rb +8 -0
- data/app/models/concerns/report.rb +11 -0
- data/app/models/concerns/report_daily.rb +32 -0
- data/app/models/concerns/report_monthly.rb +18 -0
- data/app/models/concerns/report_weekly.rb +19 -0
- data/app/models/concerns/updated_ago.rb +12 -0
- data/app/models/reports/analytics_daily.rb +26 -0
- data/app/models/reports/analytics_monthly.rb +16 -0
- data/app/models/reports/analytics_weekly.rb +16 -0
- data/app/services/google_analytics.rb +43 -0
- data/app/uploaders/character/image_uploader.rb +22 -0
- data/app/uploaders/character/settings/file_uploader.rb +5 -0
- data/app/views/character/character.html.erb +67 -0
- data/app/views/character/generic/form.html.erb +8 -0
- data/app/views/character/pages/form.html.erb +28 -0
- data/app/views/character/posts/form.html.erb +38 -0
- data/app/views/character/settings/admins.html.erb +29 -0
- data/app/views/character/settings/post_authors.html.erb +28 -0
- data/app/views/character/settings/post_categories.html.erb +31 -0
- data/app/views/character/settings/redirects.html.erb +30 -0
- data/app/views/character/settings/settings_group.html.erb +67 -0
- data/app/views/errors/not_found.html.erb +157 -0
- data/app/views/pages/_default.html.erb +3 -0
- data/app/views/pages/_redactor.html.erb +3 -0
- data/app/views/pages/show.html.erb +5 -0
- data/app/views/posts/_post.html.erb +17 -0
- data/app/views/posts/author.html.erb +18 -0
- data/app/views/posts/category.html.erb +18 -0
- data/app/views/posts/index.html.erb +18 -0
- data/app/views/posts/rss.builder +19 -0
- data/app/views/posts/show.html.erb +14 -0
- data/app/views/shared/_google_analytics.html.erb +13 -0
- data/character.gemspec +48 -5
- data/doc/README_old.md +161 -0
- data/doc/generic_app.md +19 -0
- data/doc/img/demo-1.jpg +0 -0
- data/doc/img/demo-2.jpg +0 -0
- data/doc/img/demo-3.jpg +0 -0
- data/doc/img/demo-4.jpg +0 -0
- data/doc/img/demo-5.jpg +0 -0
- data/doc/instances.md +39 -0
- data/doc/settings.md +1 -0
- data/lib/character.rb +29 -1
- data/lib/character/engine.rb +33 -1
- data/lib/character/generators/bootstrap_generator.rb +51 -0
- data/lib/character/instance.rb +59 -0
- data/lib/character/routing.rb +42 -5
- data/lib/character/settings.rb +101 -0
- data/lib/character/templates/admin.coffee +15 -0
- data/lib/character/templates/admin.scss +3 -0
- data/lib/character/templates/application.html.erb +44 -0
- data/lib/character/templates/application.scss +12 -0
- data/lib/character/templates/assets.rb +1 -0
- data/lib/character/templates/initializer.rb +5 -0
- data/lib/character/templates/settings.scss +11 -0
- data/lib/character/templates/settings.yml +67 -0
- data/lib/character/templates/typography.scss +13 -0
- data/lib/character/version.rb +2 -2
- data/lib/mongoid/carrierwave_serialization_patch.rb +9 -0
- data/lib/tasks/analytics.rake +52 -0
- data/test/config/application.rb +65 -0
- data/test/config/mongoid.yml +12 -0
- data/test/config/secrets.yml +22 -0
- data/test/controllers/character/api_controller_test.rb +94 -0
- data/test/factories/product_factory.rb +5 -0
- data/test/lib/character/engine_test.rb +33 -0
- data/test/lib/character/routing_test.rb +31 -0
- data/test/test_helper.rb +48 -0
- data/vendor/assets/javascripts/backbone.js +944 -794
- data/vendor/assets/javascripts/jquery.fileupload.js +1426 -0
- data/vendor/assets/javascripts/jquery.form.js +1278 -0
- data/vendor/assets/javascripts/jquery.iframe-transport.js +214 -0
- data/vendor/assets/javascripts/raphael.js +8117 -0
- data/vendor/assets/javascripts/raphael.morris.js +1885 -0
- data/vendor/assets/javascripts/underscore.inflection.js +177 -0
- data/vendor/assets/javascripts/underscore.string.js +1 -1
- data/vendor/assets/stylesheets/csspinner.css +361 -0
- data/vendor/assets/stylesheets/normalize.css +423 -0
- metadata +499 -49
- data/app/controllers/character/posts_controller.rb +0 -27
- data/lib/generators/character/install_generator.rb +0 -42
- data/lib/generators/character/templates/README +0 -1
- data/lib/generators/character/templates/admin/character.rb +0 -3
- data/vendor/assets/fonts/general_foundicons.eot +0 -0
- data/vendor/assets/fonts/general_foundicons.svg +0 -15
- data/vendor/assets/fonts/general_foundicons.ttf +0 -0
- data/vendor/assets/fonts/general_foundicons.woff +0 -0
- data/vendor/assets/javascripts/character/index.js.coffee +0 -53
- data/vendor/assets/javascripts/character/models/post.js.coffee +0 -39
- data/vendor/assets/javascripts/character/views/app.js.coffee +0 -81
- data/vendor/assets/javascripts/character/views/editor.js.coffee +0 -231
- data/vendor/assets/javascripts/character/views/editor_settings.js.coffee +0 -44
- data/vendor/assets/javascripts/character/views/index.js.coffee +0 -116
- data/vendor/assets/javascripts/character/views/preview.js.coffee +0 -49
- data/vendor/assets/javascripts/jquery.smartresize.js +0 -30
- data/vendor/assets/javascripts/lodash.js +0 -4258
- data/vendor/assets/javascripts/showdown.js +0 -62
- data/vendor/assets/stylesheets/character/_base.css.scss +0 -84
- data/vendor/assets/stylesheets/character/_icons.css.scss.erb +0 -96
- data/vendor/assets/stylesheets/character/_view_editor.css.scss +0 -115
- data/vendor/assets/stylesheets/character/_view_index.css.scss +0 -73
- data/vendor/assets/stylesheets/character/_view_preview.css.scss +0 -49
- data/vendor/assets/stylesheets/character/index.css.scss +0 -32
|
@@ -1,62 +0,0 @@
|
|
|
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={extensions:{}},forEach=Showdown.forEach=function(a,b){if(typeof a.forEach=="function")a.forEach(b);else{var c,d=a.length;for(c=0;c<d;c++)b(a[c],c,a)}},stdExtName=function(a){return a.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(a){var b,c,d,e=0,f=[],g=[];if(typeof module!="undefind"&&typeof exports!="undefined"&&typeof require!="undefind"){var h=require("fs");if(h){var i=h.readdirSync((__dirname||".")+"/extensions").filter(function(a){return~a.indexOf(".js")}).map(function(a){return a.replace(/\.js$/,"")});Showdown.forEach(i,function(a){var b=stdExtName(a);Showdown.extensions[b]=require("./extensions/"+a)})}}this.makeHtml=function(a){return b={},c={},d=[],a=a.replace(/~/g,"~T"),a=a.replace(/\$/g,"~D"),a=a.replace(/\r\n/g,"\n"),a=a.replace(/\r/g,"\n"),a="\n\n"+a+"\n\n",a=M(a),a=a.replace(/^[ \t]+$/mg,""),Showdown.forEach(f,function(b){a=k(b,a)}),a=z(a),a=m(a),a=l(a),a=o(a),a=K(a),a=a.replace(/~D/g,"$$"),a=a.replace(/~T/g,"~"),Showdown.forEach(g,function(b){a=k(b,a)}),a};if(a&&a.extensions){var j=this;Showdown.forEach(a.extensions,function(a){typeof a=="string"&&(a=Showdown.extensions[stdExtName(a)]);if(typeof a!="function")throw"Extension '"+a+"' could not be loaded. It was either not found or is not a valid extension.";Showdown.forEach(a(j),function(a){a.type?a.type==="language"||a.type==="lang"?f.push(a):(a.type==="output"||a.type==="html")&&g.push(a):g.push(a)})})}var k=function(a,b){if(a.regex){var c=new RegExp(a.regex,"g");return b.replace(c,a.replace)}if(a.filter)return a.filter(b)},l=function(a){return a+="~0",a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(a,d,e,f,g){return d=d.toLowerCase(),b[d]=G(e),f?f+g:(g&&(c[d]=g.replace(/"/g,""")),"")}),a=a.replace(/~0/,""),a},m=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|style|section|header|footer|nav|article|aside",c="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside";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,n),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,n),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n),a=a.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,n),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n),a=a.replace(/\n\n/g,"\n"),a},n=function(a,b){var c=b;return c=c.replace(/\n\n/g,"\n"),c=c.replace(/^\n/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(d.push(c)-1)+"K\n\n",c},o=function(a){a=v(a);var b=A("<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=x(a),a=y(a),a=E(a),a=m(a),a=F(a),a},p=function(a){return a=B(a),a=q(a),a=H(a),a=t(a),a=r(a),a=I(a),a=G(a),a=D(a),a=a.replace(/ +\n/g," <br />\n"),a},q=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=N(b,"\\`*_"),b}),a},r=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,s),a},s=function(a,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(b[m]!=undefined)n=b[m],c[m]!=undefined&&(o=c[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}}n=N(n,"*_");var p='<a href="'+n+'"';return o!=""&&(o=o.replace(/"/g,"""),o=N(o,"*_"),p+=' title="'+o+'"'),p+=">"+l+"</a>",p},t=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,u),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,u),a},u=function(a,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(b[m]==undefined)return k;n=b[m],c[m]!=undefined&&(o=c[m])}l=l.replace(/"/g,"""),n=N(n,"*_");var p='<img src="'+n+'" alt="'+l+'"';return o=o.replace(/"/g,"""),o=N(o,"*_"),p+=' title="'+o+'"',p+=" />",p},v=function(a){function b(a){return a.replace(/[^\w]/g,"").toLowerCase()}return a=a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(a,c){return A('<h1 id="'+b(c)+'">'+p(c)+"</h1>")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return A('<h2 id="'+b(c)+'">'+p(c)+"</h2>")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return A("<h"+e+' id="'+b(d)+'">'+p(d)+"</h"+e+">")}),a},w,x=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return e?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=w(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=w(f);return h=e+"<"+g+">\n"+h+"</"+g+">\n",h})),a=a.replace(/~0/,""),a};w=function(a){return e++,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,h=c;return g||f.search(/\n{2,}/)>-1?f=o(L(f)):(f=x(L(f)),f=f.replace(/\n$/,""),f=p(f)),"<li>"+f+"</li>\n"}),a=a.replace(/~0/g,""),e--,a};var y=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=C(L(d)),d=M(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="<pre><code>"+d+"\n</code></pre>",A(d)+e}),a=a.replace(/~0/,""),a},z=function(a){return a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,b,c){var d=b,e=c;return e=C(e),e=M(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="<pre><code"+(d?' class="'+d+'"':"")+">"+e+"\n</code></pre>",A(e)}),a=a.replace(/~0/,""),a},A=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(d.push(a)-1)+"K\n\n"},B=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=C(f),b+"<code>"+f+"</code>"}),a},C=function(a){return a=a.replace(/&/g,"&"),a=a.replace(/</g,"<"),a=a.replace(/>/g,">"),a=N(a,"*_{}[]\\",!1),a},D=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},E=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=o(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}),A("<blockquote>\n"+c+"\n</blockquote>")}),a},F=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");var b=a.split(/\n{2,}/g),c=[],e=b.length;for(var f=0;f<e;f++){var g=b[f];g.search(/~K(\d+)K/g)>=0?c.push(g):g.search(/\S/)>=0&&(g=p(g),g=g.replace(/^([ \t]*)/g,"<p>"),g+="</p>",c.push(g))}e=c.length;for(var f=0;f<e;f++)while(c[f].search(/~K(\d+)K/)>=0){var h=d[RegExp.$1];h=h.replace(/\$/g,"$$$$"),c[f]=c[f].replace(/~K\d+K/,h)}return c.join("\n\n")},G=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),a=a.replace(/<(?![a-z\/?\$!])/gi,"<"),a},H=function(a){return a=a.replace(/\\(\\)/g,O),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,O),a},I=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 J(K(b))}),a},J=function(a){var b=[function(a){return"&#"+a.charCodeAt(0)+";"},function(a){return"&#x"+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if(a=="@")a=b[Math.floor(Math.random()*2)](a);else if(a!=":"){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a='<a href="'+a+'">'+a+"</a>",a=a.replace(/">.+:/g,'">'),a},K=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)}),a},L=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,""),a},M=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},N=function(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,O),a},O=function(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}},typeof module!="undefined"&&(module.exports=Showdown),typeof define=="function"&&define.amd&&define("showdown",function(){return Showdown});
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@import "compass/reset";
|
|
2
|
-
@import "compass/css3";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$GRAY: #E3E3E1;
|
|
6
|
-
|
|
7
|
-
@mixin shadow { @include box-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@mixin character_body { font-family:'Helvetica Neue', Helvetica, Arial;
|
|
12
|
-
font-weight:300;
|
|
13
|
-
font-size:14px;
|
|
14
|
-
color:#444;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
strong { font-weight:600;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
a, a:visited { color:#444;
|
|
21
|
-
text-decoration:none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
textarea, input { outline: none;
|
|
25
|
-
border:none;
|
|
26
|
-
margin:0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
*, *:before, *:after { @include box-sizing(border-box);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.clearfix { *zoom: 1; // IE6/7 support
|
|
33
|
-
&:before, &:after { content:" ";
|
|
34
|
-
display:table;
|
|
35
|
-
}
|
|
36
|
-
&:after { clear: both;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.chr-panel {
|
|
41
|
-
&.left { float:left;
|
|
42
|
-
width:50%;
|
|
43
|
-
padding:1em 0.5em 1em 1em;
|
|
44
|
-
&.fixed { position:fixed;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
&.right { float:right;
|
|
48
|
-
width:50%;
|
|
49
|
-
padding:1em 1em 1em 0.5em;
|
|
50
|
-
&.fixed { position:fixed;
|
|
51
|
-
right:0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.container { background:#fff;
|
|
56
|
-
padding-top:1em;
|
|
57
|
-
@include shadow;
|
|
58
|
-
header { border-bottom:1px solid #f6f6f6;
|
|
59
|
-
padding-bottom:1em;
|
|
60
|
-
font-size:0.85em;
|
|
61
|
-
margin:0 1em;
|
|
62
|
-
line-height:1;
|
|
63
|
-
.title, .info { text-transform:uppercase;
|
|
64
|
-
font-weight:500;
|
|
65
|
-
color:#999;
|
|
66
|
-
}
|
|
67
|
-
.info { float:right;
|
|
68
|
-
}
|
|
69
|
-
.buttons { float:right;
|
|
70
|
-
font-size:1.2em;
|
|
71
|
-
a { padding:0.5em;
|
|
72
|
-
opacity:0.8;
|
|
73
|
-
&:hover { opacity:1;
|
|
74
|
-
}
|
|
75
|
-
&:last-child { padding-right:0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
.split { border-left:1px solid #f6f6f6;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
$fontFileName: "general_foundicons";
|
|
2
|
-
$fontName: "GeneralFoundicons";
|
|
3
|
-
$classPrefix: "foundicon-";
|
|
4
|
-
|
|
5
|
-
@mixin i-class($name,$pua) {
|
|
6
|
-
.#{$classPrefix}#{$name}:before {
|
|
7
|
-
content: "\f#{$pua}";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@mixin face {
|
|
12
|
-
@font-face {
|
|
13
|
-
font-family: $fontName;
|
|
14
|
-
src: font-url('#{$fontFileName}.eot');
|
|
15
|
-
src: font-url('#{$fontFileName}.eot?#iefix') format('embedded-opentype'),
|
|
16
|
-
font-url('#{$fontFileName}.woff') format('woff'),
|
|
17
|
-
font-url('#{$fontFileName}.ttf') format('truetype'),
|
|
18
|
-
font-url('#{$fontFileName}.svg##{$fontName}') format('svg');
|
|
19
|
-
font-weight: normal;
|
|
20
|
-
font-style: normal;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* font-face */
|
|
25
|
-
@include face;
|
|
26
|
-
|
|
27
|
-
/* global foundicon styles */
|
|
28
|
-
[class*="#{$classPrefix}"] {
|
|
29
|
-
display: inline;
|
|
30
|
-
width: auto;
|
|
31
|
-
height: auto;
|
|
32
|
-
line-height: inherit;
|
|
33
|
-
vertical-align: baseline;
|
|
34
|
-
background-image: none;
|
|
35
|
-
background-position: 0 0;
|
|
36
|
-
background-repeat: repeat;
|
|
37
|
-
}
|
|
38
|
-
[class*="#{$classPrefix}"]:before {
|
|
39
|
-
font-family: $fontName;
|
|
40
|
-
font-weight: normal;
|
|
41
|
-
font-style: normal;
|
|
42
|
-
text-decoration: inherit;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* icons */
|
|
46
|
-
@include i-class(settings,"000");
|
|
47
|
-
@include i-class(heart,"001");
|
|
48
|
-
@include i-class(star,"002");
|
|
49
|
-
@include i-class(plus,"003");
|
|
50
|
-
@include i-class(minus,"004");
|
|
51
|
-
@include i-class(checkmark,"005");
|
|
52
|
-
@include i-class(remove,"006");
|
|
53
|
-
@include i-class(mail,"007");
|
|
54
|
-
@include i-class(calendar,"008");
|
|
55
|
-
@include i-class(page,"009");
|
|
56
|
-
@include i-class(tools,"00a");
|
|
57
|
-
@include i-class(globe,"00b");
|
|
58
|
-
@include i-class(home,"00c");
|
|
59
|
-
@include i-class(quote,"00d");
|
|
60
|
-
@include i-class(people,"00e");
|
|
61
|
-
@include i-class(monitor,"00f");
|
|
62
|
-
@include i-class(laptop,"010");
|
|
63
|
-
@include i-class(phone,"011");
|
|
64
|
-
@include i-class(cloud,"012");
|
|
65
|
-
@include i-class(error,"013");
|
|
66
|
-
@include i-class(right-arrow,"014");
|
|
67
|
-
@include i-class(left-arrow,"015");
|
|
68
|
-
@include i-class(up-arrow,"016");
|
|
69
|
-
@include i-class(down-arrow,"017");
|
|
70
|
-
@include i-class(trash,"018");
|
|
71
|
-
@include i-class(add-doc,"019");
|
|
72
|
-
@include i-class(edit,"01a");
|
|
73
|
-
@include i-class(lock,"01b");
|
|
74
|
-
@include i-class(unlock,"01c");
|
|
75
|
-
@include i-class(refresh,"01d");
|
|
76
|
-
@include i-class(paper-clip,"01e");
|
|
77
|
-
@include i-class(video,"01f");
|
|
78
|
-
@include i-class(photo,"020");
|
|
79
|
-
@include i-class(graph,"021");
|
|
80
|
-
@include i-class(idea,"022");
|
|
81
|
-
@include i-class(mic,"023");
|
|
82
|
-
@include i-class(cart,"024");
|
|
83
|
-
@include i-class(address-book,"025");
|
|
84
|
-
@include i-class(compass,"026");
|
|
85
|
-
@include i-class(flag,"027");
|
|
86
|
-
@include i-class(location,"028");
|
|
87
|
-
@include i-class(clock,"029");
|
|
88
|
-
@include i-class(folder,"02a");
|
|
89
|
-
@include i-class(inbox,"02b");
|
|
90
|
-
@include i-class(website,"02c");
|
|
91
|
-
@include i-class(smiley,"02d");
|
|
92
|
-
@include i-class(search,"02e");
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
@mixin character_editor {
|
|
3
|
-
|
|
4
|
-
.editor {
|
|
5
|
-
textarea { width:100%;
|
|
6
|
-
padding:1em;
|
|
7
|
-
border:none;
|
|
8
|
-
font-size:0.85em;
|
|
9
|
-
margin-top:1px; // some issue;
|
|
10
|
-
resize: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
header { margin:54px 1em 0 1em;
|
|
14
|
-
.title input { width:100%;
|
|
15
|
-
font-size:1.2em;
|
|
16
|
-
padding:0.6em 0.7em 0.5em;
|
|
17
|
-
font-weight: 600;
|
|
18
|
-
@include shadow;
|
|
19
|
-
}
|
|
20
|
-
.permalink { font-size:0.85em;
|
|
21
|
-
font-weight:400;
|
|
22
|
-
opacity:0.8;
|
|
23
|
-
line-height:2;
|
|
24
|
-
.slug { font-weight:600;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
article { overflow-y:scroll;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
footer { width:100%;
|
|
33
|
-
padding:.5em 1em;
|
|
34
|
-
background:#333;
|
|
35
|
-
position:fixed;
|
|
36
|
-
bottom:0;
|
|
37
|
-
|
|
38
|
-
button { text-transform:uppercase;
|
|
39
|
-
color:#eee;
|
|
40
|
-
border:none;
|
|
41
|
-
@include border-radius(3px);
|
|
42
|
-
padding:.5em 1em;
|
|
43
|
-
cursor:pointer;
|
|
44
|
-
@include single-box-shadow(#333, 0px, 0px, 1px, 1px, false);
|
|
45
|
-
&:hover,&.active { @include single-box-shadow(#888, 0px, 0px, 1px, 1px, false);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
.save-draft { background:#2763a5;
|
|
49
|
-
float:right;
|
|
50
|
-
margin-right:5px;
|
|
51
|
-
}
|
|
52
|
-
.publish { background:#a71820;
|
|
53
|
-
float:right;
|
|
54
|
-
}
|
|
55
|
-
.cancel { background:#444;
|
|
56
|
-
}
|
|
57
|
-
.settings { width:35px;
|
|
58
|
-
float:right;
|
|
59
|
-
margin-right:5px;
|
|
60
|
-
.settings-box { display:none;
|
|
61
|
-
}
|
|
62
|
-
button { background:#444;
|
|
63
|
-
padding-top:6px;
|
|
64
|
-
line-height:1;
|
|
65
|
-
}
|
|
66
|
-
&.shown .settings-box { display:block;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.settings-box { position: absolute;
|
|
72
|
-
right:28px;
|
|
73
|
-
//min-height:200px;
|
|
74
|
-
bottom:56px;
|
|
75
|
-
width:460px;
|
|
76
|
-
background: #333;
|
|
77
|
-
border: 4px solid #333;
|
|
78
|
-
text-align: left;
|
|
79
|
-
@include border-radius(6px);
|
|
80
|
-
color:#fff;
|
|
81
|
-
padding:10px;
|
|
82
|
-
|
|
83
|
-
//@include single-box-shadow(rgba(0,0,0,0.3), 0px, 1px, 4px, 0px, false);
|
|
84
|
-
|
|
85
|
-
-moz-box-shadow: 0 1px 4px rgba(0,0,0,0.3);
|
|
86
|
-
-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
|
|
87
|
-
filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
|
|
88
|
-
|
|
89
|
-
&:after, &:before { top: 100%;
|
|
90
|
-
border: solid transparent;
|
|
91
|
-
content: " ";
|
|
92
|
-
height: 0;
|
|
93
|
-
width: 0;
|
|
94
|
-
position: absolute;
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:after { border-color: rgba(0, 0, 0, 0);
|
|
99
|
-
border-top-color: fff;
|
|
100
|
-
border-width: 10px;
|
|
101
|
-
left: 50%;
|
|
102
|
-
margin-left: -10px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&:before { border-color: rgba(51, 51, 51, 0);
|
|
106
|
-
border-top-color: #333;
|
|
107
|
-
border-width: 16px;
|
|
108
|
-
left: 50%;
|
|
109
|
-
margin-left: 42px;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
@mixin character_index {
|
|
2
|
-
.index {
|
|
3
|
-
li { position:relative;
|
|
4
|
-
a { border-bottom:1px solid #f6f6f6;
|
|
5
|
-
border-top:1px solid #f6f6f6;
|
|
6
|
-
padding:1em 0;
|
|
7
|
-
height:6em;
|
|
8
|
-
display:block;
|
|
9
|
-
color:#444;
|
|
10
|
-
margin:0 1em;
|
|
11
|
-
margin-top:-1px;
|
|
12
|
-
position:relative;
|
|
13
|
-
&.active { margin-left:0;
|
|
14
|
-
margin-right:0;
|
|
15
|
-
padding-left:1em;
|
|
16
|
-
padding-right:1em;
|
|
17
|
-
z-index:10;
|
|
18
|
-
position:relative;
|
|
19
|
-
border-bottom:1px solid #ddd;
|
|
20
|
-
border-top:1px solid #ddd;
|
|
21
|
-
|
|
22
|
-
.views { opacity:1;
|
|
23
|
-
}
|
|
24
|
-
img { left:1em;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:last-child a { border-bottom:none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
img { width:4em;
|
|
33
|
-
height:4em;
|
|
34
|
-
@include border-radius(2em);
|
|
35
|
-
position:absolute;
|
|
36
|
-
left:0;
|
|
37
|
-
}
|
|
38
|
-
.meta, .date, .views { color:#999;
|
|
39
|
-
display:block;
|
|
40
|
-
}
|
|
41
|
-
.left { float:left;
|
|
42
|
-
width:70%;
|
|
43
|
-
padding-left:5em;
|
|
44
|
-
}
|
|
45
|
-
.right { float:right;
|
|
46
|
-
width:30%;
|
|
47
|
-
text-align:right;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.title { display:block;
|
|
51
|
-
font-weight:500;
|
|
52
|
-
line-height:1.2;
|
|
53
|
-
}
|
|
54
|
-
.date { font-size:0.85em;
|
|
55
|
-
padding-top:0.25em;
|
|
56
|
-
}
|
|
57
|
-
.meta { font-size:0.85em;
|
|
58
|
-
padding-top:0.5em;
|
|
59
|
-
}
|
|
60
|
-
.views { font-size:2.7em;
|
|
61
|
-
font-weight:500;
|
|
62
|
-
padding-top:0.15em;
|
|
63
|
-
opacity:0.5;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
li.placeholder { text-align:center;
|
|
67
|
-
padding:2em 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
@mixin character_preview {
|
|
2
|
-
//
|
|
3
|
-
// Active admin blog article styles
|
|
4
|
-
//
|
|
5
|
-
article { padding:0em 1em 5em 1em;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
// Put in here your blog post styles
|
|
11
|
-
//
|
|
12
|
-
article {
|
|
13
|
-
// Define font size for blog post preview
|
|
14
|
-
// Add some responsiveness here, to make it look good on big screens
|
|
15
|
-
// Content element is used to render proper blog post in article container
|
|
16
|
-
.content { font-size:12px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.content { max-width:700px;
|
|
20
|
-
margin:0 auto;
|
|
21
|
-
color:#333;
|
|
22
|
-
font-family: Times, sans-serif;
|
|
23
|
-
|
|
24
|
-
p, li { font-size:1.3em;
|
|
25
|
-
line-height:1.6em;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
p { margin-bottom:0.2em;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
li { padding-left:1em;
|
|
32
|
-
&:before { content:"— ";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
p + p { text-indent: 2em;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h1 { font-size: 1.75em;
|
|
40
|
-
line-height: 1.3em;
|
|
41
|
-
margin: 1em auto .5em;
|
|
42
|
-
}
|
|
43
|
-
h2 { font-size: 1.65em;
|
|
44
|
-
line-height: 1.3em;
|
|
45
|
-
margin: 1em auto .5em;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|