woople-theme 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.md +20 -0
- data/Rakefile +37 -0
- data/app/assets/images/woople-theme/certification/missing.png +0 -0
- data/app/assets/images/woople-theme/certification/red-icon.png +0 -0
- data/app/assets/images/woople-theme/certification/red-icon2x.png +0 -0
- data/app/assets/images/woople-theme/completed-triangle.png +0 -0
- data/app/assets/images/woople-theme/completed-triangle2x.png +0 -0
- data/app/assets/images/woople-theme/icons/menu.png +0 -0
- data/app/assets/images/woople-theme/icons/menu2x.png +0 -0
- data/app/assets/images/woople-theme/icons/search.png +0 -0
- data/app/assets/images/woople-theme/icons/search2x.png +0 -0
- data/app/assets/images/woople-theme/icons/sortASC.png +0 -0
- data/app/assets/images/woople-theme/icons/sortASC2x.png +0 -0
- data/app/assets/images/woople-theme/icons/sortDESC.png +0 -0
- data/app/assets/images/woople-theme/icons/sortDESC2x.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_down.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_down2x.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_up.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_up2x.png +0 -0
- data/app/assets/images/woople-theme/logo.png +0 -0
- data/app/assets/images/woople-theme/missing-profile.png +0 -0
- data/app/assets/images/woople-theme/missing.png +0 -0
- data/app/assets/images/woople-theme/rails.png +0 -0
- data/app/assets/images/woople-theme/star-icon.png +0 -0
- data/app/assets/images/woople-theme/star-icon2x.png +0 -0
- data/app/assets/javascripts/woople-theme/theme.js +39 -0
- data/app/assets/stylesheets/woople-theme/base.css.less +101 -0
- data/app/assets/stylesheets/woople-theme/buttons.css.less +38 -0
- data/app/assets/stylesheets/woople-theme/colours.css.less +29 -0
- data/app/assets/stylesheets/woople-theme/content-item.css.less +157 -0
- data/app/assets/stylesheets/woople-theme/content.css.less +38 -0
- data/app/assets/stylesheets/woople-theme/course.css.less +47 -0
- data/app/assets/stylesheets/woople-theme/framework.css +5 -0
- data/app/assets/stylesheets/woople-theme/framework/index.css.less +8 -0
- data/app/assets/stylesheets/woople-theme/framework/responsive.css.less +1 -0
- data/app/assets/stylesheets/woople-theme/grid.css.less +38 -0
- data/app/assets/stylesheets/woople-theme/index.css.less +20 -0
- data/app/assets/stylesheets/woople-theme/legacy.css.less +28 -0
- data/app/assets/stylesheets/woople-theme/menu.css.less +132 -0
- data/app/assets/stylesheets/woople-theme/modal.css.less +56 -0
- data/app/assets/stylesheets/woople-theme/outline.css.less +117 -0
- data/app/assets/stylesheets/woople-theme/page-header.css.less +48 -0
- data/app/assets/stylesheets/woople-theme/pagination.css.less +31 -0
- data/app/assets/stylesheets/woople-theme/profile.css.less +120 -0
- data/app/assets/stylesheets/woople-theme/responsive.css.less +1 -0
- data/app/assets/stylesheets/woople-theme/theme-retina.css +44 -0
- data/app/assets/stylesheets/woople-theme/theme.css +8 -0
- data/app/assets/stylesheets/woople-theme/variables.css.less +68 -0
- data/app/helpers/javascript_helper.rb +5 -0
- data/app/helpers/theme_helper.rb +36 -0
- data/app/presenters/content_image.rb +7 -0
- data/app/presenters/content_item_presenter.rb +14 -0
- data/app/presenters/menu_link_presenter.rb +52 -0
- data/app/presenters/menu_presenter.rb +7 -0
- data/app/presenters/menu_section_presenter.rb +19 -0
- data/app/presenters/outline_download_presenter.rb +7 -0
- data/app/presenters/outline_presenter.rb +43 -0
- data/app/presenters/outline_video_presenter.rb +45 -0
- data/app/presenters/page_header_presenter.rb +6 -0
- data/app/presenters/profile_presenter.rb +9 -0
- data/app/presenters/theme_presentation.rb +51 -0
- data/app/views/layouts/theme.html.erb +43 -0
- data/app/views/woople-theme/_content_item.html.erb +28 -0
- data/app/views/woople-theme/_content_item_header.html.erb +7 -0
- data/app/views/woople-theme/_menu.html.erb +15 -0
- data/app/views/woople-theme/_outline.html.erb +19 -0
- data/app/views/woople-theme/_outline_download.html.erb +6 -0
- data/app/views/woople-theme/_outline_video.html.erb +13 -0
- data/app/views/woople-theme/_page_header.html.erb +8 -0
- data/app/views/woople-theme/_profile.html.erb +20 -0
- data/app/views/woople-theme/_video_modal.html.erb +20 -0
- data/config/locales/en.yml +18 -0
- data/config/routes.rb +2 -0
- data/lib/tasks/woople-theme_tasks.rake +4 -0
- data/lib/woople-theme.rb +5 -0
- data/lib/woople-theme/configuration.rb +23 -0
- data/lib/woople-theme/engine.rb +14 -0
- data/lib/woople-theme/version.rb +3 -0
- metadata +196 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
@import "woople-theme/colours.css.less";
|
3
|
+
|
4
|
+
.page-header {
|
5
|
+
border-color:fade(@highlight, 10%);
|
6
|
+
padding-left:@contentPadding;
|
7
|
+
padding-right:@contentPadding;
|
8
|
+
margin-top:0;
|
9
|
+
padding-top:@contentPadding * 1.5;
|
10
|
+
background: @highlightBackground;
|
11
|
+
|
12
|
+
h1 {
|
13
|
+
font-weight:200;
|
14
|
+
font-family:HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
15
|
+
color:#0089D0;
|
16
|
+
font-size:50px;
|
17
|
+
line-height:55px;
|
18
|
+
margin-bottom:10px;
|
19
|
+
}
|
20
|
+
|
21
|
+
p {
|
22
|
+
font-size:16px;
|
23
|
+
line-height:23px;
|
24
|
+
color:@secondaryTextColour;
|
25
|
+
margin-bottom:-4px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@media (max-width: 767px) {
|
30
|
+
.page-header {
|
31
|
+
padding-left:@phoneMargin;
|
32
|
+
padding-right:@phoneMargin;
|
33
|
+
padding-top:@phoneMargin * 1.5;
|
34
|
+
margin-bottom:0;
|
35
|
+
|
36
|
+
h1 {
|
37
|
+
font-size:28px;
|
38
|
+
line-height:32px;
|
39
|
+
}
|
40
|
+
|
41
|
+
p {
|
42
|
+
font-size:12px;
|
43
|
+
line-height:18px;
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
@import "woople-theme/colours.css.less";
|
3
|
+
|
4
|
+
.pagination {
|
5
|
+
margin-top:0;
|
6
|
+
.box-shadow(inset 0 1px 3px @insideShadowColour);
|
7
|
+
|
8
|
+
ul {
|
9
|
+
.box-shadow(0 0 0 transparent);
|
10
|
+
.border-radius(0);
|
11
|
+
}
|
12
|
+
li:first-child a {
|
13
|
+
border-radius:0;
|
14
|
+
-webkit-border-radius:0;
|
15
|
+
}
|
16
|
+
|
17
|
+
li:last-child a {
|
18
|
+
border-radius:0;
|
19
|
+
-webkit-border-radius:0;
|
20
|
+
}
|
21
|
+
|
22
|
+
a {
|
23
|
+
border:none;
|
24
|
+
}
|
25
|
+
|
26
|
+
a:hover, .active a {
|
27
|
+
background-color:@highlightBackground;
|
28
|
+
}
|
29
|
+
|
30
|
+
}
|
31
|
+
|
@@ -0,0 +1,120 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
@import "woople-theme/colours.css.less";
|
3
|
+
|
4
|
+
.profile {
|
5
|
+
position:absolute;
|
6
|
+
top:19px;
|
7
|
+
right:30px;
|
8
|
+
width:300px;
|
9
|
+
|
10
|
+
.profile-link {
|
11
|
+
float:right;
|
12
|
+
margin-bottom:0;
|
13
|
+
|
14
|
+
.dropdown-menu {
|
15
|
+
background: @contentBackground;
|
16
|
+
.border-radius(0);
|
17
|
+
.box-shadow();
|
18
|
+
top:33px;
|
19
|
+
border:none;
|
20
|
+
left:auto;
|
21
|
+
right:2px;
|
22
|
+
|
23
|
+
li > a:hover, .active > a, .active a:hover {
|
24
|
+
background-color:@primary;
|
25
|
+
}
|
26
|
+
|
27
|
+
.divider:last-child {
|
28
|
+
display:none;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.dropdown-toggle {
|
33
|
+
height:28px;
|
34
|
+
width:28px;
|
35
|
+
padding:2px;
|
36
|
+
position:relative;
|
37
|
+
z-index:1001;
|
38
|
+
border:none;
|
39
|
+
|
40
|
+
&:hover {
|
41
|
+
img {
|
42
|
+
.box-shadow(none);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.open .dropdown-toggle {
|
48
|
+
background: @contentBackground;
|
49
|
+
border-color:@contentBorder;
|
50
|
+
border-bottom:none;
|
51
|
+
border-bottom-left-radius:0;
|
52
|
+
border-bottom-right-radius:0;
|
53
|
+
|
54
|
+
img {
|
55
|
+
.box-shadow(none);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
img {
|
60
|
+
max-width:28px;
|
61
|
+
.border-radius(5px);
|
62
|
+
.box-shadow(0 1px 3px rgba(0,0,0,0.10));
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
.search {
|
67
|
+
float:left;
|
68
|
+
display:inline-block;
|
69
|
+
position:relative;
|
70
|
+
margin-bottom:0;
|
71
|
+
margin-top:3px;
|
72
|
+
margin-right:5px;
|
73
|
+
|
74
|
+
.search-page {
|
75
|
+
position:absolute;
|
76
|
+
left:10px;
|
77
|
+
top:6px;
|
78
|
+
opacity:0.5;
|
79
|
+
|
80
|
+
.icon-search {
|
81
|
+
background:url(/assets/woople-theme/icons/search.png);
|
82
|
+
background-position:0 0;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.search-query {
|
87
|
+
padding-left:30px;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
@media (max-width: 768px) {
|
93
|
+
.profile {
|
94
|
+
right:5px;
|
95
|
+
width:auto;
|
96
|
+
|
97
|
+
.search {
|
98
|
+
margin-right:0;
|
99
|
+
|
100
|
+
input { display:none; }
|
101
|
+
|
102
|
+
.search-page {
|
103
|
+
opacity:1.0;
|
104
|
+
position:relative;
|
105
|
+
display:inline-block;
|
106
|
+
width:30px;
|
107
|
+
height:30px;
|
108
|
+
top:0;
|
109
|
+
left:0;
|
110
|
+
margin-right:5px;
|
111
|
+
|
112
|
+
.icon-search {
|
113
|
+
position:absolute;
|
114
|
+
left:8px;
|
115
|
+
top:8px;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "twitter/bootstrap/responsive";
|
@@ -0,0 +1,44 @@
|
|
1
|
+
.navigation .icon-th-list {
|
2
|
+
background-image:url(/assets/woople-theme/icons/menu2x.png);
|
3
|
+
background-size: 14px 14px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.profile .search .search-page .icon-search {
|
7
|
+
background-image:url(/assets/woople-theme/icons/search2x.png);
|
8
|
+
background-size:14px 14px;
|
9
|
+
}
|
10
|
+
|
11
|
+
#browse_show .completed {
|
12
|
+
background-image:url(/assets/woople-theme/completed-triangle2x.png);
|
13
|
+
background-size:34px 27px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.content-item .content-item-content .content-item-metadata .icon-star {
|
17
|
+
background-image:url(/assets/woople-theme/star-icon2x.png);
|
18
|
+
background-size:15px 15px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.menu .cert-status-red {
|
22
|
+
background-image:url(/assets/woople-theme/certification/red-icon2x.png);
|
23
|
+
background-size:25px 25px;
|
24
|
+
}
|
25
|
+
|
26
|
+
.content-item-header .sortAsc .icon-chevron-up {
|
27
|
+
background-image:url(/assets/woople-theme/icons/sortASC2x.png);
|
28
|
+
background-size:14px 14px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.content-item-header .sortDesc .icon-chevron-down {
|
32
|
+
background-image:url(/assets/woople-theme/icons/sortDESC2x.png);
|
33
|
+
background-size:14px 14px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.icon-thumbs-up {
|
37
|
+
background-image:url(/assets/woople-theme/icons/thumbs_up2x.png);
|
38
|
+
background-size:15px 16px;
|
39
|
+
}
|
40
|
+
|
41
|
+
.icon-thumbs-down {
|
42
|
+
background-image:url(/assets/woople-theme/icons/thumbs_down2x.png);
|
43
|
+
background-size:15px 16px;
|
44
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
@import "twitter/bootstrap/mixins";
|
2
|
+
@import "twitter/bootstrap/variables";
|
3
|
+
@import "woople-theme/colours.css.less";
|
4
|
+
|
5
|
+
@contentPadding: 20px;
|
6
|
+
@menuWidth: 255px;
|
7
|
+
@contentOverlap: 5px;
|
8
|
+
@contentOffset: @menuWidth - @contentOverlap;
|
9
|
+
@negativeContentOffset: @contentOffset * -1;
|
10
|
+
|
11
|
+
@logoSize: 24px;
|
12
|
+
@logoWithPadding: @logoSize * 3;
|
13
|
+
|
14
|
+
/*course*/
|
15
|
+
@imageWidth: 50px;
|
16
|
+
@tableCellPadding: 10px;
|
17
|
+
@leftColumnOffset: (@gridGutterWidth*2) + @imageWidth;
|
18
|
+
|
19
|
+
|
20
|
+
@phoneImageSize: 50px;
|
21
|
+
@phoneMargin: @contentPadding / 2;
|
22
|
+
@phoneOffset: @phoneImageSize + @phoneMargin;
|
23
|
+
@phoneLeftColumnOffset: @phoneMargin + @gridGutterWidth + @imageWidth;
|
24
|
+
|
25
|
+
.content-title() {
|
26
|
+
font-weight:300;
|
27
|
+
font-size:18px;
|
28
|
+
line-height:1.5em;
|
29
|
+
margin-bottom:0.5em;
|
30
|
+
}
|
31
|
+
|
32
|
+
.outline-title(@left: @leftColumnOffset) {
|
33
|
+
line-height:1.5em;
|
34
|
+
font-size:11px;
|
35
|
+
text-transform:uppercase;
|
36
|
+
padding-left:@left;
|
37
|
+
border-top:solid 1px @insetContentBorder;
|
38
|
+
color: @secondaryTextColour;
|
39
|
+
padding-top:@contentPadding * 1.5;
|
40
|
+
margin-bottom:@contentPadding / 2;
|
41
|
+
padding-right:@leftColumnOffset;
|
42
|
+
}
|
43
|
+
.modal-video() {
|
44
|
+
max-height:600px;
|
45
|
+
overflow:visible;
|
46
|
+
|
47
|
+
.modal-video {
|
48
|
+
position:relative;
|
49
|
+
padding-bottom: 56.25%;
|
50
|
+
padding-top:30px; /* ie 6 workaround */
|
51
|
+
height:0;
|
52
|
+
overflow:hidden;
|
53
|
+
|
54
|
+
iframe, object, embed {
|
55
|
+
position: absolute;
|
56
|
+
top: 0;
|
57
|
+
left: 0;
|
58
|
+
width: 100%;
|
59
|
+
height: 100%;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.course-image() {
|
65
|
+
width:100%;
|
66
|
+
.border-radius(10px);
|
67
|
+
.box-shadow(0 1px 3px rgba(0, 0, 0, 0.10));
|
68
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module ThemeHelper
|
2
|
+
# This allows you to generate a page-header component
|
3
|
+
def page_header(data, presenter = nil)
|
4
|
+
data = ThemePresentation.wrap(data, PageHeaderPresenter, presenter)
|
5
|
+
render 'woople-theme/page_header', header: data
|
6
|
+
end
|
7
|
+
|
8
|
+
def content_items(items, presenter = nil)
|
9
|
+
collection = ThemePresentation.wrap_collection(items, ContentItemPresenter, presenter)
|
10
|
+
render partial: 'woople-theme/content_item', collection: collection
|
11
|
+
end
|
12
|
+
|
13
|
+
def video_modal(video, presenter = nil)
|
14
|
+
video = ThemePresentation.wrap(video, presenter)
|
15
|
+
render 'woople-theme/video_modal', video: video
|
16
|
+
end
|
17
|
+
|
18
|
+
def content_item_header
|
19
|
+
render partial: 'woople-theme/content_item_header'
|
20
|
+
end
|
21
|
+
|
22
|
+
def outline(items, presenter = nil)
|
23
|
+
collection = ThemePresentation.wrap_collection(items, OutlinePresenter, presenter)
|
24
|
+
render partial: 'woople-theme/outline', collection: collection
|
25
|
+
end
|
26
|
+
|
27
|
+
def profile
|
28
|
+
model = ThemePresentation.wrap(send(WoopleTheme.configuration.profile_helper), ProfilePresenter)
|
29
|
+
render 'woople-theme/profile', profile: model
|
30
|
+
end
|
31
|
+
|
32
|
+
def menu
|
33
|
+
model = ThemePresentation.wrap(send(WoopleTheme.configuration.menu_helper), MenuPresenter)
|
34
|
+
render 'woople-theme/menu', menu: model
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'delegate'
|
2
|
+
require_relative 'content_image'
|
3
|
+
|
4
|
+
class ContentItemPresenter < SimpleDelegator
|
5
|
+
include ContentImage
|
6
|
+
|
7
|
+
def certification_metadata(&block)
|
8
|
+
yield(source.certification_metadata) if source.certification_metadata.present?
|
9
|
+
end
|
10
|
+
|
11
|
+
def source
|
12
|
+
__getobj__
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'action_view'
|
2
|
+
require 'delegate'
|
3
|
+
|
4
|
+
class MenuLinkPresenter < SimpleDelegator
|
5
|
+
include ActionView::Helpers::TagHelper
|
6
|
+
|
7
|
+
def featured_tag(name)
|
8
|
+
if featured?
|
9
|
+
content_tag(:em, name.html_safe)
|
10
|
+
else
|
11
|
+
name
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def badge
|
16
|
+
return "" if no_badge?
|
17
|
+
|
18
|
+
content_tag(:span, link.badge, class: 'badge')
|
19
|
+
end
|
20
|
+
|
21
|
+
def certification_badge
|
22
|
+
return "" if no_certification_badge?
|
23
|
+
|
24
|
+
content_tag(:span, content_tag(:i, '', class: "cert-status-#{link.certification_badge}") + " #{link.certification_badge.titleize}", class: 'badge label-icon')
|
25
|
+
end
|
26
|
+
|
27
|
+
def css_class
|
28
|
+
"active" if selected?
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def link
|
34
|
+
__getobj__
|
35
|
+
end
|
36
|
+
|
37
|
+
def featured?
|
38
|
+
link.respond_to?(:featured) && link.featured
|
39
|
+
end
|
40
|
+
|
41
|
+
def no_badge?
|
42
|
+
!link.respond_to?(:badge)
|
43
|
+
end
|
44
|
+
|
45
|
+
def no_certification_badge?
|
46
|
+
!link.respond_to?(:certification_badge)
|
47
|
+
end
|
48
|
+
|
49
|
+
def selected?
|
50
|
+
link.respond_to?(:selected) && link.selected
|
51
|
+
end
|
52
|
+
end
|