rails_admin_content_builder_rails_6 1.0.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.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +134 -0
- data/Rakefile +2 -0
- data/app/assets/images/cb-image-default.jpg +0 -0
- data/app/assets/images/cb-loading.svg +1 -0
- data/app/assets/images/cb-snippet-gallery.jpg +0 -0
- data/app/assets/images/cb-snippet-gallery.psd +0 -0
- data/app/assets/images/cb-snippet-image-text.jpg +0 -0
- data/app/assets/images/cb-snippet-image-text.psd +0 -0
- data/app/assets/images/cb-snippet-image.jpg +0 -0
- data/app/assets/images/cb-snippet-image.psd +0 -0
- data/app/assets/images/cb-snippet-quote-text.jpg +0 -0
- data/app/assets/images/cb-snippet-quote-text.psd +0 -0
- data/app/assets/images/cb-snippet-quote.jpg +0 -0
- data/app/assets/images/cb-snippet-quote.psd +0 -0
- data/app/assets/images/cb-snippet-relational-text.jpg +0 -0
- data/app/assets/images/cb-snippet-relational-text.psd +0 -0
- data/app/assets/images/cb-snippet-text-image.jpg +0 -0
- data/app/assets/images/cb-snippet-text-image.psd +0 -0
- data/app/assets/images/cb-snippet-text-quote.jpg +0 -0
- data/app/assets/images/cb-snippet-text-quote.psd +0 -0
- data/app/assets/images/cb-snippet-text-relational.jpg +0 -0
- data/app/assets/images/cb-snippet-text-relational.psd +0 -0
- data/app/assets/images/cb-snippet-text.jpg +0 -0
- data/app/assets/images/cb-snippet-text.psd +0 -0
- data/app/assets/images/cb-snippet-video.jpg +0 -0
- data/app/assets/images/cb-snippet-video.psd +0 -0
- data/app/assets/images/cb-video-default.jpg +0 -0
- data/app/assets/javascripts/rails_admin/content_builder.js.erb +374 -0
- data/app/assets/javascripts/rails_admin/helpers/action_sortable.js +16 -0
- data/app/assets/javascripts/rails_admin/helpers/add_event_to_input.js +9 -0
- data/app/assets/javascripts/rails_admin/helpers/autocomplete.js.erb +32 -0
- data/app/assets/javascripts/rails_admin/helpers/file_select_and_upload.js +31 -0
- data/app/assets/javascripts/rails_admin/helpers/file_select_and_upload_gallery.js +43 -0
- data/app/assets/javascripts/rails_admin/helpers/generate_id.js +4 -0
- data/app/assets/javascripts/rails_admin/helpers/get_image_of_position.js +11 -0
- data/app/assets/javascripts/rails_admin/helpers/medium_editor.js +44 -0
- data/app/assets/javascripts/rails_admin/helpers/scrool_to.js +8 -0
- data/app/assets/javascripts/rails_admin/helpers/youtube_parse.js.erb +11 -0
- data/app/assets/stylesheets/rails_admin/content_builder.scss +534 -0
- data/app/controllers/rails_admin_content_builder/content_builder_controller.rb +39 -0
- data/app/helpers/rails_admin_content_builder/content_builder_helpers.rb +38 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/rails_admin_content_builder/content_builder.rb +45 -0
- data/app/models/rails_admin_content_builder/content_builder_category.rb +12 -0
- data/app/models/rails_admin_content_builder/content_builder_image.rb +11 -0
- data/app/views/.gitkeep +0 -0
- data/app/views/rails_admin/main/content_builder.html.erb +102 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/initializers/assets.rb +14 -0
- data/config/locales/content_builder.en.yml +32 -0
- data/config/locales/content_builder.pt-BR.yml +32 -0
- data/config/routes.rb +9 -0
- data/lib/rails_admin_content_builder_rails_6.rb +55 -0
- data/lib/rails_admin_content_builder_rails_6/engine.rb +24 -0
- data/lib/rails_admin_content_builder_rails_6/generators/rails_admin_content_builder_generator.rb +40 -0
- data/lib/rails_admin_content_builder_rails_6/generators/templates/content_builder_image_uploader.rb +90 -0
- data/lib/rails_admin_content_builder_rails_6/generators/templates/create_content_builder_category_migration.rb +10 -0
- data/lib/rails_admin_content_builder_rails_6/generators/templates/create_content_builder_image_migration.rb +10 -0
- data/lib/rails_admin_content_builder_rails_6/generators/templates/create_content_builder_migration.rb +16 -0
- data/lib/rails_admin_content_builder_rails_6/generators/templates/rails_admin_content_builder.rb +37 -0
- data/lib/rails_admin_content_builder_rails_6/version.rb +3 -0
- data/rails_admin_content_builder_rails_6.gemspec +45 -0
- data/vendor/assets/stylesheets/rails_admin_content_builder.scss +411 -0
- metadata +417 -0
data/lib/rails_admin_content_builder_rails_6/generators/rails_admin_content_builder_generator.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
class RailsAdminContentBuilderGenerator < Rails::Generators::Base
|
4
|
+
include Rails::Generators::Migration
|
5
|
+
|
6
|
+
def self.source_root
|
7
|
+
@source_root ||= File.expand_path(
|
8
|
+
File.join(File.dirname(__FILE__), 'templates/')
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.next_migration_number(*)
|
13
|
+
if @migration
|
14
|
+
@migration += 1
|
15
|
+
else
|
16
|
+
@migration = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
|
17
|
+
end
|
18
|
+
@migration.to_s
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_uploader_content_builder_image_model
|
22
|
+
template 'content_builder_image_uploader.rb',
|
23
|
+
'app/uploaders/content_builder_image_uploader.rb'
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_rails_admin_config_in_initializer
|
27
|
+
template 'rails_admin_content_builder.rb',
|
28
|
+
'config/initializers/rails_admin_content_builder.rb'
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_migrations
|
32
|
+
path = 'db/migrate'
|
33
|
+
migration_template 'create_content_builder_category_migration.rb',
|
34
|
+
File.join(path, 'create_content_builder_categories.rb')
|
35
|
+
migration_template 'create_content_builder_migration.rb',
|
36
|
+
File.join(path, 'create_content_builders.rb')
|
37
|
+
migration_template 'create_content_builder_image_migration.rb',
|
38
|
+
File.join(path, 'create_content_builder_images.rb')
|
39
|
+
end
|
40
|
+
end
|
data/lib/rails_admin_content_builder_rails_6/generators/templates/content_builder_image_uploader.rb
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
class ContentBuilderImageUploader < CarrierWave::Uploader::Base
|
3
|
+
# Include RMagick or MiniMagick support:
|
4
|
+
# include CarrierWave::RMagick
|
5
|
+
include CarrierWave::MiniMagick
|
6
|
+
|
7
|
+
# Choose what kind of storage to use for this uploader:
|
8
|
+
if Rails.env.development? || Rails.env.test?
|
9
|
+
storage :file
|
10
|
+
else
|
11
|
+
storage :sftp
|
12
|
+
end
|
13
|
+
# storage :fog
|
14
|
+
|
15
|
+
# Override the directory where uploaded files will be stored.
|
16
|
+
# This is a sensible default for uploaders that are meant to be mounted:
|
17
|
+
def store_dir
|
18
|
+
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
19
|
+
end
|
20
|
+
|
21
|
+
# Provide a default URL as a default if there hasn't been a file uploaded:
|
22
|
+
# def default_url
|
23
|
+
# # For Rails 3.1+ asset pipeline compatibility:
|
24
|
+
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
25
|
+
#
|
26
|
+
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
27
|
+
# end
|
28
|
+
|
29
|
+
# Process files as they are uploaded:
|
30
|
+
# process scale: [200, 300]
|
31
|
+
#
|
32
|
+
# def scale(width, height)
|
33
|
+
# # do something
|
34
|
+
# end
|
35
|
+
|
36
|
+
# Create different versions of your uploaded files:
|
37
|
+
# Use quality to compress the image
|
38
|
+
# resize_to_limit - Resize the image to fit within the specified dimensions while
|
39
|
+
# retaining the original aspect ratio. Will only resize the image if it is larger
|
40
|
+
# than the specified dimensions. The resulting image may be shorter or narrower
|
41
|
+
# than specified in the smaller dimension but will not be larger than the specified
|
42
|
+
# values.
|
43
|
+
# resize_to_fit - Resize the image to fit within the specified dimensions while
|
44
|
+
# retaining the original aspect ratio. The image may be shorter or narrower than
|
45
|
+
# specified in the smaller dimension but will not be larger than the specified values.
|
46
|
+
# resize_to_fill - Resize the image to fit within the specified dimensions while
|
47
|
+
# retaining the aspect ratio of the original image. If necessary, crop the image in
|
48
|
+
# the larger dimension. Optionally, a "gravity" may be specified, for example
|
49
|
+
# "Center", or "NorthEast".
|
50
|
+
# resize_and_pad - Resize the image to fit within the specified dimensions while
|
51
|
+
# retaining the original aspect ratio. If necessary, will pad the remaining area
|
52
|
+
# with the given color, which defaults to transparent (for gif and png, white
|
53
|
+
# for jpeg). Optionally, a "gravity" may be specified, as above.
|
54
|
+
version :left_or_right do
|
55
|
+
process resize_to_fit: [640, 360]
|
56
|
+
process quality: 60
|
57
|
+
end
|
58
|
+
|
59
|
+
version :center do
|
60
|
+
process resize_to_fit: [1280, 720]
|
61
|
+
process quality: 80
|
62
|
+
end
|
63
|
+
|
64
|
+
# Use quality to compress the image
|
65
|
+
# version :thumb_large do
|
66
|
+
# process resize_to_fit: [1280, 720]
|
67
|
+
# process quality: 60
|
68
|
+
# end
|
69
|
+
|
70
|
+
# Add a white list of extensions which are allowed to be uploaded.
|
71
|
+
# For images you might use something like this:
|
72
|
+
def extension_whitelist
|
73
|
+
%w(jpg jpeg gif png)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Mitigate CVE-2016-3714
|
77
|
+
def content_type_whitelist
|
78
|
+
[/image\//]
|
79
|
+
end
|
80
|
+
|
81
|
+
# Override the filename of the uploaded files:
|
82
|
+
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
83
|
+
def filename
|
84
|
+
if original_filename
|
85
|
+
image_format = original_filename.match(/\.([^.]*)$/).to_a.first
|
86
|
+
image_name = original_filename.gsub(/\.([^.]*)$/, "").parameterize
|
87
|
+
return "#{image_name}#{image_format}"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateContentBuilders < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :content_builders do |t|
|
4
|
+
t.string :title
|
5
|
+
t.string :written_by
|
6
|
+
t.datetime :date_publish
|
7
|
+
t.text :content
|
8
|
+
t.boolean :status, default: false
|
9
|
+
t.string :slug
|
10
|
+
t.text :summary
|
11
|
+
t.references :content_builder_category, index: true, foreign_key: true
|
12
|
+
|
13
|
+
t.timestamps null: false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/rails_admin_content_builder_rails_6/generators/templates/rails_admin_content_builder.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
RailsAdmin.config do |config|
|
2
|
+
config.actions do
|
3
|
+
content_builder do
|
4
|
+
only ['RailsAdminContentBuilder::ContentBuilder']
|
5
|
+
end
|
6
|
+
|
7
|
+
config.model 'RailsAdminContentBuilder::ContentBuilder' do
|
8
|
+
list do
|
9
|
+
field :id
|
10
|
+
field :title
|
11
|
+
field :date_publish
|
12
|
+
field :content_builder_category
|
13
|
+
field :status
|
14
|
+
end
|
15
|
+
edit do
|
16
|
+
field :title
|
17
|
+
field :date_publish
|
18
|
+
field :written_by
|
19
|
+
field :content_builder_category
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
config.model 'RailsAdminContentBuilder::ContentBuilderCategory' do
|
24
|
+
list do
|
25
|
+
field :id
|
26
|
+
field :name
|
27
|
+
end
|
28
|
+
edit do
|
29
|
+
field :name
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
config.model 'RailsAdminContentBuilder::ContentBuilderImage' do
|
34
|
+
visible false
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "rails_admin_content_builder_rails_6/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rails_admin_content_builder_rails_6"
|
7
|
+
spec.version = RailsAdminContentBuilderRails6::VERSION
|
8
|
+
spec.authors = ["Giuliano Crivelli"]
|
9
|
+
spec.email = ["giuliano@agenciaw3.digital"]
|
10
|
+
|
11
|
+
spec.summary = "Easy way for create contents using rails_admin on Rails 6"
|
12
|
+
spec.description = "Easy way for create contents using rails_admin on Rails 6 now with improvements and bug fixes"
|
13
|
+
spec.homepage = "https://github.com/thefalked/rails_admin_content_builder_rails_6"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
29
|
+
spec.add_development_dependency 'rails', '~> 6.0.3', '>= 6.0.3.3'
|
30
|
+
spec.add_development_dependency 'rails_admin', '~> 2.0.2'
|
31
|
+
spec.add_development_dependency 'capybara', '~> 2.7', '>= 2.7.0'
|
32
|
+
spec.add_development_dependency 'launchy', '~> 2.4', '>= 2.4.3'
|
33
|
+
spec.add_development_dependency 'shoulda-matchers', '~> 3.1'
|
34
|
+
spec.add_development_dependency 'selenium-webdriver', '~> 2.53', '>= 2.53.4'
|
35
|
+
spec.add_development_dependency 'factory_girl_rails', '~> 4.7', '>= 4.7.0'
|
36
|
+
spec.add_development_dependency 'faker', '~> 1.6', '>= 1.6.3'
|
37
|
+
|
38
|
+
spec.add_runtime_dependency 'carrierwave', '~> 2.0'
|
39
|
+
spec.add_runtime_dependency 'medium-editor-rails', '~> 2.1', '>= 2.1.0'
|
40
|
+
spec.add_runtime_dependency 'mini_magick', '~> 4.5', '>= 4.5.1'
|
41
|
+
spec.add_runtime_dependency 'friendly_id', '~> 5.1', '>= 5.1.0'
|
42
|
+
spec.add_runtime_dependency 'simple_form', '~> 5.0.2'
|
43
|
+
spec.add_runtime_dependency 'search_cop', '~> 1.0', '>= 1.0.6'
|
44
|
+
spec.add_runtime_dependency 'rails-html-sanitizer', '~> 1.0', '>= 1.0.0'
|
45
|
+
end
|
@@ -0,0 +1,411 @@
|
|
1
|
+
// content builder
|
2
|
+
|
3
|
+
.cb,
|
4
|
+
.news {
|
5
|
+
font-size: 1em;
|
6
|
+
|
7
|
+
a {
|
8
|
+
color: inherit;
|
9
|
+
font-weight: 600;
|
10
|
+
text-decoration: none;
|
11
|
+
|
12
|
+
&:hover,
|
13
|
+
&:focus {
|
14
|
+
text-decoration: underline;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
.cb-header,
|
20
|
+
.news__header {
|
21
|
+
padding-bottom: 1em;
|
22
|
+
margin-bottom: 1em;
|
23
|
+
border-bottom: solid 1px rgba(0,0,0,.1);
|
24
|
+
}
|
25
|
+
|
26
|
+
.cb-title,
|
27
|
+
.news__title {
|
28
|
+
margin: 0;
|
29
|
+
line-height: 1.2;
|
30
|
+
|
31
|
+
color: rgba(0,0,0,.65);
|
32
|
+
font-size: 1.4em;
|
33
|
+
letter-spacing: -.04em;
|
34
|
+
}
|
35
|
+
|
36
|
+
.cb-summary,
|
37
|
+
.news__summary {
|
38
|
+
margin: .5em 0 0;
|
39
|
+
line-height: 1.5;
|
40
|
+
|
41
|
+
color: rgba(0,0,0,.4);
|
42
|
+
font-size: .8em;
|
43
|
+
}
|
44
|
+
|
45
|
+
.cb-date,
|
46
|
+
.news__date {
|
47
|
+
margin: 0 0 .5em;
|
48
|
+
|
49
|
+
color: rgba(0,0,0,.5);
|
50
|
+
font-size: .64em;
|
51
|
+
}
|
52
|
+
|
53
|
+
.cb-info,
|
54
|
+
.news__info {
|
55
|
+
margin-top: 1em;
|
56
|
+
|
57
|
+
color: rgba(0,0,0,.5);
|
58
|
+
font-size: .7em;
|
59
|
+
}
|
60
|
+
|
61
|
+
.cb-row,
|
62
|
+
.news__row {
|
63
|
+
position: relative;
|
64
|
+
max-width: 100%;
|
65
|
+
height: auto !important;
|
66
|
+
|
67
|
+
&:after {
|
68
|
+
visibility: hidden;
|
69
|
+
display: block;
|
70
|
+
font-size: 0;
|
71
|
+
content: " ";
|
72
|
+
clear: both;
|
73
|
+
height: 0;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
.cb-content,
|
78
|
+
.news__content {
|
79
|
+
line-height: 1.6;
|
80
|
+
|
81
|
+
color: rgba(0,0,0,.6);
|
82
|
+
font-family: sans-serif;
|
83
|
+
font-size: .8em;
|
84
|
+
|
85
|
+
margin-bottom: 1.5em;
|
86
|
+
|
87
|
+
&:after {
|
88
|
+
visibility: hidden;
|
89
|
+
display: block;
|
90
|
+
font-size: 0;
|
91
|
+
content: " ";
|
92
|
+
clear: both;
|
93
|
+
height: 0;
|
94
|
+
}
|
95
|
+
|
96
|
+
p {
|
97
|
+
margin: 0 0 1.5em;
|
98
|
+
|
99
|
+
&:last-of-type {
|
100
|
+
margin: 0;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
.cb-figure,
|
106
|
+
.news__figure {
|
107
|
+
position: relative;
|
108
|
+
margin: .3em 0 1.5em;
|
109
|
+
|
110
|
+
img {
|
111
|
+
display: block;
|
112
|
+
width: 100%;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
.cb-figcaption,
|
117
|
+
.news__figcaption {
|
118
|
+
color: rgba(0,0,0,.6);
|
119
|
+
|
120
|
+
font-size: .8em;
|
121
|
+
line-height: 1.4;
|
122
|
+
|
123
|
+
margin-top: .2em;
|
124
|
+
padding: .3em .6em .4em;
|
125
|
+
|
126
|
+
background: rgba(0,0,0,.05);
|
127
|
+
}
|
128
|
+
|
129
|
+
.cb-video,
|
130
|
+
.news__video {
|
131
|
+
position: relative;
|
132
|
+
height: 0;
|
133
|
+
overflow: hidden;
|
134
|
+
padding-bottom: 56.25%;
|
135
|
+
background: rgba(0,0,0,.02);
|
136
|
+
|
137
|
+
iframe {
|
138
|
+
position: absolute;
|
139
|
+
width: 100%;
|
140
|
+
height: 100%;
|
141
|
+
vertical-align: middle;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
.cb-video--center,
|
146
|
+
.news__video--center {
|
147
|
+
margin-bottom: 1.5em;
|
148
|
+
}
|
149
|
+
|
150
|
+
.cb-blockquote {
|
151
|
+
position: relative;
|
152
|
+
margin: 0 0 1.5rem;
|
153
|
+
|
154
|
+
padding: 1.5em 0 0 1.5em;
|
155
|
+
border: 0;
|
156
|
+
|
157
|
+
color: rgba(0,0,0,.5);
|
158
|
+
}
|
159
|
+
|
160
|
+
.cb-blockquote__text {
|
161
|
+
margin: 0 0 .5em;
|
162
|
+
|
163
|
+
line-height: 1.4;
|
164
|
+
|
165
|
+
font-family: sans-serif;
|
166
|
+
font-size: 1em;
|
167
|
+
|
168
|
+
&:before {
|
169
|
+
content: "\“";
|
170
|
+
|
171
|
+
position: absolute;
|
172
|
+
top: 0;
|
173
|
+
left: 0;
|
174
|
+
|
175
|
+
display: block;
|
176
|
+
line-height: 1;
|
177
|
+
|
178
|
+
color: rgba(0,0,0,.2);
|
179
|
+
font-size: 4em;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
.cb-blockquote__footer {
|
184
|
+
position: relative;
|
185
|
+
margin: 0;
|
186
|
+
|
187
|
+
padding-left: 1.5em;
|
188
|
+
|
189
|
+
font-family: sans-serif;
|
190
|
+
font-size: .9em;
|
191
|
+
|
192
|
+
&:before {
|
193
|
+
content: "\2014 \00A0";
|
194
|
+
|
195
|
+
position: absolute;
|
196
|
+
top: 0;
|
197
|
+
left: 0;
|
198
|
+
|
199
|
+
display: block;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
.cb-relational {
|
204
|
+
margin: 0 0 1.5em;
|
205
|
+
padding-top: .3em;
|
206
|
+
}
|
207
|
+
|
208
|
+
.cb-relational__title {
|
209
|
+
margin: 0 0 .5em;
|
210
|
+
|
211
|
+
line-height: 1;
|
212
|
+
padding-top: .5em;
|
213
|
+
border-top: solid 4px rgba(0,0,0,.1);
|
214
|
+
|
215
|
+
color: rgba(0,0,0,.3);
|
216
|
+
font-size: 1em;
|
217
|
+
font-weight: 700;
|
218
|
+
text-transform: uppercase;
|
219
|
+
}
|
220
|
+
|
221
|
+
.cb-relational__list {
|
222
|
+
margin: 0;
|
223
|
+
padding: 0;
|
224
|
+
list-style: none;
|
225
|
+
}
|
226
|
+
|
227
|
+
.cb-relational__item {
|
228
|
+
position: relative;
|
229
|
+
padding: 1em 0;
|
230
|
+
border-bottom: solid 1px rgba(0,0,0,.05);
|
231
|
+
}
|
232
|
+
|
233
|
+
.cb-relational__caption {
|
234
|
+
margin: 0;
|
235
|
+
|
236
|
+
display: block;
|
237
|
+
|
238
|
+
font-size: .9em;
|
239
|
+
font-weight: 700;
|
240
|
+
}
|
241
|
+
|
242
|
+
.cb-relational__link {
|
243
|
+
position: absolute;
|
244
|
+
top: 0;
|
245
|
+
left: 0;
|
246
|
+
|
247
|
+
display: block;
|
248
|
+
width: 100%;
|
249
|
+
height: 100%;
|
250
|
+
|
251
|
+
&:hover,
|
252
|
+
&:focus {
|
253
|
+
~ .cb-relational__caption {
|
254
|
+
text-decoration: underline;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
.cb-relational__btn {
|
260
|
+
display: none;
|
261
|
+
}
|
262
|
+
|
263
|
+
.cb-content-gallery {
|
264
|
+
@extend .cb-content;
|
265
|
+
}
|
266
|
+
|
267
|
+
.cb-gallery {
|
268
|
+
|
269
|
+
}
|
270
|
+
|
271
|
+
.cb-gallery__item {
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
.cb-gallery__figure {
|
276
|
+
margin: 0;
|
277
|
+
padding: 0;
|
278
|
+
}
|
279
|
+
|
280
|
+
.cb-gallery__image {
|
281
|
+
width: 100%;
|
282
|
+
}
|
283
|
+
|
284
|
+
@media screen and (min-width: 768px) {
|
285
|
+
.cb-header,
|
286
|
+
.news__header {
|
287
|
+
margin-bottom: 1.5em;
|
288
|
+
padding-bottom: 1.5em;
|
289
|
+
}
|
290
|
+
|
291
|
+
.cb-title,
|
292
|
+
.news__title {
|
293
|
+
font-size: 2em;
|
294
|
+
}
|
295
|
+
|
296
|
+
.cb-date,
|
297
|
+
.news__date {
|
298
|
+
font-size: .8em;
|
299
|
+
}
|
300
|
+
|
301
|
+
.cb-summary,
|
302
|
+
.news__summary {
|
303
|
+
font-size: 1em;
|
304
|
+
}
|
305
|
+
|
306
|
+
.cb-info,
|
307
|
+
.news__info {
|
308
|
+
margin: 1em 0 0;
|
309
|
+
font-size: .8em;
|
310
|
+
}
|
311
|
+
|
312
|
+
.cb-content,
|
313
|
+
.news__content {
|
314
|
+
font-size: 1em;
|
315
|
+
}
|
316
|
+
|
317
|
+
.cb-figure--left,
|
318
|
+
.news__figure--left {
|
319
|
+
float: left;
|
320
|
+
width: 50%;
|
321
|
+
margin: .3em 1.5em 1em 0;
|
322
|
+
}
|
323
|
+
|
324
|
+
.cb-figure--right,
|
325
|
+
.news__figure--right {
|
326
|
+
float: right;
|
327
|
+
width: 50%;
|
328
|
+
margin: .3em 0 1em 1.5em;
|
329
|
+
}
|
330
|
+
|
331
|
+
.cb-figure--center,
|
332
|
+
.news__figure--center {
|
333
|
+
margin: .3em 0 1.5rem;
|
334
|
+
}
|
335
|
+
|
336
|
+
.cb-figcaption,
|
337
|
+
.news__figcaption {
|
338
|
+
font-size: .9em;
|
339
|
+
padding: .4em .8em .5em;
|
340
|
+
}
|
341
|
+
|
342
|
+
.cb-blockquote {
|
343
|
+
padding: 2em 0 0 2em;
|
344
|
+
}
|
345
|
+
|
346
|
+
.cb-blockquote__text {
|
347
|
+
font-size: 1.2em;
|
348
|
+
}
|
349
|
+
|
350
|
+
.cb-blockquote--left {
|
351
|
+
float: left;
|
352
|
+
width: 50%;
|
353
|
+
margin: 0 2rem 1.5em 0;
|
354
|
+
}
|
355
|
+
|
356
|
+
.cb-blockquote--right {
|
357
|
+
float: right;
|
358
|
+
width: 50%;
|
359
|
+
margin: 0 0 1.5em 1.5em;
|
360
|
+
}
|
361
|
+
|
362
|
+
.cb-relational--left {
|
363
|
+
float: left;
|
364
|
+
margin: 0 1.5em 1.5em 0;
|
365
|
+
width: 50%;
|
366
|
+
}
|
367
|
+
|
368
|
+
.cb-relational--right {
|
369
|
+
float: right;
|
370
|
+
margin: 0 0 1.5em 1.5em;
|
371
|
+
width: 50%;
|
372
|
+
}
|
373
|
+
|
374
|
+
.cb-relational__caption {
|
375
|
+
font-size: 1em;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
@media screen and (min-width: 992px) {
|
380
|
+
.cb-title,
|
381
|
+
.news__title {
|
382
|
+
font-size: 2.2em;
|
383
|
+
}
|
384
|
+
|
385
|
+
.cb-summary,
|
386
|
+
.news__summary {
|
387
|
+
font-size: 1.1em;
|
388
|
+
}
|
389
|
+
|
390
|
+
.cb-aside-title {
|
391
|
+
font-size: 1.2em;
|
392
|
+
}
|
393
|
+
}
|
394
|
+
|
395
|
+
@media print {
|
396
|
+
.cb-blockquote--left {
|
397
|
+
float: left;
|
398
|
+
width: 50%;
|
399
|
+
margin: 0 2em 1.5em 0;
|
400
|
+
}
|
401
|
+
|
402
|
+
.cb-blockquote--right {
|
403
|
+
float: right;
|
404
|
+
width: 50%;
|
405
|
+
margin: 0 0 1.5em 2em;
|
406
|
+
}
|
407
|
+
|
408
|
+
.cb-relational {
|
409
|
+
display: none;
|
410
|
+
}
|
411
|
+
}
|