├── .gitignore
├── Gemfile
├── Gemfile.lock
├── MIT-LICENSE
├── README.md
├── Rakefile
├── app
├── assets
│ ├── images
│ │ └── bootstrap_notify
│ │ │ └── .gitkeep
│ ├── javascripts
│ │ ├── bootstrap_notify.js
│ │ └── bootstrap_notify
│ │ │ ├── .gitkeep
│ │ │ └── bootstrap-notify.js
│ └── stylesheets
│ │ ├── bootstrap_notify.css.scss
│ │ └── bootstrap_notify
│ │ ├── .gitkeep
│ │ ├── _variables.css.scss
│ │ ├── alert-bangtidy.css.scss
│ │ └── bootstrap-notify.css.scss
├── controllers
│ └── .gitkeep
├── helpers
│ └── .gitkeep
├── mailers
│ └── .gitkeep
├── models
│ └── .gitkeep
└── views
│ └── .gitkeep
├── bootstrap_notify.gemspec
├── config
└── routes.rb
├── lib
├── bootstrap_notify.rb
├── bootstrap_notify
│ ├── engine.rb
│ └── version.rb
└── tasks
│ └── bootstrap_notify_tasks.rake
└── script
└── rails
/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | test/dummy/db/*.sqlite3
5 | test/dummy/log/*.log
6 | test/dummy/tmp/
7 | test/dummy/.sass-cache
8 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | # Declare your gem's dependencies in bootstrap_notify.gemspec.
4 | # Bundler will treat runtime dependencies like base dependencies, and
5 | # development dependencies will be added by default to the :development group.
6 | gemspec
7 |
8 | # jquery-rails is used by the dummy application
9 | gem "jquery-rails"
10 |
11 | # Declare any dependencies that are still in development here instead of in
12 | # your gemspec. These might include edge Rails or gems from your path or
13 | # Git. Remember to move these dependencies to your gemspec before releasing
14 | # your gem to rubygems.org.
15 |
16 | # To use debugger
17 | # gem 'debugger'
18 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | PATH
2 | remote: .
3 | specs:
4 | bootstrap_notify (1.0.1)
5 | bootstrap-sass
6 | jquery-rails
7 | rails (~> 3.2.8)
8 |
9 | GEM
10 | remote: http://rubygems.org/
11 | specs:
12 | actionmailer (3.2.13)
13 | actionpack (= 3.2.13)
14 | mail (~> 2.5.3)
15 | actionpack (3.2.13)
16 | activemodel (= 3.2.13)
17 | activesupport (= 3.2.13)
18 | builder (~> 3.0.0)
19 | erubis (~> 2.7.0)
20 | journey (~> 1.0.4)
21 | rack (~> 1.4.5)
22 | rack-cache (~> 1.2)
23 | rack-test (~> 0.6.1)
24 | sprockets (~> 2.2.1)
25 | activemodel (3.2.13)
26 | activesupport (= 3.2.13)
27 | builder (~> 3.0.0)
28 | activerecord (3.2.13)
29 | activemodel (= 3.2.13)
30 | activesupport (= 3.2.13)
31 | arel (~> 3.0.2)
32 | tzinfo (~> 0.3.29)
33 | activeresource (3.2.13)
34 | activemodel (= 3.2.13)
35 | activesupport (= 3.2.13)
36 | activesupport (3.2.13)
37 | i18n (= 0.6.1)
38 | multi_json (~> 1.0)
39 | arel (3.0.2)
40 | bootstrap-sass (2.3.1.0)
41 | sass (~> 3.2)
42 | builder (3.0.4)
43 | erubis (2.7.0)
44 | hike (1.2.1)
45 | i18n (0.6.1)
46 | journey (1.0.4)
47 | jquery-rails (2.2.1)
48 | railties (>= 3.0, < 5.0)
49 | thor (>= 0.14, < 2.0)
50 | json (1.7.7)
51 | mail (2.5.3)
52 | i18n (>= 0.4.0)
53 | mime-types (~> 1.16)
54 | treetop (~> 1.4.8)
55 | mime-types (1.22)
56 | multi_json (1.7.2)
57 | polyglot (0.3.3)
58 | rack (1.4.5)
59 | rack-cache (1.2)
60 | rack (>= 0.4)
61 | rack-ssl (1.3.3)
62 | rack
63 | rack-test (0.6.2)
64 | rack (>= 1.0)
65 | rails (3.2.13)
66 | actionmailer (= 3.2.13)
67 | actionpack (= 3.2.13)
68 | activerecord (= 3.2.13)
69 | activeresource (= 3.2.13)
70 | activesupport (= 3.2.13)
71 | bundler (~> 1.0)
72 | railties (= 3.2.13)
73 | railties (3.2.13)
74 | actionpack (= 3.2.13)
75 | activesupport (= 3.2.13)
76 | rack-ssl (~> 1.3.2)
77 | rake (>= 0.8.7)
78 | rdoc (~> 3.4)
79 | thor (>= 0.14.6, < 2.0)
80 | rake (10.0.4)
81 | rdoc (3.12.2)
82 | json (~> 1.4)
83 | sass (3.2.7)
84 | sprockets (2.2.2)
85 | hike (~> 1.2)
86 | multi_json (~> 1.0)
87 | rack (~> 1.0)
88 | tilt (~> 1.1, != 1.3.0)
89 | thor (0.18.1)
90 | tilt (1.3.6)
91 | treetop (1.4.12)
92 | polyglot
93 | polyglot (>= 0.3.1)
94 | tzinfo (0.3.37)
95 |
96 | PLATFORMS
97 | ruby
98 |
99 | DEPENDENCIES
100 | bootstrap_notify!
101 | jquery-rails
102 |
--------------------------------------------------------------------------------
/MIT-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2013 YOURNAME
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Bootstrap Notify - Rails notifications made easy.
2 |
3 | **BootstrapNotify** aims to be a simple notification system that you can easily drop into your Rails project for nice looking notify flashes.
4 | BootstrapNotify is based off of bootstrap-notify by user goodybag http://goodybag.github.com/bootstrap-notify/
5 |
6 | You can see a demo at:
7 | http://goodybag.github.com/bootstrap-notify
8 |
9 | This is a based off of my SCSS conversion of bootstrap-notify.
10 |
11 | Requirements:
12 | * SCSS version of bootstrap installed from https://github.com/thomas-mcdonald/bootstrap-sass
13 | * jQuery
14 |
15 | ## Installation
16 |
17 | Add it to your Gemfile:
18 |
19 | ```ruby
20 | gem 'bootstrap_notify', :git => "https://github.com/jclay/bootstrap-notify-gem.git"
21 | ```
22 |
23 | Include the javascripts in application.js. Make sure to include **after** jQuery:
24 |
25 | ```
26 | //= require jquery
27 | //= require jquery_ujs
28 | //= require bootstrap_notify
29 | ```
30 |
31 | Import the SCSS after you import bootstrap:
32 |
33 | ```
34 | @import "bootstrap";
35 | @import "bootstrap_notify";
36 | ```
37 |
38 | ## Implementation
39 | Quick and Dirty style:
40 |
41 | Create a partial with the contents
42 |
43 | ```ruby
44 | # app/views/partials/_notify.html.haml
45 | - if !notice.blank?
46 | :javascript
47 | $(document).ready(function () {
48 | $('.top-right').notify({
49 | message: { text: "#{notice}" }
50 | }).show();
51 | });
52 | ```
53 | Render the partial in your layout with the `
` tag, after your javascript and CSS have been included.
54 |
55 | ```ruby
56 | # app/views/layouts/application.html.haml
57 | = render(:partial => "partials/notify")
58 | ```
59 |
60 | Don't forget to include the div to attach the notification to:
61 |
62 | ```
63 | # app/views/layouts/application.html.haml
64 | .notifications.top-right
65 | ```
66 |
67 | Additional configuration and placement options can be found at:
68 | http://goodybag.github.com/bootstrap-notify
69 |
70 | ## Customizing Placement
71 | You can offset the placement of the notification by adjusting the top, bottom, left or right variables.
72 |
73 | ```
74 | $notify_right: 100px;
75 | $notify_left: $notify_right;
76 | $notify_top: 500px;
77 | $notify_bottom: $notify_top;
78 | @import "bootstrap_notify";
79 | ```
80 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rake
2 | begin
3 | require 'bundler/setup'
4 | rescue LoadError
5 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6 | end
7 | begin
8 | require 'rdoc/task'
9 | rescue LoadError
10 | require 'rdoc/rdoc'
11 | require 'rake/rdoctask'
12 | RDoc::Task = Rake::RDocTask
13 | end
14 |
15 | RDoc::Task.new(:rdoc) do |rdoc|
16 | rdoc.rdoc_dir = 'rdoc'
17 | rdoc.title = 'BootstrapNotify'
18 | rdoc.options << '--line-numbers'
19 | # rdoc.rdoc_files.include('README.rdoc')
20 | rdoc.rdoc_files.include('lib/**/*.rb')
21 | end
22 |
23 | APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24 | load 'rails/tasks/engine.rake'
25 |
26 |
27 |
28 | Bundler::GemHelper.install_tasks
29 |
30 | require 'rake/testtask'
31 |
32 | Rake::TestTask.new(:test) do |t|
33 | t.libs << 'lib'
34 | t.libs << 'test'
35 | t.pattern = 'test/**/*_test.rb'
36 | t.verbose = false
37 | end
38 |
39 |
40 | task :default => :test
41 |
--------------------------------------------------------------------------------
/app/assets/images/bootstrap_notify/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/assets/images/bootstrap_notify/.gitkeep
--------------------------------------------------------------------------------
/app/assets/javascripts/bootstrap_notify.js:
--------------------------------------------------------------------------------
1 | //= require_tree .
--------------------------------------------------------------------------------
/app/assets/javascripts/bootstrap_notify/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/assets/javascripts/bootstrap_notify/.gitkeep
--------------------------------------------------------------------------------
/app/assets/javascripts/bootstrap_notify/bootstrap-notify.js:
--------------------------------------------------------------------------------
1 | /**
2 | * bootstrap-notify.js v1.0.0
3 | * --
4 | * Copyright 2012 Nijiko Yonskai
5 | * Copyright 2012 Goodybag, Inc.
6 | * --
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 |
20 | (function ($) {
21 | var Notification = function (element, options) {
22 | // Element collection
23 | this.$element = $(element);
24 | this.$note = $('');
25 | this.options = $.extend(true, {}, $.fn.notify.defaults, options);
26 | this._link = null;
27 |
28 | // Setup from options
29 | if (this.options.transition)
30 | if (this.options.transition === 'fade')
31 | this.$note.addClass('in').addClass(this.options.transition);
32 | else this.$note.addClass(this.options.transition);
33 | else this.$note.addClass('fade').addClass('in');
34 |
35 | if (this.options.type)
36 | this.$note.addClass('alert-' + this.options.type);
37 | else this.$note.addClass('alert-success');
38 |
39 | if (this.options.message)
40 | if (typeof this.options.message === 'string')
41 | this.$note.html(this.options.message);
42 | else if (typeof this.options.message === 'object')
43 | if (this.options.message.html)
44 | this.$note.html(this.options.message.html);
45 | else if (this.options.message.text)
46 | this.$note.text(this.options.message.text);
47 |
48 | if (this.options.closable)
49 | this._link = $('×'),
50 | $(this._link).on('click', $.proxy(Notification.onClose, this)),
51 | this.$note.prepend(this._link);
52 |
53 | return this;
54 | };
55 |
56 | Notification.onClose = function () {
57 | this.options.onClose();
58 | $(this.$note).remove().css("display", "");
59 | this.options.onClosed();
60 | };
61 |
62 | Notification.prototype.show = function () {
63 | if (this.options.fadeOut.enabled)
64 | this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(Notification.onClose, this));
65 |
66 | this.$element.append(this.$note);
67 | this.$note.alert();
68 | };
69 |
70 | Notification.prototype.hide = function () {
71 | if (this.options.fadeOut.enabled)
72 | this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(Notification.onClose, this));
73 | else Notification.onClose.call(this);
74 | };
75 |
76 | $.fn.notify = function (options) {
77 | return new Notification(this, options);
78 | };
79 |
80 | $.fn.notify.defaults = {
81 | type: 'success',
82 | closable: true,
83 | transition: 'fade',
84 | fadeOut: {
85 | enabled: true,
86 | delay: 3000
87 | },
88 | message: null,
89 | onClose: function () {},
90 | onClosed: function () {}
91 | }
92 | })(window.jQuery);
93 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/bootstrap_notify.css.scss:
--------------------------------------------------------------------------------
1 | @import "bootstrap_notify/**/*"
--------------------------------------------------------------------------------
/app/assets/stylesheets/bootstrap_notify/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/assets/stylesheets/bootstrap_notify/.gitkeep
--------------------------------------------------------------------------------
/app/assets/stylesheets/bootstrap_notify/_variables.css.scss:
--------------------------------------------------------------------------------
1 | //Customize the placement of your notifications
2 | $notify_right: 10px !default;
3 | $notify_left: $notify_right !default;
4 | $notify_top: 50px !default;
5 | $notify_bottom: $notify_top !default;
--------------------------------------------------------------------------------
/app/assets/stylesheets/bootstrap_notify/alert-bangtidy.css.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * bangTidy2 Style - Ported from Growl Style
3 | * Ported and Cleaned By Nijikokun @nijikokun
4 | * Less By Vitaly @Laboratory
5 | * SCSS by jclay
6 | * Original Author Daryl Ginn
7 | * Based On http://dribbble.com/shots/527056-Growl-Theme-2
8 | *
9 | * To use, for style use: bangTidy
10 | *
11 | */
12 |
13 | $glossLight: rgba(0, 0, 0, 0.80);
14 | $glossDark: rgba(0, 0, 0, 0.88);
15 | $box_shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
16 | $text_shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
17 | $border_radius: 4px;
18 |
19 | .alert-bangTidy {
20 | box-sizing: border-box;
21 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
22 | background: $glossLight;
23 | background: -moz-linear-gradient(top, $glossLight 0%, $glossDark 100%);
24 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $glossLight), color-stop(100%, $glossDark));
25 | background: -webkit-linear-gradient(top, $glossLight 0%, $glossDark 100%);
26 | background: -o-linear-gradient(top, $glossLight 0%, $glossDark 100%);
27 | background: -ms-linear-gradient(top, $glossLight 0%, $glossDark 100%);
28 | background: linear-gradient(top, $glossLight 0%, $glossDark 100%);
29 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '@{glossLight}', endColorstr = '@{glossDark}', GradientType = 0);
30 | border: 1px solid #000;
31 | -webkit-box-shadow: $box_shadow;
32 | -moz-box-shadow: $box_shadow;
33 | -o-box-shadow: $box_shadow;
34 | box-shadow: $box_shadow;
35 | -webkit-border-radius: $border_radius;
36 | -moz-border-radius: $border_radius;
37 | -o-border-radius: $border_radius;
38 | border-radius: $border_radius;
39 | overflow: hidden;
40 | color: white;
41 | -webkit-text-shadow: $text_shadow;
42 | -moz-text-shadow: $text_shadow;
43 | -o-text-shadow: $text_shadow;
44 | text-shadow: $text_shadow;
45 | -webkit-font-smoothing: antialiased;
46 | }
47 |
48 |
49 | @-webkit-keyframes notification {
50 | 0% { -webkit-transform: rotateY(-90deg); opacity: 0; }
51 | 70% { -webkit-transform: rotateY(20deg); opacity: .8; }
52 | 90% { -webkit-transform: rotateY(-10deg); opacity: 1; }
53 | 100% { -webkit-transform: rotateY(-0deg); opacity: 1; }
54 | }
55 |
56 | @-moz-keyframes notification {
57 | 0% { -moz-transform: rotateY(-90deg); opacity: 0; }
58 | 70% { -moz-transform: rotateY(20deg); opacity: .8; }
59 | 90% { -moz-transform: rotateY(-10deg); opacity: 1; }
60 | 100% { -moz-transform: rotateY(-0deg); opacity: 1; }
61 | }
62 |
63 | @-ms-keyframes notification {
64 | 0% { -ms-transform: rotateY(-90deg); opacity: 0; }
65 | 70% { -ms-transform: rotateY(20deg); opacity: .8; }
66 | 90% { -ms-transform: rotateY(-10deg); opacity: 1; }
67 | 100% { -ms-transform: rotateY(-0deg); opacity: 1; }
68 | }
69 |
70 | @-o-keyframes notification {
71 | 0% { -o-transform: rotateY(-90deg); opacity: 0; }
72 | 70% { -o-transform: rotateY(20deg); opacity: .8; }
73 | 90% { -o-transform: rotateY(-10deg); opacity: 1; }
74 | 100% { -o-transform: rotateY(-0deg); opacity: 1; }
75 | }
76 |
77 | keyframes notification {
78 | 0% { transform: rotateY(-90deg); opacity: 0; }
79 | 70% { transform: rotateY(20deg); opacity: .8; }
80 | 90% { transform: rotateY(-10deg); opacity: 1; }
81 | 100% { transform: rotateY(-0deg); opacity: 1; }
82 | }
83 |
84 | .notifications > div {
85 | -webkit-animation: notification .75s linear;
86 | -moz-animation: notification .75s linear;
87 | -ms-animation: notification .75s linear;
88 | -o-animation: notification .75s linear;
89 | animation: notification .75s linear;
90 | }
91 |
92 | .alert-blackgloss:before {
93 | background: -webkit-gradient(linear, 0% -16.5%, 16.5% -100%, from(rgba(255,255,255,.0)), to(rgba(255,255,255,.6)), color-stop(.99,rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.0))) no-repeat;
94 | -webkit-mask-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,.5)), color-stop(.8,rgba(255,255,255,.0)));
95 | position: absolute;
96 | content: '.';
97 | line-height: 0;
98 | top: 0;
99 | right: 0;
100 | bottom: 0;
101 | left: 0;
102 | display: block;
103 | overflow: hidden;
104 | text-indent: -99999px;
105 | -webkit-border-radius: 5px;
106 | }
107 |
108 | .alert-blackgloss {
109 | background: rgba(0,0,0,1);
110 | -webkit-box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1);
111 | -moz-box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1);
112 | -ms-box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1);
113 | -o-box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1);
114 | box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.1);
115 | border: 1px solid rgba(0,0,0,.95);
116 | -webkit-border-radius: 5px;
117 | -moz-border-radius: 5px;
118 | -ms-border-radius: 5px;
119 | -o-border-radius: 5px;
120 | border-radius: 5px;
121 | -webkit-font-smoothing: antialiased;
122 | text-shadow: 0 1px 2px rgba(0,0,0,.5);
123 | color: #fff;
124 | -webkit-transform: rotateY(-0deg);
125 | -moz-transform: rotateY(-0deg);
126 | -o-transform: rotateY(-0deg);
127 | transform: rotateY(-0deg);
128 | position: relative;
129 | background-clip: padding-box;
130 | }
131 |
132 | .alert-blackgloss .close {
133 | position: relative;
134 | top: -3px;
135 | right: -25px;
136 | color: #fff;
137 | content: 'x';
138 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/bootstrap_notify/bootstrap-notify.css.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Bootstrap-notify.css.scss
3 | *
4 | * @author Vitaly @Laboratory
5 | * @author Nijiko Yonskai
6 | * @copyright 2012 Vitaly
7 | * @copyright 2013 Nijiko Yonskai
8 | */
9 |
10 | @import "variables";
11 |
12 | .notifications {
13 | position: fixed;
14 |
15 | &.top-right {
16 | right: $notify_right;
17 | top: $notify_top;
18 | }
19 |
20 | &.top-left {
21 | left: $notify_left;
22 | top: $notify_top;
23 | }
24 |
25 | &.bottom-left {
26 | left: $notify_left;
27 | bottom: $notify_bottom;
28 | }
29 |
30 | &.bottom-right {
31 | right: $notify_right;
32 | bottom: $notify_bottom;
33 | }
34 |
35 | > div {
36 | position: relative;
37 | z-index: 9999;
38 | margin: 5px 0px;
39 | }
40 |
41 | &.center {
42 | top: 48%;
43 | left: 0;
44 | width: 100%;
45 |
46 | > div {
47 | margin: 5px auto;
48 | width: 20%;
49 | text-align: center;
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/controllers/.gitkeep
--------------------------------------------------------------------------------
/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/helpers/.gitkeep
--------------------------------------------------------------------------------
/app/mailers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/mailers/.gitkeep
--------------------------------------------------------------------------------
/app/models/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/models/.gitkeep
--------------------------------------------------------------------------------
/app/views/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jclay/bootstrap-notify-gem/80c14193d288829a25a61afe2d910e160af1cc64/app/views/.gitkeep
--------------------------------------------------------------------------------
/bootstrap_notify.gemspec:
--------------------------------------------------------------------------------
1 | $:.push File.expand_path("../lib", __FILE__)
2 |
3 | # Maintain your gem's version:
4 | require "bootstrap_notify/version"
5 |
6 | # Describe your gem and declare its dependencies:
7 | Gem::Specification.new do |s|
8 | s.name = "bootstrap_notify"
9 | s.version = BootstrapNotify::VERSION
10 | s.authors = ["Joel Clay"]
11 | s.email = ["ra3don92@gmail.com"]
12 | s.summary = "BootstrapNotify makes it easy to drop in beautiful flash notifications in Rails!"
13 | s.version = "1.0.1"
14 | # s.description = "TODO: Description of BootstrapNotify."
15 |
16 | s.files = Dir["{app,config,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"]
17 |
18 | s.add_dependency "rails", "~> 3.2.8"
19 | s.add_dependency "bootstrap-sass"
20 | s.add_dependency "jquery-rails"
21 | end
22 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | end
3 |
--------------------------------------------------------------------------------
/lib/bootstrap_notify.rb:
--------------------------------------------------------------------------------
1 | require "bootstrap_notify/engine"
2 |
3 | module BootstrapNotify
4 | end
5 |
--------------------------------------------------------------------------------
/lib/bootstrap_notify/engine.rb:
--------------------------------------------------------------------------------
1 | module BootstrapNotify
2 | class Engine < ::Rails::Engine
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/lib/bootstrap_notify/version.rb:
--------------------------------------------------------------------------------
1 | module BootstrapNotify
2 | VERSION = "0.0.1"
3 | end
4 |
--------------------------------------------------------------------------------
/lib/tasks/bootstrap_notify_tasks.rake:
--------------------------------------------------------------------------------
1 | # desc "Explaining what the task does"
2 | # task :bootstrap_notify do
3 | # # Task goes here
4 | # end
5 |
--------------------------------------------------------------------------------
/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | ENGINE_ROOT = File.expand_path('../..', __FILE__)
5 | ENGINE_PATH = File.expand_path('../../lib/bootstrap_notify/engine', __FILE__)
6 |
7 | require 'rails/all'
8 | require 'rails/engine/commands'
9 |
--------------------------------------------------------------------------------