client: improve theming variable consistency

This commit is contained in:
Max Leiter 2022-03-24 15:12:54 -07:00
parent 2823c217ea
commit e5f467b26a
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
5 changed files with 213 additions and 195 deletions

View file

@ -28,6 +28,21 @@ const App = ({
accents_8: 'var(--darkest-gray)', accents_8: 'var(--darkest-gray)',
border: 'var(--light-gray)', border: 'var(--light-gray)',
}, },
expressiveness: {
dropdownBoxShadow: '0 0 0 1px var(--light-gray)',
shadowSmall: '0 0 0 1px var(--light-gray)',
shadowLarge: '0 0 0 1px var(--light-gray)',
shadowMedium: '0 0 0 1px var(--light-gray)',
},
layout: {
gap: 'var(--gap)',
gapHalf: 'var(--gap-half)',
gapQuarter: 'var(--gap-quarter)',
gapNegative: 'var(--gap-negative)',
gapHalfNegative: 'var(--gap-half-negative)',
gapQuarterNegative: 'var(--gap-quarter-negative)',
radius: 'var(--radius)',
},
font: { font: {
mono: 'var(--font-mono)', mono: 'var(--font-mono)',
sans: 'var(--font-sans)', sans: 'var(--font-sans)',

View file

@ -130,7 +130,7 @@ const Post = () => {
}, [title]) }, [title])
return ( return (
<div style={{ marginBottom: 150 }}> <div style={{ paddingBottom: 150 }}>
<Title title={title} onChange={onChangeTitle} /> <Title title={title} onChange={onChangeTitle} />
<FileDropzone setDocs={uploadDocs} /> <FileDropzone setDocs={uploadDocs} />
<EditDocumentList onPaste={onPaste} docs={docs} updateDocTitle={updateDocTitle} updateDocContent={updateDocContent} removeDoc={removeDoc} /> <EditDocumentList onPaste={onPaste} docs={docs} updateDocTitle={updateDocTitle} updateDocContent={updateDocContent} removeDoc={removeDoc} />

View file

@ -8,6 +8,9 @@
--gap-half: 0.5rem; --gap-half: 0.5rem;
--gap: 1rem; --gap: 1rem;
--gap-double: 2rem; --gap-double: 2rem;
--gap-negative: calc(-1 * var(--gap));
--gap-half-negative: calc(-1 * var(--gap-half));
--gap-quarter-negative: calc(-1 * var(--gap-quarter));
--small-gap: 4rem; --small-gap: 4rem;
--big-gap: 4rem; --big-gap: 4rem;
--main-content: 55rem; --main-content: 55rem;

View file

@ -11,7 +11,8 @@ import markdown from "@lib/render-markdown"
export const posts = Router() export const posts = Router()
const postVisibilitySchema = (value: string) => { const postVisibilitySchema = (value: string) => {
if (value === "public" || value === "private") { if (value === "public" || value === "private" ||
value === "unlisted" || value === "protected") {
return value return value
} else { } else {
throw new Error("Invalid post visibility") throw new Error("Invalid post visibility")

View file

@ -2,7 +2,6 @@ import { createServer } from "http"
import { app } from "./app" import { app } from "./app"
import config from "./lib/config" import config from "./lib/config"
import { sequelize } from "./lib/sequelize" import { sequelize } from "./lib/sequelize"
;(async () => { ;(async () => {
await sequelize.sync({}) await sequelize.sync({})
createServer(app).listen(config.port, () => createServer(app).listen(config.port, () =>