Update templates relying on app env

pull/3559/head
Adam Rutkowski 3 years ago
parent aedd1ecf33
commit 97d87acb4d

@ -1,4 +1,4 @@
<%= if !Application.get_env(:plausible, :is_selfhost) do %>
<%= if full_build?() do %>
<div class="max-w-2xl px-8 pt-4 pb-8 mx-auto mt-24 bg-white border-t-2 border-orange-200 rounded rounded-t-none shadow-md dark:bg-gray-800 dark:border-orange-200 ">
<div class="flex flex-wrap justify-between">
<h2 class="text-xl font-black dark:text-gray-100 w-max mr-4 mt-2">Subscription Plan</h2>

@ -0,0 +1,308 @@
<div class="mt-24 bg-gray-800 dark:bg-gray-800">
<div class="container px-4 py-12 sm:px-6 lg:py-16 lg:px-8">
<div class="xl:grid xl:grid-cols-3 xl:gap-8">
<div class="my-8 xl:my-0">
<h4 class="font-semibold tracking-wider text-gray-300 leading-5">
<img src="/images/icon/plausible_logo_sm.png" class="inline-block w-6 mr-1" />
Plausible Analytics
</h4>
<p class="mt-4 text-base text-gray-400 leading-6">
<%= if full_build?() do %>
Made and hosted in the EU <span class="text-lg">🇪🇺</span> <br />
<% end %>
Solely funded by our subscribers.<br />
</p>
<%= if not full_build?() do %>
<div class="mt-4">
<a
href="https://github.com/sponsors/plausible"
class="inline-flex items-center px-4 py-2 text-sm font-medium bg-gray-700 border border-transparent shadow-sm rounded-md text-gray-50 hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-500"
>
<svg
class="w-5 h-5 mr-2 -ml-1 text-pink-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
>
</path>
</svg>
Sponsor @plausible
</a>
</div>
<% end %>
</div>
<div class="grid grid-cols-2 gap-8 xl:col-span-2">
<div class="md:grid md:grid-cols-2 md:gap-8">
<div>
<h4 class="text-sm font-semibold tracking-wider text-gray-400 uppercase leading-5">
Why Plausible?
</h4>
<ul class="mt-4">
<li>
<a
rel="noreferrer"
href="https://plausible.io/simple-web-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
Simple metrics
</a>
</li>
<li class="mt-4">
<a
rel="noferrer"
href="https://plausible.io/lightweight-web-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
Lightweight script
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/privacy-focused-web-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
Privacy focused
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/open-source-website-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
Open source
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/for-bloggers-creators"
class="text-base leading-6 text-gray-300 hover:text-white"
>
For creators
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/for-freelancers-agencies"
class="text-base leading-6 text-gray-300 hover:text-white"
>
For agencies
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/for-ecommerce-saas"
class="text-base leading-6 text-gray-300 hover:text-white"
>
For ecommerce
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/white-label-web-analytics"
class="text-base leading-6 text-gray-300 hover:text-white"
>
White label
</a>
</li>
</ul>
</div>
<div class="mt-32 md:mt-0">
<h4 class="text-sm font-semibold tracking-wider text-gray-400 uppercase leading-5">
Comparisons
</h4>
<ul class="mt-4">
<li>
<a
rel="noferrer"
href="https://plausible.io/vs-google-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
vs Google Analytics
</a>
</li>
<li class="mt-4">
<a
rel="noferrer"
href="https://plausible.io/vs-matomo"
class="text-base text-gray-300 leading-6 hover:text-white"
>
vs Matomo
</a>
</li>
<li class="mt-4">
<a
rel="noferrer"
href="https://plausible.io/vs-cloudflare-web-analytics"
class="text-base text-gray-300 leading-6 hover:text-white"
>
vs Cloudflare
</a>
</li>
</ul>
</div>
</div>
<div class="md:grid md:grid-cols-2 md:gap-8">
<div>
<h4 class="text-sm leading-5 font-semibold tracking-wider text-gray-400 uppercase">
Community
</h4>
<ul class="mt-4">
<li>
<a
rel="noreferrer"
href="https://plausible.io/blog"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Blog
</a>
</li>
<li class="mt-4">
<a
ref="noreferrer"
target="_blank"
href="https://plausible.io/status"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Status
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/docs"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Documentation
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
target="_blank"
href="https://github.com/plausible/analytics"
class="text-base leading-6 text-gray-300 hover:text-white"
>
GitHub
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
target="_blank"
href="https://twitter.com/plausiblehq"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Twitter
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
target="_blank"
rel="me"
href="https://fosstodon.org/@plausible"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Mastodon
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
target="_blank"
href="https://www.linkedin.com/company/plausible-analytics/"
class="text-base leading-6 text-gray-300 hover:text-white"
>
LinkedIn
</a>
</li>
</ul>
</div>
<div class="mt-12 md:mt-0">
<h4 class="text-sm leading-5 font-semibold tracking-wider text-gray-400 uppercase">
Company
</h4>
<ul class="mt-4">
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/about"
class="text-base leading-6 text-gray-300 hover:text-white"
>
About
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/contact"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Contact
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/privacy"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Privacy
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/data-policy"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Data policy
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/terms"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Terms
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/dpa"
class="text-base leading-6 text-gray-300 hover:text-white"
>
DPA
</a>
</li>
<li class="mt-4">
<a
rel="noreferrer"
href="https://plausible.io/imprint"
class="text-base leading-6 text-gray-300 hover:text-white"
>
Imprint
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

