bolton-cms-padrino 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +15 -0
  2. data/.components +9 -0
  3. data/.gitignore +15 -0
  4. data/Gemfile +15 -0
  5. data/README.md +185 -0
  6. data/Rakefile +6 -0
  7. data/bolton-cms-padrino.gemspec +38 -0
  8. data/bolton_cms/config/image_sizes.yml +27 -0
  9. data/bolton_cms/config/site.yml +11 -0
  10. data/bolton_cms/config/templates.yml +6 -0
  11. data/bolton_cms/display/app.rb +61 -0
  12. data/bolton_cms/display/assets/stylesheets/base/_colors.scss +26 -0
  13. data/bolton_cms/display/assets/stylesheets/base/_typography.scss +31 -0
  14. data/bolton_cms/display/assets/stylesheets/base/_units.scss +3 -0
  15. data/bolton_cms/display/assets/stylesheets/display.scss +10 -0
  16. data/bolton_cms/display/assets/stylesheets/layout/_layout.scss +169 -0
  17. data/bolton_cms/display/controllers/base.rb +33 -0
  18. data/bolton_cms/display/helpers/helper.rb +67 -0
  19. data/bolton_cms/display/views/errors/403.slim +11 -0
  20. data/bolton_cms/display/views/errors/404.slim +15 -0
  21. data/bolton_cms/display/views/errors/500.slim +13 -0
  22. data/bolton_cms/display/views/layouts/application.slim +52 -0
  23. data/bolton_cms/display/views/templates/default.slim +25 -0
  24. data/bolton_cms/manage/app.rb +87 -0
  25. data/bolton_cms/manage/assets/images/collapsible-collapse.svg +1 -0
  26. data/bolton_cms/manage/assets/images/collapsible-collapse.svg.base64 +1 -0
  27. data/bolton_cms/manage/assets/images/collapsible-collapse.svg.uri +1 -0
  28. data/bolton_cms/manage/assets/images/collapsible-expand.svg +1 -0
  29. data/bolton_cms/manage/assets/images/collapsible-expand.svg.base64 +1 -0
  30. data/bolton_cms/manage/assets/images/collapsible-expand.svg.uri +1 -0
  31. data/bolton_cms/manage/assets/images/delete.svg +1 -0
  32. data/bolton_cms/manage/assets/images/delete.svg.base64 +1 -0
  33. data/bolton_cms/manage/assets/images/delete.svg.uri +1 -0
  34. data/bolton_cms/manage/assets/images/menu.svg +1 -0
  35. data/bolton_cms/manage/assets/images/menu.svg.base64 +1 -0
  36. data/bolton_cms/manage/assets/images/menu.svg.uri +1 -0
  37. data/bolton_cms/manage/assets/images/page-add.svg +1 -0
  38. data/bolton_cms/manage/assets/images/page-add.svg.base64 +1 -0
  39. data/bolton_cms/manage/assets/images/page-add.svg.uri +1 -0
  40. data/bolton_cms/manage/assets/images/user.svg +1 -0
  41. data/bolton_cms/manage/assets/images/user.svg.base64 +1 -0
  42. data/bolton_cms/manage/assets/images/user.svg.uri +1 -0
  43. data/bolton_cms/manage/assets/javascripts/application.js +82 -0
  44. data/bolton_cms/manage/assets/javascripts/enquire.min.js +7 -0
  45. data/bolton_cms/manage/assets/javascripts/jquery.mobile.custom.min.js +3 -0
  46. data/bolton_cms/manage/assets/stylesheets/_mixins.scss +0 -0
  47. data/bolton_cms/manage/assets/stylesheets/_placeholders.scss +13 -0
  48. data/bolton_cms/manage/assets/stylesheets/base/_colors.scss +97 -0
  49. data/bolton_cms/manage/assets/stylesheets/base/_forms.scss +105 -0
  50. data/bolton_cms/manage/assets/stylesheets/base/_icons.scss +35 -0
  51. data/bolton_cms/manage/assets/stylesheets/base/_tables.scss +26 -0
  52. data/bolton_cms/manage/assets/stylesheets/base/_typography.scss +34 -0
  53. data/bolton_cms/manage/assets/stylesheets/base/_units.scss +3 -0
  54. data/bolton_cms/manage/assets/stylesheets/layout/_layout.scss +172 -0
  55. data/bolton_cms/manage/assets/stylesheets/layout/_page_form.scss +100 -0
  56. data/bolton_cms/manage/assets/stylesheets/layout/_session_new.scss +10 -0
  57. data/bolton_cms/manage/assets/stylesheets/manage.scss +17 -0
  58. data/bolton_cms/manage/assets/stylesheets/modules/_collapsible.scss +42 -0
  59. data/bolton_cms/manage/assets/stylesheets/modules/_flash.scss +30 -0
  60. data/bolton_cms/manage/assets/stylesheets/modules/_item.scss +64 -0
  61. data/bolton_cms/manage/assets/stylesheets/modules/_tree.scss +30 -0
  62. data/bolton_cms/manage/controllers/accounts.rb +85 -0
  63. data/bolton_cms/manage/controllers/base.rb +9 -0
  64. data/bolton_cms/manage/controllers/pages.rb +112 -0
  65. data/bolton_cms/manage/controllers/sessions.rb +28 -0
  66. data/bolton_cms/manage/helpers/helper.rb +39 -0
  67. data/bolton_cms/manage/views/accounts/_form.slim +20 -0
  68. data/bolton_cms/manage/views/accounts/confirm_destroy.slim +7 -0
  69. data/bolton_cms/manage/views/accounts/edit.slim +2 -0
  70. data/bolton_cms/manage/views/accounts/index.slim +17 -0
  71. data/bolton_cms/manage/views/accounts/new.slim +2 -0
  72. data/bolton_cms/manage/views/errors/403.slim +11 -0
  73. data/bolton_cms/manage/views/errors/404.slim +15 -0
  74. data/bolton_cms/manage/views/errors/500.slim +13 -0
  75. data/bolton_cms/manage/views/layouts/application.slim +49 -0
  76. data/bolton_cms/manage/views/pages/_asset_form.slim +36 -0
  77. data/bolton_cms/manage/views/pages/_form.slim +65 -0
  78. data/bolton_cms/manage/views/pages/_node.slim +22 -0
  79. data/bolton_cms/manage/views/pages/confirm_destroy.slim +7 -0
  80. data/bolton_cms/manage/views/pages/edit.slim +2 -0
  81. data/bolton_cms/manage/views/pages/index.slim +6 -0
  82. data/bolton_cms/manage/views/pages/new.slim +2 -0
  83. data/bolton_cms/manage/views/sessions/new.slim +24 -0
  84. data/config/apps.rb +37 -0
  85. data/config/boot.rb +51 -0
  86. data/config/database.rb +1 -0
  87. data/config/mongoid.yml +32 -0
  88. data/config.ru +9 -0
  89. data/db/seeds.rb +23 -0
  90. data/gems/bolton-cms-padrino-0.2.6.gem +0 -0
  91. data/lib/bolton-cms-padrino.rb +23 -0
  92. data/lib/bolton_cms/attachment_uploader.rb +55 -0
  93. data/lib/bolton_cms/config.rb +20 -0
  94. data/lib/bolton_cms/models/account.rb +55 -0
  95. data/lib/bolton_cms/models/asset.rb +18 -0
  96. data/lib/bolton_cms/models/fragment.rb +16 -0
  97. data/lib/bolton_cms/models/page.rb +98 -0
  98. data/lib/bolton_cms/userstamp.rb +12 -0
  99. data/lib/bolton_cms/version.rb +3 -0
  100. data/public/favicon.ico +0 -0
  101. data/spec/fixtures/files/test1.jpg +0 -0
  102. data/spec/fixtures/files/test2.jpg +0 -0
  103. data/spec/models/account_spec.rb +38 -0
  104. data/spec/models/asset_spec.rb +36 -0
  105. data/spec/models/fragment_spec.rb +38 -0
  106. data/spec/models/page_spec.rb +191 -0
  107. data/spec/spec.rake +13 -0
  108. data/spec/spec_config.rb +25 -0
  109. metadata +428 -0
@@ -0,0 +1,67 @@
1
+ BoltonCms::Display.helpers do
2
+
3
+ def render_site_sections(sections, page=nil)
4
+ content_tag :nav, render_page_links(sections, page), class: 'site-sections'
5
+ end
6
+
7
+ def render_children(page)
8
+ content_tag :nav, render_page_links(page.children, page), class: 'children'
9
+ end
10
+
11
+ def render_page_links(items, page=nil)
12
+ output = ''
13
+ items.each do |item|
14
+ content = page && page.path == item.path ?
15
+ content_tag(:strong, item.title)
16
+ :
17
+ link_to(item.title, item.position == 0 && !item.parent? ? '/' : item.path)
18
+
19
+ output << content_tag(:li, content)
20
+ end
21
+
22
+ content_tag :ul, output.html_safe
23
+ end
24
+
25
+ def render_breadcrumbs(page)
26
+ title = page.title
27
+
28
+ output = ''
29
+
30
+ while page.has_parent?
31
+ page = page.parent
32
+ output << content_tag(:li, link_to(page.title, page.path))
33
+ end
34
+
35
+ output << content_tag(:li, content_tag(:strong, title))
36
+
37
+ content_tag :nav, content_tag(:ul, output.html_safe), class: 'breadcrumbs'
38
+ end
39
+
40
+ def render_active_fragments(page, wrapper_entity=:section)
41
+ output = ''
42
+
43
+ BoltonCms::TEMPLATES[page.template.to_s]['fragments'].each do |label|
44
+ if fragment = @page.find_fragment(label)
45
+ output << content_tag(
46
+ wrapper_entity,
47
+ content_tag('h1', label) << render_cms_content(fragment.filter, fragment.body),
48
+ class: "fragment-#{fragment.label.to_slug.normalize.to_s}"
49
+ )
50
+ end
51
+ end
52
+
53
+ output.html_safe
54
+ end
55
+
56
+ def render_cms_content(filter, content)
57
+ output = case filter
58
+ when :raw
59
+ content
60
+ else
61
+ BoltonCms::MDR.render(content)
62
+ end
63
+
64
+ output.html_safe
65
+ end
66
+
67
+ end
@@ -0,0 +1,11 @@
1
+ article#error-403
2
+ h1 We're sorry...
3
+
4
+ p
5
+ ' You seem to be attempting to access a document or resource without the required privileges.
6
+ | Please log in using the appropriate credentials and try again.
7
+
8
+ p
9
+ ' If you believe this is in error, please
10
+ = mail_to BoltonCms::SITE['contact']['email'], 'contact us', subject: "[403] Access Denied - #{request.url}"
11
+ | and we will attempt to rectify the problem as soon as possible.
@@ -0,0 +1,15 @@
1
+ article#error-404
2
+ h1 We're sorry...
3
+
4
+ p
5
+ ' The document or resource you've requested can't be found at this address.
6
+ | Please verify that the address in your browser's location field is correct.
7
+
8
+ p
9
+ ' If you continue to see this page, please navigate from the
10
+ = link_to 'home page', url(:base, :index, path: '')
11
+ | to rediscover the location of the document or resource you're looking for.
12
+
13
+ p
14
+ ' Remember to update any bookmarks to this location, as the document or resource
15
+ | may have been permanently moved or removed.
@@ -0,0 +1,13 @@
1
+ article#error-500
2
+ h1 We're sorry...
3
+
4
+ p
5
+ ' The system seems to have encountered an error. Please do not use the 'back' or 'reload' button.
6
+ ' Wait a few moments and then navigate from the
7
+ = link_to 'home page', url(:base, :index, path: '')
8
+ | to try again.
9
+
10
+ p
11
+ ' If the problem persists, please
12
+ = mail_to BoltonCms::SITE['contact']['email'], 'contact us', subject: "[500] Internal Server Error - #{request.url}"
13
+ | and let us know exactly what actions led to this error. We'll examine the problem as soon as possible.
@@ -0,0 +1,52 @@
1
+ doctype 5
2
+ html lang='en'
3
+ head
4
+ meta content='text/html; charset=utf-8' http-equiv='Content-Type'
5
+ meta name='viewport' content='width=device-width,initial-scale=1'
6
+
7
+ title = "#{ (@title || @page.title) } | #{ BoltonCms::SITE['name'] || 'Bolton CMS' }"
8
+
9
+ = stylesheet_link_tag 'display'
10
+
11
+ body
12
+ header#global-header
13
+ h1 = link_to(BoltonCms::SITE['name'] || 'Bolton CMS', url(:base, :index, :path => ''))
14
+
15
+ - if @sections.present?
16
+ = render_site_sections @sections, @page
17
+
18
+ = yield
19
+
20
+ footer#global-footer
21
+ - if @sections.present?
22
+ section.site-links
23
+ h1 Site Links
24
+
25
+ = render_page_links [@home].concat(@sections)
26
+
27
+ - if BoltonCms::SITE['contact'].present?
28
+ section.contact
29
+ h1 Contact
30
+
31
+ address<>
32
+ - if BoltonCms::SITE['contact']['email'].present?
33
+ a.name<> href="mailto:#{BoltonCms::SITE['contact']['email']}"
34
+ = BoltonCms::SITE['contact']['name']
35
+ - else
36
+ span.name<>
37
+ = BoltonCms::SITE['contact']['name']
38
+ - if BoltonCms::SITE['contact']['address'].present?
39
+ span.street<>
40
+ = BoltonCms::SITE['contact']['address']
41
+ span.city-state-zip<>
42
+ span.city<>
43
+ = BoltonCms::SITE['contact']['city']
44
+ span.state<>
45
+ = BoltonCms::SITE['contact']['state']
46
+ span.zip<>
47
+ = BoltonCms::SITE['contact']['zip']
48
+ - if BoltonCms::SITE['contact']['country'].present?
49
+ span.country
50
+ = BoltonCms::SITE['contact']['country']
51
+
52
+ p.copyright Copyright &copy; #{Time.now.year} #{ BoltonCms::SITE['organization'] || 'Bolton CMS' }
@@ -0,0 +1,25 @@
1
+ article
2
+ header
3
+ - if @page.has_parent?
4
+ = render_breadcrumbs @page
5
+
6
+ h1= @page.present? ? @page.title : 'Untitled Page'
7
+
8
+ = render_cms_content @page.filter, @page.body
9
+
10
+ - unless @page.assets.empty?
11
+ section.assets
12
+ h1 Gallery
13
+
14
+ ul.assets-list
15
+ - @page.unused_assets.each do |asset|
16
+ li
17
+ = link_to image_tag(asset.attachment.thumb), asset.attachment
18
+
19
+ = render_active_fragments @page
20
+
21
+ - if @page.has_children?
22
+ section.children
23
+ h1 More on This Topic
24
+
25
+ = render_children @page
@@ -0,0 +1,87 @@
1
+ module BoltonCms
2
+
3
+ class Manage < Padrino::Application
4
+
5
+ register Padrino::Rendering
6
+ register Padrino::Mailer
7
+ register Padrino::Helpers
8
+ register Padrino::Admin::AccessControl
9
+ register Padrino::Sprockets
10
+
11
+ ##
12
+ # Caching support
13
+ #
14
+ # register Padrino::Cache
15
+ # enable :caching
16
+ #
17
+ # You can customize caching store engines:
18
+ #
19
+ # set :cache, Padrino::Cache::Store::Memcache.new(::Memcached.new('127.0.0.1:11211', exception_retry_limit: 1))
20
+ # set :cache, Padrino::Cache::Store::Memcache.new(::Dalli::Client.new('127.0.0.1:11211', exception_retry_limit: 1))
21
+ # set :cache, Padrino::Cache::Store::Redis.new(::Redis.new(host: '127.0.0.1', port: 6379, db: 0))
22
+ # set :cache, Padrino::Cache::Store::Memory.new(50)
23
+ # set :cache, Padrino::Cache::Store::File.new(Padrino.root('tmp', app_name.to_s, 'cache')) # default choice
24
+ #
25
+
26
+ ##
27
+ # Application configuration options
28
+ #
29
+ # set :raise_errors, true # Raise exceptions (will stop application) (default for test)
30
+ # set :dump_errors, true # Exception backtraces are written to STDERR (default for production/development)
31
+ # set :show_exceptions, true # Shows a stack trace in browser (default for development)
32
+ # set :logging, true # Logging in STDOUT for development and file for production (default only for development)
33
+ # set :public_folder, "foo/bar" # Location for static assets (default root/public)
34
+ # set :reload, false # Reload application files (default in development)
35
+ # set :default_builder, "foo" # Set a custom form builder (default 'StandardFormBuilder')
36
+ # set :locale_path, "bar" # Set path for I18n translations (default your_app/locales)
37
+ # disable :sessions # Disabled sessions by default (enable if needed)
38
+ # disable :flash # Disables sinatra-flash (enabled by default if Sinatra::Flash is defined)
39
+ # layout :my_layout # Layout can be in views/layouts/foo.ext or views/foo.ext (default :application)
40
+ #
41
+
42
+ ##
43
+ # You can configure for a specified environment like:
44
+ #
45
+ # configure :development do
46
+ # set :foo, :bar
47
+ # disable :asset_stamp # no asset timestamping for dev
48
+ # end
49
+ #
50
+
51
+ sprockets
52
+
53
+ configure :development, :test do
54
+ Sprockets::Sass.options[:style] = :compact
55
+ Sprockets::Sass.options[:line_comments] = false
56
+ end
57
+
58
+ enable :sessions
59
+ disable :store_location
60
+
61
+ set :admin_model, 'Account'
62
+
63
+ access_control.roles_for :any do |role|
64
+ role.protect '/pages'
65
+ role.protect '/accounts'
66
+ role.allow '/sessions'
67
+ end
68
+
69
+ access_control.roles_for :admin do |role|
70
+ role.project_module :pages, '/pages'
71
+ role.project_module :accounts, '/accounts'
72
+ end
73
+
74
+ access_control.roles_for :editor, :producer do |role|
75
+ role.allow '/accounts/edit'
76
+ role.allow '/accounts/update'
77
+ role.project_module :pages, '/pages'
78
+ end
79
+
80
+ # Custom error management
81
+ error(403) { @title = "Access Denied"; render('errors/403') }
82
+ error(404) { @title = "Document Not Found"; render('errors/404') }
83
+ error(500) { @title = "Internal Server Error"; render('errors/500') }
84
+
85
+ end
86
+
87
+ end
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="16" viewBox="0, 0, 9, 16"><path fill="#FFFFFF" d="M9,13.351 L4.5,8.889 L0,13.351 L0,16 L4.5,11.538 L9,16 L9,13.351 z M9,2.649 L9,0 L4.5,4.462 L0,0 L0,2.649 L4.5,7.11 L9,2.649 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwLCAwLCA5LCAxNiI+PHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTksMTMuMzUxIEw0LjUsOC44ODkgTDAsMTMuMzUxIEwwLDE2IEw0LjUsMTEuNTM4IEw5LDE2IEw5LDEzLjM1MSB6IE05LDIuNjQ5IEw5LDAgTDQuNSw0LjQ2MiBMMCwwIEwwLDIuNjQ5IEw0LjUsNy4xMSBMOSwyLjY0OSB6Ii8+PC9zdmc+Cg==");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%2216%22%20viewBox=%220,%200,%209,%2016%22%3E%3Cpath%20fill=%22%23FFFFFF%22%20d=%22M9,13.351%20L4.5,8.889%20L0,13.351%20L0,16%20L4.5,11.538%20L9,16%20L9,13.351%20z%20M9,2.649%20L9,0%20L4.5,4.462%20L0,0%20L0,2.649%20L4.5,7.11%20L9,2.649%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="9" height="16" viewBox="0, 0, 9, 16"><path fill="#FFFFFF" d="M9,4.452 L4.5,0 L0,4.452 L0,7.095 L4.5,2.643 L9,7.095 L9,4.452 z M9,11.548 L9,8.905 L4.5,13.357 L0,8.905 L0,11.548 L4.5,16 L9,11.548 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwLCAwLCA5LCAxNiI+PHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTksNC40NTIgTDQuNSwwIEwwLDQuNDUyIEwwLDcuMDk1IEw0LjUsMi42NDMgTDksNy4wOTUgTDksNC40NTIgeiBNOSwxMS41NDggTDksOC45MDUgTDQuNSwxMy4zNTcgTDAsOC45MDUgTDAsMTEuNTQ4IEw0LjUsMTYgTDksMTEuNTQ4IHoiLz48L3N2Zz4K");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%2216%22%20viewBox=%220,%200,%209,%2016%22%3E%3Cpath%20fill=%22%23FFFFFF%22%20d=%22M9,4.452%20L4.5,0%20L0,4.452%20L0,7.095%20L4.5,2.643%20L9,7.095%20L9,4.452%20z%20M9,11.548%20L9,8.905%20L4.5,13.357%20L0,8.905%20L0,11.548%20L4.5,16%20L9,11.548%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0, 0, 14, 16"><path fill="#333333" d="M4.992,0 L8.996,0 L9.991,1 L13.005,1 L14,4 L11.05,4 L11.998,5 L14,5 L13.005,16 L0.995,16 L0,5 L1.996,5 L2.469,4 L0,4 L0.995,1 L3.997,1 z M2.997,2 L2.002,3 L11.998,3 L11.003,2 z M6.953,4 L3.518,4 L3.991,5 L6.005,5 z M1.996,7 L2.707,14 L11.293,14 L12.004,7 z M5.502,8 L5.999,13 L3.997,13 L3.5,8 z M8.498,8 L8.001,13 L10.003,13 L10.5,8 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCwgMCwgMTQsIDE2Ij48cGF0aCBmaWxsPSIjMzMzMzMzIiBkPSJNNC45OTIsMCBMOC45OTYsMCBMOS45OTEsMSBMMTMuMDA1LDEgTDE0LDQgTDExLjA1LDQgTDExLjk5OCw1IEwxNCw1IEwxMy4wMDUsMTYgTDAuOTk1LDE2IEwwLDUgTDEuOTk2LDUgTDIuNDY5LDQgTDAsNCBMMC45OTUsMSBMMy45OTcsMSB6IE0yLjk5NywyIEwyLjAwMiwzIEwxMS45OTgsMyBMMTEuMDAzLDIgeiBNNi45NTMsNCBMMy41MTgsNCBMMy45OTEsNSBMNi4wMDUsNSB6IE0xLjk5Niw3IEwyLjcwNywxNCBMMTEuMjkzLDE0IEwxMi4wMDQsNyB6IE01LjUwMiw4IEw1Ljk5OSwxMyBMMy45OTcsMTMgTDMuNSw4IHogTTguNDk4LDggTDguMDAxLDEzIEwxMC4wMDMsMTMgTDEwLjUsOCB6Ii8+PC9zdmc+Cg==");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2214%22%20height=%2216%22%20viewBox=%220,%200,%2014,%2016%22%3E%3Cpath%20fill=%22%23333333%22%20d=%22M4.992,0%20L8.996,0%20L9.991,1%20L13.005,1%20L14,4%20L11.05,4%20L11.998,5%20L14,5%20L13.005,16%20L0.995,16%20L0,5%20L1.996,5%20L2.469,4%20L0,4%20L0.995,1%20L3.997,1%20z%20M2.997,2%20L2.002,3%20L11.998,3%20L11.003,2%20z%20M6.953,4%20L3.518,4%20L3.991,5%20L6.005,5%20z%20M1.996,7%20L2.707,14%20L11.293,14%20L12.004,7%20z%20M5.502,8%20L5.999,13%20L3.997,13%20L3.5,8%20z%20M8.498,8%20L8.001,13%20L10.003,13%20L10.5,8%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="16" viewBox="0, 0, 24, 16"><path fill="#FFFFFF" d="M1.125,2.526 L22.875,2.526 C23.496,2.526 24,1.961 24,1.263 C24,0.565 23.496,0 22.875,0 L1.125,0 C0.504,0 0,0.565 0,1.263 C0,1.961 0.504,2.526 1.125,2.526 z M22.875,6.737 L1.125,6.737 C0.504,6.737 0,7.302 0,8 C0,8.698 0.504,9.263 1.125,9.263 L22.875,9.263 C23.496,9.263 24,8.698 24,8 C24,7.302 23.496,6.737 22.875,6.737 z M22.875,13.474 L1.125,13.474 C0.504,13.474 0,14.039 0,14.737 C0,15.435 0.504,16 1.125,16 L22.875,16 C23.496,16 24,15.435 24,14.737 C24,14.039 23.496,13.474 22.875,13.474 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCwgMCwgMjQsIDE2Ij48cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMS4xMjUsMi41MjYgTDIyLjg3NSwyLjUyNiBDMjMuNDk2LDIuNTI2IDI0LDEuOTYxIDI0LDEuMjYzIEMyNCwwLjU2NSAyMy40OTYsMCAyMi44NzUsMCBMMS4xMjUsMCBDMC41MDQsMCAwLDAuNTY1IDAsMS4yNjMgQzAsMS45NjEgMC41MDQsMi41MjYgMS4xMjUsMi41MjYgeiBNMjIuODc1LDYuNzM3IEwxLjEyNSw2LjczNyBDMC41MDQsNi43MzcgMCw3LjMwMiAwLDggQzAsOC42OTggMC41MDQsOS4yNjMgMS4xMjUsOS4yNjMgTDIyLjg3NSw5LjI2MyBDMjMuNDk2LDkuMjYzIDI0LDguNjk4IDI0LDggQzI0LDcuMzAyIDIzLjQ5Niw2LjczNyAyMi44NzUsNi43MzcgeiBNMjIuODc1LDEzLjQ3NCBMMS4xMjUsMTMuNDc0IEMwLjUwNCwxMy40NzQgMCwxNC4wMzkgMCwxNC43MzcgQzAsMTUuNDM1IDAuNTA0LDE2IDEuMTI1LDE2IEwyMi44NzUsMTYgQzIzLjQ5NiwxNiAyNCwxNS40MzUgMjQsMTQuNzM3IEMyNCwxNC4wMzkgMjMuNDk2LDEzLjQ3NCAyMi44NzUsMTMuNDc0IHoiLz48L3N2Zz4K");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2224%22%20height=%2216%22%20viewBox=%220,%200,%2024,%2016%22%3E%3Cpath%20fill=%22%23FFFFFF%22%20d=%22M1.125,2.526%20L22.875,2.526%20C23.496,2.526%2024,1.961%2024,1.263%20C24,0.565%2023.496,0%2022.875,0%20L1.125,0%20C0.504,0%200,0.565%200,1.263%20C0,1.961%200.504,2.526%201.125,2.526%20z%20M22.875,6.737%20L1.125,6.737%20C0.504,6.737%200,7.302%200,8%20C0,8.698%200.504,9.263%201.125,9.263%20L22.875,9.263%20C23.496,9.263%2024,8.698%2024,8%20C24,7.302%2023.496,6.737%2022.875,6.737%20z%20M22.875,13.474%20L1.125,13.474%20C0.504,13.474%200,14.039%200,14.737%20C0,15.435%200.504,16%201.125,16%20L22.875,16%20C23.496,16%2024,15.435%2024,14.737%20C24,14.039%2023.496,13.474%2022.875,13.474%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="13" height="16" viewBox="0, 0, 13, 16"><path fill="#333333" d="M11,14 L11,16 L13,16 L13,14 z M0,-0 L0,16 L7,16 L7,14 L2,14 L2,2 L7,2 L7,6 L11,6 L11,10 L13,10 L13,5 L8,-0 z M8,8 L8,11 L5,11 L5,13 L8,13 L8,16 L10,16 L10,13 L13,13 L13,11 L10,11 L10,8 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCwgMCwgMTMsIDE2Ij48cGF0aCBmaWxsPSIjMzMzMzMzIiBkPSJNMTEsMTQgTDExLDE2IEwxMywxNiBMMTMsMTQgeiBNMCwtMCBMMCwxNiBMNywxNiBMNywxNCBMMiwxNCBMMiwyIEw3LDIgTDcsNiBMMTEsNiBMMTEsMTAgTDEzLDEwIEwxMyw1IEw4LC0wIHogTTgsOCBMOCwxMSBMNSwxMSBMNSwxMyBMOCwxMyBMOCwxNiBMMTAsMTYgTDEwLDEzIEwxMywxMyBMMTMsMTEgTDEwLDExIEwxMCw4IHoiLz48L3N2Zz4K");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2213%22%20height=%2216%22%20viewBox=%220,%200,%2013,%2016%22%3E%3Cpath%20fill=%22%23333333%22%20d=%22M11,14%20L11,16%20L13,16%20L13,14%20z%20M0,-0%20L0,16%20L7,16%20L7,14%20L2,14%20L2,2%20L7,2%20L7,6%20L11,6%20L11,10%20L13,10%20L13,5%20L8,-0%20z%20M8,8%20L8,11%20L5,11%20L5,13%20L8,13%20L8,16%20L10,16%20L10,13%20L13,13%20L13,11%20L10,11%20L10,8%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0, 0, 30, 30"><path fill="#333344" d="M26.028,22.62 C21.729,21.627 17.727,20.757 19.665,17.097 C25.564,5.958 21.229,0 15,0 C8.648,0 4.42,6.186 10.334,17.097 C12.33,20.78 8.178,21.648 3.972,22.62 C-0.325,23.613 0.006,25.882 0.006,30 L29.994,30 C29.994,25.882 30.324,23.613 26.028,22.62 z"/></svg>
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCwgMCwgMzAsIDMwIj48cGF0aCBmaWxsPSIjMzMzMzQ0IiBkPSJNMjYuMDI4LDIyLjYyIEMyMS43MjksMjEuNjI3IDE3LjcyNywyMC43NTcgMTkuNjY1LDE3LjA5NyBDMjUuNTY0LDUuOTU4IDIxLjIyOSwwIDE1LDAgQzguNjQ4LDAgNC40Miw2LjE4NiAxMC4zMzQsMTcuMDk3IEMxMi4zMywyMC43OCA4LjE3OCwyMS42NDggMy45NzIsMjIuNjIgQy0wLjMyNSwyMy42MTMgMC4wMDYsMjUuODgyIDAuMDA2LDMwIEwyOS45OTQsMzAgQzI5Ljk5NCwyNS44ODIgMzAuMzI0LDIzLjYxMyAyNi4wMjgsMjIuNjIgeiIvPjwvc3ZnPgo=");
@@ -0,0 +1 @@
1
+ background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2230%22%20height=%2230%22%20viewBox=%220,%200,%2030,%2030%22%3E%3Cpath%20fill=%22%23333344%22%20d=%22M26.028,22.62%20C21.729,21.627%2017.727,20.757%2019.665,17.097%20C25.564,5.958%2021.229,0%2015,0%20C8.648,0%204.42,6.186%2010.334,17.097%20C12.33,20.78%208.178,21.648%203.972,22.62%20C-0.325,23.613%200.006,25.882%200.006,30%20L29.994,30%20C29.994,25.882%2030.324,23.613%2026.028,22.62%20z%22/%3E%3C/svg%3E%0A");
@@ -0,0 +1,82 @@
1
+ //= require enquire.min
2
+ //= require jquery.mobile.custom.min
3
+
4
+ $(window).load(function() {
5
+ // Flash notifications
6
+ var $flash = $(".flash");
7
+ var fo = { queue: true, easing: "linear", duration: 75 };
8
+ $flash.animate({ top: "+=5" }, fo)
9
+ .animate({ top: "-=10" }, fo)
10
+ .animate({ top: "+=10" }, fo)
11
+ .animate({ top: "-=10" }, fo)
12
+ .animate({ top: "+=5" }, fo);
13
+ setTimeout(function() {
14
+ $flash.fadeOut(1000, function() {
15
+ $flash.remove();
16
+ });
17
+ }, 5000);
18
+
19
+ // Mobile navigation
20
+ enquire.register("screen and (max-width: 29.6875em)", {
21
+ match: function() {
22
+ var nav = $("#global-nav");
23
+ var toggle = $("<span class='nav-toggle'/>");
24
+ nav.parent().append(toggle);
25
+ nav.hide();
26
+ toggle.on("tap", function(e) {
27
+ e.preventDefault();
28
+ $this = $(this);
29
+ $this.toggleClass("open");
30
+ nav.slideToggle(250);
31
+ });
32
+ },
33
+ unmatch: function() {
34
+ var nav = $("#global-nav");
35
+ var toggle = nav.parent().find(".nav-toggle");
36
+ nav.show();
37
+ toggle.remove();
38
+ }
39
+ });
40
+
41
+ // Collapsible sections/fieldsets
42
+ $(".accordion-container .collapsible-header").click(function() {
43
+ var $this = $(this);
44
+ var $parent = $this.parent(".collapsible");
45
+ var $content = $parent.find(".collapsible-content");
46
+
47
+ if ($.ui) {
48
+
49
+ $(".accordion-container .collapsible:not(.collapsed)").addClass("collapsed", 250);
50
+ $parent.removeClass("collapsed", 250);
51
+
52
+ } else {
53
+
54
+ if ($parent.hasClass("collapsed")) {
55
+ var $open = $(".accordion-container .collapsible:not(.collapsed) .collapsible-content");
56
+ var height = $open.innerHeight();
57
+
58
+ $open.css({
59
+ boxSizing: "border-box",
60
+ overflow: "hidden",
61
+ maxHeight: height
62
+ })
63
+ .animate({
64
+ maxHeight: 0
65
+ }, 200, function() {
66
+ $(this).parent(".collapsible").addClass("collapsed");
67
+ $(this).css({ maxHeight: "auto" });
68
+ });
69
+
70
+ $content.css({
71
+ boxSizing: "border-box",
72
+ overflow: "hidden"
73
+ });
74
+ $parent.removeClass("collapsed");
75
+ $content.animate({
76
+ maxHeight: height
77
+ }, 200);
78
+ }
79
+
80
+ }
81
+ });
82
+ });
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * enquire.js v2.1.0 - Awesome Media Queries in JavaScript
3
+ * Copyright (c) 2013 Nick Williams - http://wicky.nillia.ms/enquire.js
4
+ * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
+ */
6
+
7
+ (function(t,i,n){var e=i.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=n(e):"function"==typeof define&&define.amd?define(function(){return i[t]=n(e)}):i[t]=n(e)})("enquire",this,function(t){"use strict";function i(t,i){var n,e=0,s=t.length;for(e;s>e&&(n=i(t[e],e),n!==!1);e++);}function n(t){return"[object Array]"===Object.prototype.toString.apply(t)}function e(t){return"function"==typeof t}function s(t){this.options=t,!t.deferSetup&&this.setup()}function o(i,n){this.query=i,this.isUnconditional=n,this.handlers=[],this.mql=t(i);var e=this;this.listener=function(t){e.mql=t,e.assess()},this.mql.addListener(this.listener)}function r(){if(!t)throw Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!t("only all").matches}return s.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},o.prototype={addHandler:function(t){var i=new s(t);this.handlers.push(i),this.matches()&&i.on()},removeHandler:function(t){var n=this.handlers;i(n,function(i,e){return i.equals(t)?(i.destroy(),!n.splice(e,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){i(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";i(this.handlers,function(i){i[t]()})}},r.prototype={register:function(t,s,r){var h=this.queries,u=r&&this.browserIsIncapable;return h[t]||(h[t]=new o(t,u)),e(s)&&(s={match:s}),n(s)||(s=[s]),i(s,function(i){h[t].addHandler(i)}),this},unregister:function(t,i){var n=this.queries[t];return n&&(i?n.removeHandler(i):(n.clear(),delete this.queries[t])),this}},new r});
@@ -0,0 +1,3 @@
1
+ /*! jQuery Mobile v1.3.2 | Copyright 2010, 2013 jQuery Foundation, Inc. | jquery.org/license */
2
+
3
+ (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,r){function l(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var i="hashchange",s=n,o,u=e.event.special,a=s.documentMode,f="on"+i in t&&(a===r||a>7);e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.fn[i].delay=50,u[i]=e.extend(u[i],{setup:function(){if(f)return!1;e(o.start)},teardown:function(){if(f)return!1;e(o.stop)}}),o=function(){function p(){var n=l(),r=h(u);n!==u?(c(u=n,r),e(t).trigger(i)):r!==u&&(location.href=location.href.replace(/#.*/,"")+r),o=setTimeout(p,e.fn[i].delay)}var n={},o,u=l(),a=function(e){return e},c=a,h=a;return n.start=function(){o||p()},n.stop=function(){o&&clearTimeout(o),o=r},t.attachEvent&&!t.addEventListener&&!f&&function(){var t,r;n.start=function(){t||(r=e.fn[i].src,r=r&&r+l(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||c(l()),p()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow,s.onpropertychange=function(){try{event.propertyName==="title"&&(t.document.title=s.title)}catch(e){}})},n.stop=a,h=function(){return l(t.location.href)},c=function(n,r){var o=t.document,u=e.fn[i].domain;n!==r&&(o.title=s.title,o.open(),u&&o.write('<script>document.domain="'+u+'"</script>'),o.close(),t.location.hash=n)}}(),n}()})(e,this),function(e){e.mobile={}}(e),function(e,t,r){var i={};e.mobile=e.extend(e.mobile,{version:"1.3.2",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},window:e(t),document:e(n),keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},behaviors:{},silentScroll:function(n){e.type(n)!=="number"&&(n=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,n),e.mobile.document.trigger("silentscroll",{x:0,y:n})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:i,nsNormalize:function(t){if(!t)return;return i[t]||(i[t]=e.camelCase(e.mobile.ns+t))},getInheritedTheme:function(e,t){var n=e[0],r="",i=/ui-(bar|body|overlay)-([a-z])\b/,s,o;while(n){s=n.className||"";if(s&&(o=i.exec(s))&&(r=o[2]))break;n=n.parentNode}return r||t||"a"},closestPageData:function(e){return e.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("mobile-page")},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,n){if(!e.mobile.ignoreContentEnabled)return t;var r=t.length,i=e(),s,o,u;for(var a=0;a<r;a++){o=t.eq(a),u=!1,s=t[a];while(s){var f=s.getAttribute?s.getAttribute("data-"+e.mobile.ns+n):"";if(f==="false"){u=!0;break}s=s.parentNode}u||(i=i.add(o))}return i},getScreenHeight:function(){return t.innerHeight||e.mobile.window.height()}},e.mobile),e.fn.jqmData=function(t,n){var i;return typeof t!="undefined"&&(t&&(t=e.mobile.nsNormalize(t)),arguments.length<2||n===r?i=this.data(t):i=this.data(t,n)),i},e.jqmData=function(t,n,r){var i;return typeof n!="undefined"&&(i=e.data(t,n?e.mobile.nsNormalize(n):n,r)),i},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,n){return e.removeData(t,e.mobile.nsNormalize(n))},e.fn.removeWithDependents=function(){e.removeWithDependents(this)},e.removeWithDependents=function(t){var n=e(t);(n.jqmData("dependents")||e()).remove(),n.remove()},e.fn.addDependents=function(t){e.addDependents(e(this),t)},e.addDependents=function(t,n){var r=e(t).jqmData("dependents")||e();e(t).jqmData("dependents",e.merge(r,n))},e.fn.getEncodedText=function(){return e("<div/>").text(e(this).text()).html()},e.fn.jqmEnhanceable=function(){return e.mobile.enhanceable(this)},e.fn.jqmHijackable=function(){return e.mobile.hijackable(this)};var s=e.find,o=/:jqmData\(([^)]*)\)/g;e.find=function(t,n,r,i){return t=t.replace(o,"[data-"+(e.mobile.ns||"")+"$1]"),s.call(this,t,n,r,i)},e.extend(e.find,s),e.find.matches=function(t,n){return e.find(t,null,null,n)},e.find.matchesSelector=function(t,n){return e.find(n,null,null,[t]).length>0}}(e,this),function(e,r){t.matchMedia=t.matchMedia||function(e,t){var n,r=e.documentElement,i=r.firstElementChild||r.firstChild,s=e.createElement("body"),o=e.createElement("div");return o.id="mq-test-1",o.style.cssText="position:absolute;top:-100em",s.style.background="none",s.appendChild(o),function(e){return o.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',r.insertBefore(s,i),n=o.offsetWidth===42,r.removeChild(s),{matches:n,media:e}}}(n),e.mobile.media=function(e){return t.matchMedia(e).matches}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,n){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e,r){function i(e){var t=e.charAt(0).toUpperCase()+e.substr(1),n=(e+" "+u.join(t+" ")+t).split(" ");for(var i in n)if(o[n[i]]!==r)return!0}function h(e,t,r){var i=n.createElement("div"),s=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},o=function(e){return e===""?"":"-"+e.charAt(0).toLowerCase()+e.substr(1)+"-"},a=function(n){var r=o(n)+e+": "+t+";",u=s(n),a=u+(u===""?e:s(e));i.setAttribute("style",r),!i.style[a]||(l=!0)},f=r?r:u,l;for(var c=0;c<f.length;c++)a(f[c]);return!!l}function p(){var i="transform-3d",o=e.mobile.media("(-"+u.join("-"+i+"),(-")+"-"+i+"),("+i+")");if(o)return!!o;var a=n.createElement("div"),f={MozTransform:"-moz-transform",transform:"transform"};s.append(a);for(var l in f)a.style[l]!==r&&(a.style[l]="translate3d( 100px, 1px, 1px )",o=t.getComputedStyle(a).getPropertyValue(f[l]));return!!o&&o!=="none"}function d(){var t=location.protocol+"//"+location.host+location.pathname+"ui-dir/",n=e("head base"),r=null,i="",o,u;return n.length?i=n.attr("href"):n=r=e("<base>",{href:t}).appendTo("head"),o=e("<a href='testurl' />").prependTo(s),u=o[0].href,n[0].href=i||location.pathname,r&&r.remove(),u.indexOf(t)===0}function v(){var e=n.createElement("x"),r=n.documentElement,i=t.getComputedStyle,s;return"pointerEvents"in e.style?(e.style.pointerEvents="auto",e.style.pointerEvents="x",r.appendChild(e),s=i&&i(e,"").pointerEvents==="auto",r.removeChild(e),!!s):!1}function m(){var e=n.createElement("div");return typeof e.getBoundingClientRect!="undefined"}function g(){var e=t,n=navigator.userAgent,r=navigator.platform,i=n.match(/AppleWebKit\/([0-9]+)/),s=!!i&&i[1],o=n.match(/Fennec\/([0-9]+)/),u=!!o&&o[1],a=n.match(/Opera Mobi\/([0-9]+)/),f=!!a&&a[1];return(r.indexOf("iPhone")>-1||r.indexOf("iPad")>-1||r.indexOf("iPod")>-1)&&s&&s<534||e.operamini&&{}.toString.call(e.operamini)==="[object OperaMini]"||a&&f<7458||n.indexOf("Android")>-1&&s&&s<533||u&&u<6||"palmGetResource"in t&&s&&s<534||n.indexOf("MeeGo")>-1&&n.indexOf("NokiaBrowser/8.5.0")>-1?!1:!0}var s=e("<body>").prependTo("html"),o=s[0].style,u=["Webkit","Moz","O"],a="palmGetResource"in t,f=t.opera,l=t.operamini&&{}.toString.call(t.operamini)==="[object OperaMini]",c=t.blackberry&&!i("-webkit-transform");e.extend(e.mobile,{browser:{}}),e.mobile.browser.oldIE=function(){var e=3,t=n.createElement("div"),r=t.all||[];do t.innerHTML="<!--[if gt IE "+ ++e+"]><br><![endif]-->";while(r[0]);return e>4?e:!e}(),e.extend(e.support,{cssTransitions:"WebKitTransitionEvent"in t||h("transition","height 100ms linear",["Webkit","Moz",""])&&!e.mobile.browser.oldIE&&!f,pushState:"pushState"in history&&"replaceState"in history&&!(t.navigator.userAgent.indexOf("Firefox")>=0&&t.top!==t)&&t.navigator.userAgent.search(/CriOS/)===-1,mediaquery:e.mobile.media("only all"),cssPseudoElement:!!i("content"),touchOverflow:!!i("overflowScrolling"),cssTransform3d:p(),boxShadow:!!i("boxShadow")&&!c,fixedPosition:g(),scrollTop:("pageXOffset"in t||"scrollTop"in n.documentElement||"scrollTop"in s[0])&&!a&&!l,dynamicBaseTag:d(),cssPointerEvents:v(),boundingRect:m()}),s.remove();var y=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();e.mobile.gradeA=function(){return(e.support.mediaquery||e.mobile.browser.oldIE&&e.mobile.browser.oldIE>=7)&&(e.support.boundingRect||e.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/)!==null)},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||l||y,y&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-mobile-nosupport-boxshadow")}(e),function(e,t){var n=e.mobile.window,r,i;e.event.special.navigate=r={bound:!1,pushStateEnabled:!0,originalEventName:t,isPushStateEnabled:function(){return e.support.pushState&&e.mobile.pushStateEnabled===!0&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return e.mobile.hashListeningEnabled===!0},popstate:function(t){var r=new e.Event("navigate"),i=new e.Event("beforenavigate"),s=t.originalEvent.state||{},o=location.href;n.trigger(i);if(i.isDefaultPrevented())return;t.historyState&&e.extend(s,t.historyState),r.originalEvent=t,setTimeout(function(){n.trigger(r,{state:s})},0)},hashchange:function(t,r){var i=new e.Event("navigate"),s=new e.Event("beforenavigate");n.trigger(s);if(s.isDefaultPrevented())return;i.originalEvent=t,n.trigger(i,{state:t.hashchangeState||{}})},setup:function(e,t){if(r.bound)return;r.bound=!0,r.isPushStateEnabled()?(r.originalEventName="popstate",n.bind("popstate.navigate",r.popstate)):r.isHashChangeEnabled()&&(r.originalEventName="hashchange",n.bind("hashchange.navigate",r.hashchange))}}}(e),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",n)},teardown:function(){e(this).unbind("resize",n)}};var t=250,n=function(){s=(new Date).getTime(),o=s-r,o>=t?(r=s,e(this).trigger("throttledresize")):(i&&clearTimeout(i),i=setTimeout(n,t-o))},r=0,i,s,o}(e),function(e,t){function d(){var e=o();e!==u&&(u=e,r.trigger(i))}var r=e(t),i="orientationchange",s,o,u,a,f,l={0:!0,180:!0};if(e.support.orientation){var c=t.innerWidth||r.width(),h=t.innerHeight||r.height(),p=50;a=c>h&&c-h>p,f=l[t.orientation];if(a&&f||!a&&!f)l={"-90":!0,90:!0}}e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;u=o(),r.bind("throttledresize",d)},teardown:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;r.unbind("throttledresize",d)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=o(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=o=function(){var r=!0,i=n.documentElement;return e.support.orientation?r=l[t.orientation]:r=i&&i.clientWidth/i.clientHeight<1.1,r?"portrait":"landscape"},e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.attrFn&&(e.attrFn[i]=!0)}(e,this),function(e,t,n,r){function x(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function T(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=x(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function N(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function C(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function k(){g=!1}function L(){g=!0}function A(){E=0,v.length=0,m=!1,L()}function O(){k()}function M(){_(),c=setTimeout(function(){c=0,A()},e.vmouse.resetTimerDuration)}function _(){c&&(clearTimeout(c),c=0)}function D(t,n,r){var i;if(r&&r[t]||!r&&C(n.target,t))i=T(n,t),e(n.target).trigger(i);return i}function P(t){var n=e.data(t.target,s);if(!m&&(!E||E!==n)){var r=D("v"+t.type,t);r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}}function H(t){var n=x(t).touches,r,i;if(n&&n.length===1){r=t.target,i=N(r);if(i.hasVirtualBinding){E=w++,e.data(r,s,E),_(),O(),d=!1;var o=x(t).touches[0];h=o.pageX,p=o.pageY,D("vmouseover",t,i),D("vmousedown",t,i)}}}function B(e){if(g)return;d||D("vmousecancel",e,N(e.target)),d=!0,M()}function j(t){if(g)return;var n=x(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=N(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&D("vmousecancel",t,s),D("vmousemove",t,s),M()}function F(e){if(g)return;L();var t=N(e.target),n;D("vmouseup",e,t);if(!d){var r=D("vclick",e,t);r&&r.isDefaultPrevented()&&(n=x(e).changedTouches[0],v.push({touchID:E,x:n.clientX,y:n.clientY}),m=!0)}D("vmouseout",e,t),d=!1,M()}function I(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function q(){}function R(t){var n=t.substr(1);return{setup:function(r,s){I(this)||e.data(this,i,{});var o=e.data(this,i);o[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,P),e(this).bind(n,q),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",H).bind("touchend",F).bind("touchmove",j).bind("scroll",B))},teardown:function(r,s){--l[t],l[t]||b.unbind(n,P),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",H).unbind("touchmove",j).unbind("touchend",F).unbind("scroll",B));var o=e(this),u=e.data(this,i);u&&(u[t]=!1),o.unbind(n,q),I(this)||o.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var U=0;U<o.length;U++)e.event.special[o[U]]=R(o[U]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)}(e,t,n),function(e,t,r){function l(t,n,r){var i=r.type;r.type=n,e.event.dispatch.call(t,r),r.type=i}var i=e(n);e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)});var s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})}},e.event.special.tap={tapholdThreshold:750,setup:function(){var t=this,n=e(t);n.bind("vmousedown",function(r){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),s===e.target&&l(t,"tap",e)}if(r.which&&r.which!==1)return!1;var s=r.target,o=r.originalEvent,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){l(t,"taphold",e.Event("taphold",{target:s}))},e.event.special.tap.tapholdThreshold)})}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t;return{time:(new Date).getTime(),coords:[n.pageX,n.pageY],origin:e(t.target)}},stop:function(e){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;return{time:(new Date).getTime(),coords:[t.pageX,t.pageY]}},handleSwipe:function(t,n){n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold&&t.origin.trigger("swipe").trigger(t.coords[0]>n.coords[0]?"swipeleft":"swiperight")},setup:function(){var t=this,n=e(t);n.bind(u,function(t){function o(t){if(!i)return;s=e.event.special.swipe.stop(t),Math.abs(i.coords[0]-s.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()}var i=e.event.special.swipe.start(t),s;n.bind(f,o).one(a,function(){n.unbind(f,o),i&&s&&e.event.special.swipe.handleSwipe(i,s),i=s=r})})}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)}}})}(e,this),function(e){var t=e("meta[name=viewport]"),n=t.attr("content"),r=n+",maximum-scale=1, user-scalable=no",i=n+",maximum-scale=10, user-scalable=yes",s=/(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(n);e.mobile.zoom=e.extend({},{enabled:!s,locked:!1,disable:function(n){!s&&!e.mobile.zoom.locked&&(t.attr("content",r),e.mobile.zoom.enabled=!1,e.mobile.zoom.locked=n||!1)},enable:function(n){!s&&(!e.mobile.zoom.locked||n===!0)&&(t.attr("content",i),e.mobile.zoom.enabled=!0,e.mobile.zoom.locked=!1)},restore:function(){s||(t.attr("content",n),e.mobile.zoom.enabled=!0)}})}(e),function(e,t){function f(e){i=e.originalEvent,a=i.accelerationIncludingGravity,s=Math.abs(a.x),o=Math.abs(a.y),u=Math.abs(a.z),!t.orientation&&(s>7||(u>6&&o<8||u<8&&o>6)&&s>5)?r.enabled&&r.disable():r.enabled||r.enable()}e.mobile.iosorientationfixEnabled=!0;var n=navigator.userAgent;if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(n)&&n.indexOf("AppleWebKit")>-1)){e.mobile.iosorientationfixEnabled=!1;return}var r=e.mobile.zoom,i,s,o,u,a;e.mobile.document.on("mobileinit",function(){e.mobile.iosorientationfixEnabled&&e.mobile.window.bind("orientationchange.iosorientationfix",r.enable).bind("devicemotion.iosorientationfix",f)})}(e,this)});
File without changes
@@ -0,0 +1,13 @@
1
+ %hidden {
2
+ position: absolute;
3
+ height: 1px;
4
+ width: 1px;
5
+ overflow: hidden;
6
+ margin: -1px;
7
+ padding: 0;
8
+ border: 0;
9
+ clip: rect(1px, 1px, 1px, 1px);
10
+ }
11
+ .hidden {
12
+ @extend %hidden;
13
+ }
@@ -0,0 +1,97 @@
1
+ // Base colors
2
+ $base-color: #333;
3
+ $base-background: #fff;
4
+
5
+ $link-color: #334;
6
+ $link-hover-color: #556;
7
+ $link-active-color: #667;
8
+ $link-visited-color: #666;
9
+
10
+ // Mobile layout
11
+ $mobile-header-color: #fff;
12
+ $mobile-header-background: #334;
13
+
14
+ $mobile-nav-hover-background: #667;
15
+ $mobile-nav-link-border-color: #99a;
16
+ $mobile-nav-current-color: #ccd;
17
+ $mobile-nav-current-background: #334;
18
+
19
+ // Layout
20
+ $global-header-color: #334;
21
+ $global-nav-color: #99a;
22
+ $global-nav-hover-color: #667;
23
+ $global-nav-current-color: #334;
24
+
25
+ $global-footer-color: #bbbbbf;
26
+ $global-footer-background: #eeeef3;
27
+
28
+ // Flash messages
29
+ $flash-success-color: #353;
30
+ $flash-success-background: #cec;
31
+ $flash-success-border-color: #696;
32
+
33
+ $flash-error-color: #600;
34
+ $flash-error-background: #fee;
35
+ $flash-error-border-color: #900;
36
+
37
+ $flash-warning-color: #660;
38
+ $flash-warning-background: #ffd;
39
+ $flash-warning-border-color: #dd0;
40
+
41
+ $flash-notice-color: #336;
42
+ $flash-notice-background: #ddf;
43
+ $flash-notice-border-color: #66c;
44
+
45
+ // Tables
46
+ $table-border-color: transparent;
47
+
48
+ $thead-color: #335;
49
+ $thead-background: #dfdfe9;
50
+ $thead-border-color: #cfcfdd;
51
+
52
+ $tfoot-color: $thead-color;
53
+ $tfoot-background: $thead-background;
54
+ $tfoot-border-color: $thead-border-color;
55
+
56
+ $th-border-color: #cfcfdd;
57
+ $td-border-color: #dfdfee;
58
+
59
+ // Forms
60
+ $fieldset-background: #f9f9fc;
61
+ $fieldset-border-color: #dfdff6;
62
+ $legend-color: #667;
63
+
64
+ $btn-color: #eee;
65
+ $btn-background: #556;
66
+ $btn-hover-color: #fff;
67
+ $btn-hover-background: #667;
68
+
69
+ $btn-primary-color: #dde;
70
+ $btn-primary-background: #334;
71
+ $btn-primary-hover-color: $btn-hover-color;
72
+ $btn-primary-hover-background: #445;
73
+
74
+ $btn-cancel-color: #eee;
75
+ $btn-cancel-background: #777;
76
+ $btn-cancel-hover-color: #fff;
77
+ $btn-cancel-hover-background: #888;
78
+
79
+ $updates-color: #ccc;
80
+ $updates-hover-color: #999;
81
+ $updates-background: #f9f9f9;
82
+
83
+ // Collapsible sections/fieldsets
84
+ $collapsible-open-legend-color: #eee;
85
+ $collapsible-open-legend-background: #334;
86
+
87
+ $collapsible-legend-color: #eef;
88
+ $collapsible-legend-background: #556;
89
+
90
+ $collapsible-legend-hover-color: #fff;
91
+ $collapsible-legend-hover-background: #667;
92
+
93
+ // Tree display
94
+ $tree-line-color: #ccc;
95
+
96
+ $item-border-color: #cce;
97
+ $item-path-color: #779;