cortex-reaver 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/lib/cortex_reaver/config.rb +3 -3
  2. data/lib/cortex_reaver/controller/comment.rb +1 -1
  3. data/lib/cortex_reaver/controller/photograph.rb +1 -1
  4. data/lib/cortex_reaver/helper/form.rb +2 -0
  5. data/lib/cortex_reaver/helper/navigation.rb +29 -26
  6. data/lib/cortex_reaver/layout/blank.rhtml +0 -14
  7. data/lib/cortex_reaver/layout/text.rhtml +0 -14
  8. data/lib/cortex_reaver/model/comment.rb +0 -1
  9. data/lib/cortex_reaver/public/css/actions.css +23 -4
  10. data/lib/cortex_reaver/public/css/colophon.css +2 -2
  11. data/lib/cortex_reaver/public/css/commments.css +5 -0
  12. data/lib/cortex_reaver/public/css/context_navigation.css +26 -0
  13. data/lib/cortex_reaver/public/css/flash.css +4 -0
  14. data/lib/cortex_reaver/public/css/fonts.css +6 -1
  15. data/lib/cortex_reaver/public/css/main.css +25 -20
  16. data/lib/cortex_reaver/public/css/pagination.css +14 -7
  17. data/lib/cortex_reaver/public/css/photo-show.css +17 -3
  18. data/lib/cortex_reaver/public/css/photo.css +15 -23
  19. data/lib/cortex_reaver/public/css/sidebar.css +23 -60
  20. data/lib/cortex_reaver/public/css/text.css +1 -0
  21. data/lib/cortex_reaver/public/images/grid_34_light.png +0 -0
  22. data/lib/cortex_reaver/public/images/next_34_light.png +0 -0
  23. data/lib/cortex_reaver/public/images/prev_34_light.png +0 -0
  24. data/lib/cortex_reaver/version.rb +1 -1
  25. data/lib/cortex_reaver/view/comments/form.rhtml +1 -1
  26. data/lib/cortex_reaver/view/comments/post_form.rhtml +1 -1
  27. data/lib/cortex_reaver/view/journals/form.rhtml +25 -1
  28. data/lib/cortex_reaver/view/photographs/grid.rhtml +0 -18
  29. data/lib/cortex_reaver/view/photographs/show.rhtml +2 -1
  30. data/lib/cortex_reaver/view/sidebar/context_navigation.rhtml +5 -0
  31. data/lib/cortex_reaver/view/top.rhtml +2 -3
  32. metadata +129 -62
  33. data/lib/cortex_reaver/public/css/top_actions.css +0 -50
@@ -151,7 +151,7 @@ You can also just provide a regex for the path, in which case it is matched dire
151
151
  [/^\/journals(\/(page|tagged))?/, 'explore_journals']
152
152
  ",
153
153
  :default => [
154
- ['**', 'sections'],
154
+ ['*', 'context_navigation'],
155
155
  ['/', 'photographs']
156
156
  ]
157
157
 
@@ -184,8 +184,8 @@ You can also just provide a regex for the path, in which case it is matched dire
184
184
  photographs.define :sizes,
185
185
  :desc => "What sizes of each photograph to maintain.",
186
186
  :default => {
187
- :thumbnail => '166x',
188
- :grid => '150x150',
187
+ :thumbnail => '160x',
188
+ :grid => '140x140',
189
189
  :small => 'x512',
190
190
  :medium => 'x768',
191
191
  :large => 'x1024'
@@ -96,7 +96,7 @@ module CortexReaver
96
96
 
97
97
  # Save comment and go back to the parent.
98
98
  session[:pending_comment] = @comment
99
- redirect comment.parent.url
99
+ redirect @comment.parent.url
100
100
  else
101
101
  # Okay, set anonymous info
102
102
  @comment.name = request[:name] unless request[:name].blank?
@@ -45,7 +45,7 @@ module CortexReaver
45
45
  on_second_save do |photograph, request|
46
46
  photograph.tags = request[:tags]
47
47
  photograph.image = request[:image][:tempfile] if request[:image]
48
- photograph.infer_date_from_exif! if request[:infer_date]
48
+ photograph.infer_date_from_exif! if request[:infer_date] == "1"
49
49
 
50
50
  Ramaze::Cache.action.clear
51
51
  end
@@ -19,6 +19,8 @@ module Ramaze
19
19
  s << "<li>#{attribute.to_s.titleize} #{error}.</li>\n"
20
20
  end
21
21
  s << "</ul></div>"
22
+ else
23
+ ''
22
24
  end
23
25
  end
24
26
 
@@ -46,7 +46,7 @@ module Ramaze
46
46
 
47
47
  # Returns a list with next/up/previous links for the record.
48
48
  def model_nav(model)
49
- if not model.respond_to? :next
49
+ if not (model.respond_to? :next and model.respond_to? :absolute_window_url)
50
50
  # Not applicable
51
51
  return
52
52
  elsif CortexReaver::User === model or CortexReaver::Page === model
@@ -72,7 +72,7 @@ module Ramaze
72
72
  # of the class (in which case the page which would contain that instance
73
73
  # is highlighted, or a page number. Limit determines how many numeric links
74
74
  # to include--use :all to include all pages.
75
- def page_nav(klass, index = nil, limit = 15)
75
+ def page_nav(klass, index = nil, limit = 17)
76
76
  # Translate :first, :last into corresponding windows.
77
77
  case index
78
78
  when :first
@@ -95,28 +95,33 @@ module Ramaze
95
95
  if limit.kind_of? Integer and window_count > limit
96
96
  # There are more pages than we can display.
97
97
 
98
- # Default first and last pages are the size of the collection
99
- first_page = 1
100
- last_page = window_count - 2
101
-
102
98
  # The desired number of previous or next pages
103
- previous_pages = (Float(limit - 3) / 2).floor
104
- next_pages = (Float(limit - 3) / 2).floor
105
-
106
- if (offset = first_page - (page - previous_pages)) > 0
107
- # Window extends before the start of the pages
108
- last_page = first_page + (limit - 2)
109
- elsif (offset = (page + next_pages) - last_page) > 0
110
- # Window extends beyond the end of the pages
111
- first_page = last_page - (limit - 2)
112
- else
113
- # Window is somewhere in the middle
114
- first_page = page - previous_pages
115
- last_page = page + next_pages
99
+ previous_pages = (Float(limit - 1) / 2).floor
100
+ next_pages = (Float(limit - 1) / 2).ceil
101
+
102
+ # Shift window near edges
103
+ first = page - previous_pages
104
+ last = page + next_pages
105
+ if first < 0
106
+ last -= first
107
+ first = 0
108
+ elsif last > (window_count - 1)
109
+ first -= last - (window_count - 1)
110
+ last = window_count - 1
116
111
  end
117
112
 
118
- # Generate list of pages
119
- pages = [0] + (first_page..last_page).to_a + [window_count - 1]
113
+ # Build pages
114
+ pages = (first .. last).to_a
115
+
116
+ # Check for elided segments
117
+ if pages[0] != 0
118
+ pages[0] = 0
119
+ pages[1] = :elided
120
+ end
121
+ if pages[-1] != window_count - 1
122
+ pages[-1] = window_count - 1
123
+ pages[-2] = :elided
124
+ end
120
125
  else
121
126
  # The window encompasses the entire set of pages
122
127
  pages = (0 ... window_count).to_a
@@ -132,12 +137,10 @@ module Ramaze
132
137
  # Convert pages to links
133
138
  unless pages.empty?
134
139
  pages.inject(pages.first - 1) do |previous, i|
135
- if (i - previous) > 1
140
+ if i == :elided
136
141
  # These pages are not side-by-side.
137
142
  links << '<li class="elided"><span>&hellip;</span></li>'
138
- end
139
-
140
- if i == page
143
+ elsif i == page
141
144
  # This is a link to the current page.
142
145
  links << "<li class=\"current\"><span>#{i + 1}</span></li>"
143
146
  else
@@ -162,7 +165,7 @@ module Ramaze
162
165
 
163
166
  # Produces a section navigation list from an array of titles to urls.
164
167
  def section_nav(sections)
165
- s = "<ul class=\"actions\">\n"
168
+ s = "<ul class=\"sections actions\">\n"
166
169
  sections.each do |section|
167
170
  title = section.first
168
171
  url = section.last.to_s
@@ -21,19 +21,5 @@
21
21
  </div>
22
22
 
23
23
  <%= CortexReaver::MainController.render_view('tracker') %>
24
-
25
- <script type="text/javascript">
26
- /* <![CDATA[ */
27
- $(document).ready(function() {
28
- $('.pagination li').not('.elided').add('.actions > li').not('.current').not('.placeholder').each(function(i) {
29
- $(this).fadeTo(0,0.8);
30
- $(this).hover(
31
- function() { $(this).fadeTo(0,1) },
32
- function() { $(this).fadeTo(200,0.8) }
33
- );
34
- });
35
- });
36
- /* ]]> */
37
- </script>
38
24
  </body>
39
25
  </html>
@@ -45,19 +45,5 @@
45
45
  </div>
46
46
 
47
47
  <%= CortexReaver::MainController.render_view('tracker') %>
48
-
49
- <script type="text/javascript">
50
- /* <![CDATA[ */
51
- $(document).ready(function() {
52
- $('.pagination li').add('.actions > li').not('.elided').not('.current').not('.placeholder').each(function(i) {
53
- $(this).fadeTo(0,0.8);
54
- $(this).hover(
55
- function() { $(this).fadeTo(0,1) },
56
- function() { $(this).fadeTo(200,0.8) }
57
- );
58
- });
59
- });
60
- /* ]]> */
61
- </script>
62
48
  </body>
63
49
  </html>
@@ -3,7 +3,6 @@ module CortexReaver
3
3
  plugin :timestamps
4
4
  plugin :cached_rendering
5
5
  plugin :comments
6
- plugin :sequenceable
7
6
 
8
7
  include CortexReaver::Model::Renderer
9
8
 
@@ -1,7 +1,7 @@
1
1
  /* Actions */
2
2
  ul.actions {
3
3
  margin: 0;
4
- padding: 2px;
4
+ padding: 0;
5
5
  }
6
6
  .actions li {
7
7
  color: #000;
@@ -12,13 +12,32 @@ ul.actions {
12
12
  .actions li a {
13
13
  color: #000;
14
14
  }
15
- .actions li.current {
16
- background: #fff;
15
+
16
+ /* Top actions */
17
+ #top .actions li {
18
+ display: inline-block;
19
+ }
20
+
21
+ #top .sections.actions li {
22
+ padding-bottom: 3px;
23
+ border-bottom: 3px solid transparent;
24
+ position: relative;
25
+ top: 3px;
17
26
  }
18
- .actions li.current a {
27
+
28
+ #top .sections.actions a {
29
+ padding: 6px;
19
30
  color: #000;
20
31
  }
21
32
 
33
+ #top .sections.actions li:hover {
34
+ border-bottom-color: #444 !important;
35
+ }
36
+
37
+ #top .sections.actions li.current {
38
+ border-bottom-color: #888;
39
+ }
40
+
22
41
  /* Footer actions on journals, pages, etc */
23
42
  .footer .actions {
24
43
  font-size: 80%;
@@ -1,10 +1,10 @@
1
1
  #colophon {
2
2
  font-size: 80%;
3
3
  margin: 20px auto;
4
- color: #ccc;
4
+ color: #888;
5
5
  text-align: center;
6
6
  }
7
7
 
8
8
  #colophon a {
9
- color: #fff;
9
+ color: #000;
10
10
  }
@@ -1,3 +1,8 @@
1
+ .text-entry .comments, .photograph .comments {
2
+ margin-top: 20px;
3
+ margin-bottom: 20px;
4
+ }
5
+
1
6
  div.comment {
2
7
  margin-bottom: 10px;
3
8
  padding: 6px;
@@ -0,0 +1,26 @@
1
+ .navigation.actions li {
2
+ display: inline-block;
3
+ margin-left: 8px;
4
+ }
5
+
6
+ .navigation.actions li:first-child {
7
+ margin-left: 0;
8
+ }
9
+
10
+ .navigation.actions a {
11
+ height: 34px;
12
+ width: 34px;
13
+ display: block;
14
+ text-indent: 100px;
15
+ overflow: hidden;
16
+ white-space: nowrap;
17
+ background: no-repeat center;
18
+ }
19
+
20
+ .navigation.actions a.up { background-image: url('/images/grid_34_light.png'); }
21
+ .navigation.actions a.previous { background-image: url('/images/prev_34_light.png'); }
22
+ .navigation.actions a.next { background-image: url('/images/next_34_light.png'); }
23
+
24
+ .navigation.actions a.up:hover { background-image: url('/images/grid_34.png'); }
25
+ .navigation.actions a.previous:hover { background-image: url('/images/prev_34.png'); }
26
+ .navigation.actions a.next:hover { background-image: url('/images/next_34.png'); }
@@ -24,10 +24,12 @@
24
24
  color: #003;
25
25
  background: #e6e6ff;
26
26
  -webkit-box-shadow: 0 1px 2px #88a;
27
+ -moz-box-shadow: 0 1px 2px #88a;
27
28
  }
28
29
  body.photographs .flash.notice {
29
30
  background: #3C3C54;
30
31
  -webkit-box-shadow: none;
32
+ -moz-box-shadow: none;
31
33
  color: #fff;
32
34
  }
33
35
  .flash.notice .icon {
@@ -38,11 +40,13 @@ body.photographs .flash.notice {
38
40
  color: #300;
39
41
  background: #ffe6e6;
40
42
  -webkit-box-shadow: 0 1px 2px #a88;
43
+ -moz-box-shadow: 0 1px 2px #a88;
41
44
  }
42
45
  body.photographs .flash.error {
43
46
  background: #541C1C;
44
47
  color: #fff;
45
48
  -webkit-box-shadow: none;
49
+ -moz-box-shadow: none;
46
50
  }
47
51
  .flash.error .icon {
48
52
  background-position: -256px -32px;
@@ -1,5 +1,5 @@
1
1
  body {
2
- font-size: 14px;
2
+ font-size: 13px;
3
3
  font-family: sans-serif;
4
4
  }
5
5
 
@@ -9,9 +9,14 @@ h1 {
9
9
  }
10
10
 
11
11
  h2 {
12
+ margin-top: 0;
12
13
  font-size: 150%;
13
14
  }
14
15
 
16
+ h2:first-child {
17
+ margin-top: 0;
18
+ }
19
+
15
20
  h3 {
16
21
  font-size: 120%;
17
22
  }
@@ -1,56 +1,61 @@
1
1
  body {
2
- background: url('/images/background_tile.png');
2
+ background: #fff;
3
3
  color: #000;
4
4
  margin: 0;
5
5
  }
6
6
 
7
7
  #content {
8
- width: 970px;
8
+ width: 900px;
9
9
  position: relative;
10
10
  margin: auto;
11
- background: #fee;
12
11
  }
13
12
 
14
13
  #top {
15
- padding: 20px 10px 10px 10px;
16
- text-align: right;
17
14
  position: absolute;
18
- display: block;
19
- height: 100px;
20
- width: 760px;
15
+ height: 80px;
16
+ width: 900px;
21
17
  left: 0px;
22
- color: #fff;
18
+ border-bottom: 1px solid #aaa;
23
19
  }
24
20
 
25
21
  #top h1 {
26
- margin-top: 16px;
22
+ padding: 0;
23
+ margin: 0;
24
+ font-size: 48px;
25
+ font-weight: 700;
26
+ position: absolute;
27
+ left: 0;
28
+ bottom: 0;
29
+ }
30
+
31
+ #top .actions {
32
+ position: absolute;
33
+ right: 0;
34
+ bottom: 0;
27
35
  }
28
36
 
29
37
  #top a {
30
- color: #fff;
38
+ color: #000;
39
+ }
40
+ #top a:hover {
41
+ text-decoration: none;
31
42
  }
32
43
 
33
44
  #boxes {
34
45
  position: absolute;
35
46
  width: 170px;
36
47
  top: 100px;
37
- right: 0px;
48
+ right: 0;
38
49
  }
39
50
 
40
51
  #main-container {
41
52
  position: absolute;
42
53
  left: 0px;
43
54
  top: 100px;
44
- width: 780px;
45
- }
46
-
47
- body.blank #main-container {
48
- width: 900px;
55
+ right: 196px;
49
56
  }
50
57
 
51
58
  #main {
59
+ background: #fff;
52
60
  min-height: 260px;
53
- padding: 10px;
54
- -moz-border-radius: 10px;
55
- -webkit-border-radius: 10px;
56
61
  }
@@ -7,10 +7,10 @@
7
7
  .pagination.actions li {
8
8
  margin: 1px;
9
9
  padding: 0;
10
- width: 38px;
11
- background: #444;
10
+ width: 35px;
11
+ background: #ddd;
12
12
  display: inline-block;
13
- color: white;
13
+ color: #000;
14
14
  }
15
15
 
16
16
  .pagination.actions li:first-child {
@@ -28,8 +28,6 @@
28
28
  }
29
29
 
30
30
  .pagination.actions li.elided {
31
- background: transparent url('/images/elided.png') center;
32
- background-repeat: repeat-y;
33
31
  }
34
32
 
35
33
  .pagination.actions li > * {
@@ -40,14 +38,23 @@
40
38
  width: 28px;
41
39
  line-height: 18px;
42
40
  text-decoration: none !important;
43
- color: white !important;
41
+ color: #000 !important;
44
42
  overflow: hidden;
45
43
  }
46
44
 
45
+ .pagination.actions li:hover, .pagination.actions li.current > *:hover {
46
+ background: #444;
47
+ }
48
+
49
+ .pagination.actions li > *:hover {
50
+ color: #fff !important;
51
+ }
52
+
47
53
  .pagination.actions li.current {
48
- background-color: #168715;
54
+ background-color: #888;
49
55
  }
50
56
 
57
+
51
58
  .pagination.actions li > a.previous, .pagination.actions li > a.next {
52
59
  text-indent: -100px;
53
60
  }
@@ -1,14 +1,23 @@
1
1
  #top.photograph {
2
2
  width: 600px;
3
- height: 60px;
4
- position: static;
3
+ height: 80px;
4
+ position: relative;
5
5
  margin-left: auto;
6
6
  margin-right: auto;
7
+ border: none;
8
+ }
9
+
10
+ #top.photograph a {
11
+ color: #999;
12
+ }
13
+
14
+ #top.photograph .actions {
15
+ bottom: 10px;
7
16
  }
8
17
 
9
18
  .photograph.full {
10
19
  text-align: center;
11
- margin: 0 auto;
20
+ margin: 20px auto;
12
21
  color: #fff;
13
22
  }
14
23
 
@@ -23,6 +32,7 @@
23
32
  display: block;
24
33
  -moz-border-radius: 6px;
25
34
  -webkit-border-radius: 6px;
35
+ border-radius: 6px;
26
36
  }
27
37
 
28
38
  .frame a {
@@ -87,3 +97,7 @@
87
97
  background: #333;
88
98
  color: #fff;
89
99
  }
100
+
101
+ body.blank #colophon a {
102
+ color: #fff;
103
+ }
@@ -1,43 +1,35 @@
1
- /* Adjust the sidebar colors some */
2
- body.photographs .box .actions li {
3
- background: #444;
4
- }
5
- body.photographs .box .actions li.current {
6
- background: #666;
7
- }
8
- body.photographs .box .actions li.current a {
9
- color: #fff;
10
- }
11
-
12
- /* Dark main section */
13
- body.photographs #main-container {
14
- background: transparent;
15
- }
16
- body.photographs #main {
17
- background: #000;
1
+ /* Backgrounds */
2
+ body.blank {
3
+ background: url('/images/background_tile.png');
18
4
  }
19
5
 
20
6
  /* Grid */
21
7
  .photographs.grid {
22
- width: 764px;
8
+ margin: 10px -5px;
23
9
  padding: 0;
24
- margin: 2px -2px 8px -2px;
25
10
  }
