scrivito_seo_headline_extender 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 22242088f8f42b68be92150544c03337d689142b
4
+ data.tar.gz: e61cfe5d7a16b9fb8c2b0e5676cad777b5bb140b
5
+ SHA512:
6
+ metadata.gz: 5d64ee2028f39c7b1f0d67159b3fd50ff0c29cd4771c58397f339426567c2930c39fc35b7edcef064af1a6a0620d0a2d1621ed33ad9feeb47b0d8258096368d9
7
+ data.tar.gz: 79e4d7fc9b7a2dd57d331f17842e2d22ab70125699ca78e9d97343538cae8a4a80d6501a161aa7247a8f457e6fb8e080415357be5b958413474700724b07015f
data/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ Copyright (c) 2009 - 2014 Infopark AG (http://www.infopark.com)
2
+
3
+ This software can be used and modified under the LGPL-3.0. Please refer to
4
+ http://www.gnu.org/licenses/lgpl-3.0.html for the license text.
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 = 'ScrivitoSeoHeadlineExtender'
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,83 @@
1
+ h1 {
2
+ font-size: 36px;
3
+ font-weight: normal;
4
+ font-style: normal;
5
+ }
6
+
7
+ h2 {
8
+ font-size: 30px;
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ }
12
+
13
+ h3 {
14
+ font-size: 24px;
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ }
18
+
19
+ h4 {
20
+ font-size: 18px;
21
+ font-weight: normal;
22
+ font-style: normal;
23
+ }
24
+
25
+ h5 {
26
+ font-size: 14px;
27
+ font-weight: normal;
28
+ font-style: normal;
29
+ }
30
+
31
+ h6 {
32
+ font-size: 12px;
33
+ font-weight: normal;
34
+ font-style: normal;
35
+ }
36
+
37
+ h1.large, h2.large, h3.large, h4.large, h5.large, h6.large {
38
+ font-size: 36px;
39
+ }
40
+
41
+ h1.medium, h2.medium, h3.medium, h4.medium, h5.medium, h6.medium {
42
+ font-size: 24px;
43
+ }
44
+
45
+ h1.small, h2.small, h3.small, h4.small, h5.small, h6.small {
46
+ font-size: 18px;
47
+ }
48
+
49
+ h1.text, h2.text, h3.text, h4.text, h5.text, h6.text {
50
+ font-size: 14px;
51
+ }
52
+
53
+ h1.normal, h2.normal, h3.normal, h4.normal, h5.normal, h6.normal {
54
+ font-weight: normal;
55
+ font-style: normal;
56
+ }
57
+
58
+ h1.bold, h2.bold, h3.bold, h4.bold, h5.bold, h6.bold {
59
+ font-weight: bold;
60
+ font-style: normal;
61
+ }
62
+
63
+ h1.italic, h2.italic, h3.italic, h4.italic, h5.italic, h6.italic {
64
+ font-weight: normal;
65
+ font-style: italic;
66
+ }
67
+
68
+ h1.bold-italic, h2.bold-italic, h3.bold-italic, h4.bold-italic, h5.bold-italic, h6.bold-italic {
69
+ font-weight: bold;
70
+ font-style: italic;
71
+ }
72
+
73
+ h1.left, h2.left, h3.left, h4.left, h5.left, h6.left {
74
+ text-align: left;
75
+ }
76
+
77
+ h1.center, h2.center, h3.center, h4.center, h5.center, h6.center {
78
+ text-align: center;
79
+ }
80
+
81
+ h1.right, h2.right, h3.right, h4.right, h5.right, h6.right {
82
+ text-align: right;
83
+ }
@@ -0,0 +1,13 @@
1
+ class HeadlineWidget < Widget
2
+ def css_class
3
+ [self.size, self.css_style, self.alignment].join(" ")
4
+ end
5
+
6
+ def css_style
7
+ self.style.blank? ? "" : self.style
8
+ end
9
+
10
+ def tag
11
+ self.type.blank? ? :h3 : self.type.to_sym
12
+ end
13
+ end
@@ -0,0 +1,19 @@
1
+ <div class="details-view">
2
+ <h4>Headline</h4>
3
+ <%= scrivito_tag(:div, widget, :headline) %>
4
+
5
+ <h4>Type</h4>
6
+ <%= cms_edit_enum(widget, :type) %>
7
+
8
+ <h4>Size</h4>
9
+ <%= cms_edit_enum(widget, :size) %>
10
+
11
+ <h4>Style</h4>
12
+ <%= cms_edit_enum(widget, :style) %>
13
+
14
+ <h4>Alignment</h4>
15
+ <%= cms_edit_enum(widget, :alignment) %>
16
+
17
+ <h4>Anchor</h4>
18
+ <%= scrivito_tag(:div, widget, :anchor) %>
19
+ </div>
@@ -0,0 +1 @@
1
+ <%= scrivito_tag(widget.tag, widget, :headline, class: widget.css_class, id: widget.anchor.presence) %>
@@ -0,0 +1,13 @@
1
+ <div class="editing-dialog-thumbnail">
2
+ <div class="visualization">
3
+ <span class="icon editing-icon-headline"></span>
4
+ </div>
5
+
6
+ <div class="title">
7
+ Headline
8
+ </div>
9
+
10
+ <div class="description">
11
+ The headline widget displays a page heading and allows to set an anchor. Also has some options for SEO.
12
+ </div>
13
+ </div>
@@ -0,0 +1,5 @@
1
+ module ScrivitoSeoHeadlineExtender
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace ScrivitoSeoHeadlineExtender
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module ScrivitoSeoHeadlineExtender
2
+ VERSION = "1.1.0"
3
+ end
@@ -0,0 +1,4 @@
1
+ require "scrivito_seo_headline_extender/engine"
2
+
3
+ module ScrivitoSeoHeadlineExtender
4
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :scrivito_seo_headline_extender do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,52 @@
1
+ class AddSeoFeaturesToHeadlineWidget < ::Scrivito::Migration
2
+ def up
3
+ obj_class = Scrivito::ObjClass.find('HeadlineWidget')
4
+
5
+ if obj_class.present?
6
+ attributes.each do |elem|
7
+ obj_class.attributes.add(name: elem[:name], type: elem[:type], values: elem[:values])
8
+ end
9
+ else
10
+ Scrivito::ObjClass.create(
11
+ name: 'HeadlineWidget',
12
+ is_binary: false,
13
+ atrributes: [
14
+ {
15
+ name: 'headline',
16
+ type: :string
17
+ },
18
+ {
19
+ name: 'anchor',
20
+ type: 'string'
21
+ }
22
+ ] + attributes
23
+ )
24
+ end
25
+
26
+ end
27
+
28
+ def attributes
29
+ [
30
+ {
31
+ name: 'type',
32
+ type: :enum,
33
+ values: ['h1','h2','h3','h4','h5','h6'],
34
+ },
35
+ {
36
+ name: 'size',
37
+ type: :enum,
38
+ values: ['large','medium','small','text'],
39
+ },
40
+ {
41
+ name: 'style',
42
+ type: :enum,
43
+ values: ['normal','bold','italic','bold-italic'],
44
+ },
45
+ {
46
+ name: 'alignment',
47
+ type: :enum,
48
+ values: ['center','left','right'],
49
+ },
50
+ ]
51
+ end
52
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scrivito_seo_headline_extender
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Scrivito
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-07 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_sdk
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: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Scrivito Widget for a headline with seo features
56
+ email:
57
+ - support@scrivito.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - LICENSE
63
+ - Rakefile
64
+ - app/assets/javascripts/seo_headline_extender/application.js
65
+ - app/assets/stylesheets/seo_headline_extender/application.css
66
+ - app/models/headline_widget.rb
67
+ - app/views/headline_widget/details.html.erb
68
+ - app/views/headline_widget/show.html.erb
69
+ - app/views/headline_widget/thumbnail.html.erb
70
+ - lib/scrivito_seo_headline_extender.rb
71
+ - lib/scrivito_seo_headline_extender/engine.rb
72
+ - lib/scrivito_seo_headline_extender/version.rb
73
+ - lib/tasks/scrivito_seo_headline_extender_tasks.rake
74
+ - scrivito/migrate/0_add_seo_features_to_headline_widget.rb
75
+ homepage: https://www.scrivito.com
76
+ licenses:
77
+ - LGPL-3.0
78
+ metadata: {}
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 2.3.0
96
+ signing_key:
97
+ specification_version: 4
98
+ summary: Scrivito Widget for a headline with seo features
99
+ test_files: []