cortex-reaver 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. data/LICENSE +25 -0
  2. data/README +48 -0
  3. data/bin/console +11 -0
  4. data/bin/cortex_reaver +110 -0
  5. data/bin/import.rb +78 -0
  6. data/lib/cortex_reaver.rb +114 -0
  7. data/lib/cortex_reaver/config.rb +21 -0
  8. data/lib/cortex_reaver/controller/comment.rb +113 -0
  9. data/lib/cortex_reaver/controller/config.rb +14 -0
  10. data/lib/cortex_reaver/controller/journal.rb +40 -0
  11. data/lib/cortex_reaver/controller/main.rb +56 -0
  12. data/lib/cortex_reaver/controller/page.rb +34 -0
  13. data/lib/cortex_reaver/controller/photograph.rb +45 -0
  14. data/lib/cortex_reaver/controller/project.rb +40 -0
  15. data/lib/cortex_reaver/controller/tag.rb +67 -0
  16. data/lib/cortex_reaver/controller/user.rb +71 -0
  17. data/lib/cortex_reaver/helper/activity.rb +9 -0
  18. data/lib/cortex_reaver/helper/attachments.rb +139 -0
  19. data/lib/cortex_reaver/helper/auth.rb +45 -0
  20. data/lib/cortex_reaver/helper/canonical.rb +55 -0
  21. data/lib/cortex_reaver/helper/crud.rb +317 -0
  22. data/lib/cortex_reaver/helper/date.rb +29 -0
  23. data/lib/cortex_reaver/helper/error.rb +14 -0
  24. data/lib/cortex_reaver/helper/feeds.rb +88 -0
  25. data/lib/cortex_reaver/helper/form.rb +114 -0
  26. data/lib/cortex_reaver/helper/navigation.rb +142 -0
  27. data/lib/cortex_reaver/helper/photographs.rb +25 -0
  28. data/lib/cortex_reaver/helper/tags.rb +47 -0
  29. data/lib/cortex_reaver/helper/workflow.rb +27 -0
  30. data/lib/cortex_reaver/migrations/001_users.rb +24 -0
  31. data/lib/cortex_reaver/migrations/002_pages.rb +29 -0
  32. data/lib/cortex_reaver/migrations/003_journals.rb +26 -0
  33. data/lib/cortex_reaver/migrations/004_photographs.rb +24 -0
  34. data/lib/cortex_reaver/migrations/005_projects.rb +27 -0
  35. data/lib/cortex_reaver/migrations/006_tags.rb +64 -0
  36. data/lib/cortex_reaver/migrations/007_comments.rb +40 -0
  37. data/lib/cortex_reaver/migrations/008_config.rb +23 -0
  38. data/lib/cortex_reaver/model/comment.rb +109 -0
  39. data/lib/cortex_reaver/model/journal.rb +53 -0
  40. data/lib/cortex_reaver/model/page.rb +87 -0
  41. data/lib/cortex_reaver/model/photograph.rb +133 -0
  42. data/lib/cortex_reaver/model/project.rb +49 -0
  43. data/lib/cortex_reaver/model/tag.rb +72 -0
  44. data/lib/cortex_reaver/model/user.rb +147 -0
  45. data/lib/cortex_reaver/public/css/admin.css +45 -0
  46. data/lib/cortex_reaver/public/css/custom.css +0 -0
  47. data/lib/cortex_reaver/public/css/form.css +51 -0
  48. data/lib/cortex_reaver/public/css/main.css +325 -0
  49. data/lib/cortex_reaver/public/css/photo.css +113 -0
  50. data/lib/cortex_reaver/public/css/ramaze_error.css +90 -0
  51. data/lib/cortex_reaver/public/css/text.css +25 -0
  52. data/lib/cortex_reaver/public/dispatch.fcgi +11 -0
  53. data/lib/cortex_reaver/public/images/CortexReaver.gif +0 -0
  54. data/lib/cortex_reaver/public/images/atom-xml-icon.png +0 -0
  55. data/lib/cortex_reaver/public/images/body.png +0 -0
  56. data/lib/cortex_reaver/public/images/border_bottom.png +0 -0
  57. data/lib/cortex_reaver/public/images/border_bottom_left.png +0 -0
  58. data/lib/cortex_reaver/public/images/border_bottom_right.png +0 -0
  59. data/lib/cortex_reaver/public/images/border_left.png +0 -0
  60. data/lib/cortex_reaver/public/images/border_right.png +0 -0
  61. data/lib/cortex_reaver/public/images/border_top.png +0 -0
  62. data/lib/cortex_reaver/public/images/border_top_left.png +0 -0
  63. data/lib/cortex_reaver/public/images/border_top_right.png +0 -0
  64. data/lib/cortex_reaver/public/images/comment.gif +0 -0
  65. data/lib/cortex_reaver/public/images/dark_trans.png +0 -0
  66. data/lib/cortex_reaver/public/images/delete.gif +0 -0
  67. data/lib/cortex_reaver/public/images/edit.gif +0 -0
  68. data/lib/cortex_reaver/public/images/header.png +0 -0
  69. data/lib/cortex_reaver/public/images/header.xcf +0 -0
  70. data/lib/cortex_reaver/public/images/header_background.png +0 -0
  71. data/lib/cortex_reaver/public/images/parent.gif +0 -0
  72. data/lib/cortex_reaver/public/images/rss-xml-icon.png +0 -0
  73. data/lib/cortex_reaver/public/images/sections.png +0 -0
  74. data/lib/cortex_reaver/public/images/sections_highlight.png +0 -0
  75. data/lib/cortex_reaver/public/js/admin.js +36 -0
  76. data/lib/cortex_reaver/public/js/cookie.js +27 -0
  77. data/lib/cortex_reaver/public/js/jquery.js +32 -0
  78. data/lib/cortex_reaver/public/js/photo.js +33 -0
  79. data/lib/cortex_reaver/snippets/array.rb +7 -0
  80. data/lib/cortex_reaver/snippets/ramaze/dispatcher/file.rb +37 -0
  81. data/lib/cortex_reaver/support/attachments.rb +235 -0
  82. data/lib/cortex_reaver/support/cached_rendering.rb +79 -0
  83. data/lib/cortex_reaver/support/canonical.rb +107 -0
  84. data/lib/cortex_reaver/support/comments.rb +69 -0
  85. data/lib/cortex_reaver/support/pagination.rb +38 -0
  86. data/lib/cortex_reaver/support/renderer.rb +196 -0
  87. data/lib/cortex_reaver/support/sequenceable.rb +248 -0
  88. data/lib/cortex_reaver/support/tags.rb +108 -0
  89. data/lib/cortex_reaver/support/timestamps.rb +33 -0
  90. data/lib/cortex_reaver/version.rb +8 -0
  91. data/lib/cortex_reaver/view/adminbox.rhtml +56 -0
  92. data/lib/cortex_reaver/view/blank_layout.rhtml +46 -0
  93. data/lib/cortex_reaver/view/comments/comment.rhtml +34 -0
  94. data/lib/cortex_reaver/view/comments/form.rhtml +25 -0
  95. data/lib/cortex_reaver/view/comments/list.rhtml +5 -0
  96. data/lib/cortex_reaver/view/comments/post_form.rhtml +36 -0
  97. data/lib/cortex_reaver/view/config/form.rhtml +10 -0
  98. data/lib/cortex_reaver/view/error.rhtml +72 -0
  99. data/lib/cortex_reaver/view/journals/form.rhtml +12 -0
  100. data/lib/cortex_reaver/view/journals/journal.rhtml +39 -0
  101. data/lib/cortex_reaver/view/journals/list.rhtml +33 -0
  102. data/lib/cortex_reaver/view/journals/short.rhtml +3 -0
  103. data/lib/cortex_reaver/view/journals/show.rhtml +5 -0
  104. data/lib/cortex_reaver/view/pages/form.rhtml +12 -0
  105. data/lib/cortex_reaver/view/pages/list.rhtml +26 -0
  106. data/lib/cortex_reaver/view/pages/show.rhtml +12 -0
  107. data/lib/cortex_reaver/view/photographs/atom_fragment.rhtml +82 -0
  108. data/lib/cortex_reaver/view/photographs/form.rhtml +19 -0
  109. data/lib/cortex_reaver/view/photographs/grid.rhtml +36 -0
  110. data/lib/cortex_reaver/view/photographs/list.rhtml +9 -0
  111. data/lib/cortex_reaver/view/photographs/short.rhtml +3 -0
  112. data/lib/cortex_reaver/view/photographs/show.rhtml +114 -0
  113. data/lib/cortex_reaver/view/photographs/sidebar.rhtml +7 -0
  114. data/lib/cortex_reaver/view/projects/form.rhtml +13 -0
  115. data/lib/cortex_reaver/view/projects/list.rhtml +27 -0
  116. data/lib/cortex_reaver/view/projects/show.rhtml +38 -0
  117. data/lib/cortex_reaver/view/tags/form.rhtml +9 -0
  118. data/lib/cortex_reaver/view/tags/list.rhtml +28 -0
  119. data/lib/cortex_reaver/view/tags/show.rhtml +51 -0
  120. data/lib/cortex_reaver/view/text_layout.rhtml +78 -0
  121. data/lib/cortex_reaver/view/users/form.rhtml +16 -0
  122. data/lib/cortex_reaver/view/users/list.rhtml +38 -0
  123. data/lib/cortex_reaver/view/users/login.rhtml +13 -0
  124. data/lib/cortex_reaver/view/users/register.rhtml +13 -0
  125. data/lib/cortex_reaver/view/users/show.rhtml +37 -0
  126. data/lib/cortex_reaver/view/users/user.rhtml +35 -0
  127. data/lib/proto/cortex_reaver.yaml +28 -0
  128. metadata +285 -0
