aura 0.0.1.pre10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. data/.gitignore +6 -0
  2. data/.travis.yml +3 -0
  3. data/Gemfile +2 -0
  4. data/HISTORY.md +95 -0
  5. data/README.md +53 -0
  6. data/Rakefile +27 -0
  7. data/Scribefile +8 -0
  8. data/app/css/_utilities.scss +88 -0
  9. data/app/css/admin.scss +21 -0
  10. data/app/css/admin/_settings.scss +136 -0
  11. data/app/css/admin/chrome.scss +208 -0
  12. data/app/css/admin/common.scss +78 -0
  13. data/app/css/admin/forms.scss +342 -0
  14. data/app/css/admin/jquery_wysiwyg.scss +96 -0
  15. data/app/css/admin/loading.scss +18 -0
  16. data/app/css/admin/meta.scss +42 -0
  17. data/app/css/admin/reset.scss +46 -0
  18. data/app/css/admin/sections.scss +79 -0
  19. data/app/css/admin/setup.scss +22 -0
  20. data/app/css/admin/sidebar.scss +136 -0
  21. data/app/css/admin/slug.scss +78 -0
  22. data/app/css/admin/uiscreen.scss +22 -0
  23. data/app/css/admin/wysiwyg_field.scss +11 -0
  24. data/app/css/admin_watermark.scss +23 -0
  25. data/app/css/default_home_page.scss +13 -0
  26. data/app/css/login.scss +47 -0
  27. data/app/helpers/admin_helpers.rb +59 -0
  28. data/app/helpers/flash_helpers.rb +86 -0
  29. data/app/helpers/form_builder_helpers.rb +9 -0
  30. data/app/helpers/html_helpers.rb +27 -0
  31. data/app/helpers/jquery_helpers.rb +26 -0
  32. data/app/helpers/main_helpers.rb +67 -0
  33. data/app/helpers/page_helpers.rb +92 -0
  34. data/app/helpers/template_helpers.rb +94 -0
  35. data/app/helpers/user_helpers.rb +45 -0
  36. data/app/init/admin.rb +34 -0
  37. data/app/init/extensions.rb +18 -0
  38. data/app/init/pistol.rb +11 -0
  39. data/app/init/sequel.rb +11 -0
  40. data/app/main.rb +106 -0
  41. data/app/migrations/page.rb +29 -0
  42. data/app/migrations/settings.rb +11 -0
  43. data/app/migrations/user.rb +13 -0
  44. data/app/models/page.rb +116 -0
  45. data/app/models/page_seed.rb +47 -0
  46. data/app/models/settings.rb +59 -0
  47. data/app/models/user.rb +60 -0
  48. data/app/routes/admin.rb +44 -0
  49. data/app/routes/css_js.rb +53 -0
  50. data/app/routes/design_tests.rb +15 -0
  51. data/app/routes/editor.rb +152 -0
  52. data/app/routes/site.rb +33 -0
  53. data/app/routes/user.rb +48 -0
  54. data/app/views/admin/_back_to_dashboard.haml +3 -0
  55. data/app/views/admin/dashboard.haml +46 -0
  56. data/app/views/admin/layout.haml +73 -0
  57. data/app/views/admin/settings.haml +40 -0
  58. data/app/views/admin/settings/database.haml +42 -0
  59. data/app/views/base/crumbs.haml +50 -0
  60. data/app/views/base/delete.haml +19 -0
  61. data/app/views/base/edit.haml +61 -0
  62. data/app/views/base/errors.haml +10 -0
  63. data/app/views/base/form.haml +11 -0
  64. data/app/views/base/list.haml +14 -0
  65. data/app/views/base/list_actions.haml +4 -0
  66. data/app/views/base/list_item.haml +7 -0
  67. data/app/views/base/nav.haml +36 -0
  68. data/app/views/base/new.haml +36 -0
  69. data/app/views/base/preview.haml +28 -0
  70. data/app/views/base/tabs.haml +12 -0
  71. data/app/views/default_home_page.haml +15 -0
  72. data/app/views/design_tests/admin_styles.haml +58 -0
  73. data/app/views/form_builder/builder.haml +29 -0
  74. data/app/views/page/edit.haml +29 -0
  75. data/app/views/page/form.haml +22 -0
  76. data/app/views/page/meta_form.haml +22 -0
  77. data/app/views/page/new.haml +26 -0
  78. data/app/views/user/edit.haml +52 -0
  79. data/app/views/user/form.haml +43 -0
  80. data/app/views/user/list.haml +11 -0
  81. data/app/views/user/login.haml +33 -0
  82. data/app/views/user/new.haml +25 -0
  83. data/app/views/user/welcome.haml +29 -0
  84. data/app/views/watermark/watermark.haml +16 -0
  85. data/aura.gemspec +36 -0
  86. data/bin/aura +8 -0
  87. data/config/database.rb +12 -0
  88. data/config/extensions.rb +5 -0
  89. data/config/scss.rb +14 -0
  90. data/config/user.rb +10 -0
  91. data/default/.gitignore +6 -0
  92. data/default/Gemfile +11 -0
  93. data/default/README.md +24 -0
  94. data/default/Rakefile +8 -0
  95. data/default/app/README +3 -0
  96. data/default/app/css/.gitignore +0 -0
  97. data/default/app/helpers/helpers.rb.example +9 -0
  98. data/default/app/js/.gitignore +0 -0
  99. data/default/app/migrations/model.rb.example +20 -0
  100. data/default/app/models/model.rb.example +11 -0
  101. data/default/app/models/page-ext.rb.example +17 -0
  102. data/default/app/routes/site.rb.example +5 -0
  103. data/default/app/views/hello.haml.example +1 -0
  104. data/default/config.ru +3 -0
  105. data/default/config/.gitignore +0 -0
  106. data/default/config/database.rb.example +30 -0
  107. data/default/config/extensions.rb +5 -0
  108. data/default/config/user.rb.example +10 -0
  109. data/default/db/.gitignore +0 -0
  110. data/default/init.rb +15 -0
  111. data/default/public/.gitignore +0 -0
  112. data/extensions/contact_form/migrations/contact_form.rb +13 -0
  113. data/extensions/contact_form/models/contact_form.rb +13 -0
  114. data/extensions/contact_form/routes/contact_form.rb +11 -0
  115. data/extensions/contact_form/views/contact_form/edit.haml +8 -0
  116. data/extensions/contact_form/views/contact_form/form.haml +3 -0
  117. data/extensions/contact_form/views/contact_form/nav.haml +42 -0
  118. data/extensions/contact_form/views/contact_form/responses.haml +20 -0
  119. data/extensions/contact_form/views/contact_form/tabs.haml +8 -0
  120. data/extensions/default_theme/css/theme/_settings.scss +3 -0
  121. data/extensions/default_theme/css/theme/chrome.scss +66 -0
  122. data/extensions/default_theme/css/theme/reset.scss +34 -0
  123. data/extensions/default_theme/css/theme/style.scss +3 -0
  124. data/extensions/default_theme/info.yml +2 -0
  125. data/extensions/default_theme/public/browse.png +0 -0
  126. data/extensions/default_theme/views/base/id_portfolio.haml +32 -0
  127. data/extensions/default_theme/views/base/show.haml +31 -0
  128. data/extensions/default_theme/views/errors/error.haml +9 -0
  129. data/extensions/default_theme/views/errors/not_found.haml +11 -0
  130. data/extensions/default_theme/views/layout.haml +33 -0
  131. data/lib/aura.rb +315 -0
  132. data/lib/aura/admin.rb +41 -0
  133. data/lib/aura/app.rb +4 -0
  134. data/lib/aura/cli.rb +19 -0
  135. data/lib/aura/cli/base.rb +89 -0
  136. data/lib/aura/cli/helpers.rb +32 -0
  137. data/lib/aura/editor.rb +30 -0
  138. data/lib/aura/extension.rb +189 -0
  139. data/lib/aura/files.rb +38 -0
  140. data/lib/aura/menu.rb +142 -0
  141. data/lib/aura/models.rb +80 -0
  142. data/lib/aura/public.rb +68 -0
  143. data/lib/aura/rendering.rb +134 -0
  144. data/lib/aura/seeder.rb +38 -0
  145. data/lib/aura/slugs.rb +87 -0
  146. data/lib/aura/subtype.rb +48 -0
  147. data/lib/aura/tasks.rb +24 -0
  148. data/lib/aura/tasks/common.rb +17 -0
  149. data/lib/aura/tasks/db.rake +54 -0
  150. data/lib/aura/utils.rb +81 -0
  151. data/lib/aura/version.rb +25 -0
  152. data/lib/core/hasharray.rb +65 -0
  153. data/lib/core/object_ext.rb +9 -0
  154. data/lib/sequel/plugins/aura_custom.rb +16 -0
  155. data/lib/sequel/plugins/aura_editable.rb +39 -0
  156. data/lib/sequel/plugins/aura_hierarchy.rb +82 -0
  157. data/lib/sequel/plugins/aura_model.rb +271 -0
  158. data/lib/sequel/plugins/aura_renderable.rb +42 -0
  159. data/lib/sequel/plugins/aura_sluggable.rb +103 -0
  160. data/lib/sequel/plugins/aura_subtyped.rb +83 -0
  161. data/lib/terra.rb +185 -0
  162. data/lib/terra/ext.rb +16 -0
  163. data/lib/terra/field.rb +98 -0
  164. data/lib/terra/fields.rb +122 -0
  165. data/lib/terra/fieldset.rb +93 -0
  166. data/lib/terra/form.rb +111 -0
  167. data/manual/configuration.md +42 -0
  168. data/manual/extensions.md +45 -0
  169. data/manual/files.md +70 -0
  170. data/manual/helpers.md +39 -0
  171. data/manual/index.md +65 -0
  172. data/manual/models.md +58 -0
  173. data/manual/recipes.md +38 -0
  174. data/manual/recipes/bundling_sample_data.md +30 -0
  175. data/manual/recipes/creating_themes.md +10 -0
  176. data/manual/recipes/using_markdown_or_textile.md +24 -0
  177. data/manual/routes.md +39 -0
  178. data/manual/theming.md +55 -0
  179. data/manual/views.md +128 -0
  180. data/public/hi.html +0 -0
  181. data/public/images/admin/back.png +0 -0
  182. data/public/images/admin/browse.png +0 -0
  183. data/public/images/admin/mock-bg.png +0 -0
  184. data/public/images/admin/top-loader.gif +0 -0
  185. data/public/images/admin/uiscreen-loader.gif +0 -0
  186. data/public/images/admin_icons/add.png +0 -0
  187. data/public/images/admin_icons/contact.png +0 -0
  188. data/public/images/admin_icons/dashboard.png +0 -0
  189. data/public/images/admin_icons/generic.png +0 -0
  190. data/public/images/admin_icons/home-12.png +0 -0
  191. data/public/images/admin_icons/page.png +0 -0
  192. data/public/images/admin_icons/settings.png +0 -0
  193. data/public/images/jquery.wysiwyg.gif +0 -0
  194. data/public/js/admin.form_builder.js +15 -0
  195. data/public/js/admin.js +62 -0
  196. data/public/js/admin.layout.js +53 -0
  197. data/public/js/admin.nav.js +241 -0
  198. data/public/js/admin.slug.js +46 -0
  199. data/public/js/admin.subpage.js +15 -0
  200. data/public/js/jquery.hashlisten.js +85 -0
  201. data/public/js/jquery.js +166 -0
  202. data/public/js/jquery.livenavigate.js +58 -0
  203. data/public/js/jquery.livequery.js +226 -0
  204. data/public/js/jquery.quickvalidate.js +164 -0
  205. data/public/js/jquery.tmpl.js +486 -0
  206. data/public/js/jquery.uiscreen.js +150 -0
  207. data/public/js/jquery.wysiwyg.js +2339 -0
  208. data/public/js/jqueryui.js +766 -0
  209. data/public/js/lib.dirty.js +11 -0
  210. data/public/js/lib.loading.js +23 -0
  211. data/public/js/lib.wysiwyg.js +155 -0
  212. data/public/js/underscore-1.1.7.js +27 -0
  213. data/test/app/app/css/test_raw.css +1 -0
  214. data/test/app/app/css/test_sass.sass +3 -0
  215. data/test/app/app/damogram.txt +1 -0
  216. data/test/app/app/js/test_coffee.coffee +4 -0
  217. data/test/app/app/js/test_javascript.js +4 -0
  218. data/test/app/init.rb +5 -0
  219. data/test/stories/admin_css_story.rb +18 -0
  220. data/test/stories/css_js_story.rb +29 -0
  221. data/test/stories/first_login_story.rb +29 -0
  222. data/test/stories/visit_story.rb +39 -0
  223. data/test/stories_helper.rb +58 -0
  224. data/test/test_cli_helper.rb +31 -0
  225. data/test/test_helper.rb +111 -0
  226. data/test/test_temp_helper.rb +9 -0
  227. data/test/unit/cli_test.rb +38 -0
  228. data/test/unit/dump_test.rb +14 -0
  229. data/test/unit/extensions_test.rb +18 -0
  230. data/test/unit/files_test.rb +14 -0
  231. data/test/unit/flash_helper_test.rb +36 -0
  232. data/test/unit/html_helper_test.rb +29 -0
  233. data/test/unit/jquery_helper_test.rb +18 -0
  234. data/test/unit/model_test.rb +34 -0
  235. data/test/unit/page_helpers_test.rb +36 -0
  236. data/test/unit/seeder_test.rb +15 -0
  237. data/test/unit/settings_test.rb +29 -0
  238. data/test/unit/slug_test.rb +39 -0
  239. data/test/unit/ss_migration_test.rb +14 -0
  240. data/test/unit/terra_test.rb +125 -0
  241. data/test/unit/utils_test.rb +11 -0
  242. data/vendor/sinatra-sequel/.gitignore +3 -0
  243. data/vendor/sinatra-sequel/COPYING +18 -0
  244. data/vendor/sinatra-sequel/README.md +84 -0
  245. data/vendor/sinatra-sequel/Rakefile +67 -0
  246. data/vendor/sinatra-sequel/lib/sinatra/sequel.rb +73 -0
  247. data/vendor/sinatra-sequel/sinatra-sequel.gemspec +39 -0
  248. data/vendor/sinatra-sequel/spec/spec_sinatra_sequel.rb +70 -0
  249. metadata +536 -0
