dust-cms 0.0.05

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +3 -0
  3. data/Rakefile +5 -0
  4. data/app/assets/images/admin/blank.png +0 -0
  5. data/app/assets/images/admin/dust-letterpress.png +0 -0
  6. data/app/assets/images/admin/main-back.png +0 -0
  7. data/app/assets/images/admin/ui/delete-icon.png +0 -0
  8. data/app/assets/images/admin/ui/edit-icon.png +0 -0
  9. data/app/assets/images/admin/ui/handle.png +0 -0
  10. data/app/assets/images/admin/ui/icons.png +0 -0
  11. data/app/assets/images/admin/ui/index-icon.png +0 -0
  12. data/app/assets/images/admin/ui/new-icon.png +0 -0
  13. data/app/assets/images/entypo/entypo.eot +0 -0
  14. data/app/assets/images/entypo/entypo.svg +13 -0
  15. data/app/assets/images/entypo/entypo.ttf +0 -0
  16. data/app/assets/images/entypo/entypo.woff +0 -0
  17. data/app/assets/images/entypo-social/entypo-social.eot +0 -0
  18. data/app/assets/images/entypo-social/entypo-social.svg +13 -0
  19. data/app/assets/images/entypo-social/entypo-social.ttf +0 -0
  20. data/app/assets/images/entypo-social/entypo-social.woff +0 -0
  21. data/app/assets/images/fancybox/blank.gif +0 -0
  22. data/app/assets/images/fancybox/fancy_close.png +0 -0
  23. data/app/assets/images/fancybox/fancy_loading.png +0 -0
  24. data/app/assets/images/fancybox/fancy_nav_left.png +0 -0
  25. data/app/assets/images/fancybox/fancy_nav_right.png +0 -0
  26. data/app/assets/images/fancybox/fancy_shadow_e.png +0 -0
  27. data/app/assets/images/fancybox/fancy_shadow_n.png +0 -0
  28. data/app/assets/images/fancybox/fancy_shadow_ne.png +0 -0
  29. data/app/assets/images/fancybox/fancy_shadow_nw.png +0 -0
  30. data/app/assets/images/fancybox/fancy_shadow_s.png +0 -0
  31. data/app/assets/images/fancybox/fancy_shadow_se.png +0 -0
  32. data/app/assets/images/fancybox/fancy_shadow_sw.png +0 -0
  33. data/app/assets/images/fancybox/fancy_shadow_w.png +0 -0
  34. data/app/assets/images/fancybox/fancy_title_left.png +0 -0
  35. data/app/assets/images/fancybox/fancy_title_main.png +0 -0
  36. data/app/assets/images/fancybox/fancy_title_over.png +0 -0
  37. data/app/assets/images/fancybox/fancy_title_right.png +0 -0
  38. data/app/assets/images/fancybox/fancybox-x.png +0 -0
  39. data/app/assets/images/fancybox/fancybox-y.png +0 -0
  40. data/app/assets/images/fancybox/fancybox.png +0 -0
  41. data/app/assets/javascripts/cms/dust/defaults.js.coffee +31 -0
  42. data/app/assets/javascripts/cms/dust/gallery/photo.js.coffee +1 -0
  43. data/app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee +21 -0
  44. data/app/assets/javascripts/cms/dust/gallery/photos.js.coffee +6 -0
  45. data/app/assets/javascripts/cms/dust/gallery/photos_view.js.coffee +12 -0
  46. data/app/assets/javascripts/cms/dust/gallery/router.js.coffee +14 -0
  47. data/app/assets/javascripts/cms/dust/gallery.js.coffee +31 -0
  48. data/app/assets/javascripts/cms/dust/nav.js.coffee +21 -0
  49. data/app/assets/javascripts/cms/dust/sections.js.coffee +21 -0
  50. data/app/assets/javascripts/cms/dust/sortables.js.coffee +64 -0
  51. data/app/assets/javascripts/cms/dust/window.js.coffee +11 -0
  52. data/app/assets/javascripts/cms/dust.js.coffee +19 -0
  53. data/app/assets/javascripts/cms/lib/backbone.js +42 -0
  54. data/app/assets/javascripts/cms/lib/fineuploader-3.0.js +71 -0
  55. data/app/assets/javascripts/cms/lib/handlebars.js +1920 -0
  56. data/app/assets/javascripts/cms/lib/spin.js +2 -0
  57. data/app/assets/javascripts/cms/lib/underscore.js +1 -0
  58. data/app/assets/javascripts/cms.js +14 -0
  59. data/app/assets/javascripts/core/jquery.form.js +785 -0
  60. data/app/assets/javascripts/core/jquery.html5.js +29 -0
  61. data/app/assets/javascripts/core/jquery.mousewheel-3.0.2.pack.js +13 -0
  62. data/app/assets/javascripts/core/jquery.placeholder.min.js +11 -0
  63. data/app/assets/javascripts/core/nestedsortables.js +429 -0
  64. data/app/assets/javascripts/core/serializelist.js +66 -0
  65. data/app/assets/javascripts/core/tipTip.js +21 -0
  66. data/app/assets/javascripts/core.js +4 -0
  67. data/app/assets/javascripts/front_end/application-main.js.coffee +27 -0
  68. data/app/assets/javascripts/front_end/map.js +34 -0
  69. data/app/assets/javascripts/front_end/video.js +4569 -0
  70. data/app/assets/javascripts/front_end.js +18 -0
  71. data/app/assets/stylesheets/cms/flash_messages.css.scss +17 -0
  72. data/app/assets/stylesheets/cms/footer.css.scss +12 -0
  73. data/app/assets/stylesheets/cms/forms.css.scss +67 -0
  74. data/app/assets/stylesheets/cms/gallery.css.scss +21 -0
  75. data/app/assets/stylesheets/cms/icons.css.scss +123 -0
  76. data/app/assets/stylesheets/cms/jquery-ui.custom.scss +6 -0
  77. data/app/assets/stylesheets/cms/layout.css.scss +162 -0
  78. data/app/assets/stylesheets/cms/lib/grid.css.scss +116 -0
  79. data/app/assets/stylesheets/cms/lib/mixins.css.scss +20 -0
  80. data/app/assets/stylesheets/cms/login.scss +12 -0
  81. data/app/assets/stylesheets/cms/main.old +155 -0
  82. data/app/assets/stylesheets/cms/nav.css.scss +73 -0
  83. data/app/assets/stylesheets/cms/sections.scss +17 -0
  84. data/app/assets/stylesheets/cms/sortables.scss +20 -0
  85. data/app/assets/stylesheets/cms.css.scss +30 -0
  86. data/app/assets/stylesheets/core/app/defaults.css.scss +556 -0
  87. data/app/assets/stylesheets/core/plugins/PIE.htc +96 -0
  88. data/app/assets/stylesheets/core/plugins/jquery-ui-1.8.5.custom.old +572 -0
  89. data/app/assets/stylesheets/core/plugins/jquery.fancybox-1.3.1.css +364 -0
  90. data/app/assets/stylesheets/core/plugins/skeleton.css +155 -0
  91. data/app/assets/stylesheets/core/plugins/tipTip.css +115 -0
  92. data/app/assets/stylesheets/core/plugins/uploadify.css +25 -0
  93. data/app/assets/stylesheets/core/reset/reset.css +211 -0
  94. data/app/assets/stylesheets/core/reset/text.css +86 -0
  95. data/app/assets/stylesheets/core.css.scss +14 -0
  96. data/app/assets/stylesheets/front_end/app/just-delete-me-and-start-over.css.scss +70 -0
  97. data/app/assets/stylesheets/front_end.css +14 -0
  98. data/app/controllers/authentication_controller.rb +30 -0
  99. data/app/controllers/dust/blocks_controller.rb +49 -0
  100. data/app/controllers/dust/contacts_controller.rb +89 -0
  101. data/app/controllers/dust/dashboard_controller.rb +26 -0
  102. data/app/controllers/dust/gallery/albums_controller.rb +49 -0
  103. data/app/controllers/dust/gallery/api/photos_controller.rb +28 -0
  104. data/app/controllers/dust/gallery/photos_controller.rb +47 -0
  105. data/app/controllers/dust/menu_items_controller.rb +51 -0
  106. data/app/controllers/dust/menus_controller.rb +47 -0
  107. data/app/controllers/dust/pages_controller.rb +52 -0
  108. data/app/controllers/dust/password_resets_controller.rb +48 -0
  109. data/app/controllers/dust/posts_controller.rb +47 -0
  110. data/app/controllers/dust/roles_controller.rb +47 -0
  111. data/app/controllers/dust/sessions_controller.rb +29 -0
  112. data/app/controllers/dust/site_wides_controller.rb +28 -0
  113. data/app/controllers/dust/sortable_controller.rb +17 -0
  114. data/app/controllers/dust/users_controller.rb +52 -0
  115. data/app/controllers/front_end/page_controller.rb +27 -0
  116. data/app/controllers/front_end/post_controller.rb +14 -0
  117. data/app/controllers/front_end/sitemap_controller.rb +11 -0
  118. data/app/controllers/front_end_controller.rb +18 -0
  119. data/app/helpers/error_messages_helper.rb +23 -0
  120. data/app/helpers/exceptions.rb +4 -0
  121. data/app/helpers/layout_helper.rb +28 -0
  122. data/app/helpers/misc_helper.rb +29 -0
  123. data/app/helpers/region_helper.rb +32 -0
  124. data/app/mailers/post_office.rb +39 -0
  125. data/app/models/ckeditor/asset.rb +7 -0
  126. data/app/models/ckeditor/attachment_file.rb +7 -0
  127. data/app/models/ckeditor/picture.rb +7 -0
  128. data/app/models/dust/block.rb +114 -0
  129. data/app/models/dust/builder/page.rb +84 -0
  130. data/app/models/dust/builder/site_wide.rb +50 -0
  131. data/app/models/dust/contact.rb +34 -0
  132. data/app/models/dust/gallery/album.rb +14 -0
  133. data/app/models/dust/gallery/photo.rb +23 -0
  134. data/app/models/dust/handlebar.rb +59 -0
  135. data/app/models/dust/map.rb +21 -0
  136. data/app/models/dust/menu/item_dependency.rb +66 -0
  137. data/app/models/dust/menu.rb +11 -0
  138. data/app/models/dust/menu_item.rb +64 -0
  139. data/app/models/dust/page.rb +52 -0
  140. data/app/models/dust/post.rb +39 -0
  141. data/app/models/dust/role.rb +9 -0
  142. data/app/models/dust/section.rb +11 -0
  143. data/app/models/dust/session.rb +28 -0
  144. data/app/models/dust/site_wide.rb +41 -0
  145. data/app/models/dust/sort.rb +52 -0
  146. data/app/models/dust/sortable_item.rb +21 -0
  147. data/app/models/dust/user.rb +49 -0
  148. data/app/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
  149. data/app/uploaders/ckeditor_picture_uploader.rb +53 -0
  150. data/app/uploaders/gallery_photo_uploader.rb +52 -0
  151. data/app/uploaders/image_uploader.rb +51 -0
  152. data/app/uploaders/slide_image_uploader.rb +51 -0
  153. data/app/views/dust/blocks/_block.html.haml +20 -0
  154. data/app/views/dust/blocks/_form.html.haml +50 -0
  155. data/app/views/dust/blocks/_normal_block_content.html.haml +1 -0
  156. data/app/views/dust/blocks/_search.html.haml +4 -0
  157. data/app/views/dust/blocks/edit.html.haml +4 -0
  158. data/app/views/dust/blocks/index.html.haml +16 -0
  159. data/app/views/dust/blocks/new.html.haml +3 -0
  160. data/app/views/dust/contacts/_form.html.haml +37 -0
  161. data/app/views/dust/contacts/_import_csv.html.haml +8 -0
  162. data/app/views/dust/contacts/_instance.html.haml +13 -0
  163. data/app/views/dust/contacts/_search.html.haml +4 -0
  164. data/app/views/dust/contacts/edit.html.haml +2 -0
  165. data/app/views/dust/contacts/index.html.haml +17 -0
  166. data/app/views/dust/contacts/index.json.haml +6 -0
  167. data/app/views/dust/contacts/new.html.haml +3 -0
  168. data/app/views/dust/dashboard/_options.html.haml +6 -0
  169. data/app/views/dust/dashboard/show.html.haml +33 -0
  170. data/app/views/dust/dashboard/update.html.haml +6 -0
  171. data/app/views/dust/gallery/albums/_form.html.haml +52 -0
  172. data/app/views/dust/gallery/albums/_photo.html.haml +12 -0
  173. data/app/views/dust/gallery/albums/edit.html.haml +3 -0
  174. data/app/views/dust/gallery/albums/index.html.haml +18 -0
  175. data/app/views/dust/gallery/albums/new.html.haml +4 -0
  176. data/app/views/dust/gallery/albums/show.html.haml +2 -0
  177. data/app/views/dust/gallery/photos/_form.html.haml +26 -0
  178. data/app/views/dust/gallery/photos/edit.html.haml +3 -0
  179. data/app/views/dust/gallery/photos/index.html.haml +18 -0
  180. data/app/views/dust/gallery/photos/new.html.haml +4 -0
  181. data/app/views/dust/gallery/photos/show.json.jbuilder +5 -0
  182. data/app/views/dust/menu_items/_form.html.haml +24 -0
  183. data/app/views/dust/menu_items/_roots.html.haml +3 -0
  184. data/app/views/dust/menu_items/_search.html.haml +4 -0
  185. data/app/views/dust/menu_items/_tree.html.haml +11 -0
  186. data/app/views/dust/menu_items/edit.html.haml +2 -0
  187. data/app/views/dust/menu_items/index.html.haml +19 -0
  188. data/app/views/dust/menu_items/new.html.haml +2 -0
  189. data/app/views/dust/menus/_form.html.haml +39 -0
  190. data/app/views/dust/menus/edit.html.haml +3 -0
  191. data/app/views/dust/menus/index.html.haml +18 -0
  192. data/app/views/dust/menus/new.html.haml +4 -0
  193. data/app/views/dust/menus/show.html.haml +2 -0
  194. data/app/views/dust/pages/_form.html.haml +68 -0
  195. data/app/views/dust/pages/_search.html.haml +4 -0
  196. data/app/views/dust/pages/edit.html.haml +3 -0
  197. data/app/views/dust/pages/index.html.haml +16 -0
  198. data/app/views/dust/pages/new.html.haml +3 -0
  199. data/app/views/dust/password_resets/edit.html.haml +6 -0
  200. data/app/views/dust/password_resets/new.html.haml +10 -0
  201. data/app/views/dust/posts/_form.html.haml +39 -0
  202. data/app/views/dust/posts/edit.html.haml +3 -0
  203. data/app/views/dust/posts/index.html.haml +18 -0
  204. data/app/views/dust/posts/new.html.haml +4 -0
  205. data/app/views/dust/posts/show.html.haml +2 -0
  206. data/app/views/dust/roles/_form.html.haml +11 -0
  207. data/app/views/dust/roles/edit.html.haml +2 -0
  208. data/app/views/dust/roles/index.html.haml +14 -0
  209. data/app/views/dust/roles/new.html.haml +2 -0
  210. data/app/views/dust/sessions/_form.html.haml +18 -0
  211. data/app/views/dust/sessions/new.html.haml +2 -0
  212. data/app/views/dust/site_wides/new.html.haml +19 -0
  213. data/app/views/dust/slides/_form.html.haml +26 -0
  214. data/app/views/dust/slides/_search.html.haml +4 -0
  215. data/app/views/dust/slides/_slideshow.html.haml +12 -0
  216. data/app/views/dust/slides/edit.html.haml +5 -0
  217. data/app/views/dust/slides/index.html.haml +25 -0
  218. data/app/views/dust/slides/index.js.haml +2 -0
  219. data/app/views/dust/slides/new.html.haml +6 -0
  220. data/app/views/dust/slides/show.html.haml +15 -0
  221. data/app/views/dust/sortable/sort.js.coffee +10 -0
  222. data/app/views/dust/users/_form.html.haml +27 -0
  223. data/app/views/dust/users/_search.html.haml +4 -0
  224. data/app/views/dust/users/_user_bar.html.haml +10 -0
  225. data/app/views/dust/users/dashboard.html.haml +40 -0
  226. data/app/views/dust/users/edit.html.haml +2 -0
  227. data/app/views/dust/users/index.html.haml +16 -0
  228. data/app/views/dust/users/new.html.haml +2 -0
  229. data/app/views/front_end/page/_admin.html.haml +6 -0
  230. data/app/views/front_end/page/search.html.haml +9 -0
  231. data/app/views/front_end/page/show.html.haml +8 -0
  232. data/app/views/front_end/post/_admin.html.haml +7 -0
  233. data/app/views/front_end/post/show.html.haml +12 -0
  234. data/app/views/front_end/sitemap/index.html.haml +4 -0
  235. data/app/views/front_end/sitemap/index.xml.haml +9 -0
  236. data/app/views/layouts/app_partials/_analytics.html.haml +11 -0
  237. data/app/views/layouts/app_partials/_application_tree.html.haml +6 -0
  238. data/app/views/layouts/cms.html.haml +52 -0
  239. data/app/views/layouts/cms_partials/_nav.html.haml +5 -0
  240. data/app/views/layouts/front_end.html.haml +22 -0
  241. data/app/views/layouts/sessions.html.haml +19 -0
  242. data/app/views/post_office/contact_confirmation.html.haml +7 -0
  243. data/app/views/post_office/contact_request.html.haml +24 -0
  244. data/app/views/post_office/password_reset_instructions.html.haml +6 -0
  245. data/app/views/widgets/_contact_form.html.haml +20 -0
  246. data/app/views/widgets/_map.html.haml +16 -0
  247. data/app/views/widgets/_quick_contact_form.html.haml +10 -0
  248. data/app/views/widgets/_site_map.html.haml +7 -0
  249. data/app/views/widgets/_site_menu.html.haml +10 -0
  250. data/app/views/widgets/_slider.html.haml +0 -0
  251. data/app/views/widgets/_user_login.html.haml +13 -0
  252. data/app/views/widgets/galleries/_archive.html.haml +1 -0
  253. data/app/views/widgets/galleries/_show.html.haml +0 -0
  254. data/app/views/widgets/posts/_index.html.haml +1 -0
  255. data/app/views/widgets/posts/_show.html.haml +0 -0
  256. data/config/authorization_rules.rb +23 -0
  257. data/config/generators/templates/haml/scaffold/_form.html.haml +19 -0
  258. data/config/generators/templates/haml/scaffold/edit.html.haml +3 -0
  259. data/config/generators/templates/haml/scaffold/index.html.haml +18 -0
  260. data/config/generators/templates/haml/scaffold/new.html.haml +4 -0
  261. data/config/generators/templates/haml/scaffold/show.html.haml +2 -0
  262. data/config/generators/templates/rails/scaffold_controller/controller.rb +51 -0
  263. data/config/initializers/app_string_io.rb +12 -0
  264. data/config/initializers/ckeditor.rb +18 -0
  265. data/config/initializers/client_side_validations.rb +13 -0
  266. data/config/initializers/dust_config.rb +22 -0
  267. data/config/initializers/dust_core_reloader.rb +11 -0
  268. data/config/initializers/sorcery.rb +398 -0
  269. data/config/initializers/wrap_parameters.rb +14 -0
  270. data/config/routes.rb +55 -0
  271. data/db/migrate/20101206025845_create_roles.rb +11 -0
  272. data/db/migrate/20110217212357_create_ckeditor_assets.rb +31 -0
  273. data/db/migrate/20110218000640_create_pages.rb +15 -0
  274. data/db/migrate/20110218000641_create_sections.rb +15 -0
  275. data/db/migrate/20110218002220_create_contacts.rb +22 -0
  276. data/db/migrate/20110218020608_create_menu_items.rb +21 -0
  277. data/db/migrate/20110507014158_create_blocks.rb +23 -0
  278. data/db/migrate/20121106195938_sorcery_core.rb +17 -0
  279. data/db/migrate/20121106195939_sorcery_remember_me.rb +15 -0
  280. data/db/migrate/20121106195940_sorcery_reset_password.rb +17 -0
  281. data/db/migrate/20121106195941_sorcery_activity_logging.rb +17 -0
  282. data/db/migrate/20121106200754_sorcery_user_activation.rb +17 -0
  283. data/db/migrate/20130220044031_create_site_wides.rb +11 -0
  284. data/db/migrate/20130220051658_create_menus.rb +11 -0
  285. data/db/migrate/20130223030136_create_albums.rb +13 -0
  286. data/db/migrate/20130223040911_create_photos.rb +15 -0
  287. data/db/migrate/20130223044553_create_posts.rb +15 -0
  288. data/lib/dust/engine.rb +18 -0
  289. data/lib/dust/utils.rb +14 -0
  290. data/lib/dust/version.rb +3 -0
  291. data/lib/dust-cms.rb +53 -0
  292. data/lib/tasks/dust_tasks.rake +51 -0
  293. data/lib/tasks/seed.rb +46 -0
  294. metadata +613 -0
