refactor(templates): move some css styles to avoid duplication
This commit is contained in:
parent
495e5e2e7e
commit
92b8ece1c3
|
@ -12,7 +12,14 @@ import {
|
||||||
import { Signature } from './components/Signature.tsx'
|
import { Signature } from './components/Signature.tsx'
|
||||||
import type { Template } from '../types.ts'
|
import type { Template } from '../types.ts'
|
||||||
import type { JSX } from 'preact'
|
import type { JSX } from 'preact'
|
||||||
import { bodyCss, messageCss, rootCss, textCss } from './styles/base.tsx'
|
import {
|
||||||
|
bodyCss,
|
||||||
|
buttonCss,
|
||||||
|
headingCss,
|
||||||
|
messageCss,
|
||||||
|
rootCss,
|
||||||
|
textCss,
|
||||||
|
} from './styles/base.tsx'
|
||||||
import { BaseStyle } from './styles/base.tsx'
|
import { BaseStyle } from './styles/base.tsx'
|
||||||
|
|
||||||
function Welcome(
|
function Welcome(
|
||||||
|
@ -104,14 +111,6 @@ function Welcome(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const headingCss: JSX.CSSProperties = {
|
|
||||||
fontFamily: 'Garamond, serif',
|
|
||||||
color: rootCss.accentColor,
|
|
||||||
textAlign: 'center',
|
|
||||||
margin: '-1rem 0 3rem',
|
|
||||||
fontSize: '2.5rem',
|
|
||||||
}
|
|
||||||
|
|
||||||
const preCss: JSX.CSSProperties = {
|
const preCss: JSX.CSSProperties = {
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'monospace',
|
||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
|
@ -120,14 +119,6 @@ const preCss: JSX.CSSProperties = {
|
||||||
backgroundColor: rootCss.backgroundColor,
|
backgroundColor: rootCss.backgroundColor,
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonCss: JSX.CSSProperties = {
|
|
||||||
color: 'white',
|
|
||||||
padding: '1rem',
|
|
||||||
borderRadius: '0.4rem',
|
|
||||||
fontSize: '1.2rem',
|
|
||||||
backgroundColor: rootCss.accentColor,
|
|
||||||
}
|
|
||||||
|
|
||||||
const imgCss: JSX.CSSProperties = {
|
const imgCss: JSX.CSSProperties = {
|
||||||
display: 'inline',
|
display: 'inline',
|
||||||
padding: '1rem',
|
padding: '1rem',
|
||||||
|
|
|
@ -19,10 +19,26 @@ export const messageCss: JSX.CSSProperties = {
|
||||||
textWrap: 'balance',
|
textWrap: 'balance',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const headingCss: JSX.CSSProperties = {
|
||||||
|
fontFamily: 'Garamond, serif',
|
||||||
|
color: rootCss.accentColor,
|
||||||
|
textAlign: 'center',
|
||||||
|
margin: '-1rem 0 3rem',
|
||||||
|
fontSize: '2.5rem',
|
||||||
|
}
|
||||||
|
|
||||||
export const textCss: JSX.CSSProperties = {
|
export const textCss: JSX.CSSProperties = {
|
||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const buttonCss: JSX.CSSProperties = {
|
||||||
|
color: 'white',
|
||||||
|
padding: '1rem',
|
||||||
|
borderRadius: '0.4rem',
|
||||||
|
fontSize: '1.2rem',
|
||||||
|
backgroundColor: rootCss.accentColor,
|
||||||
|
}
|
||||||
|
|
||||||
export const rawCss = `
|
export const rawCss = `
|
||||||
a {
|
a {
|
||||||
color: ${rootCss.accentColor};
|
color: ${rootCss.accentColor};
|
||||||
|
|
Loading…
Reference in a new issue