scrivito_elastic_slider_widget 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +3 -0
- data/README.md +40 -0
- data/Rakefile +21 -0
- data/app/assets/javascripts/scrivito_elastic_slider_widget/application.js +13 -0
- data/app/assets/stylesheets/scrivito_elastic_slider_widget/application.css +35 -0
- data/app/models/elastic_slider_panel_widget.rb +10 -0
- data/app/models/elastic_slider_widget.rb +8 -0
- data/app/views/elastic_slider_panel_widget/details.html.erb +15 -0
- data/app/views/elastic_slider_panel_widget/show.html.erb +16 -0
- data/app/views/elastic_slider_panel_widget/thumbnail.html.erb +11 -0
- data/app/views/elastic_slider_widget/details.html.erb +20 -0
- data/app/views/elastic_slider_widget/show.html.erb +15 -0
- data/app/views/elastic_slider_widget/thumbnail.html.erb +11 -0
- data/lib/scrivito_elastic_slider_widget/engine.rb +5 -0
- data/lib/scrivito_elastic_slider_widget/version.rb +3 -0
- data/lib/scrivito_elastic_slider_widget.rb +4 -0
- data/lib/tasks/scrivito_elastic_slider_tasks.rake +4 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 650d7179a7939255c5aae1e1ee3cd355d52c2e71
|
4
|
+
data.tar.gz: a6525cda11b26ea455624a6bac6156a6c9220b68
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f6698286a1917e1dab0412eec23eb361c6361539945ef596ec3659d98cc344a0a3763eddce166e49066d2a9041187cdae96b8b0d81c0765f4b397d230a1792f8
|
7
|
+
data.tar.gz: 7c0e81726076ac8c6f105de533c87348fad9b642b271782411dfaf3fdc1391545f58149c8551bb84f75a18965e379ff5f6addf02c7e42c6e7dde48ed85f27993
|
data/LICENSE
ADDED
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Scrivito Elastic Slider
|
2
|
+
|
3
|
+
This Gem adds an Elastic Slider Widget to [Scrivito](http://scrivito.com).
|
4
|
+
|
5
|
+
## Prerequisites
|
6
|
+
|
7
|
+
Use Bootstrap 3.2 in your Rails App.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add the gem to your Gemfile:
|
12
|
+
|
13
|
+
gem 'scrivito_elastic_slider_widget'
|
14
|
+
|
15
|
+
Run bundle
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
(Currently you need to download the gem's files from github and install it locally.)
|
20
|
+
|
21
|
+
Add this line to your app/assets/stylesheets/application.css:
|
22
|
+
|
23
|
+
*= require scrivito_elastic_slider_widget/application
|
24
|
+
|
25
|
+
Run
|
26
|
+
|
27
|
+
$ rake scrivito:migrate:install
|
28
|
+
$ rake scrivito:migrate
|
29
|
+
|
30
|
+
Switch to your Workspace 'rtc' and follow below Steps for Usage. If you are happy with the outcome run
|
31
|
+
|
32
|
+
$ rake scrivito:migrate:publish
|
33
|
+
|
34
|
+
|
35
|
+
## Steps for Usage
|
36
|
+
|
37
|
+
- Insert the Widget 'Elastic Slider' and put several 'Image Panels for Elastic Slider' into it.
|
38
|
+
- Edit each Panel's Widget Properties to set Image, Headline, Button Text and Button Link or use inline editing.
|
39
|
+
- Switch into 'Preview' mode to see the Slider in action.
|
40
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'ScrivitoElasticSlider'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
Bundler::GemHelper.install_tasks
|
21
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
16
|
+
|
17
|
+
/* Carousel
|
18
|
+
================================================== */
|
19
|
+
|
20
|
+
.carousel-inner .item {height:400px;}
|
21
|
+
.carousel-inner > .item > img,
|
22
|
+
.carousel-inner > .item > a > img { display: block; height: auto; line-height: 1; min-width: 1200px; width: 100%;}
|
23
|
+
.carousel-inner .container {position:static;}
|
24
|
+
.carousel-control {width:7%; opacity:.2; @include transition(all .3s ease-in-out); }
|
25
|
+
.carousel-control i {font-size:30px; line-height:400px;}
|
26
|
+
|
27
|
+
/* Editing-View of Carousel */
|
28
|
+
/* body[data-scrivito-display-mode='editing'] .carousel-inner .item {height:150px;}
|
29
|
+
body[data-scrivito-display-mode='editing'] .carousel-inner .item > img {height: 100%; }
|
30
|
+
body[data-scrivito-display-mode='editing'] .carousel-inner .item .carousel-caption {top: 0; padding: 0;}
|
31
|
+
body[data-scrivito-display-mode='editing'] .carousel-inner .item .container .carousel-caption h1 {font-size: 20px; color: #465b66; text-shadow: none;}
|
32
|
+
body[data-scrivito-display-mode='editing'] .carousel-inner .item .container .carousel-caption p {font-size: 15px; color: darkgrey; text-shadow: none;}
|
33
|
+
body[data-scrivito-display-mode='editing'] .carousel-inner .item .container .btn {font-size: 15px; padding: 3px;}
|
34
|
+
*/
|
35
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="details-view">
|
2
|
+
|
3
|
+
<h4>Background Image</h4>
|
4
|
+
<%= scrivito_image_tag(widget, :image, data: { filter: 'images' }) %>
|
5
|
+
|
6
|
+
<h4>Headline</h4>
|
7
|
+
<%= scrivito_tag(:div, widget, :headline) %>
|
8
|
+
|
9
|
+
<h4>Text</h4>
|
10
|
+
<%= scrivito_tag(:div, widget, :content) %>
|
11
|
+
|
12
|
+
<h4>Button</h4>
|
13
|
+
<%= scrivito_edit_link(widget, :button, data: {placeholder: "Where should the button take the user ..."}) %>
|
14
|
+
|
15
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="item <%= widget.additional_classes(params) %>">
|
2
|
+
<%= scrivito_image_tag widget, :image %>
|
3
|
+
<div class="container">
|
4
|
+
<div class="carousel-caption">
|
5
|
+
<%= scrivito_tag :h1, widget, :headline %>
|
6
|
+
<div class="content">
|
7
|
+
<%= scrivito_tag :p, widget, :content %>
|
8
|
+
<% unless widget.button.blank? %>
|
9
|
+
<p>
|
10
|
+
<%= link_to widget.button.title, scrivito_path(widget.button), class: "btn btn-lg btn-primary", role: "button" %>
|
11
|
+
</p>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="editing-dialog-thumbnail">
|
2
|
+
<div class="visualization">
|
3
|
+
<span class="icon editing-icon-image"></span>
|
4
|
+
</div>
|
5
|
+
<div class="title">
|
6
|
+
Image Panel for Elastic Slider
|
7
|
+
</div>
|
8
|
+
<div class="description">
|
9
|
+
Serves an image background panel for the Elastic Slider.
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
<% widget.panels.each_with_index do |panel, index| %>
|
3
|
+
<% unless index == 0 %>
|
4
|
+
<hr />
|
5
|
+
<% end %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-4">
|
8
|
+
<%= scrivito_image_tag(panel, :image, style: "max-height: 100px; max-width: 250px; margin-bottom: 1em;") %>
|
9
|
+
</div>
|
10
|
+
<div class="col-md-3">
|
11
|
+
<h4>Headline</h4>
|
12
|
+
<%= scrivito_tag(:p, panel, :headline) %>
|
13
|
+
</div>
|
14
|
+
<div class="col-md-5">
|
15
|
+
<h4>Text</h4>
|
16
|
+
<%= scrivito_tag(:p, panel, :content) %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<%= scrivito_edit_link(panel, :button, data: {placeholder: "Where should the button take the user ..."}) %>
|
20
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Carousel -->
|
2
|
+
<div id="myCarousel" class="carousel slide" data-ride="carousel">
|
3
|
+
<ol class="carousel-indicators">
|
4
|
+
<% (0..widget.panels.size-1).each do |index| %>
|
5
|
+
<li data-target="#myCarousel" data-slide-to="<%= index %>" <% if index == 0 %>class="active"<% end %>></li>
|
6
|
+
<% end %>
|
7
|
+
</ol>
|
8
|
+
<div class="carousel-inner">
|
9
|
+
<% widget.panels.each do |panel| %>
|
10
|
+
<%= render template: 'elastic_slider_panel_widget/show', locals: {widget: panel} %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
|
14
|
+
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
|
15
|
+
</div><!-- /.carousel -->
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="editing-dialog-thumbnail">
|
2
|
+
<div class="visualization">
|
3
|
+
<span class="icon editing-icon-slider"></span>
|
4
|
+
</div>
|
5
|
+
<div class="title">
|
6
|
+
Elastic Slider
|
7
|
+
</div>
|
8
|
+
<div class="description">
|
9
|
+
Displays an elastic slider. Fill with Elastic Slider Panels.
|
10
|
+
</div>
|
11
|
+
</div>
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scrivito_elastic_slider_widget
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Scrivito
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: scrivito
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jquery-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Allows inserting an Elastic Slider with image panels and text above..
|
56
|
+
email:
|
57
|
+
- support@scrivito.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- LICENSE
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- app/assets/javascripts/scrivito_elastic_slider_widget/application.js
|
66
|
+
- app/assets/stylesheets/scrivito_elastic_slider_widget/application.css
|
67
|
+
- app/models/elastic_slider_panel_widget.rb
|
68
|
+
- app/models/elastic_slider_widget.rb
|
69
|
+
- app/views/elastic_slider_panel_widget/details.html.erb
|
70
|
+
- app/views/elastic_slider_panel_widget/show.html.erb
|
71
|
+
- app/views/elastic_slider_panel_widget/thumbnail.html.erb
|
72
|
+
- app/views/elastic_slider_widget/details.html.erb
|
73
|
+
- app/views/elastic_slider_widget/show.html.erb
|
74
|
+
- app/views/elastic_slider_widget/thumbnail.html.erb
|
75
|
+
- lib/scrivito_elastic_slider_widget.rb
|
76
|
+
- lib/scrivito_elastic_slider_widget/engine.rb
|
77
|
+
- lib/scrivito_elastic_slider_widget/version.rb
|
78
|
+
- lib/tasks/scrivito_elastic_slider_tasks.rake
|
79
|
+
homepage: https://www.scrivito.com
|
80
|
+
licenses:
|
81
|
+
- LGPL-3.0
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.4.2
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: A Widget for Scrivito delivering an Elastic Slider.
|
103
|
+
test_files: []
|