Added advanced branding
parent
29fa4fe3bd
commit
7bf83d65b9
|
@ -7,7 +7,11 @@ import styles from './EmptyPlaceholder.module.css';
|
||||||
function EmptyPlaceholder({ msg, children }) {
|
function EmptyPlaceholder({ msg, children }) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.placeholder}>
|
<div className={styles.placeholder}>
|
||||||
<Icon className={styles.icon} icon={<Logo />} size="xlarge" />
|
<Icon
|
||||||
|
icon={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || <Logo />}
|
||||||
|
size="xlarge"
|
||||||
|
className={styles.icon}
|
||||||
|
/>
|
||||||
<h2 className={styles.msg}>{msg}</h2>
|
<h2 className={styles.msg}>{msg}</h2>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import Image from 'next/image';
|
||||||
import styles from './Icon.module.css';
|
import styles from './Icon.module.css';
|
||||||
|
|
||||||
function Icon({ icon, className, size = 'medium', ...props }) {
|
function Icon({ icon, className, size = 'medium', ...props }) {
|
||||||
|
@ -15,7 +16,7 @@ function Icon({ icon, className, size = 'medium', ...props }) {
|
||||||
})}
|
})}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{icon}
|
{typeof icon === 'string' ? <Image src={icon} width={20} height={20} /> : icon}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,11 @@ export default function LoginForm() {
|
||||||
{() => (
|
{() => (
|
||||||
<Form>
|
<Form>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<Icon icon={<Logo />} size="xlarge" className={styles.icon} />
|
<Icon
|
||||||
|
icon={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || <Logo />}
|
||||||
|
size="xlarge"
|
||||||
|
className={styles.icon}
|
||||||
|
/>
|
||||||
<h1 className="center">{process.env.NEXT_PUBLIC_CUSTOM_TITLE || 'umami'}</h1>
|
<h1 className="center">{process.env.NEXT_PUBLIC_CUSTOM_TITLE || 'umami'}</h1>
|
||||||
</div>
|
</div>
|
||||||
<FormRow>
|
<FormRow>
|
||||||
|
|
|
@ -26,7 +26,11 @@ export default function Header() {
|
||||||
{allowUpdate && <UpdateNotice />}
|
{allowUpdate && <UpdateNotice />}
|
||||||
<header className={classNames(styles.header, 'row')}>
|
<header className={classNames(styles.header, 'row')}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<Icon icon={<Logo />} size="large" className={styles.logo} />
|
<Icon
|
||||||
|
icon={process.env.NEXT_PUBLIC_CUSTOM_FAVICON_URL || <Logo />}
|
||||||
|
size="large"
|
||||||
|
className={styles.logo}
|
||||||
|
/>
|
||||||
<Link
|
<Link
|
||||||
href={isSharePage ? process.env.NEXT_PUBLIC_CUSTOM_HOMEPAGE_URL || HOMEPAGE_URL : '/'}
|
href={isSharePage ? process.env.NEXT_PUBLIC_CUSTOM_HOMEPAGE_URL || HOMEPAGE_URL : '/'}
|
||||||
>
|
>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
"message.no-data-available": "Keine Daten vorhanden.",
|
"message.no-data-available": "Keine Daten vorhanden.",
|
||||||
"message.no-websites-configured": "Es ist keine Webseite vorhanden.",
|
"message.no-websites-configured": "Es ist keine Webseite vorhanden.",
|
||||||
"message.page-not-found": "Seite nicht gefunden.",
|
"message.page-not-found": "Seite nicht gefunden.",
|
||||||
"message.powered-by": "Betrieben durch {name}",
|
"message.powered-by": "Powered by {name}",
|
||||||
"message.reset-warning": "Alle Daten für diese Webseite werden gelöscht, jedoch bleibt der Tracking Code bestehen.",
|
"message.reset-warning": "Alle Daten für diese Webseite werden gelöscht, jedoch bleibt der Tracking Code bestehen.",
|
||||||
"message.save-success": "Erfolgreich gespeichert.",
|
"message.save-success": "Erfolgreich gespeichert.",
|
||||||
"message.share-url": "Dies ist die öffentliche URL zum Teilen für {target}.",
|
"message.share-url": "Dies ist die öffentliche URL zum Teilen für {target}.",
|
||||||
|
|
|
@ -3,7 +3,7 @@ const pkg = require('./package.json');
|
||||||
|
|
||||||
const contentSecurityPolicy = `
|
const contentSecurityPolicy = `
|
||||||
default-src 'self';
|
default-src 'self';
|
||||||
img-src *;
|
img-src * 'self' data:;
|
||||||
script-src 'self' 'unsafe-eval';
|
script-src 'self' 'unsafe-eval';
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
connect-src 'self' api.umami.is;
|
connect-src 'self' api.umami.is;
|
||||||
|
@ -52,6 +52,10 @@ module.exports = {
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
images: {
|
||||||
|
dangerouslyAllowSVG: true,
|
||||||
|
domains: [new URL(process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL).hostname],
|
||||||
|
},
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,12 +27,33 @@ export default function App({ Component, pageProps }) {
|
||||||
return (
|
return (
|
||||||
<Intl>
|
<Intl>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel="icon" href={`${basePath}/favicon.ico`} />
|
<link
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href={`${basePath}/apple-touch-icon.png`} />
|
rel="icon"
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href={`${basePath}/favicon-32x32.png`} />
|
href={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || `${basePath}/favicon.ico`}
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href={`${basePath}/favicon-16x16.png`} />
|
/>
|
||||||
|
<link
|
||||||
|
rel="apple-touch-icon"
|
||||||
|
sizes="180x180"
|
||||||
|
href={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || `${basePath}/apple-touch-icon.png`}
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="icon"
|
||||||
|
type="image/png"
|
||||||
|
sizes="32x32"
|
||||||
|
href={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || `${basePath}/favicon-32x32.png`}
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="icon"
|
||||||
|
type="image/png"
|
||||||
|
sizes="16x16"
|
||||||
|
href={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || `${basePath}/favicon-16x16.png`}
|
||||||
|
/>
|
||||||
<link rel="manifest" href={`${basePath}/site.webmanifest`} />
|
<link rel="manifest" href={`${basePath}/site.webmanifest`} />
|
||||||
<link rel="mask-icon" href={`${basePath}/safari-pinned-tab.svg`} color="#5bbad5" />
|
<link
|
||||||
|
rel="mask-icon"
|
||||||
|
href={process.env.NEXT_PUBLIC_CUSTOM_LOGO_URL || `${basePath}/safari-pinned-tab.svg`}
|
||||||
|
color="#5bbad5"
|
||||||
|
/>
|
||||||
<meta name="msapplication-TileColor" content="#da532c" />
|
<meta name="msapplication-TileColor" content="#da532c" />
|
||||||
<meta name="theme-color" content="#fafafa" media="(prefers-color-scheme: light)" />
|
<meta name="theme-color" content="#fafafa" media="(prefers-color-scheme: light)" />
|
||||||
<meta name="theme-color" content="#2f2f2f" media="(prefers-color-scheme: dark)" />
|
<meta name="theme-color" content="#2f2f2f" media="(prefers-color-scheme: dark)" />
|
||||||
|
|
|
@ -582,7 +582,7 @@
|
||||||
"message.powered-by": [
|
"message.powered-by": [
|
||||||
{
|
{
|
||||||
"type": 0,
|
"type": 0,
|
||||||
"value": "Betrieben durch "
|
"value": "Powered by "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": 1,
|
"type": 1,
|
||||||
|
|
Loading…
Reference in New Issue