logo theme
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 397 KiB After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
@@ -772,7 +772,7 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|||||||
ref={tenantButtonRef}
|
ref={tenantButtonRef}
|
||||||
>
|
>
|
||||||
<span className="sidebar__title">
|
<span className="sidebar__title">
|
||||||
<LogoIcon className="sidebar__logo" />
|
<LogoIcon className="sidebar__logo" variant="small" />
|
||||||
<span className="sidebar__title-text">Papercrate</span>
|
<span className="sidebar__title-text">Papercrate</span>
|
||||||
{tenantName ? <span className="sidebar__tenant"> / {tenantName}</span> : null}
|
{tenantName ? <span className="sidebar__tenant"> / {tenantName}</span> : null}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ const SIDEBAR_COLLAPSE_STORAGE_KEY = 'papercrate_sidebar_collapsed';
|
|||||||
const SidebarContext = createContext<SidebarContextValue | null>(null);
|
const SidebarContext = createContext<SidebarContextValue | null>(null);
|
||||||
|
|
||||||
const THEME_STORAGE_KEY = 'papercrate_theme_settings';
|
const THEME_STORAGE_KEY = 'papercrate_theme_settings';
|
||||||
const DEFAULT_NEUTRAL_HUE = 35;
|
const DEFAULT_NEUTRAL_HUE = 29;
|
||||||
const DEFAULT_NEUTRAL_CHROMA = 0.5;
|
const DEFAULT_NEUTRAL_CHROMA = 0.44;
|
||||||
const DEFAULT_NEUTRAL_CONTRAST = 0.5;
|
const DEFAULT_NEUTRAL_CONTRAST = 0.56;
|
||||||
const DEFAULT_THEME_MODE = 'system';
|
const DEFAULT_THEME_MODE = 'system';
|
||||||
const THEME_MODES = ['system', 'light', 'dark'];
|
const THEME_MODES = ['system', 'light', 'dark'];
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-screen__brand img {
|
.login-screen__brand img {
|
||||||
width: 5.5rem;
|
width: 11rem;
|
||||||
height: 5.5rem;
|
height: 11rem;
|
||||||
border-radius: 1rem;
|
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
:root {
|
:root {
|
||||||
color-scheme: light dark;
|
color-scheme: light dark;
|
||||||
|
|
||||||
--neutral-hue: 35deg;
|
--neutral-hue: 29deg;
|
||||||
--surface-hue-shift: 6deg;
|
--surface-hue-shift: 6deg;
|
||||||
--foreground-hue-offset: 20deg;
|
--foreground-hue-offset: 20deg;
|
||||||
--accent-hue-offset: 0deg;
|
--accent-hue-offset: 0deg;
|
||||||
--dark-hue-offset: 40deg;
|
--dark-hue-offset: 40deg;
|
||||||
--dark-foreground-hue-offset: 20deg;
|
--dark-foreground-hue-offset: 20deg;
|
||||||
--neutral-chroma: 0.5;
|
--neutral-chroma: 0.44;
|
||||||
--neutral-chroma-min: 0.01;
|
--neutral-chroma-min: 0.01;
|
||||||
--neutral-chroma-max: 0.20;
|
--neutral-chroma-max: 0.20;
|
||||||
--neutral-chroma-range: calc(var(--neutral-chroma-max) - var(--neutral-chroma-min));
|
--neutral-chroma-range: calc(var(--neutral-chroma-max) - var(--neutral-chroma-min));
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
var(--neutral-chroma-min)
|
var(--neutral-chroma-min)
|
||||||
+ clamp(0, var(--neutral-chroma), 1) * var(--neutral-chroma-range)
|
+ clamp(0, var(--neutral-chroma), 1) * var(--neutral-chroma-range)
|
||||||
);
|
);
|
||||||
--neutral-contrast: 0.5;
|
--neutral-contrast: 0.56;
|
||||||
--neutral-contrast-amount: calc(0.85 + var(--neutral-contrast) * 0.55);
|
--neutral-contrast-amount: calc(0.85 + var(--neutral-contrast) * 0.55);
|
||||||
--neutral-contrast-baseline: 1.125;
|
--neutral-contrast-baseline: 1.125;
|
||||||
--neutral-contrast-delta: calc(var(--neutral-contrast-amount) - var(--neutral-contrast-baseline));
|
--neutral-contrast-delta: calc(var(--neutral-contrast-amount) - var(--neutral-contrast-baseline));
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import {
|
|||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import FolderSvg from '../assets/folder.svg';
|
import FolderSvg from '../assets/folder.svg';
|
||||||
const logoWebp = new URL('../assets/logo.webp', import.meta.url).toString();
|
const logoWebp = new URL('../assets/logo.webp', import.meta.url).toString();
|
||||||
|
const logoSmallWebp = new URL('../assets/logo_small.webp', import.meta.url).toString();
|
||||||
import composeClassName from './classNames';
|
import composeClassName from './classNames';
|
||||||
|
|
||||||
type TablerIconComponent = (props: TablerIconProps) => JSX.Element;
|
type TablerIconComponent = (props: TablerIconProps) => JSX.Element;
|
||||||
@@ -101,9 +102,18 @@ export const FolderIcon: TablerIconComponent = ({ className, size = 16, title, .
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LogoIcon: React.FC<{ className?: string; width?: number; height?: number }> = ({ className, width = 24, height = 24 }) => (
|
interface LogoIconProps {
|
||||||
|
className?: string;
|
||||||
|
width?: number;
|
||||||
|
height?: number;
|
||||||
|
variant?: 'default' | 'small';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const LogoIcon: React.FC<LogoIconProps> = ({ className, width = 24, height = 24, variant = 'default' }) => {
|
||||||
|
const src = variant === 'small' ? logoSmallWebp : logoWebp;
|
||||||
|
return (
|
||||||
<img
|
<img
|
||||||
src={logoWebp}
|
src={src}
|
||||||
className={composeClassName('logo-icon', className)}
|
className={composeClassName('logo-icon', className)}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
@@ -111,7 +121,8 @@ export const LogoIcon: React.FC<{ className?: string; width?: number; height?: n
|
|||||||
loading="lazy"
|
loading="lazy"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export const TagIcon: TablerIconComponent = ({ className, size = '1em', stroke = 0, ...rest }) => (
|
export const TagIcon: TablerIconComponent = ({ className, size = '1em', stroke = 0, ...rest }) => (
|
||||||
<IconTagFilled
|
<IconTagFilled
|
||||||
|
|||||||
Reference in New Issue
Block a user