mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Provide an opportunity for including conference-specific CSS
There is currently no top-level selector for views that is conference-specific, so all conferences on one OSEM instance end up sharing all the same CSS. In order to allow individual conferences to have unique CSS, a class for the current conference is applied to the <body> tag, and an scss template provided with an example of conference-specific CSS.
This commit is contained in:
parent
8b12b1662d
commit
1241d21f93
5 changed files with 30 additions and 5 deletions
11
spec/views/layouts/application.haml_spec.rb
Normal file
11
spec/views/layouts/application.haml_spec.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'layouts/application.haml' do
|
||||
let(:conference) { create(:conference) }
|
||||
|
||||
it 'assigns a class to the body identifying the current conference' do
|
||||
assign(:conference, conference)
|
||||
render
|
||||
expect(rendered).to have_selector("body.conference-#{conference.short_title}")
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue