woople-theme 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2012 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Woople Theme
|
2
|
+
|
3
|
+
The look and feel of the woople front end
|
4
|
+
|
5
|
+
## Purpose & Rationale
|
6
|
+
|
7
|
+
* Extract CSS and components into a front-end framework
|
8
|
+
* Keep things as close to being open source as possible
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
gem 'woople-theme' from your Gemfile
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
coming soon
|
17
|
+
|
18
|
+
## Copyright
|
19
|
+
|
20
|
+
Copyright (c) 2012 Woople LLC. See LICENSE.txt for further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
8
|
+
begin
|
9
|
+
require 'rdoc/task'
|
10
|
+
rescue LoadError
|
11
|
+
require 'rdoc/rdoc'
|
12
|
+
require 'rake/rdoctask'
|
13
|
+
RDoc::Task = Rake::RDocTask
|
14
|
+
end
|
15
|
+
|
16
|
+
require 'rspec/core/rake_task'
|
17
|
+
require 'rake/testtask'
|
18
|
+
|
19
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
20
|
+
rdoc.rdoc_dir = 'rdoc'
|
21
|
+
rdoc.title = 'WoopleTheme'
|
22
|
+
rdoc.options << '--line-numbers'
|
23
|
+
rdoc.rdoc_files.include('README.rdoc')
|
24
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
|
+
end
|
26
|
+
|
27
|
+
RSpec::Core::RakeTask.new(:spec)
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
Rake::TestTask.new(:test) do |t|
|
31
|
+
t.libs << 'lib'
|
32
|
+
t.libs << 'test'
|
33
|
+
t.pattern = 'test/**/*_test.rb'
|
34
|
+
t.verbose = false
|
35
|
+
end
|
36
|
+
|
37
|
+
task :default => :spec
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
//= require jquery
|
2
|
+
//= require jquery_ujs
|
3
|
+
//= require modernizr
|
4
|
+
//= require twitter/bootstrap/dropdown
|
5
|
+
//= require twitter/bootstrap/modal
|
6
|
+
//= require twitter/bootstrap/button
|
7
|
+
//= require fastclick.min_
|
8
|
+
//= require_tree .
|
9
|
+
|
10
|
+
function resizeFix() {
|
11
|
+
if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
|
12
|
+
var viewportmeta = document.querySelector('meta[name="viewport"]');
|
13
|
+
if (viewportmeta) {
|
14
|
+
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0';
|
15
|
+
document.body.addEventListener('gesturestart', function () {
|
16
|
+
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
|
17
|
+
}, false);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
$(document).ready(function() {
|
24
|
+
resizeFix();
|
25
|
+
|
26
|
+
if (Modernizr.touch) {
|
27
|
+
new FastClick(document.body);
|
28
|
+
}
|
29
|
+
|
30
|
+
$('.touch .content-item').on('click', function() {
|
31
|
+
window.location = $(this).find('a').attr('href');
|
32
|
+
});
|
33
|
+
|
34
|
+
$('.touch .outline tr').on('click', function(e) {
|
35
|
+
window.location = $(this).find('a').attr('href');
|
36
|
+
});
|
37
|
+
|
38
|
+
});
|
39
|
+
|
@@ -0,0 +1,101 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
@import "woople-theme/colours.css.less";
|
3
|
+
|
4
|
+
body {
|
5
|
+
background: @background;
|
6
|
+
}
|
7
|
+
|
8
|
+
body > .container {
|
9
|
+
margin-bottom:40px;
|
10
|
+
overflow-x:hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.close-navigation, .navigation {
|
14
|
+
display:none;
|
15
|
+
}
|
16
|
+
|
17
|
+
a {
|
18
|
+
color:@primary;
|
19
|
+
}
|
20
|
+
|
21
|
+
a:hover {
|
22
|
+
color:@primary;
|
23
|
+
}
|
24
|
+
|
25
|
+
#masthead {
|
26
|
+
padding-top:@logoSize;
|
27
|
+
padding-bottom:@logoSize;
|
28
|
+
height:@logoSize;
|
29
|
+
position:relative;
|
30
|
+
z-index:1000;
|
31
|
+
|
32
|
+
.masthead-logo {
|
33
|
+
width:140px;
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
37
|
+
|
38
|
+
.copyright {
|
39
|
+
text-align:right;
|
40
|
+
margin-right:30px;
|
41
|
+
margin-top:15px;
|
42
|
+
color:rgba(0,0,0,0.5);
|
43
|
+
}
|
44
|
+
|
45
|
+
@media (max-width: 768px) {
|
46
|
+
.container > .row {
|
47
|
+
margin-left:0;
|
48
|
+
}
|
49
|
+
|
50
|
+
#masthead {
|
51
|
+
.masthead-logo {
|
52
|
+
display:block;
|
53
|
+
margin-left:auto;
|
54
|
+
margin-right:auto;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
body {
|
59
|
+
padding:0;
|
60
|
+
}
|
61
|
+
|
62
|
+
body > .container {
|
63
|
+
margin-left:0;
|
64
|
+
margin-right:0;
|
65
|
+
width:100%;
|
66
|
+
}
|
67
|
+
|
68
|
+
.close-navigation {
|
69
|
+
z-index:3;
|
70
|
+
}
|
71
|
+
|
72
|
+
.navigation {
|
73
|
+
display:block;
|
74
|
+
z-index:2;
|
75
|
+
|
76
|
+
.icon-th-list {
|
77
|
+
background:url(/assets/woople-theme/icons/menu.png);
|
78
|
+
background-position:0 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
.navigation, .close-navigation {
|
83
|
+
position:absolute;
|
84
|
+
margin-right:0;
|
85
|
+
margin-bottom:0;
|
86
|
+
width:50%;
|
87
|
+
top:0;
|
88
|
+
line-height:@logoWithPadding;
|
89
|
+
text-indent:@phoneMargin;
|
90
|
+
}
|
91
|
+
|
92
|
+
#navigation:target .close-navigation {
|
93
|
+
display:block;
|
94
|
+
left:0;
|
95
|
+
}
|
96
|
+
|
97
|
+
#navigation:target .navigation {
|
98
|
+
display:none;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
@import "woople-theme/colours.css.less";
|
3
|
+
|
4
|
+
.action {
|
5
|
+
display:inline-block;
|
6
|
+
position:absolute;
|
7
|
+
margin-left:-9px;
|
8
|
+
margin-top:-4px;
|
9
|
+
width:9px;
|
10
|
+
padding-left:5px;
|
11
|
+
padding-right:9px;
|
12
|
+
line-height:10px;
|
13
|
+
.border-radius(14px);
|
14
|
+
.buttonBackground(lighten(@primary,5%), @primary);
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
.action-large {
|
19
|
+
line-height:30px;
|
20
|
+
.border-radius(30px);
|
21
|
+
padding-left:13px;
|
22
|
+
padding-right:18px;
|
23
|
+
}
|
24
|
+
|
25
|
+
.btn-group {
|
26
|
+
.btn:last-child, .btn:first-child {
|
27
|
+
.border-radius(0);
|
28
|
+
}
|
29
|
+
|
30
|
+
.btn-primary {
|
31
|
+
.buttonBackground(lighten(@primary,5%), @primary);
|
32
|
+
}
|
33
|
+
|
34
|
+
.active {
|
35
|
+
color:@secondaryTextColour;
|
36
|
+
text-shadow:none;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@primary: #4984d0;
|
2
|
+
@highlight: #8bc03f;
|
3
|
+
|
4
|
+
@primaryTextColour: #42474e;
|
5
|
+
@secondaryTextColour: #7d7c7c;
|
6
|
+
|
7
|
+
@background: spin(darken(fade(@primary, 20%), 20%), -9);
|
8
|
+
|
9
|
+
@highlightBackground: fade(@highlight, 4%);
|
10
|
+
|
11
|
+
@contentBackground: #f9f7f7;
|
12
|
+
@contentBorder: darken(@contentBackground, 25%);
|
13
|
+
@insetContentBorder: #e0dede;
|
14
|
+
@insideShadowColour: rgba(0,0,0,0.10);
|
15
|
+
|
16
|
+
|
17
|
+
@menuTextShadowColour: @secondaryTextColour;
|
18
|
+
@menuActiveColour: @highlight;
|
19
|
+
@menuHoverColour: rgba(255,255,255,0.25);
|
20
|
+
@menuLinkColour: rgba(255, 255, 255, 0.75);
|
21
|
+
@menuHeadingColour: white;
|
22
|
+
|
23
|
+
@menuLabelBackground: darken(@primary, 10%);
|
24
|
+
@menuHoverLabelColour: lighten(@primary, 5%);
|
25
|
+
@menuActiveLabelColour: darken(@menuActiveColour, 10%);
|
26
|
+
|
27
|
+
/* LEGACY */
|
28
|
+
@legacyBackground: #d3dfe8;
|
29
|
+
@legacyMenuLinkColour: #fff;
|
@@ -0,0 +1,157 @@
|
|
1
|
+
@import "woople-theme/variables.css.less";
|
2
|
+
|
3
|
+
.content-item-header {
|
4
|
+
margin-left:0;
|
5
|
+
margin-top:@contentPadding * -1;
|
6
|
+
padding-top:@contentPadding * 0.5;
|
7
|
+
padding-left:@contentPadding;
|
8
|
+
padding-bottom:@contentPadding * 0.5;
|
9
|
+
font-weight:bold;
|
10
|
+
border-bottom:solid 1px @insetContentBorder;
|
11
|
+
|
12
|
+
a {
|
13
|
+
color:@secondaryTextColour;
|
14
|
+
}
|
15
|
+
|
16
|
+
.span1:first-child {
|
17
|
+
margin-left:0;
|
18
|
+
}
|
19
|
+
|
20
|
+
.icon-chevron-up {
|
21
|
+
display:none;
|
22
|
+
background-image:url(/assets/woople-theme/icons/sortASC.png);
|
23
|
+
background-position:0 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
.icon-chevron-down {
|
27
|
+
display:none;
|
28
|
+
background-image:url(/assets/woople-theme/icons/sortDESC.png);
|
29
|
+
background-position:0 0;
|
30
|
+
}
|
31
|
+
|
32
|
+
.sortAsc {
|
33
|
+
.icon-chevron-up { display:inline-block; }
|
34
|
+
}
|
35
|
+
|
36
|
+
.sortDesc {
|
37
|
+
.icon-chevron-down { display:inline-block; }
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
.touch .content-item:active {
|
42
|
+
.box-shadow(inset 0 0 5px rgba(0,0,0,0.25));
|
43
|
+
padding-bottom:@contentPadding * 1.5 - 1;
|
44
|
+
padding-top:@contentPadding + 1;
|
45
|
+
}
|
46
|
+
|
47
|
+
#browse_show .completed {
|
48
|
+
background-image:url(/assets/woople-theme/completed-triangle.png);
|
49
|
+
background-position:top right;
|
50
|
+
background-repeat:no-repeat;
|
51
|
+
}
|
52
|
+
|
53
|
+
.content-item {
|
54
|
+
position:relative;
|
55
|
+
margin-left:0;
|
56
|
+
padding-left:@contentPadding;
|
57
|
+
border-bottom:solid 1px @insetContentBorder;
|
58
|
+
padding-top:@contentPadding;
|
59
|
+
padding-bottom:@contentPadding * 1.5;
|
60
|
+
|
61
|
+
-webkit-tap-highlight-color: transparent;
|
62
|
+
-moz-tap-highlight-color: transparent;
|
63
|
+
-o-tap-highlight-color: transparent;
|
64
|
+
-ms-tap-highlight-color: transparent;
|
65
|
+
tap-highlight-color: transparent;
|
66
|
+
|
67
|
+
> * {
|
68
|
+
position:relative;
|
69
|
+
z-index:2;
|
70
|
+
}
|
71
|
+
|
72
|
+
.content-item-image {
|
73
|
+
margin-left:0;
|
74
|
+
|
75
|
+
img {
|
76
|
+
.course-image();
|
77
|
+
}
|
78
|
+
|
79
|
+
}
|
80
|
+
|
81
|
+
.content-item-content {
|
82
|
+
h2 {
|
83
|
+
.content-title();
|
84
|
+
|
85
|
+
a {
|
86
|
+
color:@primaryTextColour;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
.content-item-metadata {
|
91
|
+
color:@secondaryTextColour;
|
92
|
+
|
93
|
+
.badge {
|
94
|
+
background:@highlight;
|
95
|
+
cursor:initial;
|
96
|
+
}
|
97
|
+
|
98
|
+
.icon-star {
|
99
|
+
width:15px;
|
100
|
+
height:15px;
|
101
|
+
margin-top:-1px;
|
102
|
+
background-image:url(/assets/woople-theme/star-icon.png);
|
103
|
+
background-position:0 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
em {
|
107
|
+
color:@primaryTextColour;
|
108
|
+
font-style:normal;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
.content-item-progress-bar {
|
114
|
+
height:2px;
|
115
|
+
position:absolute;
|
116
|
+
z-index:1;
|
117
|
+
left:0;
|
118
|
+
bottom:0;
|
119
|
+
background:fade(@highlight, 100%);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
@media (max-width: 767px) {
|
124
|
+
.content-item-header {
|
125
|
+
display:none;
|
126
|
+
}
|
127
|
+
|
128
|
+
.content-item {
|
129
|
+
padding-left:@phoneMargin;
|
130
|
+
|
131
|
+
.content-item-image {
|
132
|
+
width:@phoneImageSize;
|
133
|
+
height:@phoneImageSize;
|
134
|
+
float:left;
|
135
|
+
margin-right:@phoneMargin;
|
136
|
+
}
|
137
|
+
|
138
|
+
.content-item-content {
|
139
|
+
h2 {
|
140
|
+
margin-left:@phoneOffset;
|
141
|
+
margin-right:@phoneMargin;
|
142
|
+
font-size:14px;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
.content-item-metadata {
|
147
|
+
margin-left: @phoneOffset;
|
148
|
+
|
149
|
+
> div {
|
150
|
+
float:left;
|
151
|
+
margin-right:@phoneMargin;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
}
|
157
|
+
}
|