@@ -0,0 +1,51 @@
1
+ textarea {
2
+ width: 90%;
3
+ height: 400px;
4
+ }
5
+
6
+ .comment-form label {
7
+ width: 4em;
8
+ margin-top: 2px;
9
+ float: left;
10
+ }
11
+ .comment-form label[for=body] {
12
+ display: none;
13
+ float: none;
14
+ margin-top: auto;
15
+ width: auto;
16
+ }
17
+
18
+ .comment-form textarea[name=body] {
19
+ margin-top: -1.5em;
20
+ }
21
+
22
+ .edit-form label {
23
+ width: 6em;
24
+ margin-top: 2px;
25
+ float: left;
26
+ }
27
+ .edit-form label.checkbox {
28
+ width: auto;
29
+ float: none;
30
+ }
31
+
32
+ .form-errors {
33
+ padding: 0.5em;
34
+ margin: 1em;
35
+ border: 1px solid #b00;
36
+ color: #b00;
37
+ background: #ffe6e6;
38
+ }
39
+
40
+ .form-errors h3 {
41
+ margin: 0;
42
+ padding: 0;
43
+ }
44
+
45
+ .form-errors ul {
46
+ padding: 0;
47
+ padding-left: 1em;
48
+ margin: 0;
49
+ }
50
+
51
+ /* Autocomplete */
@@ -0,0 +1,325 @@
1
+ body {
2
+ font-family: sans-serif;
3
+ font-size: 90%;
4
+ margin: 0;
5
+ padding: 0;
6
+ background: #f6f6f6 url(/images/body.png) repeat-x scroll 0px 0px;
7
+ }
8
+
9
+ body.blank {
10
+ padding: 0em 1em;
11
+ }
12
+
13
+ img {
14
+ border: none;
15
+ margin: 0;
16
+ }
17
+
18
+ a {
19
+ text-decoration: none;
20
+ }
21
+
22
+ a[href]:hover {
23
+ text-decoration: underline;
24
+ }
25
+
26
+ a > img {
27
+ display: block;
28
+ }
29
+
30
+ h2 {
31
+ font-size: 140%;
32
+ border-bottom: 1px solid #aaa;
33
+ margin-top: 0px;
34
+ margin-bottom: 0px;
35
+ }
36
+
37
+ .comment h2 {
38
+ font-size: 120%;
39
+ }
40
+
41
+ h3 {
42
+ font-size: 120%;
43
+ }
44
+
45
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
46
+ color: #000;
47
+ }
48
+
49
+ th {
50
+ text-align: left;
51
+ }
52
+
53
+ #top {
54
+ margin: 0px auto;
55
+ width: 760px;
56
+ height: 210px;
57
+ background: transparent;
58
+ text-align: center;
59
+ border-width: 0px 1px;
60
+ border-style: solid;
61
+ border-color: #666;
62
+ }
63
+
64
+ #sections {
65
+ margin: 0px auto;
66
+ width: 760px;
67
+ background: url(/images/sections.png) repeat-x;
68
+ height: 24px;
69
+ font-size: 12px;
70
+ text-align: center;
71
+ border-width: 0px 1px;
72
+ border-style: solid;
73
+ border-color: #666;
74
+ }
75
+
76
+ #sections ul {
77
+ margin: 0px;
78
+ padding: 4px 0px;
79
+ }
80
+
81
+ #sections li {
82
+ margin: 1em 1em;
83
+ display: inline;
84
+ }
85
+
86
+ #sections a, #sections a:hover, #sections a:visited, #sections a:active {
87
+ color: #fff;
88
+ }
89
+
90
+ #middle {
91
+ margin: 0px auto;
92
+ width: 760px;
93
+ border: 1px solid #666;
94
+ }
95
+
96
+ #columns {
97
+ margin: 0px;
98
+ padding: 0px;
99
+ width: 100%;
100
+ border-collapse: collapse;
101
+ }
102
+
103
+ #main {
104
+ vertical-align: top;
105
+ background: #fff;
106
+ padding: 0.8em;
107
+ border-top: none;
108
+ }
109
+
110
+ #sidebar {
111
+ vertical-align: top;
112
+ background: #c6c6c6;
113
+ padding: 6px;
114
+ border-left: 1px solid #bbb;
115
+ width: 170px;
116
+ }
117
+
118
+ #sidebar .box {
119
+ background-color: #fff;
120
+ margin-top: 6px;
121
+ padding: 4px;
122
+ }
123
+
124
+ #sidebar .box:first-child {
125
+ margin: 0;
126
+ }
127
+
128
+ #colophon {
129
+ font-size: 80%;
130
+ margin: 2em;
131
+ padding: 2em;
132
+ text-align: center;
133
+ }
134
+
135
+
136
+
137
+ /* Actions */
138
+ .actions {
139
+ margin: 0px;
140
+ padding: 0px;
141
+ }
142
+
143
+ .actions li {
144
+ display: inline;
145
+ }
146
+
147
+ .actions li:before {
148
+ content: ' | ';
149
+ }
150
+
151
+ .actions li:first-child:before {
152
+ content: none;
153
+ }
154
+
155
+
156
+ /* Navigation actions */
157
+
158
+ .actions.navigation {
159
+ width: 100%;
160
+ position: relative;
161
+ text-align: center;
162
+ }
163
+
164
+ .actions.navigation:first-child {
165
+ margin-bottom: 1em;
166
+ }
167
+
168
+ .actions.navigation .previous {
169
+ position: absolute;
170
+ left: 0px;
171
+ }
172
+
173
+ .actions.navigation .up {
174
+ }
175
+
176
+ .actions.navigation .next {
177
+ position: absolute;
178
+ right: 0px;
179
+ }
180
+
181
+
182
+ /* Nav styles */
183
+ .pagination.actions {
184
+ text-align: center;
185
+ }
186
+
187
+ .pagination.actions li {
188
+ margin-right: 0.15em;
189
+ margin-left: 0.15em;
190
+ }
191
+
192
+ .pagination.actions li:before {
193
+ content: none;
194
+ }
195
+
196
+
197
+ /* Flash */
198
+ .flash {
199
+ padding: 0.5em;
200
+ margin: 1em 0;
201
+ }
202
+
203
+ #flash_notice {
204
+ border: 1px solid #00b;
205
+ color: #00b;
206
+ background: #e6e6ff;
207
+ }
208
+
209
+ #flash_error {
210
+ border: 1px solid #b00;
211
+ color: #b00;
212
+ background: #ffe6e6;
213
+ }
214
+
215
+
216
+ /* Table of Contents */
217
+ .table-of-contents {
218
+ margin: 1em auto 2em auto;
219
+ border: 1px solid #ccc;
220
+ padding: 0 0.6em 0.6em 0.6em;
221
+ font-size: 80%;
222
+ }
223
+
224
+ .table-of-contents h2 {
225
+ position: relative;
226
+ top: -0.6em;
227
+ left: 2em;
228
+ padding: 0 0.25em;
229
+ background-color: #fff;
230
+ border: none;
231
+ display: inline;
232
+ width: auto;
233
+ }
234
+
235
+ .table-of-contents .date {
236
+ padding-right: 1em;
237
+ }
238
+
239
+
240
+ /* Misc */
241
+ .clear {
242
+ height: 0px;
243
+ width: 0px;
244
+ clear: both;
245
+ }
246
+
247
+ .current {
248
+ font-weight: bolder;
249
+ }
250
+
251
+ .byline {
252
+ font-size: 75%;
253
+ }
254
+
255
+ .tags {
256
+ margin: 0px;
257
+ padding: 0px;
258
+ }
259
+
260
+ .tags li {
261
+ display: inline;
262
+ }
263
+
264
+ .tags li:before {
265
+ content: ', '
266
+ }
267
+
268
+ .tags li:first-child:before {
269
+ content: none;
270
+ }
271
+
272
+ /* Icons */
273
+ .footer .icon, .icon {
274
+ display: inline;
275
+ margin: 2px 0px -1px 0px;
276
+ }
277
+
278
+ /* Attachments */
279
+ .attachments {
280
+ margin-bottom: 1em;
281
+ }
282
+
283
+ .attachments table {
284
+ width: 100%;
285
+ }
286
+
287
+ .attachments td.date {
288
+ text-align: right;
289
+ }
290
+
291
+ /* Tags */
292
+ .tags > table {
293
+ width: 100%;
294
+ }
295
+
296
+ .tags > table thead {
297
+ display: none;
298
+ }
299
+
300
+ /* Projects */
301
+ .projects > table {
302
+ width: 100%;
303
+ }
304
+ .projects > table thead {
305
+ display: none;
306
+ }
307
+
308
+ /* Users */
309
+ table.users {
310
+ width: 100%;
311
+ }
312
+
313
+ /* Percentage Bar */
314
+ .percent-bar {
315
+ display: block;
316
+ background-color: #3366ff;
317
+ color: #fff;
318
+ font-size: 75%;
319
+ padding: 0.2em;
320
+ }
321
+
322
+ /* Page Footer */
323
+ .footer {
324
+ font-size: 75%;
325
+ }
@@ -0,0 +1,113 @@
1
+ /* Infobar */
2
+ .photo #bar {
3
+ background-image: url('/images/dark_trans.png');
4
+ color: #fff;
5
+ padding: 3px 0px;
6
+ font-size: 80%;
7
+ }
8
+
9
+ .photo #bar a {
10
+ color: #fff;
11
+ }
12
+
13
+ .photo h2 {
14
+ margin-top: 0.25em;
15
+ font-size: 130%;
16
+ font-weight: normal;
17
+ border-bottom: none;
18
+ }
19
+
20
+ .photo .description {
21
+ color: #999;
22
+ }
23
+
24
+
25
+ /* Grid */
26
+ table.grid {
27
+ vertical-align: middle;
28
+ }
29
+
30
+ .grid.photographs {
31
+ background-color: #eaeaea;
32
+ margin: 0.75em 0em;
33
+ width: 100%;
34
+ border: 1px solid #bbb;
35
+ }
36
+
37
+ /* Frames */
38
+ table.frame td.content {
39
+ background: #fff;
40
+ }
41
+
42
+ .frame {
43
+ margin-left: auto;
44
+ margin-right: auto;
45
+ }
46
+
47
+ .photo.frame {
48
+ text-align: center;
49
+ vertical-align: top;
50
+ margin: 10px auto 0 auto;
51
+ }
52
+
53
+ .thumbnail.frame a {
54
+ margin: 0;
55
+ padding: 0;
56
+ }
57
+
58
+ .text.frame {
59
+ margin: 10px auto 0 auto;
60
+ width: 600px;
61
+ }
62
+
63
+ table.text.frame td.content {
64
+ padding: 1em;
65
+ }
66
+
67
+ .border_top_left {
68
+ width: 15px;
69
+ height: 15px;
70
+ background-image: url("/images/border_top_left.png");
71
+ }
72
+
73
+ .border_top {
74
+ width: auto;
75
+ height: 15px;
76
+ background-image: url("/images/border_top.png");
77
+ }
78
+
79
+ .border_top_right {
80
+ width: 17px;
81
+ height: 15px;
82
+ background-image: url("/images/border_top_right.png");
83
+ }
84
+
85
+ .border_left {
86
+ width: 15px;
87
+ height: auto;
88
+ background-image: url("/images/border_left.png");
89
+ }
90
+
91
+ .border_right {
92
+ width: 17px;
93
+ height: auto;
94
+ background-image: url("/images/border_right.png");
95
+ }
96
+
97
+ .border_bottom_left {
98
+ width: 15px;
99
+ height: 17px;
100
+ background-image: url("/images/border_bottom_left.png");
101
+ }
102
+
103
+ .border_bottom {
104
+ width: auto;
105
+ height: 17px;
106
+ background-image: url("/images/border_bottom.png");
107
+ }
108
+
109
+ .border_bottom_right {
110
+ width: 17px;
111
+ height: 17px;
112
+ background-image: url("/images/border_bottom_right.png");
113
+ }