polaris_view_helpers 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 479f0e36712d011153a8f549e60b3ee16b505d77
|
4
|
+
data.tar.gz: b81840807842fae3a850814cd2ff4f4c48590657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce3c3210a66bb30dd2200834863dbfe7c7c3f3ae1fe78a6c31d2c4b3a4de5d4176975eb4b45d3aefc9af8edf9157e5ed8743c190eda61b27693da1b9d0ed7ee
|
7
|
+
data.tar.gz: bdd538837ff6d3e5529cfb5df720b45b80b69a354fede073d65bb1d59934e13c42317e8b654e859fec3851d28fdcf8fc3ef43a58c6af0e7f023e4cf34909857c
|
@@ -1,7 +1,12 @@
|
|
1
1
|
<li class="Polaris-ResourceList__ItemWrapper">
|
2
|
-
<div class="Polaris-ResourceList__Item Polaris-ResourceList__Item--link">
|
3
|
-
<a aria-describedby="ResourceListItem4" class="Polaris-ResourceList__Link" href="" data-polaris-unstyled="true"></a>
|
2
|
+
<div class="Polaris-ResourceList__Item Polaris-ResourceList__Item--link <%= extra_classes %>">
|
3
|
+
<a aria-describedby="ResourceListItem4" class="Polaris-ResourceList__Link" href="<%= attributes[:url] %>" data-polaris-unstyled="true"></a>
|
4
4
|
<div class="Polaris-ResourceList__Container" id="ResourceListItem4">
|
5
|
+
<% if attributes[:media].present? %>
|
6
|
+
<div class="Polaris-ResourceList__Media">
|
7
|
+
<%= attributes[:media] %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
5
10
|
<div class="Polaris-ResourceList__Content">
|
6
11
|
<div class="Polaris-ResourceList__Attributes">
|
7
12
|
<p class="Polaris-ResourceList__AttributeOne"><%= attributes[:attribute_one] %></p>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<span class="Polaris-Thumbnail Polaris-Thumbnail--sizeMedium">
|
2
|
+
<% if attributes[:src].present? %>
|
3
|
+
<img src="<%= attributes[:src] %>" alt="<%= attributes[:alt] %>" class="Polaris-Thumbnail__Image">
|
4
|
+
<% else %>
|
5
|
+
<svg class="next-icon next-icon--size-24 next-icon--no-nudge">
|
6
|
+
<use xmlns:xlink="https://www.w3.org/1999/xlink" xlink:href="#next-photos"></use>
|
7
|
+
</svg>
|
8
|
+
<% end %>
|
9
|
+
</span>
|
@@ -242,9 +242,10 @@ module PolarisViewHelpers
|
|
242
242
|
end
|
243
243
|
|
244
244
|
def polaris_resource_list_item(attributes)
|
245
|
+
extra_classes = attributes[:media].present? ? "Polaris-ResourceList__Item--mediaThumbnail Polaris-ResourceList__Item--sizeMedium" : ""
|
245
246
|
render(
|
246
247
|
partial: 'polaris/resource_list_item',
|
247
|
-
locals: { attributes: attributes }
|
248
|
+
locals: { attributes: attributes, extra_classes: extra_classes }
|
248
249
|
)
|
249
250
|
end
|
250
251
|
|
@@ -256,5 +257,12 @@ module PolarisViewHelpers
|
|
256
257
|
)
|
257
258
|
end
|
258
259
|
|
260
|
+
def polaris_thumbnail(attributes)
|
261
|
+
render(
|
262
|
+
partial: 'polaris/thumbnail',
|
263
|
+
locals: { attributes: attributes }
|
264
|
+
)
|
265
|
+
end
|
266
|
+
|
259
267
|
end
|
260
268
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polaris_view_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Green
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- app/views/polaris/_tab.html.erb
|
72
72
|
- app/views/polaris/_tabs.html.erb
|
73
73
|
- app/views/polaris/_text_field.html.erb
|
74
|
+
- app/views/polaris/_thumbnail.html.erb
|
74
75
|
- app/views/polaris/banner_icons/_critical.html.erb
|
75
76
|
- app/views/polaris/banner_icons/_success.html.erb
|
76
77
|
- app/views/polaris/banner_icons/_warning.html.erb
|