Skip to content

Commit 4c4bfa3

Browse files
committed
Merge branch 'gh-pages'
2 parents 2fcc3d5 + ba9191e commit 4c4bfa3

File tree

9 files changed

+74
-35
lines changed

9 files changed

+74
-35
lines changed

_includes/model.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function loadPosts(user, repo, branch, path, cb) {
153153
var repo = getRepo(user, repo);
154154

155155
function getDefaultBranch(cb) {
156-
repo.show(function(err, repo) {
156+
repo.show(function(err, repo) {
157157
cb(null, repo.master_branch);
158158
});
159159
}
@@ -228,7 +228,7 @@ function loadPosts(user, repo, branch, path, cb) {
228228
// List all postings for a given repository
229229
// Looks into _posts/blog
230230

231-
function saveFile(user, repo, branch, path, metadata, content, message, cb) {
231+
function saveFile(user, repo, branch, path, metadata, content, message, cb) {
232232

233233
var repo = getRepo(user, repo);
234234
function serialize() {
@@ -245,7 +245,7 @@ function saveFile(user, repo, branch, path, metadata, content, message, cb) {
245245
// Delete Post
246246
// -------
247247

248-
function deletePost(user, repo, branch, path, file, cb) {
248+
function deletePost(user, repo, branch, path, file, cb) {
249249
var repo = getRepo(user, repo);
250250
repo.remove(branch, _.filepath(path, file), cb);
251251
}
@@ -254,7 +254,7 @@ function deletePost(user, repo, branch, path, file, cb) {
254254
// Move Post
255255
// -------
256256

257-
function movePost(user, repo, branch, path, newPath, cb) {
257+
function movePost(user, repo, branch, path, newPath, cb) {
258258
var repo = getRepo(user, repo);
259259
repo.move(branch, path, newPath, cb);
260260
}

_layouts/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default
2+
layout: static
33
---
44

55
<div class="about post-content">

_layouts/article.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default
2+
layout: static
33
---
44

55
<div class="help-article">

_layouts/default.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@
1010
<link rel='stylesheet' href='/{{site.baseurl}}app.css'>
1111
{% include templates.html %}
1212
<script src='/{{site.baseurl}}boot.js'></script>
13+
<script>
14+
(function(config, models, views, routers, utils, templates) {
15+
$(function() {
16+
17+
if (authenticate()) {
18+
loadApplication(function(err, data) {
19+
// Start the engines
20+
window.app.instance = new views.Application({ el: '#container', model: data }).render();
21+
if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
22+
23+
// Initialize router
24+
window.router = new routers.Application({});
25+
26+
// Start responding to routes
27+
Backbone.history.start();
28+
});
29+
}
30+
});
31+
}).apply(this, window.args);
32+
</script>
1333
</head>
1434
<body>
1535
<div id='container'>

_layouts/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default
2+
layout: static
33
---
44

55
<div class="help post-content">

_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default
2+
layout: static
33
---
44
<h1>{{ page.title }}</h1>
55
<p class="meta"> {{ page.date | date: "%B %d, %Y" }} </p>

_layouts/static.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
---
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<meta charset='UTF-8'/>
7+
<title>Prose &middot; A Content Editor for GitHub</title>
8+
<link rel='shortcut icon' href='/{{site.baseurl}}images/favicon.ico' type='image/x-icon' />
9+
<link rel='stylesheet' href='/{{site.baseurl}}fonts/open-sans.css'>
10+
<link rel='stylesheet' href='/{{site.baseurl}}app.css'>
11+
{% include templates.html %}
12+
<script src='/{{site.baseurl}}boot.js'></script>
13+
<script>
14+
(function(config, models, views, routers, utils, templates) {
15+
$(function() {
16+
if (authenticate()) {
17+
loadApplication(function(err, data) {
18+
19+
// Start the engines
20+
window.app.instance = new views.Application({ el: '#container', model: data }).render();
21+
if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
22+
23+
});
24+
}
25+
});
26+
}).apply(this, window.args);
27+
</script>
28+
</head>
29+
<body>
30+
<div id='container'>
31+
<div id='main'>{{content}}</div>
32+
</div>
33+
34+
<div id='footer'>
35+
<div class="footer-content">
36+
<a class='help' href="/{{site.baseurl}}help.html">Help</a><a class='about' href="/{{site.baseurl}}about.html">About</a>
37+
<div class="fr brand">
38+
<a href="/{{site.baseurl}}#prose/prose/blob/gh-pages/README.md">Prose 0.2.0</a>
39+
</div>
40+
</div>
41+
</div>
42+
</body>
43+
</html>

_posts/help/2012-06-20-prose-for-writers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Here's what you need to get started.
1515

1616
## Create a new GitHub Repository
1717

18-
This will be the home of your documents. Make sure there is at least one branch available. The easiest way to do it, is by initializing a new GitHub Repository and initialize it with an empty README.
18+
This will be the home of your documents. Make sure there is at least one branch available. The easiest way to do it, is by creating a new GitHub Repository and initializing it with an empty README.
1919

2020
![Create a repository on GitHub](http://prose.io/images/screenshots/prose-for-writers/create-repository.png)
2121

22-
Keep in mind, this is a plain old GitHub repository, there's no need for setting up Jekyll.
22+
Keep in mind, this is a plain old GitHub repository, no Jekyll involved here.
2323

2424

2525
## Start writing
@@ -31,7 +31,7 @@ Open your fresh repository in prose and start writing your first document. To do
3131

3232
## Remember every change
3333

34-
Only changes are stored on every save. Thanks to git you can access older versions of your document using [GitHub](https://github.com/prose/documents/commits/master). You can access the full commit history ...
34+
A full changeset is stored on every save. Thanks to git you can access older versions of your document using [GitHub](https://github.com/prose/documents/commits/master). You can access the full commit history ...
3535

3636
![Revisions](http://prose.io/images/screenshots/prose-for-writers/revisions.png)
3737

boot.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ window.app = {
4444

4545
window.args = _(window.app).toArray();
4646

47-
4847
{% include util.js %}
4948
{% include model.js %}
5049
{% include routers/application.js %}
@@ -56,7 +55,6 @@ window.args = _(window.app).toArray();
5655
{% include views/posts.js %}
5756
{% include views/post.js %}
5857

59-
6058
// Prevent exit when there are unsaved changes
6159
window.onbeforeunload = function() {
6260
if (window.app.instance.mainView && window.app.instance.mainView.dirty)
@@ -70,25 +68,3 @@ function confirmExit() {
7068
}
7169

7270

73-
(function(config, models, views, routers, utils, templates) {
74-
$(function() {
75-
76-
if (authenticate()) {
77-
loadApplication(function(err, data) {
78-
79-
// Start the engines
80-
window.app.instance = new views.Application({ el: '#container', model: data }).render();
81-
if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
82-
83-
// TODO: this is silly.
84-
if (window.location.href.match(/\.html$/)) return;
85-
86-
// Initialize router
87-
window.router = new routers.Application({});
88-
89-
// Start responding to routes
90-
Backbone.history.start();
91-
});
92-
}
93-
});
94-
}).apply(this, window.args);

0 commit comments

Comments
 (0)