2026-09-09 06:46:27 +03:30
|
|
|
// Ported from legacy henza_pwa/themeConfig/themeConfig.ts — styling values only.
|
|
|
|
|
// (legacy also defined baseURL/coreURL for its own Laravel API here; those are
|
|
|
|
|
// out of scope for a presentation-only port and superseded by this app's own
|
|
|
|
|
// src/api/client.ts, which already talks to the new NestJS API.)
|
|
|
|
|
import data from './colors.json'
|
2026-10-04 16:18:56 +03:30
|
|
|
import { themeLessVarOverrides } from './appearance'
|
2026-09-09 06:46:27 +03:30
|
|
|
|
|
|
|
|
const colors = data
|
|
|
|
|
const curve = {
|
|
|
|
|
none: 0,
|
|
|
|
|
xs: 2,
|
|
|
|
|
sm: 4,
|
|
|
|
|
font: 14,
|
|
|
|
|
px: 'px',
|
|
|
|
|
}
|
|
|
|
|
const vars = {
|
2026-10-17 13:11:42 +03:30
|
|
|
prefix: 'tehrantaj',
|
2026-09-09 06:46:27 +03:30
|
|
|
// headers
|
|
|
|
|
'font-size': curve.font + curve.px,
|
|
|
|
|
'h1-font-size': curve.font * 2 + curve.px,
|
|
|
|
|
'h2-font-size': curve.font * 1.74 + curve.px,
|
|
|
|
|
'h3-font-size': curve.font * 1.51 + curve.px,
|
|
|
|
|
'h4-font-size': curve.font * 1.32 + curve.px,
|
|
|
|
|
'h5-font-size': curve.font * 1.2 + curve.px,
|
|
|
|
|
'h6-font-size': curve.font * 1.1 + curve.px,
|
|
|
|
|
// headers
|
|
|
|
|
//ant
|
|
|
|
|
'primary-color': colors.secondary,
|
|
|
|
|
'link-color': colors.primary,
|
|
|
|
|
'heading-color': colors.primary,
|
|
|
|
|
'error-color': colors.danger,
|
|
|
|
|
'border-radius-base': 5 + curve.px,
|
|
|
|
|
'input-padding-horizontal-base': 10 + curve.px,
|
|
|
|
|
'input-padding-vertical-base': 10 + curve.px,
|
|
|
|
|
'height-lg': '42px',
|
|
|
|
|
'height-base': '32px',
|
|
|
|
|
'checkbox-size': '20px',
|
|
|
|
|
'checkbox-border-radius': '3px',
|
|
|
|
|
//ant
|
|
|
|
|
|
|
|
|
|
'transition-duration': '.5s',
|
|
|
|
|
'transition-delay': '.5s',
|
|
|
|
|
}
|
2026-10-04 16:18:56 +03:30
|
|
|
// Theme tokens (see appearance.ts) are overridden last, so @canvas, @ink, …
|
|
|
|
|
// compile to var(--c-…) and switch with the theme at runtime. The antd keys
|
|
|
|
|
// above were already resolved to hex from `colors`, so antd still gets real
|
|
|
|
|
// colours for its colour functions; only its surface backgrounds follow the
|
|
|
|
|
// theme.
|
|
|
|
|
export const $themeLessVars = Object.assign(vars, colors, themeLessVarOverrides, {
|
|
|
|
|
'component-background': 'var(--c-canvas)',
|
|
|
|
|
'body-background': 'var(--c-page)',
|
|
|
|
|
'popover-background': 'var(--c-canvas)',
|
|
|
|
|
})
|