Module: Stylesheets
- Defined in:
- lib/supplejack_api/stylesheets.rb
Overview
The majority of the Supplejack API code is Crown copyright © 2014, New Zealand Government, and is licensed under the GNU General Public License, version 3. One component is a third party component. See github.com/DigitalNZ/supplejack_api for details.
Supplejack was created by DigitalNZ at the National Library of NZ and the Department of Internal Affairs. digitalnz.org/supplejack
Class Method Summary collapse
Class Method Details
.all ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/supplejack_api/stylesheets.rb', line 10 def self.all { '1' => 'custom_red.css', '2' => 'custom_blue.css', '3' => 'custom_green.css', '4' => 'custom_brown.css', '5' => 'widget_red.css', '6' => 'widget_blue.css', '9' => 'widget_coming_home.css', '10' => 'custom_coming_home.css', '11' => 'custom_purple.css', '12' => 'custom_grey.css', '13' => 'widget_purple.css', '14' => 'widget_grey.css', '15' => 'widget_yellow.css', '16' => 'widget_transparent.css' } end |
.base_path ⇒ Object
29 30 31 |
# File 'lib/supplejack_api/stylesheets.rb', line 29 def self.base_path [ENV['HTTP_HOST'], 'assets/stylesheets/widgets'].join('/') end |
.url(id) ⇒ Object
33 34 35 |
# File 'lib/supplejack_api/stylesheets.rb', line 33 def self.url(id) [Stylesheets.base_path, Stylesheets.all[id.to_s]].join('/') end |