Skip to content

Commit 158a996

Browse files
committed
feat: Support custom CSS for public pages
Fixes #162
1 parent 92fd2f7 commit 158a996

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/views/layouts/application.html.haml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
= stylesheet_link_tag "application", media: "all", 'data-turbolinks-track': 'reload'
1515
= javascript_include_tag "application", 'data-turbolinks-track': 'reload'
1616
%link{ href:'//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700', rel: 'stylesheet', type: 'text/css' }
17+
- if HackathonConfig['custom_css'].present?
18+
%style
19+
= HackathonConfig['custom_css']
1720
1821
%body
1922
= render "layouts/header"

config/app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defaults: &defaults
2222
thanks_for_applying_message: ""
2323
thanks_for_rsvp_message: ""
2424
bus_captain_notes: ""
25+
custom_css: ""
2526

2627
development:
2728
<<: *defaults

config/locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ en:
7575
thanks_for_applying_message: Optional message that appears after completing an application. Supports markdown.
7676
thanks_for_rsvp_message: Optional message that appears after RSVP'ing as attending. Supports markdown.
7777
bus_captain_notes: Optional message that appers on the bus captain's bus list page. Supports markdown.
78+
custom_css: CSS to inject into the &lt;head&gt; of every public page
7879
placeholders:
7980
bus_list:
8081
notes: |
@@ -115,3 +116,4 @@ en:
115116
name: Hackathon Name
116117
email_from: From Email
117118
agreement_pdf_asset: Agreement PDF Asset
119+
custom_css: Custom CSS

0 commit comments

Comments
 (0)