As a designer, I want to be able to change the typography of the site. This might involve a primary and a secondary typeface. I want changes I make in one place to be reflected across the whole site, both in static and dynamic pages.
This PR introduces a new model to capture information about website fonts and store typeface files. These font files are then dynamically loaded into the head using style tags.
Also, a new StimulusJS nested_form_controller was added to help manage adding, editing and removing of fonts nested in the Website configuration form page. This was mostly stolen from GoRails with a little addition for grouping checkboxes to ensure only one primary or secondary font is selected at a time.
Right now we are only have one font being used but a secondary one can now be added. Other additional fonts can be added and then potentially used dynamically using tailwind in static pages using arbitrary values.
Changes
creates Website::Font model with has_many association to website
adds ability to upload multiple fonts using nested-form stimulus
controller
adds css styles in heads for including font-face for website fonts and
setting root font variables
adds ability to group checkboxes in nested form so that only one is
selected
Minor
fixes strftime format for schedule dates to skip padding appease
Capybara
Title
Reason for Change
From Miro Card:
This PR introduces a new model to capture information about website fonts and store typeface files. These font files are then dynamically loaded into the head using style tags.
Also, a new StimulusJS
nested_form_controller
was added to help manage adding, editing and removing of fonts nested in the Website configuration form page. This was mostly stolen from GoRails with a little addition for grouping checkboxes to ensure only one primary or secondary font is selected at a time.Right now we are only have one font being used but a secondary one can now be added. Other additional fonts can be added and then potentially used dynamically using tailwind in static pages using arbitrary values.
Changes
Minor
Change the typography of the site