golden-theme 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/assets/javascripts/golden/theme/bootstrap.js.coffee +7 -0
- data/app/assets/javascripts/golden/theme/foundation.js.coffee +7 -0
- data/app/assets/javascripts/golden/theme/foundation/ajax-chosen.js.coffee +10 -0
- data/app/assets/javascripts/golden/theme/foundation/ajax-tabs.js.coffee +42 -0
- data/app/assets/javascripts/golden/theme/foundation/bench-util-jquery.js.coffee +48 -0
- data/app/assets/javascripts/golden/theme/foundation/modal.js.coffee +60 -0
- data/app/assets/stylesheets/golden/theme/foundation.css.sass +4 -0
- data/app/assets/stylesheets/golden/theme/foundation/devise.css.sass +2 -0
- data/app/controllers/concerns/golden/theme/foundation/pagination.rb +33 -0
- data/app/views/application/{_flash_messages.html.erb → bootstrap/_flash_messages.html.erb} +1 -1
- data/app/views/application/bootstrap/_main_navigation.html.erb +1 -1
- data/app/views/application/bootstrap/_user_navigation.html.erb +3 -3
- data/app/views/application/foundation/_flash_messages.html.erb +10 -0
- data/app/views/application/foundation/_header.html.erb +17 -0
- data/app/views/application/foundation/_main_navigation.html.erb +5 -0
- data/app/views/application/foundation/_pagination.html.erb +9 -0
- data/app/views/application/foundation/_user_navigation.html.erb +19 -0
- data/config/locales/application.en.yml +16 -0
- data/config/locales/application.zh-TW.yml +16 -0
- data/golden-theme.gemspec +6 -1
- data/lib/golden/theme.rb +7 -0
- data/lib/golden/theme/bootstrap/alert_helper.rb +25 -0
- data/{app/helpers → lib}/golden/theme/bootstrap/button_helper.rb +1 -1
- data/{app/helpers → lib}/golden/theme/bootstrap/common_helper.rb +6 -6
- data/lib/golden/theme/bootstrap/deprecated_helper.rb +95 -0
- data/{app/helpers → lib}/golden/theme/bootstrap/dropdown_helper.rb +4 -4
- data/{app/helpers → lib}/golden/theme/bootstrap/link_helper.rb +10 -10
- data/lib/golden/theme/bootstrap/link_renderer.rb +3 -3
- data/{app/helpers → lib}/golden/theme/bootstrap/modal_helper.rb +7 -8
- data/{app/helpers → lib}/golden/theme/bootstrap/tab_helper.rb +19 -19
- data/lib/golden/theme/engine.rb +3 -0
- data/lib/golden/theme/foundation/alerts_helper.rb +19 -0
- data/lib/golden/theme/foundation/buttons_helper.rb +11 -0
- data/lib/golden/theme/foundation/common_helper.rb +66 -0
- data/lib/golden/theme/foundation/dropdowns_helper.rb +47 -0
- data/lib/golden/theme/foundation/link_helper.rb +56 -0
- data/lib/golden/theme/foundation/link_renderer.rb +63 -0
- data/lib/golden/theme/foundation/reveal_modal_helper.rb +63 -0
- data/lib/golden/theme/foundation/sub_nav_helper.rb +11 -0
- data/lib/golden/theme/foundation/tabs_helper.rb +58 -0
- data/lib/golden/theme/foundation/top_bar_helper.rb +16 -0
- data/lib/golden/theme/helpers.rb +24 -0
- data/lib/golden/theme/version.rb +1 -1
- metadata +79 -12
- data/app/assets/javascripts/golden/theme/bootstrap.js +0 -7
- data/app/helpers/golden/theme/bootstrap/alert_helper.rb +0 -24
@@ -1,24 +0,0 @@
|
|
1
|
-
module Golden::Theme::Bootstrap
|
2
|
-
module AlertHelper
|
3
|
-
def flash_box key, value
|
4
|
-
alert_class = case key.to_sym
|
5
|
-
when :notice, :alert
|
6
|
-
'alert-warning'
|
7
|
-
when :error
|
8
|
-
'alert-danger'
|
9
|
-
else
|
10
|
-
"alert-#{key}"
|
11
|
-
end
|
12
|
-
button_options = {
|
13
|
-
type: 'button',
|
14
|
-
name: nil,
|
15
|
-
class: 'close',
|
16
|
-
data: { dismiss: 'alert' },
|
17
|
-
'aria-hidden' => 'true'
|
18
|
-
}
|
19
|
-
content_tag :div, class: "alert #{alert_class} alert-dismissable #{key}" do
|
20
|
-
button_tag('×'.html_safe, button_options) << value
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|