Permalink
Browse files

Merge branch 'gh-pages'

  • Loading branch information...
Michael Aufreiter
Michael Aufreiter committed Jul 16, 2012
2 parents 2fcc3d5 + ba9191e commit 4c4bfa3df6ca099289350bd557b6019b349f41c9
View
@@ -153,7 +153,7 @@ function loadPosts(user, repo, branch, path, cb) {
var repo = getRepo(user, repo);
function getDefaultBranch(cb) {
- repo.show(function(err, repo) {
+ repo.show(function(err, repo) {
cb(null, repo.master_branch);
});
}
@@ -228,7 +228,7 @@ function loadPosts(user, repo, branch, path, cb) {
// List all postings for a given repository
// Looks into _posts/blog
-function saveFile(user, repo, branch, path, metadata, content, message, cb) {
+function saveFile(user, repo, branch, path, metadata, content, message, cb) {
var repo = getRepo(user, repo);
function serialize() {
@@ -245,7 +245,7 @@ function saveFile(user, repo, branch, path, metadata, content, message, cb) {
// Delete Post
// -------
-function deletePost(user, repo, branch, path, file, cb) {
+function deletePost(user, repo, branch, path, file, cb) {
var repo = getRepo(user, repo);
repo.remove(branch, _.filepath(path, file), cb);
}
@@ -254,7 +254,7 @@ function deletePost(user, repo, branch, path, file, cb) {
// Move Post
// -------
-function movePost(user, repo, branch, path, newPath, cb) {
+function movePost(user, repo, branch, path, newPath, cb) {
var repo = getRepo(user, repo);
repo.move(branch, path, newPath, cb);
}
View
@@ -1,5 +1,5 @@
---
-layout: default
+layout: static
---
<div class="about post-content">
View
@@ -1,5 +1,5 @@
---
-layout: default
+layout: static
---
<div class="help-article">
View
@@ -10,6 +10,26 @@
<link rel='stylesheet' href='/{{site.baseurl}}app.css'>
{% include templates.html %}
<script src='/{{site.baseurl}}boot.js'></script>
+ <script>
+ (function(config, models, views, routers, utils, templates) {
+ $(function() {
+
+ if (authenticate()) {
+ loadApplication(function(err, data) {
+ // Start the engines
+ window.app.instance = new views.Application({ el: '#container', model: data }).render();
+ if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
+
+ // Initialize router
+ window.router = new routers.Application({});
+
+ // Start responding to routes
+ Backbone.history.start();
+ });
+ }
+ });
+ }).apply(this, window.args);
+ </script>
</head>
<body>
<div id='container'>
View
@@ -1,5 +1,5 @@
---
-layout: default
+layout: static
---
<div class="help post-content">
View
@@ -1,5 +1,5 @@
---
-layout: default
+layout: static
---
<h1>{{ page.title }}</h1>
<p class="meta"> {{ page.date | date: "%B %d, %Y" }} </p>
View
@@ -0,0 +1,43 @@
+---
+---
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset='UTF-8'/>
+ <title>Prose &middot; A Content Editor for GitHub</title>
+ <link rel='shortcut icon' href='/{{site.baseurl}}images/favicon.ico' type='image/x-icon' />
+ <link rel='stylesheet' href='/{{site.baseurl}}fonts/open-sans.css'>
+ <link rel='stylesheet' href='/{{site.baseurl}}app.css'>
+ {% include templates.html %}
+ <script src='/{{site.baseurl}}boot.js'></script>
+ <script>
+ (function(config, models, views, routers, utils, templates) {
+ $(function() {
+ if (authenticate()) {
+ loadApplication(function(err, data) {
+
+ // Start the engines
+ window.app.instance = new views.Application({ el: '#container', model: data }).render();
+ if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
+
+ });
+ }
+ });
+ }).apply(this, window.args);
+ </script>
+</head>
+<body>
+ <div id='container'>
+ <div id='main'>{{content}}</div>
+ </div>
+
+ <div id='footer'>
+ <div class="footer-content">
+ <a class='help' href="/{{site.baseurl}}help.html">Help</a><a class='about' href="/{{site.baseurl}}about.html">About</a>
+ <div class="fr brand">
+ <a href="/{{site.baseurl}}#prose/prose/blob/gh-pages/README.md">Prose 0.2.0</a>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
@@ -15,11 +15,11 @@ Here's what you need to get started.
## Create a new GitHub Repository
-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.
+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.
![Create a repository on GitHub](http://prose.io/images/screenshots/prose-for-writers/create-repository.png)
-Keep in mind, this is a plain old GitHub repository, there's no need for setting up Jekyll.
+Keep in mind, this is a plain old GitHub repository, no Jekyll involved here.
## Start writing
@@ -31,7 +31,7 @@ Open your fresh repository in prose and start writing your first document. To do
## Remember every change
-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 ...
+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 ...
![Revisions](http://prose.io/images/screenshots/prose-for-writers/revisions.png)
View
24 boot.js
@@ -44,7 +44,6 @@ window.app = {
window.args = _(window.app).toArray();
-
{% include util.js %}
{% include model.js %}
{% include routers/application.js %}
@@ -56,7 +55,6 @@ window.args = _(window.app).toArray();
{% include views/posts.js %}
{% include views/post.js %}
-
// Prevent exit when there are unsaved changes
window.onbeforeunload = function() {
if (window.app.instance.mainView && window.app.instance.mainView.dirty)
@@ -70,25 +68,3 @@ function confirmExit() {
}
-(function(config, models, views, routers, utils, templates) {
- $(function() {
-
- if (authenticate()) {
- loadApplication(function(err, data) {
-
- // Start the engines
- window.app.instance = new views.Application({ el: '#container', model: data }).render();
- if (err) return app.instance.notify('error', 'Error while loading data from Github. This might be a temporary issue. Please try again later.');
-
- // TODO: this is silly.
- if (window.location.href.match(/\.html$/)) return;
-
- // Initialize router
- window.router = new routers.Application({});
-
- // Start responding to routes
- Backbone.history.start();
- });
- }
- });
-}).apply(this, window.args);

0 comments on commit 4c4bfa3

Please sign in to comment.