enjoy_cms 0.1.0.beta1
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 +21 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +249 -0
- data/LICENSE.txt +22 -0
- data/README.md +137 -0
- data/Rakefile +1 -0
- data/app/assets/javascripts/enjoy_cms.coffee +6 -0
- data/app/assets/javascripts/enjoy_cms/flash.js.coffee +3 -0
- data/app/assets/javascripts/enjoy_cms/map.js.coffee +22 -0
- data/app/assets/javascripts/head.load.js +707 -0
- data/app/assets/javascripts/jquery.placeholder.js +157 -0
- data/app/assets/stylesheets/enjoy_cms.sass +5 -0
- data/app/assets/stylesheets/enjoy_cms/flash.sass +63 -0
- data/app/assets/stylesheets/enjoy_cms/normalize.scss +406 -0
- data/app/assets/stylesheets/enjoy_cms/powered.sass +18 -0
- data/app/controllers/concerns/enjoy/errors.rb +93 -0
- data/app/controllers/concerns/enjoy/fancybox.rb +14 -0
- data/app/controllers/concerns/enjoy/localizeable.rb +33 -0
- data/app/controllers/concerns/enjoy/nav_menu.rb +64 -0
- data/app/controllers/concerns/enjoy/no_cache.rb +12 -0
- data/app/controllers/concerns/enjoy/seo_pages.rb +83 -0
- data/app/controllers/enjoy/contacts_controller.rb +5 -0
- data/app/controllers/enjoy/home_controller.rb +6 -0
- data/app/controllers/enjoy/news_controller.rb +5 -0
- data/app/controllers/enjoy/pages_controller.rb +5 -0
- data/app/controllers/enjoy/search_controller.rb +6 -0
- data/app/helpers/enjoy/gzip_helper.rb +27 -0
- data/app/helpers/enjoy/powered_helper.rb +12 -0
- data/app/mailers/enjoy/contact_mailer.rb +17 -0
- data/app/models/concerns/enjoy/boolean_field.rb +17 -0
- data/app/models/concerns/enjoy/enableable.rb +8 -0
- data/app/models/concerns/enjoy/geocodeable.rb +4 -0
- data/app/models/concerns/enjoy/mappable.rb +95 -0
- data/app/models/concerns/enjoy/mongoid_paperclip.rb +37 -0
- data/app/models/concerns/enjoy/seoable.rb +36 -0
- data/app/models/concerns/enjoy/sitemap_data.rb +23 -0
- data/app/models/concerns/enjoy/sort_field.rb +20 -0
- data/app/models/concerns/enjoy/sortable.rb +8 -0
- data/app/models/enjoy/contact_message.rb +12 -0
- data/app/models/enjoy/embedded_element.rb +15 -0
- data/app/models/enjoy/embedded_gallery_image.rb +15 -0
- data/app/models/enjoy/gallery.rb +10 -0
- data/app/models/enjoy/gallery_image.rb +10 -0
- data/app/models/enjoy/menu.rb +12 -0
- data/app/models/enjoy/news.rb +12 -0
- data/app/models/enjoy/page.rb +12 -0
- data/app/models/enjoy/seo.rb +13 -0
- data/app/views/blocks/_favicon.html.slim +21 -0
- data/app/views/blocks/_footer.html.slim +1 -0
- data/app/views/blocks/_seo_block.html.slim +18 -0
- data/app/views/blocks/_seo_block_with_obj.html.slim +27 -0
- data/app/views/devise/registrations/edit.html.slim +21 -0
- data/app/views/devise/registrations/new.html.slim +21 -0
- data/app/views/devise/sessions/new.html.slim +22 -0
- data/app/views/devise/shared/_links.html.slim +11 -0
- data/app/views/enjoy/contact_mailer/new_message_email.html.slim +15 -0
- data/app/views/enjoy/contacts/index.html.slim +10 -0
- data/app/views/enjoy/contacts/new.html.slim +10 -0
- data/app/views/enjoy/contacts/sent.html.slim +4 -0
- data/app/views/enjoy/home/index.html.slim +1 -0
- data/app/views/enjoy/news/index.html.slim +9 -0
- data/app/views/enjoy/news/show.html.slim +8 -0
- data/app/views/enjoy/pages/show.html.slim +1 -0
- data/app/views/enjoy/search/index.html.slim +19 -0
- data/app/views/errors/_base.html.slim +3 -0
- data/app/views/errors/error_403.html.slim +1 -0
- data/app/views/errors/error_404.html.slim +1 -0
- data/app/views/errors/error_500.html.slim +1 -0
- data/app/views/layouts/application.html.slim +25 -0
- data/app/views/rails_admin/main/_check_boxes.html.slim +27 -0
- data/app/views/rails_admin/main/_enum_check_boxes.html.slim +5 -0
- data/app/views/rails_admin/main/_enum_radio_buttons.html.slim +5 -0
- data/app/views/rails_admin/main/_form_raw.html.slim +1 -0
- data/app/views/shared/_admin_link.html.slim +3 -0
- data/app/views/shared/_messages.html.slim +7 -0
- data/app/views/shared/_meta.html.slim +19 -0
- data/app/views/shared/_obj.html.slim +21 -0
- data/app/views/shared/_og.html.slim +4 -0
- data/app/views/simple_captcha/_simple_captcha.html.slim +12 -0
- data/config/initializers/simple_captcha.rb +29 -0
- data/config/locales/en.enjoy.yml +29 -0
- data/config/locales/en.enjoy_admin.yml +6 -0
- data/config/locales/ru.cancan.yml +4 -0
- data/config/locales/ru.devise.yml +65 -0
- data/config/locales/ru.enjoy.yml +39 -0
- data/config/locales/ru.enjoy_admin.yml +6 -0
- data/config/locales/ru.kaminari.yml +17 -0
- data/config/locales/ru.models.yml +103 -0
- data/config/locales/ru.mongoid.yml +450 -0
- data/config/locales/ru.rails_admin.yml +148 -0
- data/config/locales/ru.simple_captcha.yml +3 -0
- data/config/locales/ru.simple_form.yml +9 -0
- data/config/routes.rb +14 -0
- data/enjoy_cms.gemspec +53 -0
- data/lib/enjoy/admin.rb +350 -0
- data/lib/enjoy/admin/contact_message.rb +36 -0
- data/lib/enjoy/admin/embedded_element.rb +11 -0
- data/lib/enjoy/admin/embedded_gallery_image.rb +15 -0
- data/lib/enjoy/admin/gallery.rb +20 -0
- data/lib/enjoy/admin/gallery_image.rb +18 -0
- data/lib/enjoy/admin/menu.rb +27 -0
- data/lib/enjoy/admin/news.rb +57 -0
- data/lib/enjoy/admin/page.rb +81 -0
- data/lib/enjoy/admin/seo.rb +17 -0
- data/lib/enjoy/configuration.rb +73 -0
- data/lib/enjoy/controller.rb +31 -0
- data/lib/enjoy/controllers/contacts.rb +70 -0
- data/lib/enjoy/controllers/news.rb +36 -0
- data/lib/enjoy/controllers/pages.rb +22 -0
- data/lib/enjoy/controllers/search.rb +62 -0
- data/lib/enjoy/elastic_search.rb +31 -0
- data/lib/enjoy/engine.rb +46 -0
- data/lib/enjoy/migration.rb +34 -0
- data/lib/enjoy/model.rb +22 -0
- data/lib/enjoy/models/active_record/contact_message.rb +14 -0
- data/lib/enjoy/models/active_record/menu.rb +17 -0
- data/lib/enjoy/models/active_record/news.rb +26 -0
- data/lib/enjoy/models/active_record/page.rb +20 -0
- data/lib/enjoy/models/active_record/seo.rb +17 -0
- data/lib/enjoy/models/contact_message.rb +37 -0
- data/lib/enjoy/models/embedded_element.rb +12 -0
- data/lib/enjoy/models/embedded_gallery_image.rb +16 -0
- data/lib/enjoy/models/gallery.rb +29 -0
- data/lib/enjoy/models/gallery_image.rb +23 -0
- data/lib/enjoy/models/menu.rb +28 -0
- data/lib/enjoy/models/mongoid/contact_message.rb +20 -0
- data/lib/enjoy/models/mongoid/embedded_element.rb +13 -0
- data/lib/enjoy/models/mongoid/embedded_gallery_image.rb +19 -0
- data/lib/enjoy/models/mongoid/gallery.rb +23 -0
- data/lib/enjoy/models/mongoid/gallery_image.rb +21 -0
- data/lib/enjoy/models/mongoid/menu.rb +15 -0
- data/lib/enjoy/models/mongoid/news.rb +29 -0
- data/lib/enjoy/models/mongoid/page.rb +25 -0
- data/lib/enjoy/models/mongoid/seo.rb +28 -0
- data/lib/enjoy/models/news.rb +58 -0
- data/lib/enjoy/models/page.rb +90 -0
- data/lib/enjoy/models/seo.rb +22 -0
- data/lib/enjoy/patch.rb +58 -0
- data/lib/enjoy/rails_admin_menu.rb +145 -0
- data/lib/enjoy/simple_form_patch.rb +12 -0
- data/lib/enjoy/tasks.rb +13 -0
- data/lib/enjoy/version.rb +3 -0
- data/lib/enjoy_cms.rb +109 -0
- data/lib/filename_to_slug.rb +34 -0
- data/lib/generators/enjoy/ability_generator.rb +14 -0
- data/lib/generators/enjoy/admin_generator.rb +21 -0
- data/lib/generators/enjoy/capify_generator.rb +39 -0
- data/lib/generators/enjoy/layout_generator.rb +14 -0
- data/lib/generators/enjoy/migration_generator.rb +18 -0
- data/lib/generators/enjoy/templates/Capfile +17 -0
- data/lib/generators/enjoy/templates/ability.erb +26 -0
- data/lib/generators/enjoy/templates/admin.erb +89 -0
- data/lib/generators/enjoy/templates/deploy.erb +47 -0
- data/lib/generators/enjoy/templates/dl.erb +30 -0
- data/lib/generators/enjoy/templates/migration_contact_messages.rb +15 -0
- data/lib/generators/enjoy/templates/migration_news.rb +26 -0
- data/lib/generators/enjoy/templates/migration_pages.rb +45 -0
- data/lib/generators/enjoy/templates/migration_seos.rb +14 -0
- data/lib/generators/enjoy/templates/production.erb +8 -0
- data/lib/generators/enjoy/templates/unicorn.erb +66 -0
- data/lib/generators/enjoy/utils.rb +21 -0
- data/lib/manual_slug.rb +10 -0
- data/lib/manual_slug/active_record.rb +32 -0
- data/lib/manual_slug/mongoid.rb +36 -0
- data/lib/rails_admin/custom_show_in_app.rb +43 -0
- data/release.sh +13 -0
- data/template.rb +824 -0
- metadata +579 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
module Enjoy::Mappable
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
|
|
6
|
+
if Enjoy.mongoid?
|
|
7
|
+
include Geocoder::Model::Mongoid
|
|
8
|
+
field :coordinates, type: Array
|
|
9
|
+
field :address, type: String
|
|
10
|
+
|
|
11
|
+
field :map_address, type: String
|
|
12
|
+
field :map_hint, type: String
|
|
13
|
+
|
|
14
|
+
field :lat, type: Float
|
|
15
|
+
field :lon, type: Float
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
geocoded_by :geo_address
|
|
19
|
+
after_validation :do_geocode
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
if Enjoy.active_record?
|
|
23
|
+
def coordinates
|
|
24
|
+
if latitude.nil? || longitude.nil?
|
|
25
|
+
nil
|
|
26
|
+
else
|
|
27
|
+
[longitude, latitude]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def do_geocode
|
|
33
|
+
if geo_address.blank?
|
|
34
|
+
if Enjoy.mongoid?
|
|
35
|
+
self.coordinates = nil
|
|
36
|
+
else
|
|
37
|
+
self.latitude = nil
|
|
38
|
+
self.longitude = nil
|
|
39
|
+
end
|
|
40
|
+
else
|
|
41
|
+
if (lat.nil? || lon.nil?) && (new_record? || address_changed? || coordinates.nil? || map_address_changed?)
|
|
42
|
+
geocode
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def get_lat
|
|
48
|
+
if lat.blank?
|
|
49
|
+
if coordinates.nil?
|
|
50
|
+
nil
|
|
51
|
+
else
|
|
52
|
+
coordinates[1]
|
|
53
|
+
end
|
|
54
|
+
else
|
|
55
|
+
lat
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
def get_lon
|
|
59
|
+
if lon.blank?
|
|
60
|
+
if coordinates.nil?
|
|
61
|
+
nil
|
|
62
|
+
else
|
|
63
|
+
coordinates[0]
|
|
64
|
+
end
|
|
65
|
+
else
|
|
66
|
+
lon
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def has_map?
|
|
71
|
+
(!lat.blank? && !lon.blank?) || !coordinates.nil?
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def to_map
|
|
75
|
+
{
|
|
76
|
+
id: id.to_s,
|
|
77
|
+
hint: map_hint,
|
|
78
|
+
addr: address,
|
|
79
|
+
lat: get_lat,
|
|
80
|
+
lon: get_lon,
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def geo_address
|
|
85
|
+
if map_address.blank?
|
|
86
|
+
address
|
|
87
|
+
else
|
|
88
|
+
map_address
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.admin
|
|
93
|
+
Enjoy.map_config
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
if Enjoy.mongoid?
|
|
2
|
+
module Enjoy::MongoidPaperclip
|
|
3
|
+
extend ActiveSupport::Concern
|
|
4
|
+
|
|
5
|
+
include Mongoid::Paperclip
|
|
6
|
+
|
|
7
|
+
module ClassMethods
|
|
8
|
+
def enjoy_cms_mongoid_attached_file(name, opts = {})
|
|
9
|
+
name = name.to_sym
|
|
10
|
+
unless opts.blank?
|
|
11
|
+
content_type = opts.delete(:content_type)
|
|
12
|
+
jcrop_options = opts.delete(:jcrop_options)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
has_mongoid_attached_file name, opts
|
|
16
|
+
validates_attachment name, content_type: content_type unless content_type.blank?
|
|
17
|
+
class_eval <<-EVAL
|
|
18
|
+
def #{name}_file_name=(val)
|
|
19
|
+
return self[:#{name}_file_name] = "" if val == ""
|
|
20
|
+
return self[:#{name}_file_name] = nil if val == nil
|
|
21
|
+
val = val.to_s
|
|
22
|
+
extension = File.extname(val)[1..-1]
|
|
23
|
+
file_name = val[0..val.size-extension.size-1]
|
|
24
|
+
self[:#{name}_file_name] = "\#{file_name.filename_to_slug}.\#{extension.filename_to_slug}"
|
|
25
|
+
end
|
|
26
|
+
EVAL
|
|
27
|
+
if jcrop_options
|
|
28
|
+
class_eval <<-EVAL
|
|
29
|
+
def #{name}_jcrop_options
|
|
30
|
+
#{jcrop_options}
|
|
31
|
+
end
|
|
32
|
+
EVAL
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Enjoy::Seoable
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
LOCALIZED_FIELDS = [:h1, :title, :keywords, :description, :og_title]
|
|
4
|
+
FIELDS = LOCALIZED_FIELDS + [:og_image, :robots]
|
|
5
|
+
|
|
6
|
+
included do
|
|
7
|
+
has_one :seo, as: :seoable, autosave: true
|
|
8
|
+
accepts_nested_attributes_for :seo
|
|
9
|
+
delegate *FIELDS, to: :seo
|
|
10
|
+
delegate *(FIELDS.map {|f| "#{f}=".to_sym }), to: :seo
|
|
11
|
+
alias seo_without_build seo
|
|
12
|
+
def seo
|
|
13
|
+
seo_without_build || build_seo
|
|
14
|
+
end
|
|
15
|
+
if Enjoy.config.localize
|
|
16
|
+
delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations".to_sym }), to: :seo
|
|
17
|
+
delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations=".to_sym }), to: :seo
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def page_title
|
|
22
|
+
title.blank? ? name : title
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def get_og_title
|
|
26
|
+
og_title.blank? ? name : og_title
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.admin
|
|
30
|
+
Enjoy.seo_config
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def og_image_jcrop_options
|
|
34
|
+
{aspectRation: 800.0/600.0}
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Enjoy::SitemapData
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
SITEMAP_CHANGEFREQ_ARRAY = %w(always hourly daily weekly monthly yearly never)
|
|
5
|
+
|
|
6
|
+
included do
|
|
7
|
+
if Enjoy.mongoid?
|
|
8
|
+
field :sitemap_show, type: Boolean, default: true
|
|
9
|
+
field :sitemap_lastmod, type: DateTime
|
|
10
|
+
field :sitemap_changefreq, type: String, default: 'daily'
|
|
11
|
+
field :sitemap_priority, type: Float
|
|
12
|
+
|
|
13
|
+
scope :sitemap_show, -> { where(sitemap_show: true) }
|
|
14
|
+
scope :for_sitemap, -> { sitemap_show }
|
|
15
|
+
scope :show_in_sitemap, -> { sitemap_show }
|
|
16
|
+
elsif Enjoy.active_record?
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.admin
|
|
21
|
+
Enjoy.sitemap_data_config
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Enjoy::SortField
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
module ClassMethods
|
|
5
|
+
def sort_field(prefix = '')
|
|
6
|
+
prefix = "#{prefix}_" unless prefix == ''
|
|
7
|
+
|
|
8
|
+
if Enjoy.mongoid?
|
|
9
|
+
field "#{prefix}order".to_sym, type: Integer
|
|
10
|
+
alias_method "#{prefix}sort", "#{prefix}order"
|
|
11
|
+
scope "#{prefix}ordered".to_sym, -> { asc("#{prefix}order".to_sym) }
|
|
12
|
+
scope "#{prefix}sorted".to_sym, -> { asc("#{prefix}order".to_sym) }
|
|
13
|
+
end
|
|
14
|
+
if Enjoy.active_record?
|
|
15
|
+
scope "#{prefix}ordered".to_sym, -> { order("#{prefix}order".to_sym => :asc) }
|
|
16
|
+
scope "#{prefix}sorted".to_sym, -> { order("#{prefix}order".to_sym => :asc) }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Enjoy
|
|
2
|
+
if Enjoy.mongoid?
|
|
3
|
+
class Enjoy
|
|
4
|
+
include Enjoy::Models::Enjoy
|
|
5
|
+
Enjoy.apply_patches self
|
|
6
|
+
|
|
7
|
+
# use it in inherited model
|
|
8
|
+
#rails_admin &Enjoy.embedded_image_config
|
|
9
|
+
|
|
10
|
+
# use it in rails_admin in parent model for sort
|
|
11
|
+
# sort_embedded({fields: [:embedded_field_1, :embedded_field_2...]})
|
|
12
|
+
# or u need to override rails_admin in inherited model to add sort field
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Enjoy
|
|
2
|
+
if Enjoy.mongoid?
|
|
3
|
+
class EmbeddedGalleryImage < Enjoy
|
|
4
|
+
include Enjoy::Models::EmbeddedGalleryImage
|
|
5
|
+
Enjoy.apply_patches self
|
|
6
|
+
|
|
7
|
+
# use it in inherited model
|
|
8
|
+
#rails_admin &Enjoy.embedded_image_config
|
|
9
|
+
|
|
10
|
+
# use it in rails_admin in parent model for sort
|
|
11
|
+
# sort_embedded({fields: [:embedded_field_1, :embedded_field_2...]})
|
|
12
|
+
# or u need to override rails_admin in inherited model to add sort field
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/ For third-generation iPad with high-resolution Retina display:
|
|
2
|
+
/ Size should be 228 x 228 pixels
|
|
3
|
+
= favicon_link_tag '/apple-touch-icon-228x228-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '228x228'
|
|
4
|
+
/ For iPhone with high-resolution Retina display:
|
|
5
|
+
/ Size should be 114 x 114 pixels
|
|
6
|
+
= favicon_link_tag '/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
|
|
7
|
+
/ For fienjoyt- and second-generation iPad:
|
|
8
|
+
/ Size should be 72 x 72 pixels
|
|
9
|
+
= favicon_link_tag '/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
|
|
10
|
+
/ For non-Retina iPhone, iPod Touch, and Android 2.1+ devices:
|
|
11
|
+
/ Size should be 57 x 57 pixels
|
|
12
|
+
= favicon_link_tag '/apple-touch-icon-57x57-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '57x57'
|
|
13
|
+
/ For non-Retina iPhone, iPod Touch, and Android 2.1+ devices:
|
|
14
|
+
/ Size should be 57 x 57 pixels
|
|
15
|
+
= favicon_link_tag '/apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png'
|
|
16
|
+
/ For all other devices
|
|
17
|
+
/ Size should be 32 x 32 pixels
|
|
18
|
+
= favicon_link_tag '/favicon.ico', :rel => 'shortcut icon', :type => 'image/vnd.microsoft.icon'
|
|
19
|
+
/ For all other devices
|
|
20
|
+
/ Size should be 32 x 32 pixels
|
|
21
|
+
= favicon_link_tag '/favicon.png', :rel => 'shortcut icon', :type => 'image/png'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'(c) 2016 etc
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
- if @seo_page
|
|
2
|
+
- content_for :meta do
|
|
3
|
+
= render 'shared/meta', obj: @seo_page, alt_obj: @seo_parent_page
|
|
4
|
+
|
|
5
|
+
- og_title = (@seo_page.get_og_title.blank? and @seo_parent_page ? @seo_parent_page.get_og_title : @seo_page.get_og_title)
|
|
6
|
+
- og_image = (@seo_page.og_image.blank? and @seo_parent_page ? @seo_parent_page.og_image : @seo_page.og_image)
|
|
7
|
+
= render 'shared/og', title: @seo_page.get_og_title, image: @seo_page.og_image
|
|
8
|
+
- elsif @seo_parent_page
|
|
9
|
+
- content_for :meta do
|
|
10
|
+
= render 'shared/meta', obj: @seo_parent_page
|
|
11
|
+
= render 'shared/og', title: @seo_parent_page.get_og_title, image: @seo_parent_page.og_image
|
|
12
|
+
|
|
13
|
+
- if @seo_page and @seo_page.title
|
|
14
|
+
- content_for :title do
|
|
15
|
+
title= @seo_page.title
|
|
16
|
+
- elsif @seo_parent_page and @seo_parent_page.title
|
|
17
|
+
- content_for :title do
|
|
18
|
+
title= @seo_parent_page.title
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
- obj ||= nil
|
|
2
|
+
- if obj
|
|
3
|
+
- content_for :meta do
|
|
4
|
+
- seo_page = @seo_page || @seo_parent_page
|
|
5
|
+
= render 'shared/meta', obj: obj
|
|
6
|
+
|
|
7
|
+
- og_title = (obj.get_og_title.blank? and seo_page ? seo_page.get_og_title : obj.get_og_title)
|
|
8
|
+
- og_image = (obj.og_image.blank? and seo_page ? seo_page.og_image : obj.og_image)
|
|
9
|
+
= render 'shared/og', title: obj.get_og_title, image: obj.og_image
|
|
10
|
+
- if obj.title
|
|
11
|
+
- content_for :title do
|
|
12
|
+
title= obj.title
|
|
13
|
+
|
|
14
|
+
- elsif @seo_page
|
|
15
|
+
- content_for :meta do
|
|
16
|
+
= render 'shared/meta', obj: @seo_page
|
|
17
|
+
= render 'shared/og', title: @seo_page.get_og_title, image: @seo_page.og_image
|
|
18
|
+
|
|
19
|
+
- if obj and obj.title
|
|
20
|
+
- content_for :title do
|
|
21
|
+
title= obj.title
|
|
22
|
+
- elsif @seo_page and @seo_page.title
|
|
23
|
+
- content_for :title do
|
|
24
|
+
title= @seo_page.title
|
|
25
|
+
- elsif @seo_parent_page and @seo_parent_page.title
|
|
26
|
+
- content_for :title do
|
|
27
|
+
title= @seo_parent_page.title
|