Skip to content

Commit

Permalink
Test PWA mail loc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wleightond committed Nov 12, 2024
1 parent c1aba29 commit 4b574d1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
19 changes: 18 additions & 1 deletion templates/emails/_generated_dont_edit_notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,24 @@
</td>
<td>
<p style="font-weight:600;display:block;line-height:1;margin:0;">Location</p>
<p style="font-weight:400;color:#060606;margin:0;">{{BasicDetails.get('pwa_location', None)}}</p>
<p style="font-weight:400;color:#060606;margin:0;">
</p>
<div style="font-weight:500">Latitude:</div> {{BasicDetails['pwa_location']['coords'].get('latitude', '-')}}
<p></p>
<p style="font-weight:400;color:#060606;margin:0;">
</p>
<div style="font-weight:500">Longitude:</div> {{BasicDetails['pwa_location']['coords'].get('longitude', '-')}}
<p></p>
<p style="font-weight:400;color:#060606;margin:0;">
</p>
<div style="font-weight:500">Accuracy (m):</div> {{BasicDetails['pwa_location']['coords'].get('accuracy', '-')}}
<p></p>
<!-- Maps Links --> {% if BasicDetails['pwa_location'].get('google_maps_link') %} <p style="font-weight:600;display:block;line-height:1;margin:0;margin-top:12px">
<a href="{{ BasicDetails['pwa_location']['google_maps_link'] }}" style="text-decoration:none;color:#33c480"> Show in Google Maps </a>
</p>
<p style="font-weight:600;display:block;line-height:1;margin:0;margin-top:15px">
<a href="{{ BasicDetails['pwa_location']['apple_maps_link'] }}" style="text-decoration:none;color:#33c480"> Show in Apple Maps </a>
</p> {% endif %}
</td>
</tr>
</table>
Expand Down
23 changes: 22 additions & 1 deletion templates/emails/notification.mjml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,28 @@
</td>
<td>
<p style="font-weight:600;display:block;line-height:1;margin:0;">Location</p>
<p style="font-weight:400;color:#060606;margin:0;">{{BasicDetails.get('pwa_location', None)}}</p>
<p style="font-weight:400;color:#060606;margin:0;">
<div style="font-weight:500">Latitude:</div> {{BasicDetails['pwa_location']['coords'].get('latitude', '-')}}
</p>
<p style="font-weight:400;color:#060606;margin:0;">
<div style="font-weight:500">Longitude:</div> {{BasicDetails['pwa_location']['coords'].get('longitude', '-')}}
</p>
<p style="font-weight:400;color:#060606;margin:0;">
<div style="font-weight:500">Accuracy (m):</div> {{BasicDetails['pwa_location']['coords'].get('accuracy', '-')}}
</p>
<!-- Maps Links -->
{% if BasicDetails['pwa_location'].get('google_maps_link') %}
<p style="font-weight:600;display:block;line-height:1;margin:0;margin-top:12px">
<a href="{{ BasicDetails['pwa_location']['google_maps_link'] }}" style="text-decoration:none;color:#33c480">
Show in Google Maps
</a>
</p>
<p style="font-weight:600;display:block;line-height:1;margin:0;margin-top:15px">
<a href="{{ BasicDetails['pwa_location']['apple_maps_link'] }}"style="text-decoration:none;color:#33c480">
Show in Apple Maps
</a>
</p>
{% endif %}
</td>
</tr>

Expand Down

0 comments on commit 4b574d1

Please sign in to comment.