spontaneous 0.2.0.beta4 → 0.2.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Gemfile +11 -6
- data/Readme.markdown +136 -69
- data/application/css/core.css.scss +27 -7
- data/application/css/editing.css.scss +4 -26
- data/application/css/schema_error.css.scss +22 -0
- data/application/js/content.js +11 -3
- data/application/js/edit_panel.js +1 -4
- data/application/js/field/file.js +17 -0
- data/application/js/field/image.js +30 -21
- data/application/js/field/string.js +4 -1
- data/application/js/field_preview.js +21 -16
- data/application/js/publish.js +6 -6
- data/application/js/types.js +5 -13
- data/application/js/views.js +2 -2
- data/application/js/views/box_view.js +3 -2
- data/application/js/views/page_piece_view.js +1 -1
- data/application/js/views/piece_view.js +1 -1
- data/application/views/schema_modification_error.html.erb +13 -3
- data/db/migrations/20131104101935_site_must_publish_all.rb +14 -0
- data/lib/spontaneous.rb +0 -1
- data/lib/spontaneous/box_style.rb +15 -9
- data/lib/spontaneous/capistrano/deploy.rb +13 -1
- data/lib/spontaneous/change.rb +11 -13
- data/lib/spontaneous/cli.rb +5 -2
- data/lib/spontaneous/cli/assets.rb +7 -1
- data/lib/spontaneous/cli/console.rb +7 -1
- data/lib/spontaneous/cli/content.rb +35 -0
- data/lib/spontaneous/cli/fields.rb +3 -2
- data/lib/spontaneous/cli/generate.rb +5 -2
- data/lib/spontaneous/cli/server.rb +12 -8
- data/lib/spontaneous/cli/site.rb +12 -12
- data/lib/spontaneous/cli/user.rb +28 -14
- data/lib/spontaneous/collections/box_set.rb +4 -4
- data/lib/spontaneous/collections/field_set.rb +4 -4
- data/lib/spontaneous/collections/prototype_set.rb +12 -4
- data/lib/spontaneous/data_mapper.rb +11 -7
- data/lib/spontaneous/data_mapper/content_model.rb +8 -0
- data/lib/spontaneous/data_mapper/content_model/associations.rb +1 -1
- data/lib/spontaneous/data_mapper/dataset.rb +14 -2
- data/lib/spontaneous/data_mapper/scope.rb +33 -13
- data/lib/spontaneous/facet.rb +4 -0
- data/lib/spontaneous/field.rb +12 -12
- data/lib/spontaneous/field/base.rb +27 -22
- data/lib/spontaneous/field/boolean.rb +4 -4
- data/lib/spontaneous/field/date.rb +2 -2
- data/lib/spontaneous/field/file.rb +24 -18
- data/lib/spontaneous/field/html.rb +1 -1
- data/lib/spontaneous/field/image.rb +6 -19
- data/lib/spontaneous/field/location.rb +1 -1
- data/lib/spontaneous/field/long_string.rb +3 -3
- data/lib/spontaneous/field/markdown.rb +3 -3
- data/lib/spontaneous/field/select.rb +2 -2
- data/lib/spontaneous/field/string.rb +2 -2
- data/lib/spontaneous/field/tags.rb +2 -2
- data/lib/spontaneous/field/update.rb +21 -20
- data/lib/spontaneous/field/webvideo.rb +6 -6
- data/lib/spontaneous/field/webvideo/fallback.rb +2 -2
- data/lib/spontaneous/field/webvideo/vimeo.rb +7 -7
- data/lib/spontaneous/generators/site.rb +2 -2
- data/lib/spontaneous/generators/site/Gemfile.tt +5 -1
- data/lib/spontaneous/layout.rb +2 -2
- data/lib/spontaneous/media.rb +1 -0
- data/lib/spontaneous/media/file.rb +6 -5
- data/lib/spontaneous/media/image/attributes.rb +4 -0
- data/lib/spontaneous/media/image/renderable.rb +4 -4
- data/lib/spontaneous/media/store.rb +22 -0
- data/lib/spontaneous/{storage → media/store}/backend.rb +1 -1
- data/lib/spontaneous/{storage → media/store}/cloud.rb +1 -1
- data/lib/spontaneous/{storage → media/store}/local.rb +1 -1
- data/lib/spontaneous/media/temp_file.rb +1 -1
- data/lib/spontaneous/model.rb +10 -7
- data/lib/spontaneous/model/action.rb +7 -0
- data/lib/spontaneous/model/action/clean.rb +87 -0
- data/lib/spontaneous/model/box/allowed_types.rb +15 -1
- data/lib/spontaneous/model/core.rb +10 -0
- data/lib/spontaneous/model/core/aliases.rb +1 -1
- data/lib/spontaneous/model/core/content_groups.rb +1 -1
- data/lib/spontaneous/model/core/fields.rb +1 -1
- data/lib/spontaneous/model/core/modifications.rb +2 -2
- data/lib/spontaneous/model/core/page_search.rb +4 -0
- data/lib/spontaneous/model/core/publishing.rb +4 -17
- data/lib/spontaneous/model/core/render.rb +4 -4
- data/lib/spontaneous/model/core/styles.rb +2 -2
- data/lib/spontaneous/model/core/visibility.rb +6 -2
- data/lib/spontaneous/model/page.rb +6 -2
- data/lib/spontaneous/model/page/controllers.rb +55 -17
- data/lib/spontaneous/model/page/formats.rb +12 -7
- data/lib/spontaneous/model/page/layouts.rb +2 -2
- data/lib/spontaneous/model/page/locks.rb +4 -1
- data/lib/spontaneous/model/page/page_tree.rb +40 -6
- data/lib/spontaneous/output.rb +14 -52
- data/lib/spontaneous/output/context.rb +11 -39
- data/lib/spontaneous/output/context/navigation.rb +31 -0
- data/lib/spontaneous/output/format.rb +15 -19
- data/lib/spontaneous/output/renderable.rb +99 -0
- data/lib/spontaneous/output/store.rb +24 -0
- data/lib/spontaneous/output/store/backend.rb +52 -0
- data/lib/spontaneous/output/store/file.rb +77 -0
- data/lib/spontaneous/output/store/moneta.rb +117 -0
- data/lib/spontaneous/output/store/revision.rb +34 -0
- data/lib/spontaneous/output/store/store.rb +15 -0
- data/lib/spontaneous/output/store/transaction.rb +44 -0
- data/lib/spontaneous/output/template/engine.rb +17 -7
- data/lib/spontaneous/output/template/renderer.rb +66 -40
- data/lib/spontaneous/page_lock.rb +5 -7
- data/lib/spontaneous/page_piece.rb +2 -2
- data/lib/spontaneous/permissions/user.rb +14 -7
- data/lib/spontaneous/plugins/application/features.rb +8 -4
- data/lib/spontaneous/plugins/application/state.rb +12 -6
- data/lib/spontaneous/prototypes/box_prototype.rb +9 -10
- data/lib/spontaneous/prototypes/field_prototype.rb +66 -15
- data/lib/spontaneous/publishing/immediate.rb +30 -26
- data/lib/spontaneous/rack.rb +12 -7
- data/lib/spontaneous/rack/back.rb +43 -37
- data/lib/spontaneous/rack/back/base.rb +4 -4
- data/lib/spontaneous/rack/back/changes.rb +2 -2
- data/lib/spontaneous/rack/back/file.rb +16 -24
- data/lib/spontaneous/rack/back/map.rb +5 -5
- data/lib/spontaneous/rack/back/preview.rb +3 -4
- data/lib/spontaneous/rack/back/schema.rb +1 -1
- data/lib/spontaneous/rack/back/site.rb +6 -7
- data/lib/spontaneous/rack/front.rb +19 -16
- data/lib/spontaneous/rack/middleware/authenticate.rb +3 -3
- data/lib/spontaneous/rack/middleware/reloader.rb +3 -2
- data/lib/spontaneous/rack/middleware/scope.rb +25 -19
- data/lib/spontaneous/rack/page_controller.rb +164 -13
- data/lib/spontaneous/rack/public.rb +23 -62
- data/lib/spontaneous/rack/static.rb +2 -3
- data/lib/spontaneous/schema.rb +27 -8
- data/lib/spontaneous/schema/schema_modification.rb +9 -1
- data/lib/spontaneous/schema/uid.rb +2 -2
- data/lib/spontaneous/schema/uid_map.rb +3 -2
- data/lib/spontaneous/search/database.rb +2 -2
- data/lib/spontaneous/search/field.rb +5 -3
- data/lib/spontaneous/search/index.rb +12 -7
- data/lib/spontaneous/search/results.rb +5 -3
- data/lib/spontaneous/server.rb +2 -2
- data/lib/spontaneous/site.rb +10 -3
- data/lib/spontaneous/site/features.rb +26 -6
- data/lib/spontaneous/site/helpers.rb +9 -12
- data/lib/spontaneous/site/level.rb +7 -9
- data/lib/spontaneous/site/map.rb +9 -11
- data/lib/spontaneous/site/paths.rb +5 -5
- data/lib/spontaneous/site/publishing.rb +83 -80
- data/lib/spontaneous/site/schema.rb +1 -7
- data/lib/spontaneous/site/search.rb +8 -18
- data/lib/spontaneous/site/selectors.rb +60 -54
- data/lib/spontaneous/site/state.rb +36 -30
- data/lib/spontaneous/site/storage.rb +10 -16
- data/lib/spontaneous/state.rb +8 -0
- data/lib/spontaneous/style.rb +32 -33
- data/lib/spontaneous/version.rb +1 -1
- data/spontaneous.gemspec +22 -21
- data/test/fixtures/public/templates/layouts/default.html.cut +1 -1
- data/test/fixtures/public/templates/layouts/default.pdf.cut +1 -1
- data/test/fixtures/public/templates/layouts/default.rss.cut +1 -1
- data/test/fixtures/search/config/indexes.rb +1 -1
- data/test/fixtures/serialisation/class_hash.yaml.erb +13 -1
- data/test/fixtures/serialisation/root_hash.yaml.erb +10 -0
- data/test/functional/test_application.rb +20 -24
- data/test/functional/test_back.rb +26 -27
- data/test/functional/test_cli.rb +146 -0
- data/test/functional/test_front.rb +287 -216
- data/test/functional/test_user_manager.rb +1 -1
- data/test/test_helper.rb +15 -11
- data/test/unit/test_alias.rb +32 -25
- data/test/unit/test_asset_bundler.rb +1 -1
- data/test/unit/test_assets.rb +34 -33
- data/test/unit/test_authentication.rb +1 -1
- data/test/unit/test_boxes.rb +16 -2
- data/test/unit/test_changesets.rb +23 -11
- data/test/unit/test_content.rb +15 -0
- data/test/unit/test_context.rb +139 -0
- data/test/unit/test_controllers.rb +374 -0
- data/test/{experimental → unit}/test_crypt.rb +0 -0
- data/test/unit/test_datamapper.rb +260 -237
- data/test/unit/test_datamapper_content.rb +42 -12
- data/test/{experimental → unit}/test_features.rb +85 -3
- data/test/unit/test_fields.rb +117 -42
- data/test/unit/test_formats.rb +11 -1
- data/test/unit/test_generators.rb +2 -2
- data/test/unit/test_helpers.rb +7 -8
- data/test/unit/test_images.rb +39 -2
- data/test/unit/test_layouts.rb +14 -12
- data/test/unit/test_media.rb +32 -23
- data/test/unit/test_output_store.rb +342 -0
- data/test/unit/test_page.rb +8 -1
- data/test/unit/test_permissions.rb +11 -7
- data/test/unit/test_plugins.rb +3 -3
- data/test/unit/test_prototype_set.rb +8 -1
- data/test/unit/test_publishing.rb +67 -54
- data/test/unit/test_render.rb +91 -38
- data/test/unit/test_revisions.rb +4 -4
- data/test/unit/test_schema.rb +109 -84
- data/test/unit/test_search.rb +42 -42
- data/test/unit/test_serialisation.rb +3 -2
- data/test/unit/test_site.rb +39 -27
- data/test/unit/test_storage.rb +9 -6
- data/test/unit/test_styles.rb +25 -32
- data/test/unit/test_templates.rb +8 -4
- metadata +89 -54
- data/lib/spontaneous/model/page/request.rb +0 -105
- data/lib/spontaneous/storage.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57a258edab5fa2cbbe405529dfbecb2b0686eaa5
|
4
|
+
data.tar.gz: 7577532aa63cbc2c496a8aeed4537ef57b300d03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9cda0cf3e496fbe754fe02179c13522ab37c605450ec10c3aae79bb5f6fcfd0b0f4386e6a8bb255b7f4016cb0f96c593d3471efbba878bd306292b0af7cc3e8
|
7
|
+
data.tar.gz: cb41c2287c5fb0e718d17faa99a347811cc39f87b92abdf63c10444d1b1dc4e089f2fe339265b500ad253edadb2537ecde393488c9e600c4e0c33362e29f35b6
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
## 0.2.0.beta5, released 2014-03-18
|
3
|
+
|
4
|
+
#### New Features
|
5
|
+
|
6
|
+
- Rendering output now goes to a 'output store' class rather than directly to the filesystem.
|
7
|
+
The default output store mimics the existing functionality but it can be overridden by
|
8
|
+
any Moneta compatible key-value store (e.g. Redis, Memcache). Another step closer to
|
9
|
+
Heroku compatibility
|
10
|
+
- Individual fields can now be hidden in the list view by specifying `list: false` in the
|
11
|
+
field definition options
|
12
|
+
- The navigation helper now accepts options for filtering the list of pages to include
|
13
|
+
- Page controllers are now full Sinatra instances
|
14
|
+
- The UI allows for images to be cleared
|
15
|
+
- Deleting a schema entry now raises a modification error & prompts for confirmation.
|
16
|
+
Before this a typo or other error could end up deleting db content
|
17
|
+
- Modifying the schema will now automatically delete any stray, unmapped, instances from
|
18
|
+
the db on deploy
|
19
|
+
- You can specify the name that a type will appear as in the add list, this enables the same
|
20
|
+
basic type to fill many roles without having to subclass it
|
21
|
+
|
22
|
+
#### Fixes
|
23
|
+
|
24
|
+
- Add tests for & fix current issues with Thor's handling of namespaces
|
25
|
+
- Fix equality tests for PagePiece's i.e. `PagePiece#target == PagePiece`
|
26
|
+
- Force every content query to include a list of `schema_id`s so that content entries
|
27
|
+
with an invalid/unmapped schema class won't be returned
|
28
|
+
|
29
|
+
#### Misc
|
30
|
+
|
31
|
+
- Upgrade to Sequel 4.x
|
32
|
+
- Use the `sequel_pg` gem for better performance with Sequel on Postgres
|
33
|
+
- Change version specifiers in gemspec to a more liberal range (i.e. "~> 0.x.y" becomes "~> 0.x")
|
34
|
+
- Improve layout of box tabs to handle cases with many boxes
|
35
|
+
- `Site[:symbol]` now searches by UID
|
36
|
+
- The 'back' stack now allows for insertion of Rack apps, rather than just Sinatra apps
|
37
|
+
- Rename the `:text` fieldtype to `:markdown` to make this clearer
|
38
|
+
- Rubinius 2 compatibility
|
39
|
+
- Add a CHANGELOG
|
data/Gemfile
CHANGED
@@ -2,10 +2,10 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem 'selenium-client', '~> 1.2
|
5
|
+
gem 'selenium-client', '~> 1.2', :platforms => [:mri_18]
|
6
6
|
gem 'mocha', :require => false
|
7
7
|
|
8
|
-
gem 'therubyracer', '~> 0.11
|
8
|
+
gem 'therubyracer', '~> 0.11'
|
9
9
|
|
10
10
|
# group :development do
|
11
11
|
# # gem 'Selenium', '~> 1.1.14'
|
@@ -17,8 +17,13 @@ platforms :jruby do
|
|
17
17
|
gem 'jdbc-mysql'
|
18
18
|
end
|
19
19
|
|
20
|
-
platforms :mri do
|
21
|
-
gem 'mysql2', '~> 0.3
|
22
|
-
gem '
|
23
|
-
gem 'xapian-ruby', '~> 1.2
|
20
|
+
platforms :mri, :rbx do
|
21
|
+
gem 'mysql2', '~> 0.3'
|
22
|
+
gem 'sequel_pg', '~> 1.6', require: 'sequel'
|
23
|
+
gem 'xapian-ruby', '~> 1.2'
|
24
24
|
end
|
25
|
+
|
26
|
+
|
27
|
+
platforms :rbx do
|
28
|
+
gem 'rubysl', '~> 2.0'
|
29
|
+
end
|
data/Readme.markdown
CHANGED
@@ -2,47 +2,133 @@
|
|
2
2
|
|
3
3
|
Spontaneous is a revolutionary new content management system that brings the best of Ruby and the best of HTML5 together in one elegant package.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
-
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
5
|
+
**[http://spontaneous.io](http://spontaneous.io)**
|
6
|
+
|
7
|
+
Spontaneous uses a powerful hierarchical system to organise your information.
|
8
|
+
This breaks out of the bonds of the traditional "title, slug, text" model of
|
9
|
+
CMS content and instead allows content authors to build complex, highly styled
|
10
|
+
pages out of simple, easily editable blocks.
|
11
|
+
|
12
|
+
## Status
|
13
|
+
|
14
|
+
[![Code Climate](https://codeclimate.com/github/SpontaneousCMS/spontaneous.png)](https://codeclimate.com/github/SpontaneousCMS/spontaneous)
|
15
|
+
|
16
|
+
Spontaneous is very much a work-in-progress but is currently almost feature
|
17
|
+
complete. It has been used with great success on multiple sites. However the
|
18
|
+
gem release is still marked as 'alpha' because the APIs are in constant flux.
|
19
|
+
|
20
|
+
|
21
|
+
### Features currently supported
|
22
|
+
|
23
|
+
- Definition of complex content hierarchies using ORM model-like classes which:
|
24
|
+
- Allows for versioning of the metadata using standard CVS systems (i.e. git)
|
25
|
+
- Keeps the developer in the text editor
|
26
|
+
- Simplifies the interface for the site editor
|
27
|
+
- Creates a clear separation of content from schema - changing the site metadata
|
28
|
+
- Provides a carefully thought out deployment/upgrade process
|
29
|
+
- Keeps interaction between code and db content to a bare minimum and
|
30
|
+
separated from normal site editing functions (a 'developer view')
|
31
|
+
- The schema model allows for 'Page' types which have a URL and 'Piece' types which
|
32
|
+
form the content of pages but have no URL
|
33
|
+
- Each content model sub-class (or 'type') has its own set of defined fields and
|
34
|
+
boxes. Each defined box can be configured to allow the addition of any available
|
35
|
+
schema type
|
36
|
+
- Each field has a type. The current field types include simple strings (`:string`),
|
37
|
+
long strings (`:text`), Markdown rich text (`:markdown`), images (`:image`, `:photo`),
|
38
|
+
web-video (supporting YouTube, Vimeo & Vine URLs), simple file uploads (`:file`),
|
39
|
+
date (`:date`), pulldowns (`:select` with static & dynamic options),
|
40
|
+
tag fields (`:tag`) and raw HTML code (`:html`)
|
41
|
+
- Pure separation of content from presentation. Editors write, the CMS lays it out:
|
42
|
+
- Page content is split into discrete "pieces" of multiple types (and split into
|
43
|
+
multiple 'boxes'). Each of these pieces & boxes has a custom template
|
44
|
+
- This enables sophisticated layouts way beyond those possible when constrained
|
45
|
+
by WYSIWYG based systems
|
46
|
+
- Render content using generated Javascript rather than being limited to HTML
|
47
|
+
- Sub-classes inherit their superclasses' fields & boxes so schema metadata can
|
48
|
+
be coded using DRY principles (and since it's just Ruby code, you can also
|
49
|
+
share functionality using Ruby modules)
|
50
|
+
- An edit-publish cycle that separates saving changes from making them public
|
51
|
+
- Intelligent publishing step that chooses the most effective method to deliver
|
52
|
+
pages, choosing to render & return static HTML pages if possible
|
53
|
+
- Define multiple outputs (in multiple formats) on a type-by-type basis. Current supported
|
54
|
+
formats include HTML, XML, Javascript, PHP, JSON, text... in fact any text-based, template driven
|
55
|
+
format you might need
|
56
|
+
- Powerful hierarchical structures
|
57
|
+
- Pages have fields & boxes
|
58
|
+
- Boxes have fields and can contain pieces
|
59
|
+
- Pieces can have fields and boxes
|
60
|
+
- Boxes can contain pages
|
61
|
+
- and so on with no depth limit
|
62
|
+
- An intuitive, attractive & responsive HTML5 interface with
|
63
|
+
- Resumable, sharded uploads
|
64
|
+
- Upload queueing
|
65
|
+
- Drag & drop file uploads
|
66
|
+
- Accurate previewing
|
67
|
+
- Hierarchical site navigation
|
68
|
+
- Context aware markdown editor
|
69
|
+
- Use of a schema "map" to enable re-naming of any schema types without affecting the content currently in the database
|
70
|
+
- Image fields can define any number of 'sizes' each of which is created via a custom ImageMagick
|
71
|
+
pipeline (constrcted using [skeptick](https://github.com/maxim/skeptick))
|
72
|
+
- Template inheritance based on [Django's templating](https://docs.djangoproject.com/en/dev/topics/templates/)
|
73
|
+
using [Cutaneous](https://github.com/SpontaneousCMS/cutaneous)
|
74
|
+
- Asset compilation & minimization through [Sprockets](https://github.com/sstephenson/sprockets)
|
75
|
+
- Cloud based media storage using [Fog](http://fog.io)
|
76
|
+
- Powerful fulltext searching powered by [Xapian](http://xapian.org/)
|
77
|
+
- Each site can have multiple indexes
|
78
|
+
- Each index can be configured to include any subset of the site content on a
|
79
|
+
type-by-type, field-by-field basis
|
80
|
+
- A Rack powered public site including the ability to
|
81
|
+
- inject any custom middleware into the request pipeline
|
82
|
+
- define an action that will be run on any GET to a particular type (e.g. for
|
83
|
+
authenticated access to particular types)
|
84
|
+
- define a POST method for individual types
|
85
|
+
- define multiple mini-applications per type (e.g. to allow for commenting)
|
86
|
+
- Powerful access control levels control who can do what
|
87
|
+
- Embed custom admin applications into the CMS backend
|
88
|
+
|
89
|
+
### Aims
|
90
|
+
|
91
|
+
The ultimate aim of Spontaneous is to be a CMS system capable of adapting to and
|
92
|
+
even leading the progress of the internet.
|
93
|
+
|
94
|
+
Publishing HTML pages is not enough, which is why the concept of multiple outputs
|
95
|
+
has been baked into the system right from the start.
|
96
|
+
|
97
|
+
Eventually owners of a Spontaneous site will not only be able to publish their
|
98
|
+
ideas to HTML pages but also use the same content to generate a EPUB & MOBI
|
99
|
+
e-books, print quality PDFs to send to a printer and proprietry XML or JSON data
|
100
|
+
for consumption by magazine applications running on tablets.
|
101
|
+
|
102
|
+
### Roadmap
|
103
|
+
|
104
|
+
#### v1
|
105
|
+
|
106
|
+
- **Documentation**
|
107
|
+
- Finish abstraction of rendering 'filesystem' to allow for rendering to distributed
|
108
|
+
key-value stores (WIP)
|
109
|
+
- Separate the storage configuration from the media filesystem
|
110
|
+
- Allow configuration of Sprockets to use the defined storage settings
|
111
|
+
- Abstract the search interface to allow for use of other indexing systems apart
|
112
|
+
from Xapian (e.g. Elasticsearch, Lucene etc)
|
113
|
+
- Support deployment to Heroku (removal of any persisent storage on the filesystem)
|
114
|
+
- Asynchronous, long-running field processing including integration with external
|
115
|
+
web-services including callbacks (with transcoding of video through Zencoder
|
116
|
+
as an example usage)
|
117
|
+
- Copy-paste to move pages & pieces around within the site
|
118
|
+
- Undo
|
119
|
+
- Archive not delete, including restoration of deleted content
|
120
|
+
- Revert field to previous version
|
121
|
+
- Revert page to published version
|
122
|
+
- Scheduled publishing
|
123
|
+
- Allow for per-type additions to the user interface
|
124
|
+
|
125
|
+
#### Future
|
126
|
+
|
127
|
+
- Re-write the UI using web-components and ES6
|
128
|
+
- Back up the new UI with a full suite of integration tests
|
129
|
+
|
130
|
+
|
131
|
+
## Example
|
46
132
|
|
47
133
|
A Spontaneous site is composed of pages. Within those pages are zero or more 'Boxes'. Each of those Boxes can be configured to accept the addition of zero or more types of object. These object types can either be Pages -- creating a page hierarchy -- or Pieces that are displayed as the page's content.
|
48
134
|
|
@@ -125,43 +211,21 @@ This will generate the following interface for the site editors:
|
|
125
211
|
|
126
212
|
<img src="https://github.com/SpontaneousCMS/spontaneous/raw/master/docs/recipe-interface-screenshot.png" alt="Spontaneous interface" width="800" height="577" />
|
127
213
|
|
128
|
-
, meaning that as well as writing copy and selecting images
|
129
|
-
the person writing the page also has to spend a lot of effort on the layout of
|
130
|
-
the page.
|
131
|
-
each of which will be laid out
|
132
|
-
automatically into pre-defined templates, leaving the editor to concentra
|
133
|
-
|
134
|
-
The only difference between a 'page' and a 'piece' is that pages are directly
|
135
|
-
publicly accessible through a URL, whereas pieces are only visible within the
|
136
|
-
context of a page.
|
137
|
-
|
138
|
-
|
139
|
-
Each of the objects in the content hierarchy -- pages, boxes & pieces -- can
|
140
|
-
have zero or more fields. These are where the actual content of the site, such
|
141
|
-
as text or images, will be entered by the site editors.
|
142
|
-
|
143
|
-
Each
|
144
|
-
or 'piece' has zero or more 'boxes' defined. Each of those boxes can be
|
145
|
-
configured to accept the addition of zero or more types of page or piece
|
146
|
-
|
147
|
-
|
148
|
-
The creation of the various relationships is done using normal Ruby code. Every
|
149
|
-
element in the content hierarchy has an associated Ruby class which has
|
150
|
-
configuration information about the fields
|
151
|
-
|
152
214
|
## GETTING STARTED
|
153
215
|
|
154
|
-
Install RVM
|
216
|
+
**Install RVM**
|
155
217
|
|
156
218
|
curl -L get.rvm.io | bash -s stable
|
157
219
|
source ~/.rvm/scripts/'rvm'
|
158
220
|
rvm requirements
|
159
221
|
|
160
|
-
Install Ruby
|
222
|
+
**Install Ruby**
|
223
|
+
|
224
|
+
Spontaneous needs ruby >= 1.9.3 and Ruby >= 2.0 is preferred
|
161
225
|
|
162
|
-
rvm install 1.
|
226
|
+
rvm install 2.1.1
|
163
227
|
|
164
|
-
Install Spontaneous
|
228
|
+
**Install Spontaneous**
|
165
229
|
|
166
230
|
gem install spontaneous
|
167
231
|
|
@@ -173,3 +237,6 @@ Now generate your site. Replace example.com with the domain of your site.
|
|
173
237
|
spot init
|
174
238
|
spot server
|
175
239
|
|
240
|
+
and get started hacking the schema for your site...
|
241
|
+
|
242
|
+
|
@@ -626,9 +626,11 @@ img.missing {
|
|
626
626
|
|
627
627
|
.slot-tabs {
|
628
628
|
@extend .clearfix;
|
629
|
-
height: 32px;
|
629
|
+
min-height: 32px;
|
630
630
|
vertical-align: top;
|
631
631
|
@include vertical-gradient(#666666, #4d4d4d);
|
632
|
+
padding-left: $container-padding;
|
633
|
+
padding-right: $container-padding;
|
632
634
|
li {
|
633
635
|
@include box-sizing;
|
634
636
|
@include interface;
|
@@ -636,9 +638,11 @@ img.missing {
|
|
636
638
|
color: #dddddd;
|
637
639
|
display: block;
|
638
640
|
float: left;
|
639
|
-
height:
|
641
|
+
height: 32px;
|
640
642
|
padding-left: 16px;
|
641
|
-
|
643
|
+
padding-right: 16px;
|
644
|
+
min-width: 130px;
|
645
|
+
max-width: 160px;
|
642
646
|
padding-top: 9px;
|
643
647
|
cursor: pointer;
|
644
648
|
border-left: solid 1px transparent;
|
@@ -660,14 +664,26 @@ img.missing {
|
|
660
664
|
}
|
661
665
|
}
|
662
666
|
li:first-child {
|
663
|
-
padding-left:
|
664
|
-
width: 160px + $container-padding;
|
667
|
+
padding-left: 0;
|
668
|
+
// width: 160px + $container-padding;
|
665
669
|
&.active {
|
666
670
|
.down {
|
667
671
|
padding-left: $container-padding;
|
668
672
|
}
|
669
673
|
}
|
670
674
|
}
|
675
|
+
li:hover:first-child:before,
|
676
|
+
li.active:first-child:before {
|
677
|
+
@include vertical-gradient($highlight + #111111, $highlight);
|
678
|
+
background-color: $highlight;
|
679
|
+
content: "";
|
680
|
+
position: absolute;
|
681
|
+
width: $container-padding;
|
682
|
+
height: 32px;
|
683
|
+
// outline: solid 1px red;
|
684
|
+
left: -$container-padding - 1;
|
685
|
+
top: 0;
|
686
|
+
}
|
671
687
|
li.active + li:hover {
|
672
688
|
border-left-color: $highlight - #151515;
|
673
689
|
}
|
@@ -997,6 +1013,8 @@ img.missing {
|
|
997
1013
|
margin-right: 1px;
|
998
1014
|
width: 100%;
|
999
1015
|
background: none;
|
1016
|
+
padding-left: 0;
|
1017
|
+
padding-right: 0;
|
1000
1018
|
li {
|
1001
1019
|
@include box-sizing;
|
1002
1020
|
@include interface;
|
@@ -1012,8 +1030,10 @@ img.missing {
|
|
1012
1030
|
color: #666666;
|
1013
1031
|
// color: #f2f2f2;
|
1014
1032
|
}
|
1015
|
-
li:first-child {
|
1033
|
+
li:first-child:before {
|
1016
1034
|
// @include rounded-top-left;
|
1035
|
+
// padding-left: 0;
|
1036
|
+
display: none;
|
1017
1037
|
}
|
1018
1038
|
li:nth-child(4) {
|
1019
1039
|
// @include rounded-top-right;
|
@@ -1055,7 +1075,7 @@ img.missing {
|
|
1055
1075
|
a {
|
1056
1076
|
@include button(#6b6b6b);
|
1057
1077
|
// background-color: #6b6b6b;
|
1058
|
-
padding-left:
|
1078
|
+
padding-left: 16px;
|
1059
1079
|
padding-right: 8px;
|
1060
1080
|
& + a {
|
1061
1081
|
margin-left: $unit;
|
@@ -235,18 +235,14 @@ $text-edit-width: 621px;
|
|
235
235
|
}
|
236
236
|
}
|
237
237
|
.actions {
|
238
|
-
margin:
|
239
|
-
margin-left: 0;
|
240
|
-
position: absolute;
|
241
|
-
top: 0;
|
242
|
-
right: 0;
|
243
|
-
width: 60px;
|
238
|
+
margin: 8px 0 0 0;
|
244
239
|
.button {
|
245
240
|
display: block;
|
246
241
|
}
|
247
242
|
.button.clear {
|
248
|
-
color
|
249
|
-
|
243
|
+
@include button-color($highlight, $action);
|
244
|
+
// color: #5b5b5b;
|
245
|
+
// background-color: #d1d1d1;
|
250
246
|
width: 100%;
|
251
247
|
}
|
252
248
|
}
|
@@ -274,24 +270,6 @@ $text-edit-width: 621px;
|
|
274
270
|
.landscape {
|
275
271
|
img {
|
276
272
|
max-width: 200px;
|
277
|
-
// max-height: 100px;
|
278
|
-
}
|
279
|
-
.actions {
|
280
|
-
width: auto;
|
281
|
-
display: block;
|
282
|
-
margin: 8px 0 0 0;
|
283
|
-
position: relative;
|
284
|
-
.button {
|
285
|
-
display: inline-block;
|
286
|
-
width: 109px;
|
287
|
-
}
|
288
|
-
.button.clear {
|
289
|
-
position: static;
|
290
|
-
}
|
291
|
-
.button.change {
|
292
|
-
position: absolute;
|
293
|
-
right: 0;
|
294
|
-
}
|
295
273
|
}
|
296
274
|
}
|
297
275
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
@import "definitions.css.scss";
|
2
|
+
@import "font.css.scss";
|
2
3
|
|
3
4
|
body#schema-error {
|
4
5
|
@extend .meta-background;
|
@@ -64,6 +65,21 @@ body#schema-error {
|
|
64
65
|
}
|
65
66
|
}
|
66
67
|
|
68
|
+
.warning {
|
69
|
+
font-size: 0.9em;
|
70
|
+
margin-bottom: 0.5em;
|
71
|
+
padding-bottom: 0;
|
72
|
+
color: #888;
|
73
|
+
position: relative;
|
74
|
+
}
|
75
|
+
.warning:before {
|
76
|
+
font-family: 'FontAwesome';
|
77
|
+
content: "\f071";
|
78
|
+
color: $highlight;
|
79
|
+
position: absolute;
|
80
|
+
left: -12px;
|
81
|
+
font-size: 1.1em;
|
82
|
+
}
|
67
83
|
}
|
68
84
|
li:last-child {
|
69
85
|
margin-bottom: 0;
|
@@ -87,4 +103,10 @@ body#schema-error {
|
|
87
103
|
}
|
88
104
|
}
|
89
105
|
}
|
106
|
+
code {
|
107
|
+
font-size: 0.9em;
|
108
|
+
background-color: rgba(255, 255, 255, 0.1);
|
109
|
+
padding-left: 4px;
|
110
|
+
padding-right: 4px;
|
111
|
+
}
|
90
112
|
}
|