Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Make warning notices responsive (#2591)
Vini Brasilcb5d8a0d2519
diff --git a/lib/plausible_web/templates/layout/_notice.html.eex b/lib/plausible_web/templates/layout/_notice.html.eexindex 7d2f8094d4..87475e8773 100644--- a/lib/plausible_web/templates/layout/_notice.html.eex+++ b/lib/plausible_web/templates/layout/_notice.html.eex@@ -69,45 +69,43 @@<% end %><%= if @conn.assigns[:current_user] && @conn.assigns[:current_user].subscription && @conn.assigns[:current_user].subscription.status == "past_due" do %>- <div class="container">- <div class="p-2 bg-yellow-100 rounded-lg sm:p-3">- <div class="flex flex-wrap items-center justify-between">- <div class="flex items-center flex-1 w-0">- <svg class="w-6 h-6 text-yellow-800" viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg">+ <aside class="container">+ <div class="rounded-lg bg-yellow-100 p-4">+ <div class="flex">+ <div class="flex-shrink-0">+ <svg class="w-5 h-5 mt-0.5 text-yellow-800" viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>- <p class="ml-3 font-medium text-yellow-800">- Your latest payment failed. Please provide valid payment details to keep using Plausible.- </p></div>- <div class="flex-shrink-0 order-3 w-full mt-2 sm:order-2 sm:mt-0 sm:w-auto">- <div class="rounded-md shadow-sm">- <%= link("Update billing info", to: @conn.assigns[:current_user].subscription.update_url, class: "flex items-center justify-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-500 dark:hover:text-gray-200 focus:outline-none focus:ring transition ease-in-out duration-150") %>- </div>+ <div class="ml-3 flex-1 md:flex md:justify-between">+ <p class="text-yellow-700">There was a problem with your latest payment. Please update your payment information to keep using Plausible.</p>+ <%= link to: @conn.assigns.current_user.subscription.update_url, class: "whitespace-nowrap font-medium text-yellow-700 hover:text-yellow-600" do %>+ Update billing info+ <span aria-hidden="true"> →</span>+ <% end %></div></div></div>- </div>+ </aside><% end %><%= if @conn.assigns[:current_user] && @conn.assigns[:current_user].subscription && @conn.assigns[:current_user].subscription.status == "paused" do %>- <div class="container">- <div class="p-2 bg-red-100 rounded-lg sm:p-3">- <div class="flex flex-wrap items-center justify-between">- <div class="flex items-center flex-1 w-0">- <svg class="w-6 h-6 text-red-800" viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg">+ <aside class="container">+ <div class="rounded-lg bg-red-100 p-4">+ <div class="flex">+ <div class="flex-shrink-0">+ <svg class="w-5 h-5 mt-0.5 text-red-800" viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>- <p class="ml-3 font-medium text-red-800">- Your subscription is paused due to failed payments. Please provide valid payment details to keep using Plausible.- </p></div>- <div class="flex-shrink-0 order-3 w-full mt-2 sm:order-2 sm:mt-0 sm:w-auto">- <div class="rounded-md shadow-sm">- <%= link("Update billing info", to: @conn.assigns[:current_user].subscription.update_url, class: "flex items-center justify-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-500 dark:hover:text-gray-200 focus:outline-none focus:ring transition ease-in-out duration-150") %>- </div>+ <div class="ml-3 flex-1 md:flex md:justify-between">+ <p class="text-red-700">Your subscription is paused due to failed payments. Please provide valid payment details to keep using Plausible.</p>+ <%= link to: @conn.assigns.current_user.subscription.update_url, class: "whitespace-nowrap font-medium text-red-700 hover:text-red-600" do %>+ Update billing info+ <span aria-hidden="true"> →</span>+ <% end %></div></div></div>- </div>+ </aside><% end %>