Branding stuff (#3816)
* Replace footer text * add COPYING.txt file * Add new logos * Use new logos in all layouts * New logos * Check license key on startup * Bypass license check when Mix.env == :dev * Use new logos with smaller wordmarks * Add generic logo_path/1 function * Use new favicons everywhere * Bypass license check in test env * Use sha256 for license key hash * Mix.env -> config_env() * Use Mix.evn at compile time rather than runtime * Mix format --------- Co-authored-by: Uku Taht <uku.taht@gmail.com>pull/3821/head
@ -0,0 +1,5 @@
|
||||
Plausible copyright notice
|
||||
|
||||
This software is Copyright 2024 Plausible Insights OÜ
|
||||
|
||||
This repository is provided for informational purposes only, and no rights to use, distribute or otherwise exploit this software are granted to you. Our other repositories include software that is offered under the Affero GPL, but this repository is not. If you wish to discuss a license, or our hosted service that uses the software, please contact us at hello@plausible.io
|
||||
@ -0,0 +1,5 @@
|
||||
Plausible copyright notice
|
||||
|
||||
This software is Copyright 2024 Plausible Insights OÜ
|
||||
|
||||
This repository is provided for informational purposes only, and no rights to use, distribute or otherwise exploit this software are granted to you. Our other repositories include software that is offered under the Affero GPL, but this repository is not. If you wish to discuss a license, or our hosted service that uses the software, please contact us at hello@plausible.io
|
||||
@ -0,0 +1,42 @@
|
||||
defmodule Plausible.License do
|
||||
@moduledoc """
|
||||
This module ensures that you cannot run Plausible Analytics Enterprise Edition without a valid license key.
|
||||
The software contained within the ee/ and assets/js/dashboard/ee directories are Copyright © Plausible Insights OÜ.
|
||||
We have made this code available solely for informational and transparency purposes. No rights are granted to use,
|
||||
distribute, or exploit this software in any form.
|
||||
|
||||
Any attempt to disable or modify the behavior of this module will be considered a violation of copyright.
|
||||
If you wish to use the Plausible Analytics Enterprise Edition for your own requirements, please contact us
|
||||
at hello@plausible.io to discuss obtaining a license.
|
||||
"""
|
||||
|
||||
require Logger
|
||||
|
||||
if Mix.env() == :prod do
|
||||
def ensure_valid_license do
|
||||
if has_valid_license?() do
|
||||
:ok
|
||||
else
|
||||
Logger.error(
|
||||
"Invalid or no license key provided for Plausible Enterprise Edition. Please contact hello@plausible.io to acquire a license."
|
||||
)
|
||||
|
||||
Logger.error("Shutting down")
|
||||
System.stop()
|
||||
end
|
||||
end
|
||||
|
||||
@license_hash "4qidue2klxynf4vrprlxuouwjos7dnyn4nsquamkrfhtn3ts6ova===="
|
||||
defp has_valid_license?() do
|
||||
hash =
|
||||
:crypto.hash(:sha256, Application.fetch_env!(:plausible, :license_key))
|
||||
|> Base.encode32(case: :lower)
|
||||
|
||||
hash == @license_hash
|
||||
end
|
||||
else
|
||||
def ensure_valid_license do
|
||||
:ok
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="h-full">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%= PlausibleWeb.Router.Helpers.static_path(PlausibleWeb.Endpoint, "/images/icon/plausible_favicon.png") %>">
|
||||
<title>Plausible · Web analytics</title>
|
||||
<link rel="stylesheet" href="<%= Routes.static_path(PlausibleWeb.Endpoint, "/css/app.css") %>"/>
|
||||
</head>
|
||||
<body class="flex flex-col h-full bg-gray-100 dark:bg-gray-900">
|
||||
<div class="w-full my-8 text-center">
|
||||
<%= img_tag(PlausibleWeb.Router.Helpers.static_path(PlausibleWeb.Endpoint, "/images/icon/plausible_logo_dark.png"), class: "hidden dark:inline", style: "height: 2.5rem;", alt: "Plausible logo") %>
|
||||
<%= img_tag(PlausibleWeb.Router.Helpers.static_path(PlausibleWeb.Endpoint, "/images/icon/plausible_logo.png"), class: "inline dark:hidden", style: "height: 2.5rem;", alt: "Plausible logo")%>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
|
||||
<script type="text/javascript" src="<%= Routes.static_path(PlausibleWeb.Endpoint, "/js/app.js") %>"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="h-full">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<PlausibleWeb.Components.Layout.favicon conn={@conn} />
|
||||
<title>Plausible · Web analytics</title>
|
||||
<link rel="stylesheet" href={Routes.static_path(PlausibleWeb.Endpoint, "/css/app.css")} />
|
||||
</head>
|
||||
<body class="flex flex-col h-full bg-gray-100 dark:bg-gray-900">
|
||||
<div class="w-full my-8 text-center">
|
||||
<a href={home_dest(@conn)}>
|
||||
<%= img_tag(
|
||||
PlausibleWeb.Router.Helpers.static_path(
|
||||
@conn,
|
||||
logo_path("logo_dark.svg")
|
||||
),
|
||||
class: "w-44 hidden dark:inline",
|
||||
alt: "Plausible logo",
|
||||
loading: "lazy"
|
||||
) %>
|
||||
<%= img_tag(
|
||||
PlausibleWeb.Router.Helpers.static_path(
|
||||
@conn,
|
||||
logo_path("logo_light.svg")
|
||||
),
|
||||
class: "w-44 inline dark:hidden",
|
||||
alt: "Plausible logo",
|
||||
loading: "lazy"
|
||||
) %>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
|
||||
<script type="text/javascript" src={Routes.static_path(PlausibleWeb.Endpoint, "/js/app.js")}>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |