Permalink
Browse files

Squashing a bunch of reverts into a big mess of revert.

Revert "remove couchapprc backup file"

This reverts commit d64895d.

Revert "set text area rows to number of linebreaks, look ma no scroll bars"

This reverts commit 2ebbeb6.

Revert "small typo changes to wiki edit form"

This reverts commit 79fb96c.

Revert "styles for wiki markdown help"

This reverts commit 8791b8d.

Revert "fixed markup in admin header navi"

This reverts commit c4d96dd.

Revert "merge conflicts"

This reverts commit 1083407, reversing
changes made to d57b8e8.

Revert "new layout for wiki admin header"

This reverts commit d57b8e8.

Revert "partials for footer and header, basic layout, colors and typography"

This reverts commit decfc79.
  • Loading branch information...
1 parent d64895d commit 543a6edb453e11fc2942f314f00a3c921df9e398 @jchris jchris committed Aug 8, 2010
View
6 README.md
@@ -5,11 +5,7 @@ I was tired of all the complicated wikis that required some kind of application
To deploy this you need to point a DNS name at your Couch (or use `/etc/hosts`), and then configure your CouchDB to have a vhost like:
[vhosts]
- mydnsname.com = /pages/_design/pages/_rewrite
-
-You can also add this configuration option with curl:
-
- curl -X PUT http://localhost:5984/_config/vhosts/mydnsname.com -d '"/pages/_design/pages/_rewrite"'
+ mydnsname.com:5984 = /pages/_design/pages/_rewrite
This app requires that it be deployed to a database called `pages`. I'd like to make that more dynamic, but I haven't quite gotten around to it yet (maybe I never will, that's where *you* come in.)
View
141 _attachments/style/_main.css
@@ -1,141 +0,0 @@
-/* add styles here */
-
-body {
- font:1em Helvetica, sans-serif;
-}
-
-h1 {
- margin:0;
- font-weight:normal;
- font-size:2em;
-}
-
-#header {
- background:#f3f3f7;
- padding:8px;
-}
-
-#account {
- float:right;
-}
-
-#profile {
- border-bottom:1px solid #abc;
- border-top:1px solid #abc;
- background:#cde;
- margin-bottom:8px;
- float:right;
-}
-
-p.menu {
- margin:8px;
- float:right;
-}
-
-p.menu a {
- padding:4px;
- margin:2px;
- background:#EAF3FA;
- border-radius: 5px;
-}
-
-#tools {
- float:right;
- clear:right;
- border-bottom:1px solid #abc;
- border-top:1px solid #abc;
- background:#cde;
- padding:8px;
- max-width:35%;
-}
-
-#wiki {
- margin:8px;
-}
-
-#comments {
- margin:4px;
- padding:4px;
- background:#efeeef;
-}
-
-#comments p {
- margin-bottom:4px;
-}
-
-#comments li {
- margin:4px;
- padding:4px;
- background:#dfdcdf;
-}
-
-#comments ul li {
- list-style-type: none;
-}
-
-.date {
- font-size:80%
-}
-
-#files {
- border-bottom:1px solid #abc;
- border-top:1px solid #abc;
- background:#cde;
- padding:8px;
-}
-
-.markdown-help {
- float:left;
- margin-left:20px;
- width:37%;
-}
-
-.markdown-help pre {
- overflow-x:auto;
- background:#bbb;
- padding:4px;
-}
-
-.edit-form {
- float:left;
- width:60%;
-}
-
-.preview {
- background:#eee;
- padding:4px;
-}
-
-textarea[name=markdown] {
- width:100%;
-}
-
-form {
- padding:4px;
- margin:6px;
- background-color:#ddd;
-}
-
-div.avatar {
- padding:2px;
- padding-bottom:0;
- margin-right:4px;
- float:left;
- font-size:0.78em;
- text-align: center;
-}
-
-div.avatar .name {
- padding-top:2px;
-}
-
-div.avatar img {
- margin:0 auto;
- padding:0;
- width : 40px;
- height : 40px;
-}
-
-.clear {
- clear:both;
-}
View
0 _attachments/style/_base-min.css → _attachments/style/base-min.css
File renamed without changes.
View
277 _attachments/style/custom_new.css
@@ -1,277 +0,0 @@
-/* reset.css */
-html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
-article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;}
-body {line-height:1.5;}
-table {border-collapse:separate;border-spacing:0;}
-caption, th, td {text-align:left;font-weight:normal;}
-table, td, th {vertical-align:middle;}
-blockquote:before, blockquote:after, q:before, q:after {content:"";}
-blockquote, q {quotes:"" "";}
-a img {border:none;}
-
-/* typography.css */
-html {font-size:100.01%;}
-body {font-size:100%;font-family: Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
-}
-h1, h2, h3, h4, h5, h6 {font-weight:normal;}
-h1 {
- font-family: ChunkFive, "chunk-1", "chunk-2", Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
- font-size: 3em;
- line-height: 1;
- margin-bottom: 0.5em;
-}
-h2 {font-size:2em;margin-bottom:0.75em;}
-h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
-h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
-h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
-h6 {font-size:1em;font-weight:bold;}
-h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
-p {margin:0 0 1.5em;}
-p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
-p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
-blockquote {margin:1.5em; font-style:italic;}
-strong {font-weight:bold;}
-em, dfn {font-style:italic;}
-dfn {font-weight:bold;}
-sup, sub {line-height:0;}
-abbr, acronym {border-bottom:1px dotted #666;}
-address {margin:0 0 1.5em;font-style:italic;}
-del {color:#666;}
-pre {margin:1.5em 0;white-space:pre;}
-pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
-li ul, li ol {margin:0;}
-ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;}
-ul {list-style-type:disc;}
-ol {list-style-type:decimal;}
-dl {margin:0 0 1.5em 0;}
-dl dt {font-weight:bold;}
-dd {margin-left:1.5em;}
-
-/* tables */
-table {margin-bottom:1.4em;width:100%;}
-th {font-weight:bold;}
-thead th {background:#c3d9ff;}
-th, td, caption {padding:4px 10px 4px 5px;}
-tr.even td {background:#e5ecf9;}
-tfoot {font-style:italic;}
-caption {background:#eee;}
-
-
-/* colors */
-/*
-#EC4800 orange
-#101937 blueish black
-#F6F8F5 off white / beige background
-#C59F74 dark brown
-
-*/
-
-body {
- color: #101937;
- background: #F6F8F5;
-}
-
-.footer {
- background: #101937;
- color: #101937;
-}
-
-/* links */
-a,
-a:link,
-a:visited {
- color: #EC4800;
- text-decoration: underline;
-}
-
-a:hover,
-a:active,
-a:focus {
- color: #EC4800;
- text-decoration: underline;
-}
-
-.nav a,
-.nav :link,
-.nav :visited {
- color: #101937;
- text-decoration: none;
-}
-
-.nav a:hover,
-.nav a:active,
-.nav a:focus {
- color: #101937;
- text-decoration: underline;
-}
-
-/* lists */
-.inline_list {
- list-style: none;
- overflow: hidden;
-}
-
-.inline_list li {
- display: block;
- float: left;
- text-align: center;
- padding: 0;
- margin: 0;
-}
-
-/* helpers */
-.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
-.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
-.hide {display:none;}
-.quiet {color:#666;}
-.loud {color:#000;}
-.highlight {background:#ff0;}
-.added {background:#060;color:#fff;}
-.removed {background:#900;color:#fff;}
-.first {margin-left:0;padding-left:0;}
-.last {margin-right:0;padding-right:0;}
-.top {margin-top:0;padding-top:0;}
-.bottom {margin-bottom:0;padding-bottom:0;}
-
-/* forms */
-label {font-weight:bold;}
-fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
-legend {font-weight:bold;font-size:1.2em;}
-input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
-input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
-input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
-input.text, input.title {width:300px;padding:5px;}
-input.title {font-size:1.5em;}
-textarea {width:390px;height:250px;padding:5px;}
-input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
-form.inline {line-height:3;}
-form.inline p {margin-bottom:0;}
-.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
-.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
-.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
-.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
-.error a {color:#8a1f11;}
-.notice a {color:#514721;}
-.success a {color:#264409;}
-
-/* grid.css */
-/* layout */
-
-/*
-container = 984px = 61.5em
-grid unit = 60 px = 3.75em
-gutter = 24px = 1.5em
-2cols = 144px = 4.6341%
-6cols = 480px = 48.7805%
-4cols = 312px = 31.7073%
-3cols = 228px = 23.1707%
-8cols = 648px
-10cols = 720px = 73.17073%
-
-*/
-
-.container {
- margin: 0 auto;
- max-width: 960px;
- min-width: 360px;
- overflow: hidden;
-}
-.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
-.clearfix, .container {display:block;}
-.clear {clear:both;}
-
-.span2, .span3, .span4, .span6, .span8, .span10 {
- margin-right: 2.439%;
- float: left;
-}
-
-.span2 {
- width: 14.6341%;
-}
-.span3 {
- width: 23.1707%;
-}
-.span4 {
- width: 31.7073%;
-}
-.span6 {
- width: 48.7805%;
-}
-.span8 {
- width: 65.853658%;
-}
-.span10 {
- width: 73.17073%;
-}
-.last {
- margin-right: 0 !important;
-}
-
-.lyt_img {
- max-width: 100%;
-}
-
-
-
-/* custom.css */
-
-.header .container {
- overflow: hidden;
- border-bottom: 1px solid #C59F74;
-}
-
-.logo {
- width: 25%;
- padding: 1em 1px .5em 1px;
- float: left;
- margin: 0 0 0 0;
-}
-
-a.logo,
-a.logo:link,
-a.logo:visited {
- color: #101937;
- text-decoration: none;
-}
-
-a.logo:hover,
-a.logo:active,
-a.logo:focus {
- color: #101937;
- text-decoration: none;
-}
-
-.logo h1 {
- font-family: ChunkFive, "chunk-1", "chunk-2", Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
- margin-bottom: 0;
- line-height: 1;
-}
-
-.logo span {
- text-transform: uppercase;
- letter-spacing: .05em;
- font-weight: bold;
-}
-
-/* navi */
-.navbar {
- float: right;
- width: 70%;
-}
-
-.nav {
- float: right;
- margin: 2.5em 0 0 0;
- padding: 0;
-}
-
-.nav li a {
- display: block;
- margin: 0 0 0 1em;
- padding: .25em;
-}
-
-/* temp */
-#header {
- display: none;
-}
View
27 _attachments/style/main.css
@@ -7,15 +7,7 @@ body {
h1 {
margin:0;
font-weight:normal;
- font-size:2.2em;
-}
-
-h2 {
- font-size:1.7em;
-}
-
-a.missing {
- color : #d00;
+ font-size:2em;
}
#header {
@@ -57,19 +49,10 @@ p.menu a {
max-width:35%;
}
-#wiki .wiki {
- width:65%;
+#wiki {
margin:8px;
}
-#wiki pre {
- background:#ddd;
- padding:4px;
-}
-#wiki code {
- background:#ddd;
-}
-
#comments {
margin:4px;
padding:4px;
@@ -101,9 +84,9 @@ p.menu a {
padding:8px;
}
-.preview {
- float:right;
- font-size:80%;
+.markdown-help {
+ float:left;
+ margin-left:20px;
width:37%;
}
View
9 evently/comments/_init/mustache.html
@@ -5,12 +5,12 @@
<div class="avatar">
{{#gravatar_url}}<img src="{{gravatar_url}}"/>{{/gravatar_url}}
<div class="name">
- {{by}}
+ {{nickname}}
</div>
</div>
- <p>{{{comment}}}</p>
- <em><span class="date">{{at}}</span></em>
- <div class="clear"></div>
+
+ <p>{{{comment}}}</p>
+ <em><span class="date">{{at}}</span></em>
</li>
{{/comments}}
</ul>
@@ -21,4 +21,5 @@
<textarea name="comment" rows="4" cols="60"></textarea>
<input type="hidden" name="topic" value="{{topic}}">
<p><input type="submit" value="Save Comment"></p>
+ <p><em>* I'd be happy to make this Markdown instead if someone patches <a href="http://attacklab.net/showdown/">Showdown</a> to have a safe mode.</em></p>
</form>
View
5 evently/comments/_init/query.js
@@ -2,7 +2,8 @@ function() {
var docid = $$("#wiki").docid;
return {
view : "recent-comments",
- endkey : [docid, {}],
- startkey : [docid]
+ startkey : [docid, {}],
+ endkey : [docid],
+ descending : true
};
};
View
8 evently/profile/loggedOut/all.html
@@ -1,5 +1,3 @@
-<ul class="menu inline_list">
- <li><a href="/page/index">Home</a></li>
- <li><a href="/pages/recent">Changes</a></li>
- <li><a href="/pages/comments">Comments</a></li>
-</ul>
+<p class="menu">
+ <a href="/pages/recent">Recent Changes</a>
+</p>
View
10 evently/profile/loggedOut/mustache.html
@@ -1,7 +1,3 @@
-<div class="wiki_menu">
- <ul class="menu inline_list">
- <li><a href="/page/index">Home</a></li>
- <li><a href="/pages/recent">Changes</a></li>
- <li><a href="/pages/comments">Comments</a></li>
- </ul>
-</div>
+<p class="menu">
+ <a href="/pages/recent">Recent Changes</a>
+</p>
View
12 evently/profile/profileReady/all.html
@@ -1,10 +1,8 @@
<div class="avatar">
{{#gravatar_url}}<img src="{{gravatar_url}}"/>{{/gravatar_url}}
</div>
-
-<div class="wiki_menu">
- <ul class="menu inline_list">
- <li><a href="/page/index">Home</a></li>
- <li><a href="/pages/recent">Recent Changes</a></li>
- </ul>
-</div>
+<p class="menu">
+ <a href="/page/index">Home</a>
+ <a href="/pages/recent">Recent Changes</a>
+</p>
+<div style="clear:left;"></div>
View
19 evently/profile/profileReady/mustache.html
@@ -1,14 +1,11 @@
<div class="avatar">
{{#gravatar_url}}<img src="{{gravatar_url}}"/>{{/gravatar_url}}
</div>
-
-<div class="wiki_menu">
- <ul class="menu inline_list">
- <li><a href="#/edit">Edit</a></li>
- <li><a href="#/history">History</a></li>
- <li><a href="#/upload">Upload File</a></li>
- <li><a href="/page/index">Home</a></li>
- <li><a href="/pages/recent">Changes</a></li>
- <li><a href="/pages/comments">Comments</a></li>
- </ul>
-</div>
+<p class="menu">
+ <a href="#/edit">Edit</a>
+ <a href="#/history">History</a>
+ <a href="#/upload">Upload File</a>
+ <a href="/page/index">Home</a>
+ <a href="/pages/recent">Recent Changes</a>
+</p>
+<div style="clear:left;"></div>
View
29 evently/wiki/_init.js
@@ -1,29 +0,0 @@
-function() {
- var wiki = $(this), app = $$(wiki).app, m, pages = {}, keys = [];
- $("a",wiki).each(function() {
- m = this.href.match(/.*\/page\/([^\/]+)$/);
- if (m && m[1]) {
- pages[m[1]] = true;
- }
- });
- // unique keys will be faster on big pages
- for (m in pages) {
- keys.push(m);
- }
- if (keys.length > 0) {
- app.view("all-pages", {
- keys : keys,
- success : function(resp) {
- var i, p;
- for (i=0; i < resp.rows.length; i++) {
- p = resp.rows[i].key;
- delete pages[p];
- }
- for (m in pages) {
- $("a[href='"+m+"']", wiki).addClass("missing");
- }
- },
- error : function() {}
- });
- }
-};
View
37 evently/wiki/edit/mustache.html
@@ -1,24 +1,17 @@
-<form class="wiki_edit_form clearfix">
- <h2>Editing: <a href="/page/{{_id}}">/page/{{_id}}</a></h2>
-
- <div class="span6">
- <div class="edit-form">
- <p><label>Title: <input type="text" name="title" value="{{title}}"></label></p>
- <input type="hidden" name="_rev" value="{{_rev}}">
- <input type="hidden" name="_id" value="{{_id}}">
- <textarea name="markdown">{{markdown}}</textarea>
- <p><label>Optional description: <input size="60" type="text" name="note" value="{{note}}"></label>
- <input type="submit" value="Save Changes">
- </p>
- </div>
- {{>help}}
- </div>
-
- <div class="span6 last preview_container">
- <p class="preview_hint">Preview</p>
-
- <div class="preview"></div>
- </div>
-
+<form>
+<div class="edit-form">
+ <p>Editing: <a href="/page/{{_id}}">/page/{{_id}}</a></p>
+ <p><label>Title: <input type="text" name="title" value="{{title}}"></label></p>
+ <input type="hidden" name="_rev" value="{{_rev}}">
+ <input type="hidden" name="_id" value="{{_id}}">
+ <textarea name="markdown" rows="30" cols="70">{{markdown}}</textarea>
+ <p><label>Optional description: <input size="60" type="text" name="note" value="{{note}}"></label>
+ <input type="submit" value="Save Changes">
+ <input type="button" name="preview" value="Preview">
+ </p>
+ <div class="preview"></div>
+</div>
+ {{>help}}
+<div class="clear"></div>
</form>
View
47 evently/wiki/edit/partials/help.html
@@ -6,50 +6,37 @@
## Header 2
### Header 3
#### Header 4
-##### Header 5
-(looks like header 4 in most browsers)
+##### Header 5 (looks like header 4 in most browsers)
-This is a paragraph,
-which is text surrounded
-by whitespace. Paragraphs
-can be on one line (or many),
-and can drone on for hours.
+This is a paragraph, which is text surrounded by whitespace. Paragraphs
+can be on one line (or many), and can drone on for hours.
-Here is a Markdown link to
-[Apache CouchDB](http://couchdb.apache.org),
+Here is a Markdown link to [Apache CouchDB](http://couchdb.apache.org),
and a literal &lt;http://link.com/&gt;.
-You can link to other pages
-in the wiki like this:
-[another page in the wiki](another-page)
+You can link to other pages in the wiki like
+this: [another page in the wiki](another-page)
-**note the wiki page id is
-just the thing in the parentheses**
+**note the wiki page id is just the thing in the parentheses**
Here's a link to [the wiki home page](index).
-Now some inline markup like
-_italics_
-**bold**
-`code()`
+Now some inline markup like _italics_, **bold**, and `code()`.
### Images are easy
-![picture alt](/_utils/image/logo.png "Title")
+![picture alt](/_utils/image/logo.png "Title is optional")
-> Blockquotes are like quoted
-> text in email replies
+> Blockquotes are like quoted text in email replies
>> And, they can be nested
-Another paragraph, this one
-is longer: Lorem ipsum dolor
-sit amet, consectetur adipisicing
-elit, sed do eiusmod tempor
-incididunt ut labore et dolore
-magna aliqua. Ut enim ad minim
-veniam, quis nostrud exercitation
-ullamco laboris nisi ut aliquip
-ex ea commodo consequat.
+Another paragraph, this one is longer: Lorem ipsum dolor sit amet, consectetur
+adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
+aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
+ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
+voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
+occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
+id est laborum.
* Bullet lists are easy too
- Another one
View
7 evently/wiki/edit/selectors/input[name=preview]/click.js
@@ -0,0 +1,7 @@
+function() {
+ var form = $(this).parents("form"), app = $$(form).app,
+ f = form.serializeObject(),
+ markdown = app.require("vendor/couchapp/lib/markdown");
+ $.log(f)
+ $(".preview", form).html(markdown.encode(f.markdown));
+};
View
8 evently/wiki/edit/selectors/textarea[name=markdown]/_init.js
@@ -1,8 +0,0 @@
-function() {
- var ta = $(this);
- // set text area rows to number of linebreaks, look ma no scroll bars
- ta.attr("rows", ta.val().split("\n").length);
- setTimeout(function() {
- ta.trigger("keyup");
- },50);
-};
View
1 evently/wiki/edit/selectors/textarea[name=markdown]/_init.txt
@@ -0,0 +1 @@
+keyup
View
16 evently/wiki/edit/selectors/textarea[name=markdown]/keyup.js
@@ -1,15 +1,7 @@
function() {
- var form = $(this).parents("form"), prev = $(".preview", form), app = $$(this).app,
+ var form = $(this).parents("form"), app = $$(this).app,
f = form.serializeObject(),
markdown = app.require("vendor/couchapp/lib/markdown");
- if ($$(prev).markdown != f.markdown) {
- $$(prev).markdown = f.markdown;
- $(prev).html(markdown.encode(f.markdown));
- if (!$$(prev).timeout) {
- $$(prev).timeout = setTimeout(function() {
- $("#wiki").trigger("_init");
- $$(prev).timeout = false;
- }, 1100);
- }
- }
-}
+ $.log(f)
+ $(".preview", form).html(markdown.encode(f.markdown));
+};
View
18 lists/comments.js
@@ -1,18 +0,0 @@
-function() {
- var row, ddoc = this,
- mustache = require("vendor/couchapp/lib/mustache"),
- markdown = require("vendor/couchapp/lib/markdown"),
- data = {
- title : "All Comments",
- site_title : this.couchapp.name,
- path : "/pages/comments",
- comments : []
- };
- provides("html", function() {
- while (row = getRow()) {
- log(row);
- data.comments.push(row.value)
- }
- send(mustache.to_html(ddoc.templates.comments, data, ddoc.templates.partials));
- });
-};
View
9 rewrites.json
@@ -38,14 +38,7 @@
}
},
{
- "from" : "/pages/comments",
- "to" : "_list/comments/all-comments",
- "query" : {
- "descending" : true
- }
- },
- {
"from" : "pages/*",
"to" : "../../*"
}
-]
+]
View
29 templates/comments.html
@@ -1,29 +0,0 @@
-{{>header}}
-<ul>
- {{#comments}}
- <li>
- <span class="date">{{at}}</span>:
- {{#by}}{{name}} {{/by}}
- {{^by}}Unknown {{/by}}
- (<a href="/page/{{topic}}">{{topic}}</a>)
- <span class="idontknow">{{comment}}</span>
- </li>
- {{/comments}}
-</ul>
- </body>
- <script src="/script/myloader.js"></script>
- <script src="/_utils/script/base64.js"></script>
- <script type="text/javascript" charset="utf-8">
- $.couch.app(function(app) {
- $(".date").prettyDate();
- $("#account").evently("account", app);
- var pr = app.ddoc.evently.profile.profileReady;
- pr.mustache = pr.all; // mod the template for this page
- $("#profile").evently("profile", app);
- $.evently.connect("#account","#profile", ["loggedIn","loggedOut"]);
- },{
- db : "pages",
- design : "pages"
- });
- </script>
-</html>
View
13 templates/page.html
@@ -1,8 +1,6 @@
{{>header}}
-
- <div id="wiki">
- <div class="wiki">{{{body}}}</div>
- </div>
+ <div id="tools"></div>
+ <div id="wiki">{{{body}}}</div>
<div id="comments"></div>
{{#has_atts}}
<div id="files">
@@ -13,9 +11,8 @@
{{/atts}}
</ul>
</div>
-
{{/has_atts}}
-
+ </body>
<script src="/script/myloader.js"></script>
<script src="/_utils/script/base64.js"></script>
<script src="/_utils/script/jquery.form.js"></script>
@@ -35,6 +32,4 @@
design : "pages"
});
</script>
-
-{{>footer}}
-
+</html>
View
7 templates/pages.html
@@ -4,8 +4,7 @@
<li><a href="/page/{{id}}">{{title}}</a> by {{by}} <span class="date">{{at}}</span></li>
{{/pages}}
</ul>
-
-
+ </body>
<script src="/script/myloader.js"></script>
<script src="/_utils/script/base64.js"></script>
<script type="text/javascript" charset="utf-8">
@@ -21,6 +20,4 @@
design : "pages"
});
</script>
-
-{{>footer}}
-
+</html>
View
68 templates/partials/footer.html
@@ -1,68 +0,0 @@
- </div>
- <!-- end wikicontainer -->
-
- </div>
- <!-- end container -->
-
- </div>
- </div>
-
-
- <!-- start footer -->
- <div class="footer">
- <div class="container">
- <div class="span2">
- <h4>Couchio</h4>
- <ul>
- <!--<li><a href="/about" title="About Couchio">About</a></li>-->
- <li><a href="/about" title="Team">Team</a></li>
- <li><a href="/contact" title="Contact">Contact</a></li>
- </ul>
- </div>
-
- <div class="span2">
- <h4>Dev Room</h4>
- <ul>
- <li><a href="/get" title="Try CouchDB Now">Try CouchDB</a></li>
- <li><a href="/case-studies" title="Case Studies">Case Studies</a></li>
- <!--<li><a href="" title="Case Studies">API Docs</a></li>
- <li><a href="" title="Case Studies">Videos</a></li>-->
- <li><a href="http://forums.couch.io/" title="Forums">Forums</a></li>
- </ul>
- </div>
-
- <div class="span2">
- <h4>Open Source</h4>
- <ul>
- <!--<li><a href="http://couchapp.org/" title="CouchApp.org">CouchApp.org</a></li>-->
- <li><a href="http://couchdb.apache.org/" title="Apache CouchDB">Apache CouchDB</a></li>
- </ul>
- </div>
-
- <div class="span2">
- <h4>News</h4>
- <ul>
- <!--<li><a href="" title="Newsroom">Newsroom</a></li>-->
- <li><a href="http://blog.couch.io/" title="Couchio Blog">Blog</a></li>
- <li><a href="http://www.twitter.com/couchio/" title="Couchio on Twitter">Twitter</a></li>
- </ul>
- </div>
-
- <div class="span4 last">
-
- <h4>Legal</h4>
- <ul>
- <li><a href="tos" title="Terms of Service">Terms of Service</a></li>
- <li><a href="privacy" title="Privacy Policy">Privacy Policy</a></li>
- </ul>
-
- </div>
-
- <p class="copyright center">&copy; 2010 Couchio, a Relaxed Company</p>
- </div>
-
- </div>
- <!-- end footer -->
-
- </body>
-</html>
View
58 templates/partials/header.html
@@ -2,56 +2,12 @@
<html>
<head>
<title>{{title}} - {{site_title}}</title>
-
- <script type="text/javascript" src="http://use.typekit.com/pmv7xgm.js"></script>
- <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
-
- <!--link rel="stylesheet" href="/style/custom_new.css" type="text/css" /-->
-
- <link rel="stylesheet" href="/stylesheets/screen.css" type="text/css" media="screen, projection" />
- <link rel="stylesheet" href="/stylesheets/print.css" type="text/css" media="print" />
- <!--[if lt IE 8]>
- <link rel="stylesheet" href="/stylesheets/ie.css" type="text/css" media="screen, projection" />
- <![endif]-->
- <link rel="shortcut icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/style/base-min.css" type="text/css">
+ <link rel="stylesheet" href="/style/main.css" type="text/css">
</head>
<body>
- <div class="wrap">
- <div class="wrap_inner">
- <div id="header">
- <div class="container">
- <div id="account"></div>
- <h1><strong>{{site_title}}:</strong> <a href="{{path}}">{{title}}</a></h1>
- </div>
- </div>
- <!-- start header -->
-
- <div class="header">
- <div class="container">
- <a href="/" title="Home" class="logo">
- <h1>CouchOne</h1>
- <span>Your data. Anywhere.</span>
- </a>
-
- <div class="navbar">
- <ul class="nav inline_list">
- <li class="{{#dev_active}}active{{/dev_active}}"><a href="/dev" title="Developer Resources &ndash; Community, Code, Docs">Dev Room</a></li>
- <li class="{{#support_active}}active{{/support_active}}"><a href="/support" title="Support and Training &ndash; Commercial Support &amp; Training">Support Center</a></li>
- <li class="{{#case_active}}active{{/case_active}}"><a href="/case-studies" title="Production Deployments &ndash; Reliable in Production">Case Studies</a></li>
- <li class="{{#get_active}}active{{/get_active}}"><a href="/get" title="Try CouchDB Now &ndash; Hosting &amp; Downloads">Try Now</a></li>
- </ul>
- </div>
-
- </div>
- </div>
- <!-- end header -->
-
-
- <!-- container -->
- <div class="container">
-
- <div id="profile"></div>
- <div id="tools"></div>
-
- <!-- wiki container -->
- <div class="wiki_container">
+ <div id="header">
+ <div id="account"></div>
+ <h1><strong>{{site_title}}:</strong> <a href="{{path}}">{{title}}</a></h1>
+ </div>
+ <div id="profile"></div>
View
29 validate_doc_update.js
@@ -1,29 +0,0 @@
-function (newDoc, oldDoc, userCtx, secObj) {
- var v = require("vendor/couchapp/lib/validate").init(newDoc, oldDoc, userCtx, secObj);
-
- if (v.isAdmin()) {
- return true; // admin can do anything
- }
-
- if (!userCtx.name) {
- // this could be configurable based on secObj
- v.unauthorized("please login to make changes");
- }
-
- // only admin may delete
- if (newDoc._deleted) {
- v.unauthorized("only admin may delete docs");
- }
-
- // attached versions must be preserved
- if (oldDoc && oldDoc._attachments) {
- for (var n in oldDoc._attachments) {
- if (n.indexOf("rev") == 0) {
- if (!(newDoc._attachments && newDoc._attachments[n]
- && newDoc._attachments[n].stub === true)) {
- v.forbidden("old versions may not be deleted")
- }
- }
- }
- }
-}
View
53 vendor/couchapp/lib/validate.js
@@ -1,53 +0,0 @@
-// a library for validations
-// over time we expect to extract more helpers and move them here.
-exports.init = function(newDoc, oldDoc, userCtx, secObj) {
- var v = {};
-
- v.forbidden = function(message) {
- throw({forbidden : message});
- };
-
- v.unauthorized = function(message) {
- throw({unauthorized : message});
- };
-
- v.assert = function(should, message) {
- if (!should) v.forbidden(message);
- }
-
- v.isAdmin = function() {
- return userCtx.roles.indexOf('_admin') != -1
- };
-
- v.isRole = function(role) {
- return userCtx.roles.indexOf(role) != -1
- };
-
- v.require = function() {
- for (var i=0; i < arguments.length; i++) {
- var field = arguments[i];
- message = "The '"+field+"' field is required.";
- if (typeof newDoc[field] == "undefined") v.forbidden(message);
- };
- };
-
- v.unchanged = function(field) {
- if (oldDoc && oldDoc[field] != newDoc[field])
- v.forbidden("You may not change the '"+field+"' field.");
- };
-
- v.matches = function(field, regex, message) {
- if (!newDoc[field].match(regex)) {
- message = message || "Format of '"+field+"' field is invalid.";
- v.forbidden(message);
- }
- };
-
- // this ensures that the date will be UTC, parseable, and collate correctly
- v.dateFormat = function(field) {
- message = "Sorry, '"+field+"' is not a valid date format. Try: 2010-02-24T17:00:03.432Z";
- v.matches(field, /\d{4}\-\d{2}\-\d{2}T\d{2}:\d{2}:\d{2}(\.\d*)?Z/, message);
- }
-
- return v;
-};
View
5 views/all-comments/map.js
@@ -1,5 +0,0 @@
-function(doc) {
- if (doc.type == "comment" && doc.comment) {
- emit(doc.at, doc);
- }
-};
View
5 views/all-pages/map.js
@@ -1,5 +0,0 @@
-function(doc) {
- if (doc.title && doc.markdown) {
- emit(doc._id, 1);
- }
-};

0 comments on commit 543a6ed

Please sign in to comment.