character 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -1
  3. data/.rspec +1 -0
  4. data/README.md +185 -14
  5. data/Rakefile +8 -1
  6. data/app/assets/images/character/logo.jpg +0 -0
  7. data/app/assets/javascripts/character.coffee +134 -0
  8. data/app/assets/javascripts/character/dashboard/_visitors.coffee +27 -0
  9. data/app/assets/javascripts/character/dashboard/layout.coffee +156 -0
  10. data/app/assets/javascripts/character/dashboard/module.coffee +51 -0
  11. data/app/assets/javascripts/character/generic/details.coffee +233 -0
  12. data/app/assets/javascripts/character/generic/helpers/compact_object.coffee +7 -0
  13. data/app/assets/javascripts/character/generic/helpers/data_inputs.coffee +21 -0
  14. data/app/assets/javascripts/character/generic/helpers/date_select.coffee +45 -0
  15. data/app/assets/javascripts/character/generic/helpers/editor.coffee +11 -0
  16. data/app/assets/javascripts/character/generic/helpers/redactor.coffee +38 -0
  17. data/app/assets/javascripts/character/generic/helpers/reorder.coffee +36 -0
  18. data/app/assets/javascripts/character/generic/layout.coffee +40 -0
  19. data/app/assets/javascripts/character/generic/list.coffee +214 -0
  20. data/app/assets/javascripts/character/generic/model.coffee +135 -0
  21. data/app/assets/javascripts/character/generic/module.coffee +157 -0
  22. data/app/assets/javascripts/character/images/module.coffee +148 -0
  23. data/app/assets/javascripts/character/pages/module.coffee +43 -0
  24. data/app/assets/javascripts/character/posts/module.coffee +113 -0
  25. data/app/assets/javascripts/character/settings/_admins.coffee +61 -0
  26. data/app/assets/javascripts/character/settings/_authors.coffee +56 -0
  27. data/app/assets/javascripts/character/settings/_categories.coffee +61 -0
  28. data/app/assets/javascripts/character/settings/_layout.coffee +7 -0
  29. data/app/assets/javascripts/character/settings/_redirects.coffee +56 -0
  30. data/app/assets/javascripts/character/settings/_website.coffee +7 -0
  31. data/app/assets/javascripts/character/settings/details.coffee +16 -0
  32. data/app/assets/javascripts/character/settings/layout.coffee +46 -0
  33. data/app/assets/javascripts/character/settings/module.coffee +78 -0
  34. data/app/assets/stylesheets/character.scss +37 -0
  35. data/app/assets/stylesheets/character/_admins.scss +30 -0
  36. data/app/assets/stylesheets/character/_authors.scss +30 -0
  37. data/app/assets/stylesheets/character/_categories.scss +32 -0
  38. data/app/assets/stylesheets/character/_dashboard.scss +143 -0
  39. data/app/assets/stylesheets/character/_posts.scss +93 -0
  40. data/app/assets/stylesheets/character/_redirects.scss +35 -0
  41. data/app/assets/stylesheets/character/base.scss +967 -0
  42. data/app/assets/stylesheets/character/typography.scss +29 -0
  43. data/app/controllers/character/api_controller.rb +170 -0
  44. data/app/controllers/character/application_controller.rb +37 -0
  45. data/app/controllers/character/settings_controller.rb +72 -0
  46. data/app/controllers/concerns/character/auth_concern.rb +41 -0
  47. data/app/controllers/concerns/character/instance_concern.rb +31 -0
  48. data/app/controllers/concerns/character/json_object_concern.rb +32 -0
  49. data/app/controllers/concerns/character/model_class_concern.rb +28 -0
  50. data/app/controllers/concerns/character/params_concern.rb +33 -0
  51. data/app/controllers/concerns/character/templates_concern.rb +32 -0
  52. data/app/controllers/concerns/not_found.rb +18 -0
  53. data/app/controllers/concerns/website_settings.rb +18 -0
  54. data/app/controllers/pages_controller.rb +8 -0
  55. data/app/controllers/posts_controller.rb +43 -0
  56. data/app/helpers/character_helper.rb +8 -0
  57. data/app/helpers/page_helper.rb +67 -0
  58. data/app/inputs/foundation_string_input.rb +44 -0
  59. data/app/inputs/foundation_switch_input.rb +35 -0
  60. data/app/models/character/image.rb +12 -0
  61. data/app/models/character/page.rb +21 -0
  62. data/app/models/character/post.rb +32 -12
  63. data/app/models/character/post_author.rb +22 -0
  64. data/app/models/character/post_category.rb +21 -0
  65. data/app/models/character/redirect.rb +15 -0
  66. data/app/models/character/settings/variable.rb +23 -0
  67. data/app/models/character/sitemap/sitemap_generator_helper.rb +15 -0
  68. data/app/models/character/user.rb +29 -0
  69. data/app/models/concerns/created_ago.rb +12 -0
  70. data/app/models/concerns/hideable.rb +27 -0
  71. data/app/models/concerns/orderable.rb +8 -0
  72. data/app/models/concerns/report.rb +11 -0
  73. data/app/models/concerns/report_daily.rb +32 -0
  74. data/app/models/concerns/report_monthly.rb +18 -0
  75. data/app/models/concerns/report_weekly.rb +19 -0
  76. data/app/models/concerns/updated_ago.rb +12 -0
  77. data/app/models/reports/analytics_daily.rb +26 -0
  78. data/app/models/reports/analytics_monthly.rb +16 -0
  79. data/app/models/reports/analytics_weekly.rb +16 -0
  80. data/app/services/google_analytics.rb +43 -0
  81. data/app/uploaders/character/image_uploader.rb +22 -0
  82. data/app/uploaders/character/settings/file_uploader.rb +5 -0
  83. data/app/views/character/character.html.erb +67 -0
  84. data/app/views/character/generic/form.html.erb +8 -0
  85. data/app/views/character/pages/form.html.erb +28 -0
  86. data/app/views/character/posts/form.html.erb +38 -0
  87. data/app/views/character/settings/admins.html.erb +29 -0
  88. data/app/views/character/settings/post_authors.html.erb +28 -0
  89. data/app/views/character/settings/post_categories.html.erb +31 -0
  90. data/app/views/character/settings/redirects.html.erb +30 -0
  91. data/app/views/character/settings/settings_group.html.erb +67 -0
  92. data/app/views/errors/not_found.html.erb +157 -0
  93. data/app/views/pages/_default.html.erb +3 -0
  94. data/app/views/pages/_redactor.html.erb +3 -0
  95. data/app/views/pages/show.html.erb +5 -0
  96. data/app/views/posts/_post.html.erb +17 -0
  97. data/app/views/posts/author.html.erb +18 -0
  98. data/app/views/posts/category.html.erb +18 -0
  99. data/app/views/posts/index.html.erb +18 -0
  100. data/app/views/posts/rss.builder +19 -0
  101. data/app/views/posts/show.html.erb +14 -0
  102. data/app/views/shared/_google_analytics.html.erb +13 -0
  103. data/character.gemspec +48 -5
  104. data/doc/README_old.md +161 -0
  105. data/doc/generic_app.md +19 -0
  106. data/doc/img/demo-1.jpg +0 -0
  107. data/doc/img/demo-2.jpg +0 -0
  108. data/doc/img/demo-3.jpg +0 -0
  109. data/doc/img/demo-4.jpg +0 -0
  110. data/doc/img/demo-5.jpg +0 -0
  111. data/doc/instances.md +39 -0
  112. data/doc/settings.md +1 -0
  113. data/lib/character.rb +29 -1
  114. data/lib/character/engine.rb +33 -1
  115. data/lib/character/generators/bootstrap_generator.rb +51 -0
  116. data/lib/character/instance.rb +59 -0
  117. data/lib/character/routing.rb +42 -5
  118. data/lib/character/settings.rb +101 -0
  119. data/lib/character/templates/admin.coffee +15 -0
  120. data/lib/character/templates/admin.scss +3 -0
  121. data/lib/character/templates/application.html.erb +44 -0
  122. data/lib/character/templates/application.scss +12 -0
  123. data/lib/character/templates/assets.rb +1 -0
  124. data/lib/character/templates/initializer.rb +5 -0
  125. data/lib/character/templates/settings.scss +11 -0
  126. data/lib/character/templates/settings.yml +67 -0
  127. data/lib/character/templates/typography.scss +13 -0
  128. data/lib/character/version.rb +2 -2
  129. data/lib/mongoid/carrierwave_serialization_patch.rb +9 -0
  130. data/lib/tasks/analytics.rake +52 -0
  131. data/test/config/application.rb +65 -0
  132. data/test/config/mongoid.yml +12 -0
  133. data/test/config/secrets.yml +22 -0
  134. data/test/controllers/character/api_controller_test.rb +94 -0
  135. data/test/factories/product_factory.rb +5 -0
  136. data/test/lib/character/engine_test.rb +33 -0
  137. data/test/lib/character/routing_test.rb +31 -0
  138. data/test/test_helper.rb +48 -0
  139. data/vendor/assets/javascripts/backbone.js +944 -794
  140. data/vendor/assets/javascripts/jquery.fileupload.js +1426 -0
  141. data/vendor/assets/javascripts/jquery.form.js +1278 -0
  142. data/vendor/assets/javascripts/jquery.iframe-transport.js +214 -0
  143. data/vendor/assets/javascripts/raphael.js +8117 -0
  144. data/vendor/assets/javascripts/raphael.morris.js +1885 -0
  145. data/vendor/assets/javascripts/underscore.inflection.js +177 -0
  146. data/vendor/assets/javascripts/underscore.string.js +1 -1
  147. data/vendor/assets/stylesheets/csspinner.css +361 -0
  148. data/vendor/assets/stylesheets/normalize.css +423 -0
  149. metadata +499 -49
  150. data/app/controllers/character/posts_controller.rb +0 -27
  151. data/lib/generators/character/install_generator.rb +0 -42
  152. data/lib/generators/character/templates/README +0 -1
  153. data/lib/generators/character/templates/admin/character.rb +0 -3
  154. data/vendor/assets/fonts/general_foundicons.eot +0 -0
  155. data/vendor/assets/fonts/general_foundicons.svg +0 -15
  156. data/vendor/assets/fonts/general_foundicons.ttf +0 -0
  157. data/vendor/assets/fonts/general_foundicons.woff +0 -0
  158. data/vendor/assets/javascripts/character/index.js.coffee +0 -53
  159. data/vendor/assets/javascripts/character/models/post.js.coffee +0 -39
  160. data/vendor/assets/javascripts/character/views/app.js.coffee +0 -81
  161. data/vendor/assets/javascripts/character/views/editor.js.coffee +0 -231
  162. data/vendor/assets/javascripts/character/views/editor_settings.js.coffee +0 -44
  163. data/vendor/assets/javascripts/character/views/index.js.coffee +0 -116
  164. data/vendor/assets/javascripts/character/views/preview.js.coffee +0 -49
  165. data/vendor/assets/javascripts/jquery.smartresize.js +0 -30
  166. data/vendor/assets/javascripts/lodash.js +0 -4258
  167. data/vendor/assets/javascripts/showdown.js +0 -62
  168. data/vendor/assets/stylesheets/character/_base.css.scss +0 -84
  169. data/vendor/assets/stylesheets/character/_icons.css.scss.erb +0 -96
  170. data/vendor/assets/stylesheets/character/_view_editor.css.scss +0 -115
  171. data/vendor/assets/stylesheets/character/_view_index.css.scss +0 -73
  172. data/vendor/assets/stylesheets/character/_view_preview.css.scss +0 -49
  173. data/vendor/assets/stylesheets/character/index.css.scss +0 -32
