clean up and fix repo

This commit is contained in:
Chris Smith
2024-11-07 10:39:10 +01:00
parent c48b91c28b
commit 3dedb00370
46 changed files with 320 additions and 758 deletions

View File

@@ -6,7 +6,7 @@ const theme = JSON.parse(themeRead);
let font_base = Number(theme.fonts.font_size.base.replace("px", ""));
let font_scale = Number(theme.fonts.font_size.scale);
let h6 = font_base / font_base;
let h6 = font_scale;
let h5 = h6 * font_scale;
let h4 = h5 * font_scale;
let h3 = h4 * font_scale;
@@ -16,13 +16,13 @@ let fontPrimary, fontPrimaryType, fontSecondary, fontSecondaryType;
if (theme.fonts.font_family.primary) {
fontPrimary = theme.fonts.font_family.primary
.replace(/\+/g, " ")
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
fontPrimaryType = theme.fonts.font_family.primary_type;
}
if (theme.fonts.font_family.secondary) {
fontSecondary = theme.fonts.font_family.secondary
.replace(/\+/g, " ")
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
fontSecondaryType = theme.fonts.font_family.secondary_type;
}
@@ -68,12 +68,13 @@ module.exports = {
},
fontSize: {
base: font_base + "px",
"base-sm": font_base * 0.8 + "px",
h1: h1 + "rem",
"h1-sm": h1 * 0.8 + "rem",
"h1-sm": h1 * 0.9 + "rem",
h2: h2 + "rem",
"h2-sm": h2 * 0.8 + "rem",
"h2-sm": h2 * 0.9 + "rem",
h3: h3 + "rem",
"h3-sm": h3 * 0.8 + "rem",
"h3-sm": h3 * 0.9 + "rem",
h4: h4 + "rem",
h5: h5 + "rem",
h6: h6 + "rem",