closes#382, closes#383
- added helper called ghost_head to insert meta data with current version of ghost
- added helper called ghost_foot to insert script tag for jquery
- added unit test for both helpers
- removed trailing slash from ghost.js for 'shared' path and removed from outside of loop as it is shared on front and backend
Temporary patch for #362
- Split out database teardown and initialization so they each have their
own 2 second timeout.
- Added some test-specific increased timeouts.
Closed#514
Reverting change from @c46a0c6 where I moved the new word breaking CSS rules to the body tag to apply everywhere. This doesn't play nicely everywhere - so this change moves them back to just the content preview areas where they are needed.
Closes#418.
* Moved the app config behind the promise wall (I couldn't reliably assign generated uuid to the ghost object AND have access to an automatically created db from fixtures AND not have circular reference (try including api in ghost.js ;) ))
* Added new functionality to `ghost.init()`, which is responsible for the first run bit (I'm thinking plopping a filter or an action in there for future devs)
* Modified `.gitignore` so the `.png`s casper generates aren't added
* Fixed ambiguity and typos here and there, see code
Fixes#358
- Altered post model to enable eager loading of author and
user relationships
- Fixed broken base model toJSON method, which prevented
eager resolution of relationships (thanks @tgriesser)
- Passes author information to template.
- Added unit tests for author helper.
- Added unit tests for findOne and findAll additions to Post Model
which take into account the eager relationships
Usage:
`{{author}}` -- returns the full name of the post author
`{{author.attribute}}` -- returns property of the current post author
as described by the user model
Closes half of #468
* adds a 2 second limit until you can retry logging in, otherwise sends you a 401.
* bounce: 2ms, checks the pw: 254ms on my machine
* added a test to the casper suite
closes#174
- Triggering router events for navigation between settings panes
caused the route function to be re-executed, which caused all
kinds of fun.
- Wrapped the settings route function in an if statement to preserve
the current view if it already a settings view.
- Added Ghost pub-sub and using that instead of History API
Closes#352
- Updated editor.scss to break out transition shorthand into its
constituent properties so that bourbon appends the correct vendor
prefixes.
- Added full set of publish options to the statusMap.
- Added setActiveStatus function to handle toggling the active action
for the publish menu.
- Cleaned up handleStatus and updatePost functions to match desired
functionality of menu items toggling the selected action and the actual
button on the split button invoking said action.
First pass at refactoring editor styles to make the Ghost writing experience more pleasurable.
- Larger font
- Bold title
- More space for writing
- Minor code standards cleanup
This change reduces the margin on the post editor between the title and body content from 15px to 5px. This change keeps the aesthetic of the editor, while enabling a little bit more body content to be on the screen at the same time. Small but significant adjustment.
Fixes#427
- Removed break-all, which was causing excessive behaviour detailed in the issue
- Removed -webkit- hyphen prefix, as both Chrome and Safari are ignoring it
- Firefox is currently the only browser respecting hyphens, the others simply break without hyphenating
closes#452
- changed keyboard shortcut to insert ![].. not !image[]
- changed regex in ghostdown to only work for ![]
- added a further regex in ghostdown to properly match for URLs inside the parens
Issue #465
- converted email fields throughout the site to be of type email
- converted the user website field to be of type url
- removed the browser validation by setting novalidate on the form, not the element
Closes#374
* Included node-validator as a package
* Implemented server side validation (the client side js is a mess, need a LOT of work)
* Validates email address both on signup and login screens, gives error message on malformed email addresses
* Requires at least 8 chars of password
* Tells user if password is too short
* Tells user if no such user on login
* Tells user if wrong password on login
* Tells user if server responds with a 404 (goes away, dies, etc)
* Added middleware between req and login / signup for validation
New standard - ALL .scss files are now indented 4 spaces, no tabs. I want to keep this *consistent* because it has been getting incredibly messy. This applies to all native Ghost sass - 3rd party files (normalize, typeplate, bourbon, breakpoint, etc) are not included. /cc @matthojo @erisds
Closes#354
* Reintroduced the redirect functionality (not logged in, tries to go to `/settings/user/`, is sent to `/login/` with info notification, after login user is taken to `/settings/user/)
* Reintroduced the "Successfully logged out" message
* Added middleware to scrub passive notifications from `ghost.notifications` after one use basically mimicing client side passive notifications
* Removed flash from everywhere. Even from package.json.
* Renamed flashed.hbs to notifications.hbs, modified default.hbs accordingly
* Added function to parse GET variables on client side
Show the model.validationError if one is present and also coalesce the
empty title for a more meaningful message. Also, reset the button text
after failure.
Closes#340. Closes#375
* Replaced session with id of current user
* Added method to ghostlocals to always send profile picture and full name to templates (template checks if falsy)
* Modified user saving (`forge().set(new).save()` died on me, `forge().save(new)` didn't)
* If user has profile picture, that will be used
* If user has name, that will be used
* Password changing doesn't care about your email. Uses cookies. Tasty!
* User pane uses current user id. Had to set path to me, otherwise goes to `browse` instead of `read`.
* Added logic to user api to check for `id === 'me'`, and then use the cookie value
* User data saves are now correct
* There is no logout error
This is simply a commit which improves the mobile interactions. This does not fix UI problems on mobiles.
New interactions;
Menu
* Swipe right on header to show sidebar
* Swipe left on sidebar to hide
Content
* Tap / Swipe left on item to show preview
* Swipe right to show content list
Settings
* Tap / Swipe left on link to show settings
* Swipe right on settings to show links
Closes#342.
It would be totally cool if we could have a Ghost.PubSub so we could hurl events there and pick them up somewhere else. For some reason all the backbone bits work on models, like `trigger` and `listenTo` and `delegateEvents`.
Solves:
* max-height 120px less than height of viewport
* fade-in a dark overlay as well as blur
* animation speeds/transitions should be smoother
* modal sizing fucks up when viewport is resized
Also improves Modal code compliance to Ghost Backbone coding patterns
fixes#392
- adds appRoot, and uses this to calculate other paths
- removes path calculations from loader
- remove the themedir setting in config.. completely unnecessary
- highlights just how important #360 is
Fixes#256
- Developed and linked new module, downsize, for tag-safe truncation
- Altered existing content handler to accept options for truncation
- Added tests for handler
Using truncation:
{{content words=10}}
{{content characters=256}}
Closes#282
* Added a new route
* Added new methods
* Triple security!
* Passwords are actually changed
* Also added a change password button, because 'save' has too much baggage.
On security: checks whether you're logged in. Then checks whether your old password is actually the one that belongs to you (gets value from the email field for the email, see caveat no2). Checks the new passwords for === and length > 6 on client and server side as well. And THEN changes passwords.
Caveats:
* didn't add a test, as mocha fails spectacularly on my machine. SQLITE_CORRUPT: database disk image is malformed. Cute, huh?
* Because we don't have / I'm not aware of / could not find a "currentuser" variable, I need to get the email address of the user we want to change from the email field. Theoretically if they replace that with another user's email address, and supply their pw, they will change THEIR password instead of their own.
issue #40 and issue #280
- Adds uploader jquery plugin
- includes settings for enabling/disabling upload progress bar
- adds routing for image uploads
- adds directories by year and month based on upload date
- Implements plugin on settings - general pane
- Implements plugin on editor
- adjusted general tab to save uploaded image src
TODO:
- Add error handling
- Storing information on editor
- Add events
closes#276
- settings screen now loads a model when a pane is requested, rather than when the whole screen is requested
- added browse, read and edit methods and routes for users to the API
- added user model & template to client and wired everything up.
- provided default images for cover and profile picture
Implements basic functionality described in #227 for loading plugins
from a specific directory and having a specific workflow with an init()
method and a disable() method.
Closes#333
* Refactored the Ghost.Notifications View bundle
* Added a new initialization of the NotificationCollection (hacky, but at least satisfies JSLint). This was needed as the reason the persistent success notification couldn't be dismissed was that prerendered DOM elements weren't picked up as BB Views beforehand, and thus no events were bound to them.
- added line to index.js to set node_env to development if it is not set
- fixed a small bug with the persistent notifications and used them on debug page from server side
- added 002 files to manage export and import for 002
- 002 import is somewhat smarter than 001, merging settings (except version), replacing user & clearing primary keys
- added reset to models and migration, which does the down operation the same way that init does the up operation
- import and reset clear session & redirect to login / signup
- additional unit tests
closes#171, closes#314, closes#315
- added settings for blog logo and icon
- all other settings will need to be added as needed as it's impossible to guess what the default value should be
- added tables for post tags
- added tables for post custom data
- added location column to users
- fixeed minor bug in migrations
caused by issue #326
- implementing fade in and center on signup form by applying the functionality to a shared view
- login and signup now both extend the shared view
- Ghost.View now extends Ghost.TemplateView giving all views access to subviews and templates
- Views which implemented templates no longer need to
- Some views needed to re-override render which is a bit annoying
- Settings screen now has sub-templates for each pane and for the sidebar
- Additional Casper tests for settings screen
(RE: discussion in pull #317)
- Unit tests enforce well formedness of ghostdown processor function
and what it returns.
- Ensures image markup is recognised and replaced accurately.
Updated dropzone regex to capture existing URL flag. Also supports the shorter markdown image syntax, and corrects issues with special characters in the alt field, fixing issue #146.
This introduces a new class of `.form-group` to replace the label containing the elements.
I have also included `name=""` attributes to inputs where there were non.
Hacky implementation of a suite of casper tests. This is here so that we can start to build up some tests.
Main thing missing is being able to simulate keypresses for CodeMirror
Making the tests run nicely with grunt, travis and be independent rather than interdependent can all come later.
- See tests/functional/base.js for full usage instructions & implementation notes
This is simply a commit which improves the mobile interactions. This does not fix UI problems on mobiles.
New interactions;
Menu
* Swipe right on header to show sidebar
* Swipe left on sidebar to hide
Content
* Tap / Swipe left on item to show preview
* Swipe right to show content list
Settings
* Tap / Swipe left on link to show settings
* Swipe right on settings to show links
Closes#290. In theory.
* moved flashviews to base.js, renamed to notifications
* added failures to post editor screen
* added notifications to settings (success, failure)
* added notifications when deleting posts
Most of these are not visible due to CSS rules, as overhauling that
is a task in and of itself. The notifications do show up in the inspector
though, so all is well.
Should close#37. There are persistent and passive notifications.
Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack
Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
This fixes the event where text would be selected after manipulation from shortcut, the cursor is now placed after the text. On links and images the url field text is highlighted.
Additional shortcuts;
* Ctrl+U: Make text uppercase
* Ctrl+Shift+U: Make text lowercase
* Ctrl+Alt+Shift+U: Make text titlecase
* Ctrl+Alt+W: Select word
* Ctrl+L: Make into list
- fixed the test that the fixture change broke (sort of). We should be using separate fixtures for tests really, unless we want to test something about a Ghost install.
- updated readme with better docs
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server.
- The location of the databases is highly important, this isn't expected to change again
In the future
- client/assets should probably become public/
- more stuff should be shared (helpers etc)
- cleanup some confusion around tpl and views
- moved template logic out of individual helpers and into Ghost
- simplified template-driven helpers into closures which maintain the context of handlebars
- with handlebars context we have access to data, so don't need to pass data in
- check data to test that it is a simple object and not a function
- moved helpers back into index.js
- provided tests for both template functions in ghost and the nav helper so we are back to where we were
- fixed a bug whereby once you visit the homepage the homepage menu item is always marked as the active page
- this was due to passing the config object being done by reference rather than by value, and therefore setting the selected item was persisted.
- updated navigation and pagination helpers to use SafeString
- nav and pagination don't need triple taches any more
- nav tests updated, and renamed to match helper name
- Removing mocha-as-promised as this seemed to cause problems with later tests.
- Making failure mode for tests consistent.
- increasing timeout for pagination - would love to know why this is needed
The grunt-mocha-test task seems to be causing problems with our
beforeEach handlers in some cases. The grunt-mocha-cli task runs the
mocha command using grunt.util.spawn for more consistent results
- updated fixtures so that even short-term we have valid data
- added methods to the base model that marshall the data in and out of the db so it is always an RFC 2822 date never ISO 8601
- turned off SQL debugging now the bug is resolved
- minor change to the date listing template, as we don't need to check for updated_at now that the data is correct - but should use published date anyway
Some more bits for slug generation
- fixes a bug in generation and some tests
- makes sure that deduplicated slugs get a hyphen before the number
- added %<>|^~£" to reserved chars
- added a few extra comments
- The addition of published/draft statuses to the post model on the frontend was being returned to the server.
- These additional properties are client-side only and are now unset before the model is saved
- issue #154, issue #224 and issue #220
- change port number from 3333 to 2368
- change main file name from app.js to index.js
- update README & package.json to match