mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge changes from upstream
This commit is contained in:
commit
05ca58951b
8 changed files with 56 additions and 23 deletions
23
Gruntfile.js
23
Gruntfile.js
|
@ -39,12 +39,18 @@
|
|||
},
|
||||
|
||||
// Compile all the SASS!
|
||||
compass: {
|
||||
options: {
|
||||
config: "config.rb"
|
||||
},
|
||||
// No need for config, but separated for future options
|
||||
admin: {}
|
||||
sass: {
|
||||
admin: {
|
||||
files: {
|
||||
'core/admin/assets/css/screen.css': 'core/admin/assets/sass/screen.scss'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
shell: {
|
||||
bourbon: {
|
||||
command: 'bourbon install --path core/admin/assets/sass/modules/'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -53,11 +59,12 @@
|
|||
grunt.loadNpmTasks("grunt-jslint");
|
||||
grunt.loadNpmTasks("grunt-contrib-nodeunit");
|
||||
grunt.loadNpmTasks("grunt-mocha-test");
|
||||
grunt.loadNpmTasks("grunt-contrib-compass");
|
||||
grunt.loadNpmTasks("grunt-contrib-sass");
|
||||
grunt.loadNpmTasks("grunt-shell");
|
||||
|
||||
// Prepare the project for development
|
||||
// TODO: Git submodule init/update (https://github.com/jaubourg/grunt-update-submodules)?
|
||||
grunt.registerTask("init", ["compass:admin"]);
|
||||
grunt.registerTask("init", ["shell:bourbon", "sass:admin"]);
|
||||
|
||||
// Run API tests only
|
||||
grunt.registerTask("test-api", ["nodeunit:api", "mochaTest:all"]);
|
||||
|
|
18
README.md
18
README.md
|
@ -1,4 +1,4 @@
|
|||
# [Ghost v0.1](https://github.com/TryGhost/Ghost) [![Build Status](https://magnum.travis-ci.com/TryGhost/Ghost.png?token=hMRLUurj2P3wzBdscyQs&branch=master)](https://magnum.travis-ci.com/TryGhost/Ghost)
|
||||
# [Ghost v0.1.1](https://github.com/TryGhost/Ghost) [![Build Status](https://magnum.travis-ci.com/TryGhost/Ghost.png?token=hMRLUurj2P3wzBdscyQs&branch=master)](https://magnum.travis-ci.com/TryGhost/Ghost)
|
||||
|
||||
Ghost is a free, open, simple blogging platform that's available to anyone who wants to use it. Created and maintained by [John O'Nolan](http://twitter.com/JohnONolan) + [Hannah Wolfe](http://twitter.com/ErisDS) + an amazing group of [contributors](https://github.com/TryGhost/Ghost/pulse).
|
||||
|
||||
|
@ -23,7 +23,8 @@ The top priorities right now are:
|
|||
1. Clone the git repo
|
||||
1. cd into the project folder and run `npm install`.
|
||||
* If the install fails with errors to do with "node-gyp rebuild", follow the Sqlite3 install instructions
|
||||
1. cd into /core/admin/assets and run `compass compile --css-dir=css`
|
||||
* Usually if you're within vagrant, and have installed the guest plugins and updated that, this will not happen
|
||||
1. run `grunt init` from the root. (make sure you have Casper 1.1 installed though, or have installed `bourbon` on your vagrant. See Ghost-Vagrant for that)
|
||||
|
||||
Frontend can be located at [localhost:3333](localhost:3333), Admin is at [localhost:3333/ghost](localhost:3333/ghost)
|
||||
|
||||
|
@ -56,7 +57,7 @@ If you have a bug or feature request, please [open a new issue](https://github.c
|
|||
|
||||
## Contributions
|
||||
|
||||
Pleas submit pull requests in order to contribute back to Ghost - referencing any relevant or open issues in the bug tracker.
|
||||
Pleas submit pull requests in order to contribute back to Ghost - referencing any relevant or open issues in the bug tracker.
|
||||
|
||||
All code should conform, strictly, to the Ghost project [Code Standards](https://github.com/TryGhost/Ghost/wiki/Code-standards).
|
||||
|
||||
|
@ -74,10 +75,19 @@ Keep track of Ghost development and Ghost community activity.
|
|||
|
||||
A SASS compiler is required to work with the CSS in this project.
|
||||
|
||||
Run `compass compile --css-dir=css` from /core/admin/assets.
|
||||
With bourbon, all you have to do is run `grunt init` from the root of Ghost, which will compile the admin section. For everything else, use `sass <sourcefile> <targetfile>`.
|
||||
|
||||
We also recommend [CodeKit](http://incident57.com/codekit/) (Paid/Mac) & [Scout](http://mhs.github.io/scout-app/) (Free/Mac/PC).
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### 0.1.1
|
||||
|
||||
* Added bourbon awesomeness, and various fixes as per commit history.
|
||||
* Started writing changelogs
|
||||
* Removed compass dependencies, and made grunt work again. See Installation section.
|
||||
|
||||
## Copyright & License
|
||||
|
||||
Copyright (C) 2013 Ghost
|
||||
|
|
|
@ -22,6 +22,21 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('.post-controls .delete').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var postID = $('.content-list-content').find('li.active').data('id');
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: '/api/v0.1/posts/' + postID,
|
||||
success: function (res) {
|
||||
window.location.reload();
|
||||
},
|
||||
error: function () {
|
||||
window.alert('Delete failed.');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}(jQuery));
|
|
@ -3,7 +3,7 @@
|
|||
* common property values throughout our styles. Don't overdo it.
|
||||
*
|
||||
* Table of Contents:
|
||||
*
|
||||
*
|
||||
* Compass Shit
|
||||
* Compass Plugins
|
||||
* Colors
|
||||
|
@ -19,7 +19,7 @@
|
|||
============================================================================= */
|
||||
|
||||
// Bourbon - http://bourbon.io/
|
||||
@import "bourbon";
|
||||
@import "bourbon/bourbon";
|
||||
$rounded: 2px;
|
||||
$shadow: rgba(0,0,0,0.05) 0 1px 5px;
|
||||
$default-transition-duration: 0.3s;
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
<a class="post-edit" href="#"><span class="hidden">Edit Post</span></a>
|
||||
<a class="post-settings" href="#" data-toggle=".menu-drop-right"><span class="hidden">Post Settings</span></a>
|
||||
<ul class="menu-drop-right">
|
||||
<li><a href="#">URL</a></li>
|
||||
<li><a href="#">Something</a></li>
|
||||
<li><a href="#">Delete</a></li>
|
||||
<li><a href="#" class="url">URL</a></li>
|
||||
<li><a href="#" class="something">Something</a></li>
|
||||
<li><a href="#" class="delete">Delete</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</header>
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
},
|
||||
// takes an identifier (id or slug?)
|
||||
// returns a json response with the id of the deleted post
|
||||
destroy: function (id) {
|
||||
return when.call(ghost.dataProvider().posts.destroy, id);
|
||||
destroy: function (args) {
|
||||
return when.call(ghost.dataProvider().posts.destroy, args.id);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
* @param _identifier
|
||||
* @param callback
|
||||
*/
|
||||
BookshelfBase.prototype.destroy = BookshelfBase.prototype.delete = function (_identifier, callback) {
|
||||
BookshelfBase.prototype.destroy = BookshelfBase.prototype['delete'] = function (_identifier, callback) {
|
||||
this.model.forge({id: _identifier}).destroy().then(function () {
|
||||
callback(null);
|
||||
});
|
||||
|
|
|
@ -22,12 +22,13 @@
|
|||
"bcrypt": "~0.7.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.x",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-nodeunit": "0.1.x",
|
||||
"grunt-contrib-compass": "0.2.x",
|
||||
"nodeunit": "0.8.x",
|
||||
"grunt-jslint": "0.2.x",
|
||||
"should": "~1.2.2",
|
||||
"grunt-mocha-test": "~0.4.0"
|
||||
"grunt-mocha-test": "~0.4.0",
|
||||
"grunt-shell": "~0.2.2",
|
||||
"grunt-contrib-sass": "~0.3.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue