woople-theme 0.5.0.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ @import "woople-theme/variables.css.less";
2
+
3
+ #essentials-section {
4
+ padding-left:@contentPadding;
5
+ padding-right:@contentPadding;
6
+ margin-top:0;
7
+ margin-bottom:0;
8
+ padding-top:@contentPadding;
9
+
10
+ h2 {
11
+ .section-title();
12
+ }
13
+ }
@@ -26,7 +26,7 @@
26
26
 
27
27
  h1 {
28
28
  font-weight:200;
29
- font-family:HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
29
+ font-family:@titleFont;
30
30
  color:#0089D0;
31
31
  font-size:50px;
32
32
  line-height:55px;
@@ -16,6 +16,8 @@
16
16
 
17
17
  @sosumi-font-size: 12px;
18
18
 
19
+ @titleFont: HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
20
+
19
21
  /*course*/
20
22
  @imageWidth: 50px;
21
23
  @tableCellPadding: 10px;
@@ -45,6 +47,13 @@
45
47
  padding-right:@leftColumnOffset;
46
48
  }
47
49
 
50
+ .section-title() {
51
+ font-weight: @title-font-weight;
52
+ margin-bottom:@contentPadding;
53
+ font-family:@titleFont;
54
+ color: @secondaryTextColour;
55
+ }
56
+
48
57
  .modal-video() {
49
58
  max-height:600px;
50
59
  overflow:visible;
@@ -1,5 +1,12 @@
1
1
  module DashboardHelper
2
2
  def status_alert(color, description)
3
- render partial: 'dashboard/status_alert', object: ThemePresentation.wrap({ color: color, description: description }, WoopleTheme::Dashboard::StatusAlertPresenter)
3
+ render partial: 'dashboard/status_alert',
4
+ object: ThemePresentation.wrap({ color: color, description: description }, WoopleTheme::Dashboard::StatusAlertPresenter)
4
5
  end
6
+
7
+ def essentials_section(presenter)
8
+ render partial: 'dashboard/essentials_section',
9
+ object: ThemePresentation.wrap(presenter, WoopleTheme::Dashboard::EssentialsSectionPresenter)
10
+ end
11
+
5
12
  end
@@ -0,0 +1,7 @@
1
+ module WoopleTheme
2
+ module Dashboard
3
+ class EssentialsSectionPresenter < SectionPresenter
4
+
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,28 @@
1
+ require 'explicit_delegator'
2
+
3
+ module WoopleTheme
4
+ module Dashboard
5
+ class SectionPresenter < ExplicitDelegator
6
+ enforce_definitions :title,
7
+ :enabled?
8
+
9
+ def render
10
+ yield if section.enabled?
11
+ end
12
+
13
+ def title
14
+ section.title.titleize
15
+ end
16
+
17
+ def css_id
18
+ section.title.parameterize + "-section"
19
+ end
20
+
21
+ private
22
+
23
+ def section
24
+ __getobj__
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,6 @@
1
+ <% essentials_section.render do %>
2
+ <section id="<%= essentials_section.css_id %>">
3
+ <h2><%= essentials_section.title %></h2>
4
+ <% yield %>
5
+ </section>
6
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module WoopleTheme
2
- VERSION = '0.5.0.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woople-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-21 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -172,6 +172,7 @@ files:
172
172
  - app/assets/stylesheets/woople-theme/content-item.css.less
173
173
  - app/assets/stylesheets/woople-theme/content.css.less
174
174
  - app/assets/stylesheets/woople-theme/course.css.less
175
+ - app/assets/stylesheets/woople-theme/dashboard/essentials-section.css.less
175
176
  - app/assets/stylesheets/woople-theme/dashboard/status-alert.css.less
176
177
  - app/assets/stylesheets/woople-theme/framework/index.css.less
177
178
  - app/assets/stylesheets/woople-theme/framework/responsive.css.less
@@ -208,11 +209,14 @@ files:
208
209
  - app/presenters/submitted_assessment_form_presenter.rb
209
210
  - app/presenters/theme_presentation.rb
210
211
  - app/presenters/woople_theme/answer_presenter.rb
212
+ - app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
213
+ - app/presenters/woople_theme/dashboard/section_presenter.rb
211
214
  - app/presenters/woople_theme/dashboard/status_alert_presenter.rb
212
215
  - app/presenters/woople_theme/question_presenter.rb
213
216
  - app/presenters/woople_theme/submitted_answer_presenter.rb
214
217
  - app/presenters/woople_theme/submitted_question_presenter.rb
215
218
  - app/presenters/woople_theme/video_presenter.rb
219
+ - app/views/dashboard/_essentials_section.html.erb
216
220
  - app/views/dashboard/_status_alert.html.erb
217
221
  - app/views/layouts/theme.html.erb
218
222
  - app/views/woople-theme/_assessment_form.html.erb