From ac7e385e93617b53830597614b035487471440ab Mon Sep 17 00:00:00 2001 From: Ali Arabi <51513490+IsolatePy@users.noreply.github.com> Date: Thu, 14 Nov 2019 17:37:23 +0330 Subject: [PATCH 1/5] Fixing the extension issues and resolve the images url --- app/assets/stylesheets/gritter.css | 119 ++++++++++++++++++++++++ app/assets/stylesheets/gritter.css.scss | 119 ------------------------ 2 files changed, 119 insertions(+), 119 deletions(-) create mode 100755 app/assets/stylesheets/gritter.css delete mode 100755 app/assets/stylesheets/gritter.css.scss diff --git a/app/assets/stylesheets/gritter.css b/app/assets/stylesheets/gritter.css new file mode 100755 index 0000000..61e57b2 --- /dev/null +++ b/app/assets/stylesheets/gritter.css @@ -0,0 +1,119 @@ +#gritter-notice-wrapper { + position:fixed; + top:20px; + right:20px; + width:301px; + z-index:9999; + + &.top-left { + left: 20px; + right: auto; + } + + &.bottom-right { + top: auto; + left: auto; + bottom: 20px; + right: 20px; + } + + &.bottom-left { + top: auto; + right: auto; + bottom: 20px; + left: 20px; + } + } + + .gritter-item-wrapper { + position:relative; + margin:0 0 10px 0; + background:url('../images/ie-spacer.gif'); // ie7/8 fix + } + + .gritter-top { + background:url('../images/gritter.png') no-repeat left -30px; + height:10px; + } + .hover .gritter-top { + background-position:right -30px; + } + .gritter-bottom { + background:url('../images/gritter.png') no-repeat left bottom; + height:8px; + margin:0; + } + .hover .gritter-bottom { + background-position: bottom right; + } + + .gritter-item { + display:block; + color:#eee; + padding:2px 11px 8px 11px; + font-size: 11px; + font-family:verdana; + filter:inherit; // ie8 fix + + &.gritter-css2 { + background:url('../images/gritter.png') no-repeat left -40px; + } + &.gritter-css3 { + background:rgba(0, 0, 0, 0.8); + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + padding-top: 12px; + padding-bottom: 16px; + } + + p { + padding:0; + margin:0; + } + } + .hover .gritter-item.gritter-css2 { + background-position:right -40px; + } + .hover .gritter-item.gritter-css3 { + padding:10px 9px 14px 9px; + border: solid 2px #fff; + } + + .gritter-close { + display:none; + position:absolute; + top:5px; + left:3px; + cursor:pointer; + width:30px; + height:30px; + filter:inherit; // ie8 fix + } + .gritter-css2 .gritter-close { + background:url('../images/gritter.png') no-repeat left top; + } + .gritter-css3 .gritter-close { + background:url('../images/gritter-close.png') no-repeat; + } + + .gritter-title { + font-size:14px; + font-weight:bold; + padding:0 0 7px 0; + display:block; + text-shadow:1px 1px #000; /* Not supported by IE :( */ + } + .gritter-image { + width:48px; + height:48px; + float:left; + } + .gritter-with-image, + .gritter-without-image { + padding:0 0 5px 0; + } + .gritter-with-image { + width:220px; + float:right; + } diff --git a/app/assets/stylesheets/gritter.css.scss b/app/assets/stylesheets/gritter.css.scss deleted file mode 100755 index 87c3108..0000000 --- a/app/assets/stylesheets/gritter.css.scss +++ /dev/null @@ -1,119 +0,0 @@ -#gritter-notice-wrapper { - position:fixed; - top:20px; - right:20px; - width:301px; - z-index:9999; - - &.top-left { - left: 20px; - right: auto; - } - - &.bottom-right { - top: auto; - left: auto; - bottom: 20px; - right: 20px; - } - - &.bottom-left { - top: auto; - right: auto; - bottom: 20px; - left: 20px; - } -} - -.gritter-item-wrapper { - position:relative; - margin:0 0 10px 0; - background:url(asset-url('ie-spacer.gif')); // ie7/8 fix -} - -.gritter-top { - background:url(asset-url('gritter.png')) no-repeat left -30px; - height:10px; -} -.hover .gritter-top { - background-position:right -30px; -} -.gritter-bottom { - background:url(asset-url('gritter.png')) no-repeat left bottom; - height:8px; - margin:0; -} -.hover .gritter-bottom { - background-position: bottom right; -} - -.gritter-item { - display:block; - color:#eee; - padding:2px 11px 8px 11px; - font-size: 11px; - font-family:verdana; - filter:inherit; // ie8 fix - - &.gritter-css2 { - background:url(asset-url('gritter.png')) no-repeat left -40px; - } - &.gritter-css3 { - background:rgba(0, 0, 0, 0.8); - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - padding-top: 12px; - padding-bottom: 16px; - } - - p { - padding:0; - margin:0; - } -} -.hover .gritter-item.gritter-css2 { - background-position:right -40px; -} -.hover .gritter-item.gritter-css3 { - padding:10px 9px 14px 9px; - border: solid 2px #fff; -} - -.gritter-close { - display:none; - position:absolute; - top:5px; - left:3px; - cursor:pointer; - width:30px; - height:30px; - filter:inherit; // ie8 fix -} -.gritter-css2 .gritter-close { - background:url(asset-url('gritter.png')) no-repeat left top; -} -.gritter-css3 .gritter-close { - background:url(asset-url('gritter-close.png')) no-repeat; -} - -.gritter-title { - font-size:14px; - font-weight:bold; - padding:0 0 7px 0; - display:block; - text-shadow:1px 1px #000; /* Not supported by IE :( */ -} -.gritter-image { - width:48px; - height:48px; - float:left; -} -.gritter-with-image, -.gritter-without-image { - padding:0 0 5px 0; -} -.gritter-with-image { - width:220px; - float:right; -} \ No newline at end of file From d6925d97f63f39b69c1209d0fe0cb6aa0e9103f9 Mon Sep 17 00:00:00 2001 From: Ali Arabi <51513490+IsolatePy@users.noreply.github.com> Date: Thu, 14 Nov 2019 17:38:14 +0330 Subject: [PATCH 2/5] Fixing SCSS file extention and updated images URL --- app/assets/stylesheets/{gritter.css => gritter.scss} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/assets/stylesheets/{gritter.css => gritter.scss} (100%) diff --git a/app/assets/stylesheets/gritter.css b/app/assets/stylesheets/gritter.scss similarity index 100% rename from app/assets/stylesheets/gritter.css rename to app/assets/stylesheets/gritter.scss From 1861ccd6c596d73523915b1885707add9d57df95 Mon Sep 17 00:00:00 2001 From: Ali Arabi <51513490+IsolatePy@users.noreply.github.com> Date: Thu, 14 Nov 2019 17:42:52 +0330 Subject: [PATCH 3/5] Updated readme for rails 6 --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 88bfdf4..b5f0412 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,17 @@ This Ruby on Rails gem allows you to easily add Growl-like notifications to your Are you using Rails 3.0 or lower? Check out [the 'old' branch on Github](https://github.com/RobinBrouwer/gritter/tree/old). Want support for IE6? Also check out that branch, because the newer version of gritter inside this gem dropped support for it. +If you are Using Rails 6 you should add manually the JS and SCSS to your path + +## Installation For Rails 6 +Add gritter.js and gritter.scss to your packs , Do not forget to add images folder to your packs too +Add this to your application.js : + import 'gritter'; +Add this to your application.scss : + @import 'gritter'; +And that's it! - -## Installation +## Installation For Rails 4 You can use this gem by putting the following inside your Gemfile: @@ -37,7 +45,8 @@ Version 1.2.0 changes (02/08/2015): - Added Rails 4 support. - Added on_click support. - + - Added Rails 6 support . + - Fix style problems . Version 1.1.0 changes (31/01/2013): - All gflash messages can also be stored in the Rails flash messages (optional). From 159265b71870d2cc9055cfbeba0643f36c0fc356 Mon Sep 17 00:00:00 2001 From: Ali Arabi <51513490+IsolatePy@users.noreply.github.com> Date: Thu, 14 Nov 2019 17:46:10 +0330 Subject: [PATCH 4/5] Updated readme file for rails 6 support --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b5f0412..6f69e3d 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,16 @@ Are you using Rails 3.0 or lower? Check out [the 'old' branch on Github](https:/ Also check out that branch, because the newer version of gritter inside this gem dropped support for it. If you are Using Rails 6 you should add manually the JS and SCSS to your path -## Installation For Rails 6 +**## Installation For Rails 6** Add gritter.js and gritter.scss to your packs , Do not forget to add images folder to your packs too Add this to your application.js : + ``` import 'gritter'; + ``` Add this to your application.scss : + ``` @import 'gritter'; + ``` And that's it! ## Installation For Rails 4 From f59e2c556bf9bcdfa3831ed5bd184147284d889a Mon Sep 17 00:00:00 2001 From: Ali Arabi <51513490+IsolatePy@users.noreply.github.com> Date: Thu, 14 Nov 2019 17:53:02 +0330 Subject: [PATCH 5/5] Updated Readme and add instruction for rails 6 --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6f69e3d..e41059a 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,17 @@ Are you using Rails 3.0 or lower? Check out [the 'old' branch on Github](https:/ Also check out that branch, because the newer version of gritter inside this gem dropped support for it. If you are Using Rails 6 you should add manually the JS and SCSS to your path -**## Installation For Rails 6** -Add gritter.js and gritter.scss to your packs , Do not forget to add images folder to your packs too -Add this to your application.js : - ``` +## Installation For Rails 6 +**Add gritter.js and gritter.scss to your packs . + Do not forget to add images folder to your packs too. ** + Add this line to your application.js : + import 'gritter'; - ``` + Add this to your application.scss : - ``` + @import 'gritter'; - ``` -And that's it! + ## Installation For Rails 4