26
11
 
27
12
  .photographs.grid .thumb {
28
13
  display: block;
29
14
  float: left;
30
- margin: 4px;
15
+ margin: 5px;
31
16
  }
32
17
 
33
18
  .photographs.grid .thumb > a {
34
- width: 183px;
35
- height: 183px;
36
- background-color: #111;
19
+ width: 166px;
20
+ height: 166px;
37
21
  display: table-cell;
38
22
  vertical-align: middle;
23
+ background-color: #f0f0f0;
24
+ border-width: 1px;
25
+ border-style: solid;
26
+ border-color: #fff #ccc #aaa #ccc;
39
27
  -moz-border-radius: 4px;
40
28
  -webkit-border-radius: 4px;
29
+ border-radius: 4px;
30
+ -webkit-box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
31
+ -moz-box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
32
+ box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
41
33
  }
42
34
 
43
35
  .photographs.grid .thumb > a > img {
@@ -1,83 +1,46 @@
1
- #boxes {
2
- text-align: right;
3
- }
4
-
5
- .box a {
6
- color: #fff;
7
- }
8
-
9
1
  .box {
10
- margin-bottom: 10px;
11
- }
12
-
13
- .box > ul {
14
- list-style: none;
15
- margin: 0px;
16
- padding: 0px;
17
- }
18
-
19
- .box > ul > li {
20
- margin: 0;
21
- padding: 0;
2
+ margin-bottom: 20px;
22
3
  }
23
4
 
24
5
  .box .top {
25
- color: #fff;
26
- padding: 6px 12px 6px 6px;
27
- font-size: 130%;
28
- }
29
-
30
- .box .top a {
6
+ color: #000;
7
+ font-size: 110%;
8
+ margin-bottom: 4px;
31
9
  font-weight: bolder;
32
10
  }
33
11
 
34
- .box .actions li {
35
- background: #666;
36
- border-right: 6px solid #3D3D3D;
37
- padding: 6px;
38
- margin-bottom: 3px;
39
- font-weight: bolder;
40
- font-size: 115%;
41
- margin-left: -20px;
12
+ .box .top a {
13
+ color: #000;
42
14
  }
43
15
 
44
- .box .actions li a {
45
- color: #fff;
46
- }
47
- .box .actions li a:hover {
48
- text-decoration: none;
16
+ .box ul, .box ol {
17
+ list-style-type: none;
18
+ margin: 0;
19
+ padding: 0;
49
20
  }
50
21
 
51
- .box .actions li:hover {
52
- background-color: #888;
53
- border-right-color: #1A401A;
54
- }
55
- .box .actions li.current {
56
- background: #fff;
57
- border-right-color: #168715;
58
- }
59
- .box .actions li.current a {
60
- color: #000;
22
+ .box li {
23
+ margin: 0;
24
+ padding: 0;
61
25
  }
62
26
 
63
27
  .box .text {
64
- text-align: left;
65
28
  background: #fff;
66
- font-size: 80%;
67
- padding: 6px;
68
- }
69
- .box .text a {
70
- color: blue;
29
+ font-size: 85%;
71
30
  }
31
+
72
32
  .box .text .date {
33
+ display: block;
73
34
  font-size: 80%;
74
35
  text-align: right;
36
+ color: #999;
75
37
  }
76
38
 
77
39
  .box .photo {
78
- background: #aaa;
79
- border: 2px solid #fff;
80
- padding: 0;
81
- margin: 0;
82
- margin-bottom: 20px;
40
+ background: #fff;
41
+ padding: 3px;
42
+ margin: 0px 2px 10px 2px;
43
+ -webkit-box-shadow: 0px 0px 3px #000;
44
+ -moz-box-shadow: 0px 0px 3px #000;
45
+ box-shadow: 0px 0px 3px #000;
83
46
  }
@@ -24,6 +24,7 @@ h1 a, h2 a, h3 a {
24
24
 
25
25
  .text-entry .footer {
26
26
  background: #eee;
27
+ margin-bottom: 0;
27
28
  border-bottom: 1px dashed #aaa;
28
29
  padding: 2px;
29
30
  }
@@ -1,6 +1,6 @@
1
1
  module CortexReaver
2
2
  APP_NAME = 'Cortex Reaver'
3
- APP_VERSION = '0.2.9'
3
+ APP_VERSION = '0.3.0'
4
4
  APP_AUTHOR = 'Kyle Kingsbury'
5
5
  APP_EMAIL = 'aphyr@aphyr.com'
6
6
  APP_URL = 'http://aphyr.com'
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
  <% end %>
13
13
 
14
- <%= form_for @comment, Rs(@form_action), [
14
+ <%= form_for @comment, rs(@form_action), [
15
15
  :name,
16
16
  :email,
17
17
  :http,
@@ -1,6 +1,6 @@
1
1
  <div class="post comment_form">
2
- <a id="post-comment"></a>
3
2
  <h2>Post a Comment</h2>
3
+ <a id="post-comment"></a>
4
4
 
5
5
  <%= errors_on @new_comment %>
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%= errors_on @journal %>
4
4
 
5
- <form class="edit-form" action="<%= rs(@form_action) %>" method="post" enctype="multipart/form-data">
5
+ <form class="edit-form" id="journal-edit-form" action="<%= rs(@form_action) %>" method="post" enctype="multipart/form-data">
6
6
  <%= form_p :title, :model => @journal %>
7
7
  <%= live_name_field @journal %>
8
8
  <%= live_tags_field @journal %>
@@ -12,4 +12,28 @@
12
12
  <%= attachment_form @journal %>
13
13
  <%= form_p :draft, :model => @journal, :type => 'checkbox', :description => 'This is a draft' %>
14
14
  <input type="submit" name="submit" />
15
+
16
+ <script type="text/javascript">
17
+ /* <![CDATA[ */
18
+
19
+
20
+
21
+ function saveJournal() {
22
+ localStorage.setItem('journal_id', <%= @journal.id %>);
23
+ localStorage.setItem('journal_title', $('#journal-edit-form #title').value);
24
+ localStorage.setItem('journal_name', $('#journal-edit-form #name').value);
25
+ localStorage.setItem('journal_tags', $('#journal-edit-form #tags').value);
26
+ localStorage.setItem('journal_body', $('#journal-edit-form #body').value);
27
+ }
28
+
29
+ function loadJournal() {
30
+ if (localStorage.getItem('journal_id') == <%= @journal.id %>) {
31
+ $('#journal-edit-form #title').value(localStorage.getItem('journal_title'));
32
+ $('#journal-edit-form #name').value(localStorage.getItem('journal_name'));
33
+ $('#journal-edit-form #tags').value(localStorage.getItem('journal_tags'));
34
+ $('#journal-edit-form #body').value(localStorage.getItem('journal_body'));
35
+ }
36
+
37
+ window.setInterval(saveJournal, 10000);
38
+ }
15
39
  </form>
@@ -9,21 +9,3 @@
9
9
  </ol>
10
10
 
11
11
  <div class="clear" style="height: 4px;"></div>
12
-
13
- <script type="text/javascript">
14
- /* <![CDATA[ */
15
- $(document).ready(function() {
16
- $('.grid .photograph > *').each(function(i) {
17
- var elem = $(this);
18
- elem.hover(
19
- function() {
20
- elem.animate( {backgroundColor: "#222"}, 1)
21
- },
22
- function() {
23
- elem.animate( {backgroundColor: "#111"}, 200);
24
- }
25
- );
26
- });
27
- });
28
- /* ]]> */
29
- </script>
@@ -1,8 +1,9 @@
1
1
  <div id="top" class="photograph">
2
+ <h1><a href="/"><%=h CortexReaver.config.site.name %></a></h1>
3
+
2
4
  <% if @model %>
3
5
  <%= model_nav @model %>
4
6
  <% end %>
5
- <h1><a href="/"><%=h CortexReaver.config.site.name %></a></h1>
6
7
  </div>
7
8
 
8
9
  <div id="photograph_<%= @photograph.name %>" class="photograph full">
@@ -0,0 +1,5 @@
1
+ <% if @model %>
2
+ <div class="box">
3
+ <%= model_nav @model %>
4
+ </div>
5
+ <% end %>
@@ -1,4 +1,3 @@
1
- <% if @model %>
2
- <%= model_nav @model %>
3
- <% end %>
4
1
  <h1><a href="/"><%=h CortexReaver.config.site.name %></a></h1>
2
+
3
+ <%= section_nav CortexReaver.config.view.sections %>
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cortex-reaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Kyle Kingsbury
@@ -9,149 +14,203 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-09 00:00:00 -08:00
17
+ date: 2010-06-29 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: ramaze
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - "="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2009
29
+ - 7
23
30
  version: "2009.07"
24
- version:
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: libxml-ruby
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
30
37
  requirements:
31
38
  - - ~>
32
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 1
42
+ - 1
43
+ - 3
33
44
  version: 1.1.3
34
- version:
45
+ type: :runtime
46
+ version_requirements: *id002
35
47
  - !ruby/object:Gem::Dependency
36
48
  name: erubis
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
49
+ prerelease: false
50
+ requirement: &id003 !ruby/object:Gem::Requirement
40
51
  requirements:
41
52
  - - ~>
42
53
  - !ruby/object:Gem::Version
54
+ segments:
55
+ - 2
56
+ - 6
57
+ - 2
43
58
  version: 2.6.2
44
- version:
59
+ type: :runtime
60
+ version_requirements: *id003
45
61
  - !ruby/object:Gem::Dependency
46
62
  name: sanitize
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
63
+ prerelease: false
64
+ requirement: &id004 !ruby/object:Gem::Requirement
50
65
  requirements:
51
66
  - - ~>
52
67
  - !ruby/object:Gem::Version
68
+ segments:
69
+ - 1
70
+ - 1
71
+ - 0
53
72
  version: 1.1.0
54
- version:
73
+ type: :runtime
74
+ version_requirements: *id004
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: BlueCloth
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
77
+ prerelease: false
78
+ requirement: &id005 !ruby/object:Gem::Requirement
60
79
  requirements:
61
80
  - - ~>
62
81
  - !ruby/object:Gem::Version
82
+ segments:
83
+ - 1
84
+ - 0
85
+ - 0
63
86
  version: 1.0.0
64
- version:
87
+ type: :runtime
88
+ version_requirements: *id005
65
89
  - !ruby/object:Gem::Dependency
66
90
  name: sequel
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
91
+ prerelease: false
92
+ requirement: &id006 !ruby/object:Gem::Requirement
70
93
  requirements:
71
94
  - - ~>
72
95
  - !ruby/object:Gem::Version
96
+ segments:
97
+ - 3
98
+ - 5
99
+ - 0
73
100
  version: 3.5.0
74
- version:
101
+ type: :runtime
102
+ version_requirements: *id006
75
103
  - !ruby/object:Gem::Dependency
76
104
  name: thin
77
- type: :runtime
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
105
+ prerelease: false
106
+ requirement: &id007 !ruby/object:Gem::Requirement
80
107
  requirements:
81
108
  - - ~>
82
109
  - !ruby/object:Gem::Version
110
+ segments:
111
+ - 1
112
+ - 2
113
+ - 4
83
114
  version: 1.2.4
84
- version:
115
+ type: :runtime
116
+ version_requirements: *id007
85
117
  - !ruby/object:Gem::Dependency
86
118
  name: exifr
87
- type: :runtime
88
- version_requirement:
89
- version_requirements: !ruby/object:Gem::Requirement
119
+ prerelease: false
120
+ requirement: &id008 !ruby/object:Gem::Requirement
90
121
  requirements:
91
122
  - - ~>
92
123
  - !ruby/object:Gem::Version
124
+ segments:
125
+ - 0
126
+ - 10
127
+ - 7
93
128
  version: 0.10.7
94
- version:
129
+ type: :runtime
130
+ version_requirements: *id008
95
131
  - !ruby/object:Gem::Dependency
96
132
  name: construct
97
- type: :runtime
98
- version_requirement:
99
- version_requirements: !ruby/object:Gem::Requirement
133
+ prerelease: false
134
+ requirement: &id009 !ruby/object:Gem::Requirement
100
135
  requirements:
101
136
  - - ~>
102
137
  - !ruby/object:Gem::Version
138
+ segments:
139
+ - 0
140
+ - 1
141
+ - 5
103
142
  version: 0.1.5
104
- version:
143
+ type: :runtime
144
+ version_requirements: *id009
105
145
  - !ruby/object:Gem::Dependency
106
146
  name: rmagick
107
- type: :runtime
108
- version_requirement:
109
- version_requirements: !ruby/object:Gem::Requirement
147
+ prerelease: false
148
+ requirement: &id010 !ruby/object:Gem::Requirement
110
149
  requirements:
111
150
  - - ~>
112
151
  - !ruby/object:Gem::Version
152
+ segments:
153
+ - 2
154
+ - 5
155
+ - 1
113
156
  version: 2.5.1
114
- version:
157
+ type: :runtime
158
+ version_requirements: *id010
115
159
  - !ruby/object:Gem::Dependency
116
160
  name: cssmin
117
- type: :runtime
118
- version_requirement:
119
- version_requirements: !ruby/object:Gem::Requirement
161
+ prerelease: false
162
+ requirement: &id011 !ruby/object:Gem::Requirement
120
163
  requirements:
121
164
  - - ~>
122
165
  - !ruby/object:Gem::Version
166
+ segments:
167
+ - 1
168
+ - 0
169
+ - 2
123
170
  version: 1.0.2
124
- version:
171
+ type: :runtime
172
+ version_requirements: *id011
125
173
  - !ruby/object:Gem::Dependency
126
174
  name: jsmin
127
- type: :runtime
128
- version_requirement:
129
- version_requirements: !ruby/object:Gem::Requirement
175
+ prerelease: false
176
+ requirement: &id012 !ruby/object:Gem::Requirement
130
177
  requirements:
131
178
  - - ~>
132
179
  - !ruby/object:Gem::Version
180
+ segments:
181
+ - 1
182
+ - 0
183
+ - 1
133
184
  version: 1.0.1
134
- version:
185
+ type: :runtime
186
+ version_requirements: *id012
135
187
  - !ruby/object:Gem::Dependency
136
188
  name: json
137
- type: :runtime
138
- version_requirement:
139
- version_requirements: !ruby/object:Gem::Requirement
189
+ prerelease: false
190
+ requirement: &id013 !ruby/object:Gem::Requirement
140
191
  requirements:
141
192
  - - ~>
142
193
  - !ruby/object:Gem::Version
194
+ segments:
195
+ - 1
196
+ - 1
197
+ - 9
143
198
  version: 1.1.9
144
- version:
199
+ type: :runtime
200
+ version_requirements: *id013
145
201
  - !ruby/object:Gem::Dependency
146
202
  name: trollop
147
- type: :runtime
148
- version_requirement:
149
- version_requirements: !ruby/object:Gem::Requirement
203
+ prerelease: false
204
+ requirement: &id014 !ruby/object:Gem::Requirement
150
205
  requirements:
151
206
  - - ~>
152
207
  - !ruby/object:Gem::Version
208
+ segments:
209
+ - 1
210
+ - 15
153
211
  version: "1.15"
154
- version:
212
+ type: :runtime
213
+ version_requirements: *id014
155
214
  description:
156
215
  email: aphyr@aphyr.com
157
216
  executables:
@@ -175,9 +234,9 @@ files:
175
234
  - lib/cortex_reaver/public/css/text.css
176
235
  - lib/cortex_reaver/public/css/colophon.css
177
236
  - lib/cortex_reaver/public/css/table-of-contents.css
237
+ - lib/cortex_reaver/public/css/context_navigation.css
178
238
  - lib/cortex_reaver/public/css/photo-show.css
179
239
  - lib/cortex_reaver/public/css/flash.css
180
- - lib/cortex_reaver/public/css/top_actions.css
181
240
  - lib/cortex_reaver/public/css/form.css
182
241
  - lib/cortex_reaver/public/css/tags.css
183
242
  - lib/cortex_reaver/public/css/autotags.css
@@ -199,10 +258,13 @@ files:
199
258
  - lib/cortex_reaver/public/images/prev_34_prelight.png
200
259
  - lib/cortex_reaver/public/images/header_background.png
201
260
  - lib/cortex_reaver/public/images/delete.gif
261
+ - lib/cortex_reaver/public/images/prev_34_light.png
202
262
  - lib/cortex_reaver/public/images/parent.gif
203
263
  - lib/cortex_reaver/public/images/edit_34.png
204
264
  - lib/cortex_reaver/public/images/grid_34.png
265
+ - lib/cortex_reaver/public/images/next_34_light.png
205
266
  - lib/cortex_reaver/public/images/edit_34_prelight.png
267
+ - lib/cortex_reaver/public/images/grid_34_light.png
206
268
  - lib/cortex_reaver/public/images/admin/icons.xcf
207
269
  - lib/cortex_reaver/public/images/admin/icons.png
208
270
  - lib/cortex_reaver/public/images/elided.png
@@ -242,6 +304,7 @@ files:
242
304
  - lib/cortex_reaver/snippets/range.rb
243
305
  - lib/cortex_reaver/view/sidebar/twitter.rhtml
244
306
  - lib/cortex_reaver/view/sidebar/photographs.rhtml
307
+ - lib/cortex_reaver/view/sidebar/context_navigation.rhtml
245
308
  - lib/cortex_reaver/view/sidebar/explore_photos.rhtml
246
309
  - lib/cortex_reaver/view/sidebar/sections.rhtml
247
310
  - lib/cortex_reaver/view/journals/short.rhtml
@@ -354,18 +417,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
354
417
  requirements:
355
418
  - - ">="
356
419
  - !ruby/object:Gem::Version
420
+ segments:
421
+ - 1
422
+ - 8
423
+ - 6
357
424
  version: 1.8.6
358
- version:
359
425
  required_rubygems_version: !ruby/object:Gem::Requirement
360
426
  requirements:
361
427
  - - ">="
362
428
  - !ruby/object:Gem::Version
429
+ segments:
430
+ - 0
363
431
  version: "0"
364
- version:
365
432
  requirements: []
366
433
 
367
434
  rubyforge_project: cortex-reaver
368
- rubygems_version: 1.3.5
435
+ rubygems_version: 1.3.6
369
436
  signing_key:
370
437
  specification_version: 3
371
438
  summary: A dangerous Ruby blog engine, with a photographic memory.
@@ -1,50 +0,0 @@
1
- #top .actions {
2
- top: 30px;
3
- position: absolute;
4
- padding: 0;
5
- margin: 0;
6
- }
7
-
8
- #top .actions > li {
9
- float: left;
10
- display: block;
11
- padding: 0;
12
- margin-right: 8px;
13
- width: 40px;
14
- height: 40px;
15
- }
16
-
17
- #top .actions > li > a {
18
- display: block;
19
- height: 40px;
20
- overflow: hidden;
21
- line-height: 200px;
22
- margin: 0;
23
- padding: 0;
24
- color: transparent;
25
- }
26
-
27
- #top .actions a.previous {
28
- background:transparent url(/images/prev_34.png) no-repeat scroll center center;
29
- }
30
- #top .actions a.previous:hover {
31
- background-image: url(/images/prev_34_prelight.png);
32
- }
33
- #top .actions a.up {
34
- background:transparent url(/images/grid_34.png) no-repeat scroll center center;
35
- }
36
- #top .actions a.up:hover {
37
- background-image: url(/images/grid_34_prelight.png);
38
- }
39
- #top .actions a.edit {
40
- background:transparent url(/images/edit_34.png) no-repeat scroll center center;
41
- }
42
- #top .actions a.edit:hover {
43
- background-image: url(/images/edit_34_prelight.png);
44
- }
45
- #top .actions a.next {
46
- background:transparent url(/images/next_34.png) no-repeat scroll center center;
47
- }
48
- #top .actions a.next:hover {
49
- background-image: url(/images/next_34_prelight.png);
50
- }