refinerycms-image_rotators 0.1.0
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/app/controllers/admin/image_rotator_images_controller.rb +26 -0
- data/app/controllers/admin/image_rotators_controller.rb +7 -0
- data/app/models/image_rotator.rb +13 -0
- data/app/models/image_rotator_image.rb +13 -0
- data/app/views/admin/image_rotator_images/_form.html.erb +33 -0
- data/app/views/admin/image_rotator_images/_image_rotator_image.html.erb +15 -0
- data/app/views/admin/image_rotator_images/_sortable_list.html.erb +4 -0
- data/app/views/admin/image_rotator_images/edit.html.erb +1 -0
- data/app/views/admin/image_rotator_images/new.html.erb +1 -0
- data/app/views/admin/image_rotators/_form.html.erb +29 -0
- data/app/views/admin/image_rotators/_image_rotator.html.erb +15 -0
- data/app/views/admin/image_rotators/_sortable_list.html.erb +4 -0
- data/app/views/admin/image_rotators/edit.html.erb +57 -0
- data/app/views/admin/image_rotators/index.html.erb +47 -0
- data/app/views/admin/image_rotators/new.html.erb +1 -0
- data/config/locales/en.yml +34 -0
- data/config/locales/nb.yml +19 -0
- data/config/locales/nl.yml +19 -0
- data/config/routes.rb +11 -0
- data/lib/gemspec.rb +27 -0
- data/lib/generators/refinerycms_image_rotators_generator.rb +71 -0
- data/lib/generators/templates/db/migrate/create_image_rotators.rb +35 -0
- data/lib/generators/templates/db/seeds/image_rotators.rb +4 -0
- data/lib/generators/templates/public/images/arrows.png +0 -0
- data/lib/generators/templates/public/images/bullets.png +0 -0
- data/lib/generators/templates/public/images/loading.gif +0 -0
- data/lib/generators/templates/public/javascripts/jquery.image-rotators.js +12 -0
- data/lib/generators/templates/public/javascripts/refinery/admin.js +1011 -0
- data/lib/generators/templates/public/stylesheets/image-rotators.css +138 -0
- data/lib/image_rotators.rb +7 -0
- data/lib/refinerycms-image_rotators.rb +20 -0
- data/lib/tasks/image_rotators.rake +13 -0
- data/readme.md +10 -0
- metadata +99 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery Nivo Slider v2.3
|
3
|
+
* http://nivo.dev7studios.com
|
4
|
+
*
|
5
|
+
* Copyright 2010, Gilbert Pellegrom
|
6
|
+
* Free to use and abuse under the MIT license.
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
*
|
9
|
+
* March 2010
|
10
|
+
*/
|
11
|
+
|
12
|
+
|
13
|
+
/* The Nivo Slider styles */
|
14
|
+
.nivoSlider {
|
15
|
+
position:relative;
|
16
|
+
}
|
17
|
+
.nivoSlider img {
|
18
|
+
position:absolute;
|
19
|
+
top:0px;
|
20
|
+
left:0px;
|
21
|
+
}
|
22
|
+
/* If an image is wrapped in a link */
|
23
|
+
.nivoSlider a.nivo-imageLink {
|
24
|
+
position:absolute;
|
25
|
+
top:0px;
|
26
|
+
left:0px;
|
27
|
+
width:100%;
|
28
|
+
height:100%;
|
29
|
+
border:0;
|
30
|
+
padding:0;
|
31
|
+
margin:0;
|
32
|
+
z-index:60;
|
33
|
+
display:none;
|
34
|
+
}
|
35
|
+
/* The slices in the Slider */
|
36
|
+
.nivo-slice {
|
37
|
+
display:block;
|
38
|
+
position:absolute;
|
39
|
+
z-index:50;
|
40
|
+
height:100%;
|
41
|
+
}
|
42
|
+
/* Caption styles */
|
43
|
+
.nivo-caption {
|
44
|
+
position:absolute;
|
45
|
+
left:0px;
|
46
|
+
bottom:0px;
|
47
|
+
background:#000;
|
48
|
+
color:#fff;
|
49
|
+
opacity:0.8; /* Overridden by captionOpacity setting */
|
50
|
+
width:100%;
|
51
|
+
z-index:89;
|
52
|
+
}
|
53
|
+
.nivo-caption p {
|
54
|
+
padding:5px;
|
55
|
+
margin:0;
|
56
|
+
}
|
57
|
+
.nivo-caption a {
|
58
|
+
display:inline !important;
|
59
|
+
}
|
60
|
+
.nivo-html-caption {
|
61
|
+
display:none;
|
62
|
+
}
|
63
|
+
/* Direction nav styles (e.g. Next & Prev) */
|
64
|
+
.nivo-directionNav a {
|
65
|
+
position:absolute;
|
66
|
+
top:45%;
|
67
|
+
z-index:99;
|
68
|
+
cursor:pointer;
|
69
|
+
}
|
70
|
+
.nivo-prevNav {
|
71
|
+
left:0px;
|
72
|
+
}
|
73
|
+
.nivo-nextNav {
|
74
|
+
right:0px;
|
75
|
+
}
|
76
|
+
/* Control nav styles (e.g. 1,2,3...) */
|
77
|
+
.nivo-controlNav a {
|
78
|
+
position:relative;
|
79
|
+
z-index:99;
|
80
|
+
cursor:pointer;
|
81
|
+
}
|
82
|
+
.nivo-controlNav a.active {
|
83
|
+
font-weight:bold;
|
84
|
+
}
|
85
|
+
|
86
|
+
/* Custom settings for refinerycms-image_rotators */
|
87
|
+
.image-rotator {
|
88
|
+
position:relative;
|
89
|
+
margin:30px 30px 60px 30px;
|
90
|
+
background:#202834 url(/images/loading.gif) no-repeat 50% 50%;
|
91
|
+
-moz-box-shadow:0px 0px 10px #333;
|
92
|
+
-webkit-box-shadow:0px 0px 10px #333;
|
93
|
+
box-shadow:0px 0px 10px #333;
|
94
|
+
}
|
95
|
+
.image-rotator img {
|
96
|
+
position:absolute;
|
97
|
+
top:0px;
|
98
|
+
left:0px;
|
99
|
+
display:none;
|
100
|
+
}
|
101
|
+
.image-rotator a {
|
102
|
+
border:0;
|
103
|
+
}
|
104
|
+
|
105
|
+
.nivo-controlNav {
|
106
|
+
position:absolute;
|
107
|
+
left:47%;
|
108
|
+
bottom:-30px;
|
109
|
+
}
|
110
|
+
.nivo-controlNav a {
|
111
|
+
display:block;
|
112
|
+
width:10px;
|
113
|
+
height:10px;
|
114
|
+
background:url(/images/bullets.png) no-repeat;
|
115
|
+
text-indent:-9999px;
|
116
|
+
border:0;
|
117
|
+
margin-right:3px;
|
118
|
+
float:left;
|
119
|
+
}
|
120
|
+
.nivo-controlNav a.active {
|
121
|
+
background-position:-10px 0;
|
122
|
+
}
|
123
|
+
|
124
|
+
.nivo-directionNav a {
|
125
|
+
display:block;
|
126
|
+
width:32px;
|
127
|
+
height:34px;
|
128
|
+
background:url(/images/arrows.png) no-repeat;
|
129
|
+
text-indent:-9999px;
|
130
|
+
border:0;
|
131
|
+
}
|
132
|
+
a.nivo-nextNav {
|
133
|
+
background-position:-32px 0;
|
134
|
+
right:10px;
|
135
|
+
}
|
136
|
+
a.nivo-prevNav {
|
137
|
+
left:10px;
|
138
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'refinery'
|
2
|
+
require File.expand_path('../image_rotators', __FILE__)
|
3
|
+
|
4
|
+
module Refinery
|
5
|
+
module ImageRotators
|
6
|
+
class Engine < Rails::Engine
|
7
|
+
initializer "static assets" do |app|
|
8
|
+
app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
|
9
|
+
end
|
10
|
+
|
11
|
+
config.after_initialize do
|
12
|
+
Refinery::Plugin.register do |plugin|
|
13
|
+
plugin.name = "image_rotators"
|
14
|
+
plugin.menu_match = /(admin|refinery)\/(image_rotators|image_rotator_images)$/
|
15
|
+
plugin.activity = {:class => ImageRotator, :title => 'title'}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
namespace :refinery do
|
2
|
+
|
3
|
+
namespace :image_rotators do
|
4
|
+
|
5
|
+
# call this task my running: rake refinery:image_rotators:my_task
|
6
|
+
# desc "Description of my task below"
|
7
|
+
# task :my_task => :environment do
|
8
|
+
# # add your logic here
|
9
|
+
# end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
data/readme.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Image Rotators engine for Refinery CMS.
|
2
|
+
|
3
|
+
## How to build this engine as a gem
|
4
|
+
|
5
|
+
cd vendor/engines/image_rotators
|
6
|
+
gem build refinerycms-image_rotators.gempspec
|
7
|
+
gem install refinerycms-image_rotators.gem
|
8
|
+
|
9
|
+
# Sign up for a http://rubygems.org/ account and publish the gem
|
10
|
+
gem push refinerycms-image_rotators.gem
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: refinerycms-image_rotators
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jacob Swanner
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-11-18 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: An open source Ruby on Rails image rotator engine designed for integration with RefineryCMS.
|
23
|
+
email: jacob@envylabs.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- app/controllers/admin/image_rotator_images_controller.rb
|
32
|
+
- app/controllers/admin/image_rotators_controller.rb
|
33
|
+
- app/models/image_rotator.rb
|
34
|
+
- app/models/image_rotator_image.rb
|
35
|
+
- app/views/admin/image_rotator_images/_form.html.erb
|
36
|
+
- app/views/admin/image_rotator_images/_image_rotator_image.html.erb
|
37
|
+
- app/views/admin/image_rotator_images/_sortable_list.html.erb
|
38
|
+
- app/views/admin/image_rotator_images/edit.html.erb
|
39
|
+
- app/views/admin/image_rotator_images/new.html.erb
|
40
|
+
- app/views/admin/image_rotators/_form.html.erb
|
41
|
+
- app/views/admin/image_rotators/_image_rotator.html.erb
|
42
|
+
- app/views/admin/image_rotators/_sortable_list.html.erb
|
43
|
+
- app/views/admin/image_rotators/edit.html.erb
|
44
|
+
- app/views/admin/image_rotators/index.html.erb
|
45
|
+
- app/views/admin/image_rotators/new.html.erb
|
46
|
+
- config/locales/en.yml
|
47
|
+
- config/locales/nb.yml
|
48
|
+
- config/locales/nl.yml
|
49
|
+
- config/routes.rb
|
50
|
+
- lib/gemspec.rb
|
51
|
+
- lib/generators/refinerycms_image_rotators_generator.rb
|
52
|
+
- lib/generators/templates/db/migrate/create_image_rotators.rb
|
53
|
+
- lib/generators/templates/db/seeds/image_rotators.rb
|
54
|
+
- lib/generators/templates/public/images/arrows.png
|
55
|
+
- lib/generators/templates/public/images/bullets.png
|
56
|
+
- lib/generators/templates/public/images/loading.gif
|
57
|
+
- lib/generators/templates/public/javascripts/jquery.image-rotators.js
|
58
|
+
- lib/generators/templates/public/javascripts/refinery/admin.js
|
59
|
+
- lib/generators/templates/public/stylesheets/image-rotators.css
|
60
|
+
- lib/image_rotators.rb
|
61
|
+
- lib/refinerycms-image_rotators.rb
|
62
|
+
- lib/tasks/image_rotators.rake
|
63
|
+
- readme.md
|
64
|
+
has_rdoc: true
|
65
|
+
homepage: http://envylabs.com
|
66
|
+
licenses: []
|
67
|
+
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
version: "0"
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
version: "0"
|
91
|
+
requirements: []
|
92
|
+
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 1.3.7
|
95
|
+
signing_key:
|
96
|
+
specification_version: 3
|
97
|
+
summary: Ruby on Rails image rotator engine for RefineryCMS.
|
98
|
+
test_files: []
|
99
|
+
|