@ -24,15 +24,16 @@
<%= cond do %>
<% @conn.assigns[:current_user] -> %>
<ul class="flex items-center w-full sm:w-auto">
<%= if Plausible.Billing.on_trial?(@conn.assigns[:current_user]) && !Application.get_env(:plausible, :is_selfhost) do %>
<li class="hidden mr-6 sm:block">
<%= link(trial_notificaton(@conn.assigns[:current_user]),
to: "/settings",
class:
"text-sm text-yellow-900 dark:text-yellow-900 rounded px-3 py-2 rounded-md bg-yellow-100 dark:bg-yellow-100"
) %>
</li>
<% end %>
<li
:if={Plausible.Billing.on_trial?(@conn.assigns[:current_user])}
class="hidden mr-6 sm:block"
>
<%= link(trial_notificaton(@conn.assigns[:current_user]),
to: "/settings",
class:
"text-sm text-yellow-900 dark:text-yellow-900 rounded px-3 py-2 rounded-md bg-yellow-100 dark:bg-yellow-100"
) %>
</li>
<li class="w-full sm:w-auto">
<.dropdown>
<:button class="flex items-center gap-3 px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800">
@ -57,17 +58,17 @@
<.dropdown_link new_tab href="https://plausible.io/docs">
Help Center
</.dropdown_link>
<%= if Application.get_env(:plausible, :is_selfhost) do %>
<.dropdown_link new_tab href="https://github.com/plausible/analytics">
Github Repo
</.dropdown_link>
<% else %>
<%= if full_build?() do %>
<.dropdown_link new_tab href="https://plausible.io/contact">
Contact Support
</.dropdown_link>
<.dropdown_link new_tab href={feedback_link(@conn.assigns[:current_user])}>
Feature Requests
</.dropdown_link>
<% else %>
<.dropdown_link new_tab href="https://github.com/plausible/analytics">
Github Repo
</.dropdown_link>
<% end %>
</div>
<div class="py-1.5" role="none">
@ -76,7 +77,7 @@
</:panel>
</.dropdown>
</li>
<%= if @conn.assigns[:current_user] && !Application.get_env(:plausible, :is_selfhost) do %>
<%= if @conn.assigns[:current_user] && full_build?() do %>
<li id="changelog-notification" class="relative py-2"></li>
<% end %>
</ul>

@ -1,4 +1,4 @@
<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %>
<%= if full_build?() && !@conn.assigns[:skip_plausible_tracking] do %>
<script
defer
data-api={dogfood_api_destination()}

Loading…
Cancel
Save