Skip to content

Commit

Permalink
feat: Support custom CSS for public pages
Browse files Browse the repository at this point in the history
Fixes #162
  • Loading branch information
sman591 committed May 30, 2019
1 parent 92fd2f7 commit 158a996
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
= stylesheet_link_tag "application", media: "all", 'data-turbolinks-track': 'reload'
= javascript_include_tag "application", 'data-turbolinks-track': 'reload'
%link{ href:'//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700', rel: 'stylesheet', type: 'text/css' }
- if HackathonConfig['custom_css'].present?
%style
= HackathonConfig['custom_css']
%body
= render "layouts/header"
Expand Down
1 change: 1 addition & 0 deletions config/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defaults: &defaults
thanks_for_applying_message: ""
thanks_for_rsvp_message: ""
bus_captain_notes: ""
custom_css: ""

development:
<<: *defaults
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ en:
thanks_for_applying_message: Optional message that appears after completing an application. Supports markdown.
thanks_for_rsvp_message: Optional message that appears after RSVP'ing as attending. Supports markdown.
bus_captain_notes: Optional message that appers on the bus captain's bus list page. Supports markdown.
custom_css: CSS to inject into the &lt;head&gt; of every public page
placeholders:
bus_list:
notes: |
Expand Down Expand Up @@ -115,3 +116,4 @@ en:
name: Hackathon Name
email_from: From Email
agreement_pdf_asset: Agreement PDF Asset
custom_css: Custom CSS

0 comments on commit 158a996

Please sign in to comment.