toastnz / theme-fonts
Silverstripe theme fonts module
Installs: 2 485
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: >=8.1
- composer/installers: *
- silverstripe/framework: ^4 || ^5
- symbiote/silverstripe-gridfieldextensions: ^3.1 || ^4
- undefinedoffset/sortablegridfield: ^2.0.4
This package is auto-updated.
Last update: 2024-11-03 20:04:22 UTC
README
Installation
The easiest way is to use composer:
composer require toastnz/theme-fonts
Run dev/build
afterwards.
Configuration
Add the following to your config.yml
(optional) to generate default fonts on dev/build
Fonts with a value will be locked and not editable in the CMS
Fonts with null value will be editable in the CMS
Toast\ThemeFonts\Models: default_fonts: - body: null - headings: null - comic-sans: 'comic-sans'
Usage
Colour functions
getFontFamilyClassName()
returns f-
+ getFontCustomID()
so the css class is unique. f-
is there to represent font
and to ensure the class does not start with a number.