graph_starter 0.2.1 → 0.3.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 +4 -4
- data/app/models/graph_starter/asset.rb +3 -3
- data/app/models/graph_starter/image.rb +5 -1
- data/app/views/graph_starter/assets/_cards.html.slim +2 -2
- data/app/views/graph_starter/assets/show.html.slim +2 -2
- data/app/views/layouts/graph_starter/_twitter_meta_tags.html.slim +2 -2
- data/lib/graph_starter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39794eb0d0df1788618e78fefa3b3ec2fa41e80d
|
4
|
+
data.tar.gz: 2b8f7dd5e79a3de4cf86929a5203c17377d9ee19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81a7742da6c3cc7586c6754ff7cad43ed49fe14800d0b777984eb3a42c96365f52007f3fc5f0b18080f2491a0a65cba4c7f44898ec70181a919857d5801e4bf7
|
7
|
+
data.tar.gz: ed50b31f0eb1b7a1a0b93f1458670c670332b52409027ac85499dd676462085f0800ffccf6bfbdfe2238d9566313afc5d13b219d46fa7ad27a06100355bf107b
|
@@ -37,8 +37,8 @@ module GraphStarter
|
|
37
37
|
GraphStarter::Asset::IMAGE_MODELS.include?(self)
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
41
|
-
images.first && images.first.
|
40
|
+
def first_image_source_url
|
41
|
+
images.first && images.first.source_url
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.category_association
|
@@ -158,4 +158,4 @@ module GraphStarter
|
|
158
158
|
'bookmark'
|
159
159
|
end
|
160
160
|
end
|
161
|
-
end
|
161
|
+
end
|
@@ -12,5 +12,9 @@ module GraphStarter
|
|
12
12
|
|
13
13
|
has_neo4jrb_attached_file :source
|
14
14
|
validates_attachment_content_type :source, content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif']
|
15
|
+
|
16
|
+
def source_url
|
17
|
+
source.present? ? source.url : original_url
|
18
|
+
end
|
15
19
|
end
|
16
|
-
end
|
20
|
+
end
|
@@ -16,8 +16,8 @@
|
|
16
16
|
.header = link_to asset.title, asset_path(asset)
|
17
17
|
- if asset.class.has_images?
|
18
18
|
.image
|
19
|
-
- if asset.
|
20
|
-
= image_tag asset.
|
19
|
+
- if asset.first_image_source_url.present?
|
20
|
+
= image_tag asset.first_image_source_url
|
21
21
|
- else
|
22
22
|
img src="missing"
|
23
23
|
- categories = Array(asset.categories).sort_by(&:name)
|
@@ -57,13 +57,13 @@
|
|
57
57
|
.ui.link.cards
|
58
58
|
- @asset.images.each do |image|
|
59
59
|
.card
|
60
|
-
.image = image_tag image.
|
60
|
+
.image = image_tag image.source_url, class: 'ui image tiny rounded'
|
61
61
|
.content
|
62
62
|
.header = image.title if image.title.present?
|
63
63
|
- if image.description.present?
|
64
64
|
.meta = image.description
|
65
65
|
.extra.content
|
66
|
-
a.ui.large.green.button href="#{image.
|
66
|
+
a.ui.large.green.button href="#{image.source_url}" Full Size
|
67
67
|
|
68
68
|
|
69
69
|
div class="#{side_column_width} wide column"
|
@@ -12,6 +12,6 @@ meta name="twitter:domain" content="http://neo4j.org"
|
|
12
12
|
meta name="twitter:description" content="#{@asset.summary}"
|
13
13
|
|
14
14
|
- if @asset.class.has_images?
|
15
|
-
meta name="twitter:card" content="#{(@asset.
|
15
|
+
meta name="twitter:card" content="#{(@asset.first_image_source_url.present? ? 'summary_large_image' : 'summary')}"
|
16
16
|
|
17
|
-
meta name="twitter:image:src" content="#{@asset.
|
17
|
+
meta name="twitter:image:src" content="#{@asset.first_image_source_url ? @asset.first_image_source_url : '/assets/img/neo4j/neo4j-logo.png'}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graph_starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|