diff --git a/app/assets/images/smartcitizen-2-2-kit.gif b/app/assets/images/smartcitizen-2-2-kit.gif new file mode 100644 index 00000000..05567dab Binary files /dev/null and b/app/assets/images/smartcitizen-2-2-kit.gif differ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7033a691..11b75494 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,6 +1,6 @@ <% content_for :container do %> -
-
+ <%= render layout: "ui/shared/container" do %> + <%= render layout: "ui/shared/box" do %> <% if @title %>

<%= @title %>

@@ -9,7 +9,7 @@
<%= yield %>
-
-
-<% end %> + <% end %> + <% end %> +<% end %> <%= render "layouts/base" %> diff --git a/app/views/ui/shared/_box.html.erb b/app/views/ui/shared/_box.html.erb new file mode 100644 index 00000000..dbf0635c --- /dev/null +++ b/app/views/ui/shared/_box.html.erb @@ -0,0 +1,3 @@ +
"> + <%= yield %> +
diff --git a/app/views/ui/shared/_container.html.erb b/app/views/ui/shared/_container.html.erb new file mode 100644 index 00000000..afd7e325 --- /dev/null +++ b/app/views/ui/shared/_container.html.erb @@ -0,0 +1,3 @@ +
+ <%= yield %> +
diff --git a/app/views/ui/users/_no_device_cta.html.erb b/app/views/ui/users/_no_device_cta.html.erb new file mode 100644 index 00000000..21138016 --- /dev/null +++ b/app/views/ui/users/_no_device_cta.html.erb @@ -0,0 +1,8 @@ + +

<%= t :no_device_cta_heading %>

+

<%= t :no_device_cta_blurb %>

+
+ <%= image_tag "smartcitizen-2-2-kit.gif", class: "w-100" %> + <%= t :no_device_kit_link_text %> + <%= t :no_device_onboarding_link_text %> +
diff --git a/app/views/ui/users/show.html.erb b/app/views/ui/users/show.html.erb index 154e5be1..321e0ad5 100644 --- a/app/views/ui/users/show.html.erb +++ b/app/views/ui/users/show.html.erb @@ -1,7 +1,7 @@ -
+
-
+
<%= image_tag( @user.profile_picture.present? ? @user.profile_picture : "default_avatar.svg", @@ -47,3 +47,12 @@
+
+
+
+ <%= render layout: "ui/shared/box" do %> + <%= render partial: "no_device_cta" %> + <% end %> +
+
+
diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 22552b93..4377f7dc 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -31,3 +31,9 @@ en: post_delete_user_blurb_html: "If you have deleted your account in error, please contact Smart Citizen support as soon as possible. After 24 hours, your account and all devices will be deleted permanently." post_delete_user_cta: "Return to the homepage" post_delete_user_cta_link: "https://smartcitizen.me" + no_device_cta_heading: "You don't yet have any devices!" + no_device_cta_blurb: "Order a SmartCitizen kit to start sensing, or connect one you already have." + no_device_kit_link_url: "https://smartcitizen.me#get-your-kit" + no_device_kit_link_text: "Get your kit" + no_device_onboarding_link_url: "https://start.smartcitizen.me/wizard/landing?lang=eng" + no_device_onboarding_link_text: "Connect an existing kit"