Change home destination

pull/53/head
Uku Taht 7 years ago
parent d9d43160d0
commit bb765f9c0c

@ -13,7 +13,7 @@
<div class="container text-center mt-24">
<h1 class="text-5xl font-black"><%= @status %></h1>
<div class="my-4 text-xl"><%= @message %></div>
<%= link("Go to the homepage", to: "/", class: "button mt-4") %>
<%= link("Go to the homepage", to: home_dest(@conn), class: "button mt-4") %>
</div>
</body>
</html>

@ -15,7 +15,7 @@
<%= render("_svg_icons.html") %>
<nav class="container flex items-center justify-between flex-wrap py-8">
<div class="flex items-center flex-shrink-0">
<a href="/">
<a href="<%= home_dest(@conn) %>">
<%= img_tag(PlausibleWeb.Router.Helpers.static_path(@conn, "/images/icon/plausible_logo.png"), style: "height: 2.5rem;", alt: "Plausible logo") %>
</a>
</div>

@ -13,7 +13,7 @@
<body class="flex flex-col h-full bg-gray-100">
<%= render("_svg_icons.html") %>
<div class="text-center w-full my-8">
<a href="/">
<a href="<%= home_dest(@conn) %>">
<%= img_tag(PlausibleWeb.Router.Helpers.static_path(@conn, "/images/icon/plausible_logo.png"), class: "inline", style: "height: 2.5rem;", alt: "Plausible logo") %>
</a>
</div>

@ -1,6 +1,14 @@
defmodule PlausibleWeb.LayoutView do
use PlausibleWeb, :view
def home_dest(conn) do
if conn.assigns[:current_user] do
"/sites"
else
"/"
end
end
def trial_notificaton(user) do
case Plausible.Billing.trial_days_left(user) do
days when days > 1 ->

Loading…
Cancel
Save