Peter Zimon
cb462dfb21
Add custom fonts to the body class
...
Added `gh-font-body-[font-name]` and `gh-font-heading-[font-name]` classes to the body element to allow theme developers custom font styling.
2024-10-23 09:23:13 +04:00
Peter Zimon
b0b41e0d86
Renamed var to use namespace
2024-10-23 09:23:13 +04:00
Peter Zimon
cd6acffe54
Changed ghost head to output vars
...
- Instead of the initial concept of outputing CSS classes in Ghost head, we will output the variables directly. This results in a much cleaner result and flexibility for theme developers.
2024-10-23 09:23:13 +04:00
Aileen Booker
4d1dcea641
Updated e2e snapshots to include custom fonts feature flag
2024-10-23 09:23:13 +04:00
Aileen Booker
d29bd1ae09
Fixed failing unit test for ghost_head
...
- with a98de84753bfe1d645d9c8d36205327caa0d5e59 we changed some CSS injection
- we are doing snapshot tests for the rendered CSS result in `ghost_head`, but the tests haven't been updated to reflect those changes
2024-10-23 09:23:13 +04:00
Aileen Booker
aeab51e3a6
Fixed linting error
2024-10-23 09:23:13 +04:00
Daniël van der Winden
f64ba51330
Sorted fonts alphabetically
2024-10-23 09:23:13 +04:00
Sanne de Vries
5c52607ada
Updated design settings image
...
REF DES-829
2024-10-23 09:23:13 +04:00
Peter Zimon
123f34b252
Updated spacing in custom theme settings
2024-10-23 09:23:13 +04:00
Sodbileg Gansukh
8b28694c31
Added font-size-adjust option
...
- this allows us to fine-tune the font size for specific fonts
2024-10-23 09:23:13 +04:00
Peter Zimon
a4fde1f44b
Displaying fonts in dropdown
2024-10-23 09:23:13 +04:00
Sanne de Vries
30ca22ae81
Updated label typography
...
No ref
- Changed some labels in design and portal settings to be more consistent
2024-10-23 09:23:13 +04:00
Daniël van der Winden
298a90e175
Updated font weights for IBM Plex Serif
2024-10-23 09:23:13 +04:00
Daniël van der Winden
e3b99a77da
Updated font weights for Inter
2024-10-23 09:23:13 +04:00
Daniël van der Winden
73aceeabeb
Updated font weights for Fira Sans and Poppins
2024-10-23 09:23:13 +04:00
Aileen Booker
2d36fab089
Fixed linting error and removed done todos
2024-10-23 09:23:13 +04:00
Sodbileg Gansukh
50760765db
Updated post content heading selector
2024-10-23 09:23:13 +04:00
Aileen Booker
60a9c00663
Added tests for ghost_head to verify custom fonts CSS output
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
d0afa2d0a1
Put the new custom font settings behind a feature flag
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
bf738e2ea5
Added new BehindFeatureFlag component
...
This can be used to hide UI based on feature flags
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
0b3b59fb1e
Fixed types for custom fonts
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
08b3d872f7
Removed important rule from the injected css
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
4c8d193912
Put custom font css injection behind labs flag
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
7d893aa8f7
Added customFonts
labs flag
2024-10-23 09:23:12 +04:00
Aileen Booker
0c4aaecf73
Fixed broken types and tests for custom-fonts
2024-10-23 09:23:12 +04:00
Sanne de Vries
4fa3589e06
Updated custom font list
2024-10-23 09:23:12 +04:00
Peter Zimon
9c9cffdd10
Updated theme icon in sidebar
2024-10-23 09:23:12 +04:00
Sanne de Vries
a0923a6531
Fixed merge conflict
2024-10-23 09:23:12 +04:00
Aileen Booker
f966e91451
Added unit tests to custom-fonts module
2024-10-23 09:23:12 +04:00
Aileen Booker
e1d0c286aa
Added jsdoc types to ghost_head for custom fonts
2024-10-23 09:23:12 +04:00
Sanne de Vries
7725d78670
Regrouped design setting tabs
...
REF DES-831
- Changed tabs from `Brand`, `Site wide`, `Homepage` and `Post` to `Global` and `Theme settings`.
- Added `Site wide`, `Homepage` and `Post` grouping inside the `Theme settings` tab.
2024-10-23 09:23:12 +04:00
Aileen Booker
4bf7b86ef4
Updated types so we only have to set 'Theme default' in one place
2024-10-23 09:23:12 +04:00
Aileen Booker
57c02bd6b2
Fixed CSS not being injected after save
2024-10-23 09:23:12 +04:00
Aileen Booker
52554ac7ca
Added missing heading fonts to body fonts
2024-10-23 09:23:12 +04:00
Aileen Booker
17a2fbc7e4
Added types and and validations to separate body and heading fonts
2024-10-23 09:23:12 +04:00
Aileen Booker
ecc5b4c475
Ensure to use previewed fonts to inject CSS in ghost_head
instead of settingsCache
2024-10-23 09:23:12 +04:00
Sanne de Vries
e7f57ddbb5
Added active theme info to theme settings
...
REF DES-829
2024-10-23 09:23:12 +04:00
Sanne de Vries
8a32af8ea8
Added image to top-level design settings
...
REF DES-829
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
35cc134523
Refactored generateCustomFontCss() function
...
- the function now accepts an object parameter that contains heading and body properties
- when heading and body fonts are same, they are only imported once
2024-10-23 09:23:12 +04:00
Aileen Booker
6a7b99e212
First pass towards including custom fonts in theme preview
2024-10-23 09:23:12 +04:00
Peter Zimon
41579cea1a
Updated design settings design
2024-10-23 09:23:12 +04:00
Peter Zimon
8b7f40fb70
Added DEFAULT_FONT
2024-10-23 09:23:12 +04:00
Peter Zimon
e09e17f4e6
Updated design settings order
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
103c734aec
Updated heading and body selector
2024-10-23 09:23:12 +04:00
Aileen Booker
bbcab4696c
Properly unset custom font and offer theme defaults as default
2024-10-23 09:23:12 +04:00
Peter Zimon
9e552da8d8
Removed change theme from brand for real
2024-10-23 09:23:12 +04:00
Aileen Booker
09471153ef
First pass on unsetting custom fonts
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
c190ba8d31
Added heading font selector
...
- the importStrings are now objects, so we can introduce default values for things like size, length, and height
- generateCustomFontCss function now accepts addition parameter called element, which has a type of heading | body
2024-10-23 09:23:12 +04:00
Peter Zimon
598c27c7cb
Moved themes out of design settings
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
0a1d5fe4b7
Added missing semicolon
2024-10-23 09:23:12 +04:00