├── .gitignore ├── views ├── tags │ ├── reduce.js │ └── map.js ├── recent-posts │ └── map.js ├── comments │ └── map.js ├── post-page │ └── map.js └── lib │ └── comments.js ├── blog.json ├── couchapp.json ├── evently ├── tagcloud │ └── _init │ │ ├── query.json │ │ ├── mustache.html │ │ └── data.js ├── profile │ ├── loggedOut │ │ └── mustache.html │ └── profileReady │ │ ├── selectors │ │ ├── form │ │ │ └── submit.js │ │ └── #preview │ │ │ └── click.js │ │ └── mustache.html └── account │ └── loggedIn │ ├── mustache.html │ └── data.js ├── vendor ├── couchapp │ ├── evently │ │ ├── account │ │ │ ├── loginForm │ │ │ │ ├── selectors │ │ │ │ │ ├── a[href=#signup].json │ │ │ │ │ └── form │ │ │ │ │ │ └── submit.js │ │ │ │ ├── after.js │ │ │ │ └── mustache.html │ │ │ ├── signupForm │ │ │ │ ├── selectors │ │ │ │ │ ├── a[href=#login].json │ │ │ │ │ └── form │ │ │ │ │ │ └── submit.js │ │ │ │ ├── after.js │ │ │ │ └── mustache.html │ │ │ ├── loggedIn │ │ │ │ ├── selectors.json │ │ │ │ ├── after.js │ │ │ │ ├── mustache.html │ │ │ │ └── data.js │ │ │ ├── loggedOut │ │ │ │ ├── mustache.html │ │ │ │ └── selectors.json │ │ │ ├── adminParty │ │ │ │ └── mustache.html │ │ │ ├── doLogout.js │ │ │ ├── doLogin.js │ │ │ ├── doSignup.js │ │ │ └── _init.js │ │ ├── profile │ │ │ ├── loggedOut │ │ │ │ ├── mustache.html │ │ │ │ └── after.js │ │ │ ├── profileReady │ │ │ │ ├── data.js │ │ │ │ ├── after.js │ │ │ │ └── mustache.html │ │ │ ├── noProfile │ │ │ │ ├── data.js │ │ │ │ ├── mustache.html │ │ │ │ └── selectors │ │ │ │ │ └── form │ │ │ │ │ └── submit.js │ │ │ └── loggedIn.js │ │ └── README.md │ ├── metadata.json │ ├── lib │ │ ├── redirect.js │ │ ├── list.js │ │ ├── cache.js │ │ ├── code.js │ │ ├── linkup.js │ │ ├── atom.js │ │ ├── validate.js │ │ ├── path.js │ │ ├── docform.js │ │ ├── md5.js │ │ ├── mustache.js │ │ └── markdown.js │ └── _attachments │ │ ├── loader.js │ │ ├── jquery.couch.app.util.js │ │ ├── jquery.pathbinder.js │ │ ├── jquery.couch.app.js │ │ ├── jquery.mustache.js │ │ └── jquery.evently.js └── textile │ └── textile.js ├── _attachments ├── images │ └── icon.png ├── script │ ├── app.js │ ├── jquery.scrollTo.js │ └── md5.js ├── THANKS.txt ├── style │ └── screen.css └── LICENSE.txt ├── lib ├── blog.js ├── validate.js └── mustache.js ├── shows ├── post.js └── edit.js ├── templates ├── partials │ ├── comment.html │ ├── header.html │ └── scripts.html ├── post.html ├── index.html └── edit.html ├── THANKS.txt ├── rewrites.json ├── sofa2.txt ├── validate_doc_update.js ├── lists ├── comments.js ├── post.js └── index.js ├── README.md └── helpers └── md5.js /.gitignore: -------------------------------------------------------------------------------- 1 | .couchapprc -------------------------------------------------------------------------------- /views/tags/reduce.js: -------------------------------------------------------------------------------- 1 | _count -------------------------------------------------------------------------------- /blog.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Sofa: CouchApp Blog Engine" 3 | } -------------------------------------------------------------------------------- /couchapp.json: -------------------------------------------------------------------------------- 1 | { 2 | "index" : "_list/index/recent-posts?descending=true&limit=10" 3 | } 4 | -------------------------------------------------------------------------------- /evently/tagcloud/_init/query.json: -------------------------------------------------------------------------------- 1 | { 2 | "view" : "tags", 3 | "group_level" : 1 4 | } 5 | -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loginForm/selectors/a[href=#signup].json: -------------------------------------------------------------------------------- 1 | {"click" : ["signupForm"]} -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/signupForm/selectors/a[href=#login].json: -------------------------------------------------------------------------------- 1 | {"click" : ["loginForm"]} -------------------------------------------------------------------------------- /vendor/couchapp/evently/profile/loggedOut/mustache.html: -------------------------------------------------------------------------------- 1 |
Please log in to see your profile.
-------------------------------------------------------------------------------- /vendor/couchapp/evently/profile/profileReady/data.js: -------------------------------------------------------------------------------- 1 | function(e, p) { 2 | return p 3 | } 4 | -------------------------------------------------------------------------------- /_attachments/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchris/sofa/HEAD/_attachments/images/icon.png -------------------------------------------------------------------------------- /vendor/couchapp/evently/profile/loggedOut/after.js: -------------------------------------------------------------------------------- 1 | function() { 2 | $$(this).profile = null; 3 | }; -------------------------------------------------------------------------------- /vendor/couchapp/evently/profile/noProfile/data.js: -------------------------------------------------------------------------------- 1 | function(e, userCtx) { 2 | return userCtx; 3 | } -------------------------------------------------------------------------------- /vendor/couchapp/evently/profile/profileReady/after.js: -------------------------------------------------------------------------------- 1 | function(e, p) { 2 | $$(this).profile = p; 3 | }; -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedIn/selectors.json: -------------------------------------------------------------------------------- 1 | { 2 | "a[href=#logout]" : {"click" : ["doLogout"]} 3 | } -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedOut/mustache.html: -------------------------------------------------------------------------------- 1 | Signup or Login -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loginForm/after.js: -------------------------------------------------------------------------------- 1 | function() { 2 | $("input[name=name]", this).focus(); 3 | } -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/signupForm/after.js: -------------------------------------------------------------------------------- 1 | function() { 2 | $("input[name=name]", this).focus(); 3 | } -------------------------------------------------------------------------------- /evently/profile/loggedOut/mustache.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /evently/tagcloud/_init/mustache.html: -------------------------------------------------------------------------------- 1 | {{#tags}} 2 | {{tag}} 3 | {{/tags}} -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedIn/after.js: -------------------------------------------------------------------------------- 1 | function(e, r) { 2 | $$(this).userCtx = r.userCtx; 3 | $$(this).info = r.info; 4 | }; -------------------------------------------------------------------------------- /views/recent-posts/map.js: -------------------------------------------------------------------------------- 1 | function(doc) { 2 | if (doc.type == "post") { 3 | emit(new Date(doc.created_at), doc); 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /vendor/couchapp/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "couchapp", 3 | "description": "official couchapp vendor", 4 | "fetch_uri": "git://github.com/couchapp/couchapp.git" 5 | } -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedOut/selectors.json: -------------------------------------------------------------------------------- 1 | { 2 | "a[href=#signup]" : {"click" : ["signupForm"]}, 3 | "a[href=#login]" : {"click" : ["loginForm"]} 4 | } -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/adminParty/mustache.html: -------------------------------------------------------------------------------- 1 |Admin party, everyone is admin! Fix this in Futon before proceeding.
-------------------------------------------------------------------------------- /lib/blog.js: -------------------------------------------------------------------------------- 1 | exports.slugifyString = function(string) { 2 | return string.replace(/\W/g,'-'). 3 | replace(/\-*$/,'').replace(/^\-*/,''). 4 | replace(/\-{2,}/,'-'); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /vendor/couchapp/lib/redirect.js: -------------------------------------------------------------------------------- 1 | exports.permanent = function(redirect) { 2 | return { 3 | code : 301, 4 | headers : { 5 | "Location" : redirect 6 | } 7 | }; 8 | }; -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/doLogout.js: -------------------------------------------------------------------------------- 1 | function() { 2 | var elem = $(this); 3 | $.couch.logout({ 4 | success : function() { 5 | elem.trigger("_init"); 6 | } 7 | }); 8 | } -------------------------------------------------------------------------------- /views/comments/map.js: -------------------------------------------------------------------------------- 1 | function(doc) { 2 | var comments = require("views/lib/comments"); 3 | 4 | if (doc.type == "comment") { 5 | emit(new Date(doc.created_at), comments.withGravatar(doc)); 6 | } 7 | }; -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedIn/mustache.html: -------------------------------------------------------------------------------- 1 | Welcome 2 | {{name}}! 3 | Logout? 4 | -------------------------------------------------------------------------------- /_attachments/script/app.js: -------------------------------------------------------------------------------- 1 | $.couch.app(function(app) { 2 | $('.date').prettyDate(); 3 | 4 | $("#account").evently($.extend(true, 5 | app.ddoc.vendor.couchapp.evently.account, 6 | app.ddoc.evently.account), app); 7 | }); -------------------------------------------------------------------------------- /vendor/couchapp/evently/account/loggedIn/data.js: -------------------------------------------------------------------------------- 1 | function(e, r) { 2 | return { 3 | name : r.userCtx.name, 4 | uri_name : encodeURIComponent(r.userCtx.name), 5 | auth_db : encodeURIComponent(r.info.authentication_db) 6 | }; 7 | } -------------------------------------------------------------------------------- /shows/post.js: -------------------------------------------------------------------------------- 1 | function(doc, req) { 2 | var path = require("vendor/couchapp/lib/path").init(req); 3 | var redirect = require("vendor/couchapp/lib/redirect"); 4 | return redirect.permanent(path.list('post','post-page', {startkey : [doc._id]})); 5 | } 6 | -------------------------------------------------------------------------------- /templates/partials/comment.html: -------------------------------------------------------------------------------- 1 |{{{html}}}
8 |Hello {{nickname}}!
8 | -------------------------------------------------------------------------------- /views/post-page/map.js: -------------------------------------------------------------------------------- 1 | function(doc) { 2 | var comments = require("views/lib/comments"); 3 | 4 | if (doc.type == "post") { 5 | emit([doc._id], doc); 6 | } else if (doc.type == "comment") { 7 | emit([doc.post_id, doc.created_at], comments.withGravatar(doc)); 8 | } 9 | }; -------------------------------------------------------------------------------- /_attachments/THANKS.txt: -------------------------------------------------------------------------------- 1 | Sofa THANKS 2 | ===================== 3 | 4 | A number of people have contributed to Sofa by reporting problems, 5 | suggesting improvements, submitting changes or asking hard question 6 | 7 | Some of these people are: 8 | 9 | * Andy WenkRefresh the page to see it.
'); 14 | } 15 | }); 16 | 17 | return false; 18 | }; 19 | 20 | 21 | -------------------------------------------------------------------------------- /templates/partials/scripts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/couchapp/_attachments/loader.js: -------------------------------------------------------------------------------- 1 | 2 | function couchapp_load(scripts) { 3 | for (var i=0; i < scripts.length; i++) { 4 | document.write(' 34 |