@@ -0,0 +1,8 @@
1
+ <%= simple_form_for @object, url: @form_action_url, method: :post do |f| %>
2
+ <% @generic_form_fields.each do |name| %>
3
+ <%= f.input name %>
4
+ <% end %>
5
+
6
+ <%= f.input :_position, as: :hidden if @object.class.fields.keys.include? '_position' %>
7
+ <%= f.input :hidden, as: :hidden if @object.class.fields.keys.include? 'hidden' %>
8
+ <% end %>
@@ -0,0 +1,28 @@
1
+ <% if @object.persisted? %>
2
+
3
+ <div class='chr-form-small chr-form-scrolled-up'>
4
+ <%= simple_nested_form_for @object, url: @form_action_url, method: :post do |f| %>
5
+ <%= f.input :title %>
6
+ <%= f.input :path %>
7
+ <%= f.input :template_name, collection: page_templates, include_blank: false %>
8
+ <%= f.input :hidden, as: :hidden %>
9
+ <% end %>
10
+ </div>
11
+
12
+ <article class='page'>
13
+ <%= render partial: @object.template_path %>
14
+ </article>
15
+
16
+ <% else %>
17
+
18
+ <div class='chr-form-small'>
19
+ <%= simple_form_for @object, url: @form_action_url do |f| %>
20
+ <%= f.input :title %>
21
+ <%= f.input :path %>
22
+ <%= f.input :template_name, collection: page_templates, include_blank: false %>
23
+ <%= f.input :hidden, as: :hidden %>
24
+ </div>
25
+ <% end %>
26
+ </div>
27
+
28
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <div class='chr-form-scrolled-up'>
2
+ <%= simple_nested_form_for @object, url: @form_action_url, method: :post do |f| %>
3
+
4
+ <%= f.simple_fields_for :featured_image do |ff| %>
5
+ <%= ff.input :url, as: :hidden, input_html: { value: @object.featured_image_url } %>
6
+ <% end %>
7
+
8
+ <% if Character::PostCategory.all.size > 0 %>
9
+ <%= f.input :category_id, label: 'Posted in', include_blank: true, collection: Character::PostCategory.all %>
10
+ <% end %>
11
+
12
+ <% if Character::PostAuthor.all.size > 0 %>
13
+ <%= f.input :author_id, label: 'Author', include_blank: true, collection: Character::PostAuthor.all %>
14
+ <% end %>
15
+
16
+ <%= f.input :published_at %>
17
+
18
+ <%= f.input :title, as: :hidden %>
19
+ <%= f.input :subtitle, as: :hidden %>
20
+ <%= f.input :body_html, as: :hidden %>
21
+ <%= f.input :hidden, as: :hidden %>
22
+ <% end %>
23
+ </div>
24
+
25
+ <figure id='character_post_featured_image_uploader'
26
+ class='character-post-featured-image-upload'
27
+ data-image-url='<%= @object.featured_image_url %>'></figure>
28
+
29
+ <article class='post'>
30
+ <h1 class='character-editor'
31
+ data-input-name='character_post[title]'
32
+ data-options="placeholder:'Post Title ';disableReturn:true;disableToolbar:true;disableInsert:true;"
33
+ ><%= @object.title %></h1>
34
+
35
+ <textarea id='redactor' class='character-redactor' placeholder='Type text here...'>
36
+ <%= @object.body_html.try(:html_safe) %>
37
+ </textarea>
38
+ </article>
@@ -0,0 +1,29 @@
1
+ <% @model = @character_instance.user_model.constantize %>
2
+
3
+ <div class='chr-form-large'>
4
+ <%= simple_form_for :objects, url: @action_url, method: :post do |form| %>
5
+ <%= hidden_field_tag :class_name, @model.to_s %>
6
+
7
+ <% (@objects || @model.all).each do |user| %>
8
+ <div class='admin'>
9
+ <%= form.simple_fields_for "[]", user do |f| %>
10
+ <%= link_to 'http://gravatar.com', title: 'Change picture', target: '_blank', class: 'picture' do %>
11
+ <%= image_tag user.gravatar_url(62), width: '62px', height: '62px' %>
12
+ <% end %>
13
+
14
+ <a class='action_delete' data-item-class='admin' href='#'><i class='chr-icon icon-close-alt'></i></a>
15
+ <%= f.input :email, as: :email, required: true, label: false, placeholder: 'Admins e-mail' %>
16
+ <%= f.input :_destroy, as: :hidden, value: false %>
17
+ <% end %>
18
+ </div>
19
+ <% end %>
20
+
21
+ <div id='template' class='admin'>
22
+ <%= form.simple_fields_for "[]", @model.new do |f| %>
23
+ <i class='chr-icon icon-plus-alt'></i>
24
+ <a class='action_delete' data-item-class='admin' href='#' style='display:none;'><i class='chr-icon icon-close-alt'></i></a>
25
+ <%= f.input :email, required: true, as: :email, label: false, placeholder: 'Add new admin' %>
26
+ <% end %>
27
+ </div>
28
+ <% end %>
29
+ </div>
@@ -0,0 +1,28 @@
1
+ <% @model = Character::PostAuthor %>
2
+
3
+ <div class='chr-form-large'>
4
+ <%= simple_form_for :objects, url: @action_url, method: :post do |form| %>
5
+ <%= hidden_field_tag :class_name, @model.to_s %>
6
+
7
+ <% @model.all.each do |author| %>
8
+ <%= form.simple_fields_for "[]", author do |f| %>
9
+ <div class='fields'>
10
+ <a class='action_delete' data-item-class='fields' href='#'><i class='chr-icon icon-close-alt'></i></a>
11
+ <%= f.input :name, label: false, placeholder: 'Name', required: true %>
12
+ <%= f.input :email, label: false, placeholder: 'Email', required: true %>
13
+ <%= f.input :_destroy, as: :hidden, value: false %>
14
+ </div>
15
+ <% end %>
16
+ <% end %>
17
+
18
+ <div id='template' class='fields'>
19
+ <a class='action_delete' data-item-class='fields' href='#' style='display: none;'><i class='chr-icon icon-close-alt'></i></a>
20
+ <%= form.simple_fields_for "[]", @model.new do |f| %>
21
+ <%= f.input :name, label: false, placeholder: 'Name', required: true %>
22
+ <%= f.input :email, label: false, placeholder: 'Email', required: true %>
23
+ <% end %>
24
+ </div>
25
+
26
+ <a href='#' class='action_add'>Add an author</a>
27
+ <% end %>
28
+ </div>
@@ -0,0 +1,31 @@
1
+ <% @model = Character::PostCategory %>
2
+
3
+ <div class='chr-form-large'>
4
+ <%= simple_form_for :objects, url: @action_url, method: :post do |form| %>
5
+ <%= hidden_field_tag :class_name, @model.to_s %>
6
+
7
+ <div class='sortable'>
8
+ <% @model.all.each do |category| %>
9
+ <%= form.simple_fields_for "[]", category do |f| %>
10
+ <div class='fields category'>
11
+ <i class='action_sort fa fa-sort'></i>
12
+ <a class='action_delete' data-item-class='fields' href='#'><i class='chr-icon icon-close-alt'></i></a>
13
+ <%= f.input :title, label: false, placeholder: 'Category title', required: true %>
14
+ <%= f.input :_destroy, as: :hidden, value: false %>
15
+ <%= f.input :_position, as: :hidden %>
16
+ </div>
17
+ <% end %>
18
+ <% end %>
19
+ </div>
20
+
21
+ <div id='template' class='fields category'>
22
+ <i class='action_sort fa fa-sort' style='display: none;'></i>
23
+ <i class='chr-icon icon-plus-alt'></i>
24
+ <a class='action_delete' data-item-class='fields' href='#' style='display: none;'><i class='chr-icon icon-close-alt'></i></a>
25
+ <%= form.simple_fields_for "[]", @model.new do |f| %>
26
+ <%= f.input :title, label: false, placeholder: 'Add new category', required: true, input_html: { autocomplete: 'off' } %>
27
+ <%= f.input :_position, as: :hidden %>
28
+ <% end %>
29
+ </div>
30
+ <% end %>
31
+ </div>
@@ -0,0 +1,30 @@
1
+ <% @model = Character::Redirect %>
2
+
3
+ <div class='chr-form-large'>
4
+ <%= simple_form_for :objects, url: @action_url, method: :post do |form| %>
5
+ <%= hidden_field_tag :class_name, @model.to_s %>
6
+
7
+ <% @model.all.each do |redirect| %>
8
+ <%= form.simple_fields_for "[]", redirect do |f| %>
9
+ <div class='fields'>
10
+ <a class='action_delete' data-item-class='fields' href='#'><i class='chr-icon icon-close-alt'></i></a>
11
+ <%= f.input :path, label: false, placeholder: 'Path', required: true %>
12
+ <%= f.input :type, collection: @model::TYPE_CHOICES, include_blank: false, required: true, label: false %>
13
+ <%= f.input :destination, label: false, placeholder: 'Redirect to', required: true %>
14
+ <%= f.input :_destroy, as: :hidden, value: false %>
15
+ </div>
16
+ <% end %>
17
+ <% end %>
18
+
19
+ <div id='template' class='fields'>
20
+ <a class='action_delete' data-item-class='fields' href='#' style='display: none;'><i class='chr-icon icon-close-alt'></i></a>
21
+ <%= form.simple_fields_for "[]", @model.new do |f| %>
22
+ <%= f.input :path, label: false, placeholder: 'Path', required: true %>
23
+ <%= f.input :type, collection: @model::TYPE_CHOICES, include_blank: false, required: true, label: false %>
24
+ <%= f.input :destination, label: false, placeholder: 'Redirect to', required: true %>
25
+ <% end %>
26
+ </div>
27
+
28
+ <a href='#' class='action_add'>Add a redirect</a>
29
+ <% end %>
30
+ </div>
@@ -0,0 +1,67 @@
1
+ <% @model = Character::Settings::Variable %>
2
+
3
+ <%= simple_form_for :objects, url: @action_url, method: :post, class: :default do |form| %>
4
+ <%= hidden_field_tag :class_name, @model.to_s %>
5
+ <% ::Settings.group(@settings_group_name).each do |name, object| %>
6
+
7
+ <%= form.simple_fields_for "[]", object.stored_object do |f| %>
8
+ <% case object.type %>
9
+ <% when "file" %>
10
+ <div class='input file-link <%= f.object.name.parameterize %>'>
11
+ <label class='file optional'><%= f.object.name %></label>
12
+ <%= link_to object.value, object.value, target: '_blank' %>
13
+ <%= f.input :file, as: :file, label: false %>
14
+ </div>
15
+
16
+ <% when "code" %>
17
+ <%= f.input :value,
18
+ as: :text,
19
+ label: object.name,
20
+ placeholder: object.description,
21
+ wrapper_class: 'input ' + object.name.parameterize,
22
+ input_html: { value: object.value, rows: 6 } %>
23
+
24
+ <% when "text" %>
25
+ <%= f.input :value,
26
+ as: :text,
27
+ label: object.name,
28
+ placeholder: object.description,
29
+ wrapper_class: 'input ' + object.name.parameterize,
30
+ input_html: { value: object.value, rows: 3 } %>
31
+
32
+ <% when "redactor" %>
33
+ <%= f.input :value,
34
+ as: :text,
35
+ label: object.name,
36
+ placeholder: object.description,
37
+ wrapper_class: 'input ' + object.name.parameterize,
38
+ input_html: { value: object.value, rows: 3, class: 'character-redactor' } %>
39
+
40
+ <% when "integer" %>
41
+ <%= f.input :value,
42
+ as: :integer,
43
+ label: object.name,
44
+ placeholder: object.description,
45
+ wrapper_class: 'input ' + object.name.parameterize,
46
+ input_html: { value: object.value } %>
47
+
48
+ <% when "float" %>
49
+ <%= f.input :value,
50
+ as: :float,
51
+ label: object.name,
52
+ placeholder: object.description,
53
+ wrapper_class: 'input ' + object.name.parameterize,
54
+ input_html: { value: object.value } %>
55
+
56
+ <% else %>
57
+ <%= f.input :value,
58
+ label: object.name,
59
+ placeholder: object.description,
60
+ wrapper_class: 'input ' + object.name.parameterize,
61
+ input_html: { value: object.value } %>
62
+
63
+ <% end %>
64
+ <% end %>
65
+
66
+ <% end %>
67
+ <% end %>
@@ -0,0 +1,157 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Page Not Found :(</title>
6
+ <style>
7
+ ::-moz-selection {
8
+ background: #b3d4fc;
9
+ text-shadow: none;
10
+ }
11
+
12
+ ::selection {
13
+ background: #b3d4fc;
14
+ text-shadow: none;
15
+ }
16
+
17
+ html {
18
+ padding: 30px 10px;
19
+ font-size: 20px;
20
+ line-height: 1.4;
21
+ color: #737373;
22
+ background: #f0f0f0;
23
+ -webkit-text-size-adjust: 100%;
24
+ -ms-text-size-adjust: 100%;
25
+ }
26
+
27
+ html,
28
+ input {
29
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
30
+ }
31
+
32
+ body {
33
+ max-width: 500px;
34
+ _width: 500px;
35
+ padding: 30px 20px 50px;
36
+ border: 1px solid #b3b3b3;
37
+ border-radius: 4px;
38
+ margin: 0 auto;
39
+ box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
40
+ background: #fcfcfc;
41
+ }
42
+
43
+ h1 {
44
+ margin: 0 10px;
45
+ font-size: 50px;
46
+ text-align: center;
47
+ }
48
+
49
+ h1 span {
50
+ color: #bbb;
51
+ }
52
+
53
+ h3 {
54
+ margin: 1.5em 0 0.5em;
55
+ }
56
+
57
+ p {
58
+ margin: 1em 0;
59
+ }
60
+
61
+ ul {
62
+ padding: 0 0 0 40px;
63
+ margin: 1em 0;
64
+ }
65
+
66
+ .container {
67
+ max-width: 380px;
68
+ _width: 380px;
69
+ margin: 0 auto;
70
+ }
71
+
72
+ /* google search */
73
+
74
+ #goog-fixurl ul {
75
+ list-style: none;
76
+ padding: 0;
77
+ margin: 0;
78
+ }
79
+
80
+ #goog-fixurl form {
81
+ margin: 0;
82
+ }
83
+
84
+ #goog-wm-qt,
85
+ #goog-wm-sb {
86
+ border: 1px solid #bbb;
87
+ font-size: 16px;
88
+ line-height: normal;
89
+ vertical-align: top;
90
+ color: #444;
91
+ border-radius: 2px;
92
+ }
93
+
94
+ #goog-wm-qt {
95
+ width: 220px;
96
+ height: 20px;
97
+ padding: 5px;
98
+ margin: 5px 10px 0 0;
99
+ box-shadow: inset 0 1px 1px #ccc;
100
+ }
101
+
102
+ #goog-wm-sb {
103
+ display: inline-block;
104
+ height: 32px;
105
+ padding: 0 10px;
106
+ margin: 5px 0 0;
107
+ white-space: nowrap;
108
+ cursor: pointer;
109
+ background-color: #f5f5f5;
110
+ background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
111
+ background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
112
+ background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
113
+ background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
114
+ -webkit-appearance: none;
115
+ -moz-appearance: none;
116
+ appearance: none;
117
+ *overflow: visible;
118
+ *display: inline;
119
+ *zoom: 1;
120
+ }
121
+
122
+ #goog-wm-sb:hover,
123
+ #goog-wm-sb:focus {
124
+ border-color: #aaa;
125
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
126
+ background-color: #f8f8f8;
127
+ }
128
+
129
+ #goog-wm-qt:hover,
130
+ #goog-wm-qt:focus {
131
+ border-color: #105cb6;
132
+ outline: 0;
133
+ color: #222;
134
+ }
135
+
136
+ input::-moz-focus-inner {
137
+ padding: 0;
138
+ border: 0;
139
+ }
140
+ </style>
141
+ </head>
142
+ <body>
143
+ <div class="container">
144
+ <h1>Not found <span>:(</span></h1>
145
+ <p>Sorry, but the page you were trying to view does not exist.</p>
146
+ <p>It looks like this was the result of either:</p>
147
+ <ul>
148
+ <li>a mistyped address</li>
149
+ <li>an out-of-date link</li>
150
+ </ul>
151
+ <script>
152
+ var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
153
+ </script>
154
+ <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
155
+ </div>
156
+ </body>
157
+ </html>
@@ -0,0 +1,3 @@
1
+ <%# WARNING: @object variable should point page object %>
2
+
3
+ <%= editable('body', 'Type text here...') %>
@@ -0,0 +1,3 @@
1
+ <%# WARNING: @object variable should point page object %>
2
+
3
+ <%= redactor('body') %>
@@ -0,0 +1,5 @@
1
+ <% set_meta_tags title: @object.title %>
2
+
3
+ <article class='page'>
4
+ <%= render partial: @object.template_path %>
5
+ </article>
@@ -0,0 +1,17 @@
1
+ <article class='post'>
2
+ <header class='post-header'>
3
+ <%= link_to posts_show_path(post), rel: 'bookmark' do %><h1><%= post.title %></h1><% end %>
4
+ </header>
5
+
6
+ <section class='post-body'>
7
+ <%= post.body_html.html_safe %>
8
+ </section>
9
+
10
+ <footer class='post-footer'>
11
+ <!-- TODO: add author link -->
12
+ <% unless post.category.nil? %>
13
+ <%= link_to post.category.title, posts_category_path(post.category) %>
14
+ <% end %>
15
+ <time><%= l post.published_at, format: :long %></time>
16
+ </footer>
17
+ </article>