@@ -0,0 +1,211 @@
1
+ /* `XHTML, HTML4, HTML5 Reset
2
+ ----------------------------------------------------------------------------------------------------*/
3
+
4
+ a,
5
+ abbr,
6
+ acronym,
7
+ address,
8
+ applet,
9
+ article,
10
+ aside,
11
+ audio,
12
+ b,
13
+ big,
14
+ blockquote,
15
+ body,
16
+ canvas,
17
+ caption,
18
+ center,
19
+ cite,
20
+ code,
21
+ dd,
22
+ del,
23
+ details,
24
+ dfn,
25
+ dialog,
26
+ div,
27
+ dl,
28
+ dt,
29
+ em,
30
+ embed,
31
+ fieldset,
32
+ figcaption,
33
+ figure,
34
+ font,
35
+ footer,
36
+ form,
37
+ h1,
38
+ h2,
39
+ h3,
40
+ h4,
41
+ h5,
42
+ h6,
43
+ header,
44
+ hgroup,
45
+ hr,
46
+ html,
47
+ i,
48
+ iframe,
49
+ img,
50
+ ins,
51
+ kbd,
52
+ label,
53
+ legend,
54
+ li,
55
+ mark,
56
+ menu,
57
+ meter,
58
+ nav,
59
+ object,
60
+ ol,
61
+ output,
62
+ p,
63
+ pre,
64
+ progress,
65
+ q,
66
+ rp,
67
+ rt,
68
+ ruby,
69
+ s,
70
+ samp,
71
+ section,
72
+ small,
73
+ span,
74
+ strike,
75
+ strong,
76
+ sub,
77
+ summary,
78
+ sup,
79
+ table,
80
+ tbody,
81
+ td,
82
+ tfoot,
83
+ th,
84
+ thead,
85
+ time,
86
+ tr,
87
+ tt,
88
+ u,
89
+ ul,
90
+ var,
91
+ video,
92
+ xmp {
93
+ border: 0;
94
+ margin: 0;
95
+ padding: 0;
96
+ font-size: 100%;
97
+ }
98
+
99
+ html,
100
+ body {
101
+ height: 100%;
102
+ }
103
+
104
+ article,
105
+ aside,
106
+ details,
107
+ figcaption,
108
+ figure,
109
+ footer,
110
+ header,
111
+ hgroup,
112
+ menu,
113
+ nav,
114
+ section {
115
+ /*
116
+ Override the default (display: inline) for
117
+ browsers that do not recognize HTML5 tags.
118
+
119
+ IE8 (and lower) requires a shiv:
120
+ http://ejohn.org/blog/html5-shiv
121
+ */
122
+ display: block;
123
+ }
124
+
125
+ b,
126
+ strong {
127
+ /*
128
+ Makes browsers agree.
129
+ IE + Opera = font-weight: bold.
130
+ Gecko + WebKit = font-weight: bolder.
131
+ */
132
+ font-weight: bold;
133
+ }
134
+
135
+ img {
136
+ color: transparent;
137
+ font-size: 0;
138
+ vertical-align: middle;
139
+ /*
140
+ For IE.
141
+ http://css-tricks.com/ie-fix-bicubic-scaling-for-images
142
+ */
143
+ -ms-interpolation-mode: bicubic;
144
+ }
145
+
146
+ ol,
147
+ ul {
148
+ list-style: none;
149
+ }
150
+
151
+ li {
152
+ /*
153
+ For IE6 + IE7:
154
+
155
+ "display: list-item" keeps bullets from
156
+ disappearing if hasLayout is triggered.
157
+ */
158
+ display: list-item;
159
+ }
160
+
161
+ table {
162
+ border-collapse: collapse;
163
+ border-spacing: 0;
164
+ }
165
+
166
+ th,
167
+ td,
168
+ caption {
169
+ font-weight: normal;
170
+ vertical-align: top;
171
+ text-align: left;
172
+ }
173
+
174
+ q {
175
+ quotes: none;
176
+ }
177
+
178
+ q:before,
179
+ q:after {
180
+ content: '';
181
+ content: none;
182
+ }
183
+
184
+ sub,
185
+ sup,
186
+ small {
187
+ font-size: 75%;
188
+ }
189
+
190
+ sub,
191
+ sup {
192
+ line-height: 0;
193
+ position: relative;
194
+ vertical-align: baseline;
195
+ }
196
+
197
+ sub {
198
+ bottom: -0.25em;
199
+ }
200
+
201
+ sup {
202
+ top: -0.5em;
203
+ }
204
+
205
+ svg {
206
+ /*
207
+ For IE9. Without, occasionally draws shapes
208
+ outside the boundaries of <svg> rectangle.
209
+ */
210
+ overflow: hidden;
211
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ 960 Grid System ~ Text CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+ */
7
+
8
+ /* `Basic HTML
9
+ ----------------------------------------------------------------------------------------------------*/
10
+
11
+ body {
12
+ font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
13
+ }
14
+
15
+ pre,
16
+ code {
17
+ font-family: 'DejaVu Sans Mono', Menlo, Consolas, monospace;
18
+ }
19
+
20
+ hr {
21
+ border: 0 #ccc solid;
22
+ border-top-width: 1px;
23
+ clear: both;
24
+ height: 0;
25
+ }
26
+
27
+ /* `Headings
28
+ ----------------------------------------------------------------------------------------------------*/
29
+
30
+ h1 {
31
+ font-size: 25px;
32
+ }
33
+
34
+ h2 {
35
+ font-size: 23px;
36
+ }
37
+
38
+ h3 {
39
+ font-size: 21px;
40
+ }
41
+
42
+ h4 {
43
+ font-size: 19px;
44
+ }
45
+
46
+ h5 {
47
+ font-size: 17px;
48
+ }
49
+
50
+ h6 {
51
+ font-size: 15px;
52
+ }
53
+
54
+ /* `Spacing
55
+ ----------------------------------------------------------------------------------------------------*/
56
+
57
+ ol {
58
+ list-style: decimal;
59
+ }
60
+
61
+ ul {
62
+ list-style: disc;
63
+ }
64
+
65
+ li {
66
+ margin-left: 30px;
67
+ }
68
+
69
+ p,
70
+ dl,
71
+ hr,
72
+ h1,
73
+ h2,
74
+ h3,
75
+ h4,
76
+ h5,
77
+ h6,
78
+ ol,
79
+ ul,
80
+ pre,
81
+ table,
82
+ address,
83
+ fieldset,
84
+ figure {
85
+ margin-bottom: 20px;
86
+ }
@@ -0,0 +1,14 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_directory ./core/reset
12
+ *= require_directory ./core/plugins
13
+ *= require_directory ./core/app
14
+ */
@@ -0,0 +1,70 @@
1
+ html {
2
+ color: #333333;
3
+ -webkit-font-smoothing: antialiased;
4
+
5
+ background-color: #ebeded;
6
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(235, 237, 237)), to(rgb(245, 246, 247)));
7
+ background-image: -webkit-linear-gradient(top, rgb(235, 237, 237), rgb(245, 246, 247));
8
+ background-image: -moz-linear-gradient(top, rgb(235, 237, 237), rgb(245, 246, 247));
9
+ background-image: -o-linear-gradient(top, rgb(235, 237, 237), rgb(245, 246, 247));
10
+ background-image: -ms-linear-gradient(top, rgb(235, 237, 237), rgb(245, 246, 247));
11
+ background-image: linear-gradient(top, rgb(235, 237, 237), rgb(245, 246, 247));
12
+ filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ebeded', EndColorStr='#f5f6f7');
13
+
14
+ body {
15
+ background: url(/assets/admin/dust-letterpress.png) 50% 50% no-repeat;
16
+ background-size: 250px;
17
+
18
+ &::after {
19
+ content: "dust cms";
20
+ position: absolute;
21
+ bottom: 20px;
22
+ right: 20px;
23
+
24
+ text-shadow: 1px 1px 0 #fff;
25
+ color: #CDD0D2;
26
+ }
27
+ }
28
+ }
29
+
30
+ body {
31
+ -moz-animation-name: dropHeader;
32
+ -moz-animation-iteration-count: once;
33
+ -moz-animation-timing-function: ease-in;
34
+ -moz-animation-duration: 2s;
35
+
36
+ -webkit-animation-name: dropHeader;
37
+ -webkit-animation-iteration-count: once;
38
+ -webkit-animation-timing-function: ease-in;
39
+ -webkit-animation-duration: 2s;
40
+ }
41
+ @-moz-keyframes dropHeader {
42
+ 0% {
43
+ background-size: 0px;
44
+ }
45
+ 100% {
46
+ background-size: 250px;
47
+ }
48
+ }
49
+ @-webkit-keyframes dropHeader {
50
+ 0% {
51
+ background-size: 0px;
52
+ }
53
+ 100% {
54
+ background-size: 250px;
55
+ }
56
+ }
57
+
58
+ #header_one-blocks-wrapper {
59
+ background:#DC4E00;
60
+ border-bottom: 5px solid #C44500;
61
+ box-shadow: 0 0 5px rgba(0,0,0,0.25);
62
+ }
63
+
64
+ #tree .menu-item {
65
+ padding: 20px;
66
+
67
+ a {
68
+ color: #fff;
69
+ }
70
+ }
@@ -0,0 +1,14 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require core
12
+ *= require_directory ./front_end/app
13
+
14
+ */
@@ -0,0 +1,30 @@
1
+ class AuthenticationController < ActionController::Base
2
+
3
+ protect_from_forgery
4
+ helper :all
5
+
6
+ before_filter { |c| Authorization.current_user = c.current_user }
7
+
8
+ def permission_denied
9
+ flash[:error] = "Sorry, either you need to log in first to view that page."
10
+ if current_user
11
+ redirect_to dust_dashboard_url
12
+ else
13
+ redirect_to root_url
14
+ end
15
+ end
16
+
17
+ def not_authenticated
18
+ redirect_to dust_login_url, :error => "First log in to view this page."
19
+ end
20
+
21
+ def try_return_to_previous_page(url)
22
+ !params[:return].blank? ? redirect_to(params[:return]) : redirect_to(url)
23
+ end
24
+
25
+ protected
26
+ def _prefixes
27
+ @_prefixes_with_partials ||= super | %w(widgets)
28
+ end
29
+
30
+ end
@@ -0,0 +1,49 @@
1
+ module Dust
2
+ class BlocksController < AuthenticationController
3
+
4
+ filter_access_to :all
5
+
6
+ layout 'cms'
7
+
8
+ def index
9
+ @blocks = Dust::Block.page(params[:search], params[:page])
10
+ end
11
+
12
+ def new
13
+ @block = Dust::Block.new(:show => params[:show]) if params[:show]
14
+ @block ||= Dust::Block.new
15
+ end
16
+
17
+ def create
18
+ @block = Dust::Block.new(params[:dust_block])
19
+ if @block.save
20
+ flash[:notice] = "Successfully created block."
21
+ try_return_to_previous_page(dust_blocks_url)
22
+ else
23
+ render :action => 'new'
24
+ end
25
+ end
26
+
27
+ def edit
28
+ @block = Dust::Block.find(params[:id])
29
+ end
30
+
31
+ def update
32
+ @block = Dust::Block.find(params[:id])
33
+ if @block.update_attributes(params[:dust_block])
34
+ flash[:notice] = "Successfully updated block."
35
+ try_return_to_previous_page(dust_blocks_path)
36
+ else
37
+ render :action => 'edit'
38
+ end
39
+ end
40
+
41
+ def destroy
42
+ @block = Dust::Block.find(params[:id])
43
+ @block.destroy
44
+ flash[:notice] = "Successfully destroyed block."
45
+ try_return_to_previous_page(dust_blocks_url)
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,89 @@
1
+ module Dust
2
+ class ContactsController < AuthenticationController
3
+
4
+ require "csv"
5
+
6
+ filter_access_to :all
7
+
8
+ layout 'cms'
9
+
10
+ def index
11
+ @contacts = Dust::Contact.page(params[:search], params[:page], params[:date])
12
+ end
13
+
14
+ def new
15
+ @contact = Dust::Contact.new
16
+ end
17
+
18
+ def create
19
+ @page = Dust::Page.find(1)
20
+ @contact = Dust::Contact.new(params[:dust_contact])
21
+ if @contact.save
22
+ @contact.deliver_messages
23
+ flash[:notice] = "Successfully Sent Message."
24
+ redirect_to root_url
25
+ else
26
+ render :action => 'new', :layout => 'application'
27
+ end
28
+ end
29
+
30
+ def edit
31
+ @contact = Dust::Contact.find(params[:id])
32
+ end
33
+
34
+ def update
35
+ @contact = Dust::Contact.find(params[:id])
36
+ if @contact.update_attributes(params[:dust_contact])
37
+ flash[:notice] = "Successfully updated contact."
38
+ redirect_to @contact
39
+ else
40
+ render :action => 'edit'
41
+ end
42
+ end
43
+
44
+ def destroy
45
+ @contact = Dust::Contact.find(params[:id])
46
+ @contact.destroy
47
+ flash[:notice] = "Successfully destroyed contact."
48
+ redirect_to dust_contacts_url
49
+ end
50
+
51
+ def csv
52
+ @contacts = Dust::Contact.order("created_at DESC")
53
+ if @contacts.empty?
54
+ flash[:error] = "There are no contact requests available."
55
+ redirect_to dust_contacts_path
56
+ else
57
+ csv_string = CSV.generate do |csv|
58
+ csv << ["Name", "Email", "message"]
59
+ @contacts.each do |contact|
60
+ csv << [contact['name'], contact['email'], contact['message']]
61
+ end
62
+ end
63
+
64
+ send_data(csv_string,
65
+ :type => 'text/csv; charset=utf-8; header=present',
66
+ :filename => "AllDust::Contacts#{Date.today}.csv"
67
+ )
68
+ end
69
+ end
70
+
71
+ def csv_import
72
+ csv = CSV.new(params[:csv_import][:file])
73
+ csv.each do |row|
74
+ Dust::Contact.create(:name => row[0],
75
+ :email => row[1],
76
+ :message => row[2]
77
+ )
78
+ end
79
+ csv.close
80
+ flash[:notice] = "Successfully added some Dust::Contact(s)."
81
+ redirect_to contacts_path
82
+ rescue => exception
83
+ # If an exception is thrown, the transaction rolls back and we end up in this rescue block
84
+ error = ERB::Util.h(exception.to_s) # get the error and HTML escape it
85
+ flash[:error] = "Error adding logs. (some #{error}). Please try again."
86
+ redirect_to contacts_path
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,26 @@
1
+ module Dust
2
+ class DashboardController < AuthenticationController
3
+
4
+ filter_access_to :all
5
+
6
+ layout 'cms'
7
+
8
+ def show
9
+ @options = SiteWide.variables_by_category
10
+ end
11
+
12
+
13
+ def update
14
+ @site_wide = Dust::Builder::SiteWide.new(:options => params[:options])
15
+
16
+ if @site_wide.update
17
+ flash[:notice] = "Successfully saved site wide variables!"
18
+ redirect_to dust_dashboard_url
19
+ else
20
+ @options = @site_wide.variables.group_by{ |i| i.category }
21
+ render :action => :show
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,49 @@
1
+ module Dust
2
+ module Gallery
3
+ class AlbumsController < AuthenticationController
4
+
5
+ filter_access_to :all
6
+
7
+ layout 'cms'
8
+
9
+ def index
10
+ @albums = Dust::Gallery::Album.all
11
+ end
12
+
13
+ def new
14
+ @album = Dust::Gallery::Album.new_with_menu_item
15
+ end
16
+
17
+ def edit
18
+ @album = Dust::Gallery::Album.find(params[:id])
19
+ end
20
+
21
+ def create
22
+ @album = Dust::Gallery::Album.new_with_menu_item(params[:dust_gallery_album])
23
+
24
+ if @album.save
25
+ redirect_to edit_dust_gallery_album_path(@album), notice: 'Album was successfully created.'
26
+ else
27
+ render action: "new"
28
+ end
29
+ end
30
+
31
+ def update
32
+ @album = Dust::Gallery::Album.find(params[:id])
33
+
34
+ if @album.update_attributes(params[:dust_gallery_album])
35
+ redirect_to dust_gallery_albums_path, notice: 'Album was successfully updated.'
36
+ else
37
+ render action: "edit"
38
+ end
39
+ end
40
+
41
+ def destroy
42
+ @album = Dust::Gallery::Album.find(params[:id])
43
+ @album.destroy
44
+
45
+ redirect_to dust_gallery_albums_url
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,28 @@
1
+ module Dust
2
+ module Gallery
3
+ module Api
4
+ class PhotosController < AuthenticationController
5
+
6
+ respond_to :json
7
+
8
+ def show
9
+ respond_with Dust::Gallery::Photo.find(params[:id])
10
+ end
11
+
12
+ def create
13
+ file = AppSpecificStringIO.new(params[:qqfile], request.raw_post)
14
+ respond_with Dust::Gallery::Photo.create :filename => file, :album_id => params[:album_id]
15
+ end
16
+
17
+ def update
18
+ respond_with Dust::Gallery::Photo.update params[:dust_gallery_photo]
19
+ end
20
+
21
+ def destroy
22
+ respond_with Dust::Gallery::Photo.destroy params[:id]
23
+ end
24
+
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,47 @@
1
+ module Dust
2
+ module Gallery
3
+ class PhotosController < AuthenticationController
4
+
5
+ filter_access_to :all
6
+
7
+ layout 'cms'
8
+
9
+ def show
10
+ @photo = Dust::Gallery::Photo.find params[:id]
11
+ end
12
+
13
+ def edit
14
+ @photo = Dust::Gallery::Photo.find params[:id]
15
+ end
16
+
17
+ #def create
18
+ #file = AppSpecificStringIO.new(params[:qqfile], request.raw_post)
19
+ #@photo = Dust::Gallery::Photo.new :filename => file, :album_id => params[:album_id]
20
+
21
+ #if @photo.save
22
+ #redirect_to @photo, notice: 'Photo was successfully created.'
23
+ #else
24
+ #render :json => {success: false}
25
+ #end
26
+ #end
27
+
28
+ def update
29
+ @photo = Photo.find(params[:id])
30
+
31
+ if @photo.update_attributes(params[:dust_gallery_photo])
32
+ redirect_to edit_dust_gallery_album_path(@photo.album), notice: 'Photo was successfully updated.'
33
+ else
34
+ render action: "edit"
35
+ end
36
+ end
37
+
38
+ def destroy
39
+ @photo = Photo.find(params[:id])
40
+ @photo.destroy
41
+
42
+ redirect_to edit_dust_gallery_album_path(@photo.album)
43
+ end
44
+
45
+ end
46
+ end
47
+ end