@@ -0,0 +1,208 @@
1
+ /*
2
+ *
3
+ * Layout
4
+ *
5
+ */
6
+
7
+ body {
8
+ #content { width: auto; min-width: 500px; }
9
+ }
10
+
11
+ /*
12
+ * The top bar
13
+ */
14
+
15
+ #top {
16
+ height: $top-height; line-height: $top-height; overflow: hidden;
17
+ background: $top-color; color: #ddd; padding: 0 10px;
18
+ @include gradient($top-hicolor, $top-color);
19
+
20
+ h3 {
21
+ position: absolute; top: 7px; left: 5px;
22
+ margin: 0; padding: 0; float: left;
23
+ width: 165px; position: relative;
24
+ a { color: #eee; padding: 0; display: block; float: left; font-size: 12pt; text-shadow: 0 0 4px $blue-glow-70; }
25
+ -webkit-transition-property: top, left;
26
+ -webkit-transition-duration: 0.2s, 0.2s;
27
+ }
28
+
29
+ h3 a.view {
30
+ display: block;
31
+ position: absolute; top: -1px; right: 0;
32
+ @include gradient(#eee, #d0d0d0); @include border-radius(10px);
33
+ padding: 0 10px; line-height: 20px; height: 18px; overflow: hidden;
34
+ font-size: 8pt; font-weight: bold; color: #333;
35
+ text-shadow: 1px 1px 0 $hilite50;
36
+ margin: (($top-height - 16px)/2) 0px;
37
+ text-transform: uppercase;
38
+
39
+ &:hover {
40
+ text-decoration: none; @include gradient(#fafafa, #d9d9d9);
41
+ @include shadow(inset 0 0 3px $blue, 0 0 4px $blue);
42
+ color: $blue * 0.6;
43
+ }
44
+ }
45
+ }
46
+
47
+ body.no-sidebar #top {
48
+ h3 { top: -1px; }
49
+ }
50
+
51
+ #aux {
52
+ float: right; font-size: 8pt; color: #888;
53
+
54
+ h4 {
55
+ float: left; font-weight: normal; font-size: 1em;
56
+ margin: 0; padding: 0; margin-right: 20px;
57
+ a { color: white; }
58
+ a:hover { color: white; text-decoration: underline; }
59
+ }
60
+ strong { color: #ccc; font-weight: normal; }
61
+ ul { @include horiz-list; float: left; }
62
+ a {
63
+ color: $blue; font-weight: normal;
64
+ &:hover { color: $blue * 1.1; }
65
+ }
66
+ }
67
+
68
+ /*
69
+ * Tabs
70
+ */
71
+
72
+ #tabs {
73
+ position: absolute; top: ($top-height - $tab-height); left: 200px;
74
+ z-index: 1;
75
+ ul { @include horiz-list; }
76
+ a, span {
77
+ @include border-top-radius(2px);
78
+ font-size: $small;
79
+ display: block;
80
+ padding: 0 30px 0 10px; margin-right: 5px;
81
+ color: #ddd; text-shadow: 1px 1px 0 $shadow20;
82
+ @include gradient(#666, #555);
83
+ height: $tab-height; line-height: $tab-height;
84
+ @include shadow(inset 0 1px 0 #7a7a7a);
85
+ &:hover { text-decoration: none; }
86
+ }
87
+ a:hover { @include gradient(#6a6a6a, #606060); color: #eee; }
88
+
89
+ li.active a, li.active span,
90
+ a.active, span.active {
91
+ cursor: default;
92
+ background: white; color: $grey; text-shadow: 1px 1px 0 $shadow10;
93
+ @include shadow(inset 0 1px 1px $blue-glow-40);
94
+ }
95
+ }
96
+
97
+ /*
98
+ * Title
99
+ */
100
+
101
+ #title {
102
+ @include gradient(#fff, #f7f7f7);
103
+ border-bottom: solid 1px #ccc;
104
+ margin: 0;
105
+ padding: 10px; text-align: left; @include clearfix;
106
+ @include shadow(2px 0 4px $shadow10, inset 0 -1px 0 $hilite30, inset 0 -1px 2px $blue-glow-20);
107
+ height: $title-height + 10px; overflow: hidden;
108
+
109
+ .title-c { float: left; }
110
+ h1, input {
111
+ color: $blue; font-size: 17pt;
112
+ height: $title-height - 10px;
113
+ line-height: $title-height - 10px; margin: 0;
114
+ font-family: $reset-heading-font;
115
+ text-shadow: 1px 1px 0 $hilite50;
116
+ }
117
+
118
+ h1 em {
119
+ font-weight: normal; color: #aaa; font-style: normal;
120
+ &:before { content: '/'; color: #ddd; margin-right: 8px; }
121
+ }
122
+
123
+ input {
124
+ width: 500px;
125
+ @include border-radius(4px);
126
+ margin: -5px;
127
+ background: transparent; padding: 5px; border: 0; font-weight: bold; cursor: text;
128
+ &:focus { outline: 0; }
129
+ }
130
+
131
+ &:hover input,
132
+ input:focus { background: fade-out($blue-glow-20, 0.08); @include shadow(1px 1px 0 fade-out($blue, 0.7)); }
133
+ }
134
+
135
+ body.fixed-layout {
136
+ overflow: hidden;
137
+
138
+ #nav, #title, #area { @include box-sizing(border-box); }
139
+ #nav { position: absolute; left: 0; top: $top-height; width: 200px; }
140
+ #title { position: absolute; }
141
+ #area { position: absolute; }
142
+ }
143
+
144
+ /*
145
+ * Toolbar
146
+ */
147
+
148
+ #toolbar {
149
+ position: absolute; right: 10px; top: 10px;
150
+ color: $grey;
151
+ height: $title-height - 10px;
152
+ line-height: $title-height - 10px;
153
+ ul { @include horiz-list; }
154
+ a {
155
+ margin-left: 10px;
156
+
157
+ @include button;
158
+ @include button-metal;
159
+ &:hover { text-decoration: none; }
160
+ &:hover { @include glow; }
161
+ &:active { @include button-black; }
162
+ }
163
+
164
+ a.blue { @include button-blue; }
165
+ a.black { @include button-black; }
166
+ }
167
+
168
+ /*
169
+ * Area
170
+ */
171
+
172
+ #area {
173
+ background: #eee; padding: 10px;
174
+ overflow-y: auto; overflow-x: hidden;
175
+ //@include shadow(2px -2px 2px $blue-glow-70);
176
+ }
177
+ #area.full #content { margin: -10px -10px 0 -10px; }
178
+
179
+ #content {
180
+ margin: 0 auto;
181
+ }
182
+
183
+ /*
184
+ * Flash message
185
+ */
186
+
187
+ #flash {
188
+ @include border-bottom-radius(4px);
189
+ @include gradient(fade-out($blue, 0.2), fade-out($blue * 1.2, 0.8));
190
+ margin: -11px -10px 10px -10px;
191
+ padding: 5px 10px; text-align: center;
192
+ @include shadow(0 0 4px fade-out(#adf, 0.1), inset 0 -1px 0 $hilite30, inset 0 2px 4px $shadow10);
193
+ color: white; text-shadow: 1px 1px 0 $shadow20;
194
+ border-bottom: solid 1px $blue * 1.1;
195
+
196
+ ul { @include non-list; }
197
+ }
198
+
199
+ /* Errors */
200
+ #content .validation-errors {
201
+ @include gradient(#fee, #fee * 0.95);
202
+ margin: -10px -10px 20px -10px; padding: 10px;
203
+ border-bottom: solid 1px #fee * 0.9;
204
+ @include shadow(inset 0 1px 0 #fee*1.05, 0 2px 3px $shadow05);
205
+ text-shadow: 1px 1px 0 $hilite30;
206
+ h3 { margin: 0; padding: 0; color: #855; }
207
+ ul { @include non-list; }
208
+ }
@@ -0,0 +1,78 @@
1
+ .align-center { text-align: center; }
2
+
3
+ /*
4
+ * Containers
5
+ */
6
+
7
+ div.split {
8
+ display: table; width: 100%;
9
+ >.left, >.right { display: table-cell; width: 50%; vertical-align: top; }
10
+ >.left { padding-right: 10px; }
11
+ }
12
+
13
+ div.split-70-30 {
14
+ @extend div.split;
15
+ >.left { width: 70%; }
16
+ >.right { width: 30%; }
17
+ }
18
+
19
+ div.split-250-side {
20
+ @extend div.split;
21
+ >.left { width: auto; }
22
+ >.right { width: 250px; }
23
+ }
24
+
25
+ #content div.split > div > :first-child { &, >* { margin-top: 0px; } }
26
+ #content div.split > div > :last-child { &, >* { margin-bottom: 0px; } }
27
+
28
+ div.slim { margin: 0 auto; min-width: 500px; width: 70%; }
29
+ div.slim.fixed { margin: 0 auto; width: 500px; }
30
+ div.micro { margin: 0 auto; width: 350px; }
31
+ div.dialog {
32
+ margin: 40px auto; width: 500px; padding: 40px 10px;
33
+ background: white; @include border-radius(4px); text-align: center;
34
+ @include gradient(#fff, #f0f0f0); font-size: 11pt;
35
+ @include shadow(0 0 4px $shadow10, 0 -2px 2px $blue-glow-10, 0 2px 2px $blue-glow-10);
36
+
37
+ #content & p.submit {
38
+ @include shadow(none);
39
+ background: transparent; text-align: center;
40
+ border: 0;
41
+ }
42
+ }
43
+
44
+ img.icon, span.icon {
45
+ vertical-align: middle;
46
+ display: inline-block; width: 16px; height: 16px; margin-right: 5px;
47
+ }
48
+
49
+ button, a.button {
50
+ @include button; @include button-metal;
51
+ &.black { @include button-black; }
52
+ &.blue { @include button-blue; }
53
+ &.small { @include button-small; }
54
+ &.micro { @include button-micro; }
55
+ }
56
+
57
+ /* Table */
58
+ section.items table,
59
+ section.table table {
60
+ width: 100%;
61
+
62
+ tr:last-child td { padding-bottom: 0; }
63
+ tr:first-child td { border-top: 0; padding-top: 0; }
64
+ td { padding: 10px 5px; border-top: dotted 1px #ddd; }
65
+ td:first-child { padding-left: 0; }
66
+ td:last-child { padding-right: 0; }
67
+ td.actions { width: 150px; text-align: right; }
68
+ }
69
+
70
+ td ul.actions { list-style-type: none; margin: 0; padding: 0; float: right; font-size: 8pt; line-height: 16px;
71
+ li { margin: 0; padding: 0; float: left; }
72
+ a { background: #ddd; color: #333; display: block; float: left; padding: 1px 9px; }
73
+ a { text-shadow: 1px 1px 0 $hilite30; @include shadow(1px 1px 0 $shadow20); }
74
+ a { border-left: solid 1px $hilite40; border-right: solid 1px $shadow10; }
75
+ li:first-child a { @include border-left-radius(8px); border-left: 0; }
76
+ li:last-child a { @include border-right-radius(8px); border-right: 0; }
77
+ a:hover { text-decoration: none; background: #888; color: white; text-shadow: 1px 1px 0 $shadow20; }
78
+ }
@@ -0,0 +1,342 @@
1
+ /* Forms */
2
+ form:not(.bypass) {
3
+
4
+ fieldset { margin: 10px 0 20px 0; border: 0; }
5
+
6
+ h3.legend {
7
+ @include border-radius(4px);
8
+ @include gradient($slate-blue, saturate($slate-blue * 0.9, 10%));
9
+ @include shadow(0 1px 0 $shadow20, 0 0 1px $shadow40, inset 0 1px 0 $hilite20);
10
+ text-align: center;
11
+ padding: 5px 10px; margin: 10px 0;
12
+ font-size: 1.2em; color: $grey;
13
+ text-shadow: 1px 1px 0 $hilite40;
14
+ }
15
+
16
+ p.description {
17
+ color: $grey; text-shadow: 1px 1px 0 $hilite20; padding: 10px 10px;
18
+ }
19
+
20
+ p { margin: 10px 0; position: relative; }
21
+ p:first-child { margin-top: 0; }
22
+ p:last-child { margin-bottom: 0; border-bottom: 0; }
23
+
24
+ .label, label {
25
+ display: block; font-weight: bold;
26
+ line-height: 24px; color: #777;
27
+ }
28
+
29
+ .mock, textarea, input { @include input; @include box-sizing(border-box); width: 100%; }
30
+ textarea, .mock.textarea { height: 220px; }
31
+
32
+ // Mock controls for the form builder
33
+ .mock {
34
+ display: block;
35
+ background: $sidebar-color url(/images/admin/mock-bg.png);
36
+ &, &:hover { border: solid 1px #bbb !important; }
37
+ }
38
+ .mock:active {
39
+ background-color: $sidebar-color * 0.95;
40
+ }
41
+
42
+ p.long {
43
+ .mock.textarea,
44
+ textarea { height: 150px; }
45
+ }
46
+
47
+ /* "Hola! You are:" */
48
+ h2.greeting {
49
+ font-size: 13pt; text-align: center;
50
+ color: $slate; text-shadow: 1px 1px 0 $hilite20;
51
+ margin: 0;
52
+ }
53
+
54
+ label.checkbox {
55
+ display: inline-block;
56
+ input { display: inline !important; width: auto !important; height: auto !important; }
57
+ span { display: inline; font-weight: normal; margin-left: 5px; }
58
+ }
59
+ p.submit {
60
+ @extend .message;
61
+ height: 35px; line-height: 35px; padding: 5px 15px 5px 10px;
62
+ margin: 20px 0;
63
+ & { text-align: left; @include clearfix; }
64
+ button { @include button; @include button-black; }
65
+ .right { float: right; }
66
+ }
67
+
68
+ /* Inline validation */
69
+ p.compact.error,
70
+ p.error {
71
+ input, &.focus input, input:focus {
72
+ border-color: $red;
73
+ @include shadow(0 0 3px $red,
74
+ inset 0 0 5px fade-out($red, 0.6));
75
+ }
76
+ }
77
+
78
+ p .notice {
79
+ @include border-top-left-radius(8px);
80
+ height: 20px; line-height: 20px; overflow: hidden;
81
+ padding: 0 10px 0 24px;
82
+ position: absolute; bottom: 0px; right: 0px;
83
+ color: white; text-shadow: 1px 1px 0 $shadow20;
84
+ }
85
+
86
+ p .notice {
87
+ @include shadow(0 0 3px $green);
88
+ background: $green url(/images/admin_icons/generic.png) 5px center no-repeat;
89
+ }
90
+
91
+ p.error .notice {
92
+ @include shadow(0 0 3px $red);
93
+ background: $red*0.8 url(/images/admin_icons/generic.png) 5px center no-repeat;
94
+ }
95
+
96
+ /* Overrides! :) */
97
+
98
+ /* No label */
99
+ p.no-label {
100
+ label { display: none; }
101
+ }
102
+
103
+ p.hide { display: none; }
104
+
105
+ p.center {
106
+ input, label { text-align: center; }
107
+ }
108
+
109
+ /* Title fields */
110
+ p.title {
111
+ input { font-size: 14pt; height: 45px; }
112
+ }
113
+
114
+ /* Compact fields: like slug, password, etc */
115
+ p.compact {
116
+ @include input;
117
+ @include clearfix;
118
+
119
+ height: auto;
120
+ min-height: $input-height;
121
+ line-height: $input-height;
122
+ background: rgba(0, 0, 0, 0.02);
123
+ padding: 0; width: 100%;
124
+
125
+ label {
126
+ float: left; width: 30%;
127
+ @include box-sizing(border-box);
128
+ padding: 0 10px; overflow: hidden;
129
+ line-height: $input-height;
130
+ }
131
+
132
+ select {
133
+ vertical-align: baseline;
134
+ min-width: 250px;
135
+ }
136
+
137
+ input, textarea {
138
+ &, &:hover, &:focus {
139
+ @include shadow(0); border: 0;
140
+ border-left: solid 1px #ddd;
141
+ }
142
+ float: left; width: 70%;
143
+ }
144
+
145
+ &.focus {
146
+ @include input-focus; background: #f6f6f6;
147
+ label {
148
+ text-shadow: 1px 1px 0 $hilite50;
149
+ background: fade-out($blue, 0.9); color: $blue * 0.7;
150
+ }
151
+ }
152
+ }
153
+
154
+ p.compact-top {
155
+ @extend p.compact;
156
+ margin-bottom: 0;
157
+ &, input {
158
+ @include border-bottom-radius(0);
159
+ @include border-top-radius(4px);
160
+ }
161
+ }
162
+
163
+ p.compact-bottom {
164
+ @extend p.compact;
165
+ margin-top: 0;
166
+ &, input {
167
+ border-top: 0;
168
+ @include border-top-radius(0);
169
+ @include border-bottom-radius(4px);
170
+ }
171
+ }
172
+
173
+ p.compact-middle {
174
+ @extend p.compact;
175
+ margin-top: 0; margin-bottom: 0;
176
+ &, input {
177
+ border-top: 0;
178
+ @include border-top-radius(0);
179
+ @include border-bottom-radius(0);
180
+ }
181
+ }
182
+ }
183
+
184
+ //
185
+ // Wysiwyg
186
+ //
187
+
188
+ p.html label {
189
+ padding-left: 5px; }
190
+
191
+ p.html textarea {
192
+ padding: 15px;
193
+ border-top: 0;
194
+ @include shadow(none);
195
+ }
196
+
197
+ div.wysiwyg {
198
+ @include input-base;
199
+ padding: 0;
200
+ overflow: hidden;
201
+ width: 100% !important;
202
+
203
+ // Edit HTML field
204
+ textarea {
205
+ visibility: visible;
206
+ margin-bottom: -8px;
207
+ padding: 15px;
208
+ padding-bottom: 0;
209
+ }
210
+
211
+ iframe { border: 0; @include shadow(none); }
212
+
213
+ ul.toolbar, div.toolbar-two {
214
+ height: 20px; overflow: hidden;
215
+ font-size: 8pt; color: #888; line-height: 20px;
216
+ padding: 5px 4px 4px 4px;
217
+ border-bottom: solid 1px #e2e2e2;
218
+ @include gradient(#f7f7f7, #f4f4f4);
219
+ @include shadow(inset 0 1px 0 $hilite50);
220
+ @include border-top-radius(4px);
221
+
222
+ li, li.active {
223
+ @include border-radius(2px);
224
+ border: solid 1px transparent;
225
+ margin: 0 3px; }
226
+
227
+ li.active {
228
+ background-color: $blue-glow-20;
229
+ @include shadow(0 0 4px $blue-glow-20); }
230
+
231
+ li:active {
232
+ background-color: $blue-glow-40; }
233
+
234
+ & { opacity: 0.9; }
235
+ li { opacity: 0.2; }
236
+ li:not(.bold):not(.italic):not(.underline):not(.justifyLeft):not(.justifyCenter):not(.justifyRight):not(.justifyFull) { opacity: 0; }
237
+ }
238
+
239
+ div.toolbar-two {
240
+ span, a {
241
+ margin: 0 5px; }
242
+ }
243
+
244
+ iframe { margin: 0; width: 100% !important; }
245
+
246
+ textarea, textarea:focus, textarea:hover {
247
+ border: 0; @include shadow(none); background: transparent;
248
+ }
249
+ }
250
+
251
+ html:not(.webkit) p div.wysiwyg,
252
+ p.focus div.wysiwyg {
253
+ background: white;
254
+
255
+ ul.toolbar { opacity: 1; }
256
+ ul.toolbar li { opacity: 0.9 !important; }
257
+ ul.toolbar li.separator { opacity: 0.4 !important; }
258
+ &, li, a { @extend .animate-opacity; }
259
+
260
+ }
261
+
262
+ p.html.focus {
263
+ @include border-radius(4px);
264
+ @include input-focus;
265
+ padding-bottom: 0;
266
+
267
+ textarea { @include shadow(none); }
268
+
269
+ label {
270
+ @include background(linear-gradient(top, #fafafa, #f0f0f0));
271
+ @include border-top-radius(2px);
272
+ }
273
+ }
274
+
275
+ body.js-on #area.editable-title p.main-title { display: none; }
276
+
277
+
278
+ .form-builder {
279
+ @include clearfix;
280
+ background: #f8f8f8;
281
+ border: solid 1px #ddd;
282
+ @include border-radius(4px);
283
+ padding: 0 10px;
284
+ h2 {
285
+ width: 27%; float: right; font-size: 1em;
286
+ margin-left: 3%;
287
+ color: $slate;
288
+ strong, em { display: block; }
289
+ strong { font-size: 10pt; }
290
+ em { color: #999; font-weight: normal; font-style: normal; font-size: $small; }
291
+ }
292
+ fieldset { width: 70%; float: left; }
293
+
294
+
295
+ p { position: relative; }
296
+ p .mock { cursor: move; }
297
+ p .toolbar {
298
+ position: absolute; bottom: 0px; right: 38%;
299
+ background: #333; padding: 2px;
300
+ @include border-top-radius(6px);
301
+ color: #ddd;
302
+ font-size: $small;
303
+ a { color: $blue; font-weight: normal; }
304
+ a:hover { text-decoration: none; }
305
+ span, a { padding: 0 5px; }
306
+
307
+ a.options, a.delete {
308
+ display: inline-block; width: 16px; text-indent: -9999px;
309
+ background: url(/images/admin_icons/settings.png) center -1px no-repeat;
310
+ &:hover { background-color: $blue; @include shadow(0 0 4px $blue-glow-70); }
311
+ }
312
+
313
+ a.delete {
314
+ background-image: url(/images/admin_icons/generic.png);
315
+ background-position: center 1px;
316
+ }
317
+ }
318
+
319
+ p .toolbar { display: none; }
320
+ p:hover .toolbar { display: block; }
321
+
322
+ input.label {
323
+ padding: 0 3px; height: 22px; background: transparent;
324
+ border: solid 1px transparent; @include shadow(none);
325
+ cursor: text;
326
+ margin-bottom: 3px;
327
+
328
+ &:hover {
329
+ @include shadow(none);
330
+ }
331
+ &:focus {
332
+ background: white; @include shadow(inset 0 2px 2px $shadow10);
333
+ border-color: #ccc;
334
+ }
335
+ }
336
+
337
+ p:hover input.label {
338
+ background: $hilite40;
339
+ border: solid 1px #ddd;
340
+ &:focus { background: white; border-color: #ccc; }
341
+ }
342
+ }