rubycentral / cfp-app

Rails app for managing a conference CFP
MIT License
224 stars 155 forks source link

Change the typography of the site #283

Closed jonsgreen closed 2 years ago

jonsgreen commented 2 years ago

Title

Reason for Change

From Miro Card:

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

Minor

Change the typography of the site