ants 0.2.6 → 0.2.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/ants/meta.coffee +29 -0
- data/app/assets/javascripts/ants/slug.coffee +15 -0
- data/lib/ants/version.rb +1 -1
- data/lib/concerns/ants/meta.rb +0 -8
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a098093f449a893e74a659e3458b5d471b02d206
|
4
|
+
data.tar.gz: ffbe2e6fcd1563b03e0d1b6707a2ec537da8955f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 598b4db8d45fb19217c976c58c6e29cb54df5f6e4946f535ba2d069b869c9d90772ae5d4f91e49a4a9565c4e16e0d7616eb89001c5945f2fddd455131ebdc145
|
7
|
+
data.tar.gz: a099bfe58c3a666bd757286172edd7d4ef1f9eb9d65927230d5632fb92f51c4cbd707063e086669aebe6750620034fa79367d5e117caab1591d3a9c3151df4af
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
class @AntsMetaGroup
|
2
|
+
constructor: (extra_config={}) ->
|
3
|
+
config =
|
4
|
+
type: 'group'
|
5
|
+
inputs:
|
6
|
+
_meta_title:
|
7
|
+
type: 'string'
|
8
|
+
label: 'Meta Title'
|
9
|
+
limit: 60
|
10
|
+
placeholder: "Accurate and concise description of a page's content"
|
11
|
+
|
12
|
+
_meta_description:
|
13
|
+
type: 'text'
|
14
|
+
label: 'Meta Description'
|
15
|
+
limit: 200
|
16
|
+
placeholder: 'Advertise content with short summary'
|
17
|
+
|
18
|
+
_meta_keywords:
|
19
|
+
type: 'text'
|
20
|
+
label: 'Meta Keywords'
|
21
|
+
placeholder: 'e.g. keyword1, keyword2, keyword3'
|
22
|
+
|
23
|
+
_opengraph_image_url:
|
24
|
+
type: 'loft-image'
|
25
|
+
label: 'Open Graph Image'
|
26
|
+
|
27
|
+
$.extend(config, extra_config)
|
28
|
+
|
29
|
+
return config
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class @AntsSlugInput
|
2
|
+
constructor: (extra_config={}) ->
|
3
|
+
config =
|
4
|
+
type: 'string'
|
5
|
+
name: '_slug'
|
6
|
+
label: 'Permalink'
|
7
|
+
placeholder: ''
|
8
|
+
onInitialize: (input) ->
|
9
|
+
if input.object && input.object._slugs.length
|
10
|
+
defaultSlug = input.object._slugs[0]
|
11
|
+
input.$input.attr 'placeholder', defaultSlug
|
12
|
+
|
13
|
+
$.extend(config, extra_config)
|
14
|
+
|
15
|
+
return config
|
data/lib/ants/version.rb
CHANGED
data/lib/concerns/ants/meta.rb
CHANGED
@@ -1,37 +1,29 @@
|
|
1
1
|
module Ants
|
2
2
|
module Meta
|
3
3
|
extend ActiveSupport::Concern
|
4
|
-
|
5
4
|
included do
|
6
|
-
|
7
5
|
field :_meta_title, default: ''
|
8
6
|
field :_meta_description, default: ''
|
9
7
|
field :_meta_keywords, default: ''
|
10
8
|
field :_opengraph_image_url, default: ''
|
11
9
|
|
12
|
-
|
13
10
|
# these helpers to be used for meta_tags helper,
|
14
11
|
# override them to add custom logic
|
15
12
|
def meta_title
|
16
13
|
_meta_title
|
17
14
|
end
|
18
15
|
|
19
|
-
|
20
16
|
def meta_description
|
21
17
|
_meta_description
|
22
18
|
end
|
23
19
|
|
24
|
-
|
25
20
|
def meta_keywords
|
26
21
|
_meta_keywords
|
27
22
|
end
|
28
23
|
|
29
|
-
|
30
24
|
def opengraph_image_url
|
31
25
|
_opengraph_image_url
|
32
26
|
end
|
33
|
-
|
34
|
-
|
35
27
|
end
|
36
28
|
end
|
37
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kravets
|
@@ -156,7 +156,9 @@ files:
|
|
156
156
|
- app/assets/javascripts/ants.coffee
|
157
157
|
- app/assets/javascripts/ants/admins.coffee
|
158
158
|
- app/assets/javascripts/ants/menu.coffee
|
159
|
+
- app/assets/javascripts/ants/meta.coffee
|
159
160
|
- app/assets/javascripts/ants/redirects.coffee
|
161
|
+
- app/assets/javascripts/ants/slug.coffee
|
160
162
|
- app/assets/stylesheets/ants.scss
|
161
163
|
- app/assets/stylesheets/chr/header.scss
|
162
164
|
- app/controllers/admin/admins_controller.rb
|