mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Added advanced branding
This commit is contained in:
parent
29fa4fe3bd
commit
7bf83d65b9
8 changed files with 50 additions and 12 deletions
|
|
@ -7,7 +7,11 @@ import styles from './EmptyPlaceholder.module.css';
|
|||
function EmptyPlaceholder({ msg, children }) {
|
||||
return (
|
||||
<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>
|
||||
{children}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import Image from 'next/image';
|
||||
import styles from './Icon.module.css';
|
||||
|
||||
function Icon({ icon, className, size = 'medium', ...props }) {
|
||||
|
|
@ -15,7 +16,7 @@ function Icon({ icon, className, size = 'medium', ...props }) {
|
|||
})}
|
||||
{...props}
|
||||
>
|
||||
{icon}
|
||||
{typeof icon === 'string' ? <Image src={icon} width={20} height={20} /> : icon}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,11 @@ export default function LoginForm() {
|
|||
{() => (
|
||||
<Form>
|
||||
<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>
|
||||
</div>
|
||||
<FormRow>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,11 @@ export default function Header() {
|
|||
{allowUpdate && <UpdateNotice />}
|
||||
<header className={classNames(styles.header, 'row')}>
|
||||
<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
|
||||
href={isSharePage ? process.env.NEXT_PUBLIC_CUSTOM_HOMEPAGE_URL || HOMEPAGE_URL : '/'}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue