diff --git a/Gruntfile.js b/Gruntfile.js index c4ebaf6a0f..d24e84629c 100644 --- a/Gruntfile.js +++ b/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"]); diff --git a/README.md b/README.md index aa517df80f..62c3081d5f 100644 --- a/README.md +++ b/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 `. 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 diff --git a/core/admin/assets/js/blog.js b/core/admin/assets/js/blog.js index 84a2a199af..ff8d5b872f 100644 --- a/core/admin/assets/js/blog.js +++ b/core/admin/assets/js/blog.js @@ -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)); \ No newline at end of file diff --git a/core/admin/assets/sass/modules/mixins.scss b/core/admin/assets/sass/modules/mixins.scss index 046c8f8849..57019e46a9 100644 --- a/core/admin/assets/sass/modules/mixins.scss +++ b/core/admin/assets/sass/modules/mixins.scss @@ -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; diff --git a/core/admin/views/blog.hbs b/core/admin/views/blog.hbs index 730984d3b8..5e114b5304 100644 --- a/core/admin/views/blog.hbs +++ b/core/admin/views/blog.hbs @@ -47,9 +47,9 @@ diff --git a/core/shared/api.js b/core/shared/api.js index db32e6f835..d106280824 100644 --- a/core/shared/api.js +++ b/core/shared/api.js @@ -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); } }; diff --git a/core/shared/models/dataProvider.bookshelf.base.js b/core/shared/models/dataProvider.bookshelf.base.js index 4479031b57..bfec5bc436 100644 --- a/core/shared/models/dataProvider.bookshelf.base.js +++ b/core/shared/models/dataProvider.bookshelf.base.js @@ -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); }); diff --git a/package.json b/package.json index e00d9e3c24..e9bdc87e11 100644 --- a/package.json +++ b/package.json @@ -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" } }