Skip to content

Commit 46583d0

Browse files
committed
Add links to shademap
1 parent 2ed7044 commit 46583d0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/views/homes/_link_icons.html.erb

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
<% verbose ||= false %>
12
<% if home.latitude.present? && home.longitude.present? %>
2-
<%= link_to image_tag('external-icons/google-maps.svg', size: 30, alt: 'Google Maps'),
3+
<%= link_to image_tag('external-icons/google-maps.svg', size: 30, alt: 'Google Maps', title: 'View location on Google Maps'),
34
"https://www.google.co.uk/maps/place/#{home.latitude},#{home.longitude}" %>
5+
<% if verbose %>
6+
<%= link_to image_tag('external-icons/shademap.png', size: 30, class: 'rounded', alt: 'Shademap', title: 'View sun position over time on Shademap'),
7+
"https://shademap.app/@#{home.latitude},#{home.longitude},18z,#{Time.zone.now.to_i}000t" %>
8+
<% end %>
49
<% end %>
510
<% if home.zoopla_url.present? %>
6-
<%= link_to image_tag('external-icons/zoopla.png', size: 30, class: 'rounded', alt: 'Zoopla'),
11+
<%= link_to image_tag('external-icons/zoopla.png', size: 30, class: 'rounded', alt: 'Zoopla', title: 'View property on Zoopla'),
712
home.zoopla_url %>
813
<% end %>
914
<% if home.rightmove_url.present? %>
10-
<%= link_to image_tag('external-icons/rightmove.png', size: 30, class: 'rounded', alt: 'Rightmove'),
15+
<%= link_to image_tag('external-icons/rightmove.png', size: 30, class: 'rounded', alt: 'Rightmove', title: 'View property on Rightmove'),
1116
home.rightmove_url %>
1217
<% end %>

app/views/homes/show.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<h3><%= @home.price_display %></h3>
4949
<p>
50-
<%= render 'link_icons', home: @home %>
50+
<%= render 'link_icons', home: @home, verbose: true %>
5151
</p>
5252
</div>
5353
</div>

0 commit comments

Comments
 (0)