refactor(notes): rename title font to heading font
These fonts apply to markdown headings (h1-h6), so "heading" is more accurate than "title". Renames the chosen*Font field, store action, and the --heading-font-family CSS variable. Keeps backward compatibility: .remanso.json still honors the legacy `t` key (alongside the new `h`), and a saved `chosenTitleFont` in localStorage is migrated on load so existing preferences survive.
This commit is contained in:
@@ -3,7 +3,7 @@ const dotenv = require("dotenv")
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const defaultTitleStyles = Array.from(
|
||||
const defaultHeadingStyles = Array.from(
|
||||
{ length: 6 },
|
||||
(_, k) => `h${k + 1}`
|
||||
).reduce(
|
||||
@@ -12,7 +12,7 @@ const defaultTitleStyles = Array.from(
|
||||
[heading]: {
|
||||
"margin-top": "0",
|
||||
"margin-bottom": "0.5em",
|
||||
"font-family": "var(--title-font-family)"
|
||||
"font-family": "var(--heading-font-family)"
|
||||
}
|
||||
}),
|
||||
{}
|
||||
@@ -27,7 +27,7 @@ module.exports = {
|
||||
typography: () => ({
|
||||
DEFAULT: {
|
||||
css: {
|
||||
...defaultTitleStyles,
|
||||
...defaultHeadingStyles,
|
||||
"font-size": "13pt",
|
||||
"font-family": '"Libertinus Serif", serif',
|
||||
p: {
|
||||
|
||||
Reference in New Issue
Block a user