diff --git a/README.md b/README.md index 067d547..89af800 100755 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ # Ridiculously Responsive Social Sharing Buttons +[![Join the chat at https://gitter.im/kni-labs/rrssb](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kni-labs/rrssb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Love them or hate them, social sharing buttons appear to be with us for a while. It seemed like [**we**](http://www.kurtnoble.com) were constantly making custom buttons for every single project, so we decided to create a super flexible system that would work in any container. -[![Join the chat at https://gitter.im/kni-labs/rrssb](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kni-labs/rrssb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

-[](http://kurtnoble.com/labs/rrssb/) Love them or hate them, social sharing buttons appear to be with us for a while. It seemed like [**we**](http://www.kurtnoble.com) were constantly making custom buttons for every single project, so we decided to create a super flexible system that would work in any container. +RRSSB is built with [**SASS**](http://sass-lang.com/), so you can easily customize it by tweaking a few variables. SVGs allow for tiny file size and retina support. Add or remove icons as you see fit -- the rest will fill in automagically in the container. -RRSSB is built with [**SASS**](http://sass-lang.com/), so you can easily customize it by tweaking a few variables. SVGs allow for tiny file size and retina support. Add or remove icons as you see fit — the rest will fill in automagically in the container. + - - -### Demo +## Demo > [**View the demo here**](http://kurtnoble.com/labs/rrssb/) -### Usage -1) Link to the css file in header: +## Usage +1) Copy css to your document or link to the css file in header: ```html @@ -54,19 +52,19 @@ RRSSB is built with [**SASS**](http://sass-lang.com/), so you can easily customi - Each sharing URL requires various parameters that allow you to pass through messaging in the sharing dialog. A useful tool for URI escaping any messaging that needs to pass through the share URL can be found [**here**](http://meyerweb.com/eric/tools/dencoder/). - Alternatively, all share metadata and links can be configured [using Javascript](#javascript) -3) Link to javascript files at the bottom of your document before the closing body tag for best results. (jQuery CDN, [**jQuery fallback**](http://css-tricks.com/snippets/jquery/fallback-for-cdn-hosted-jquery/), and `rrssb.min.js`): +3) Copy `rrssb.min.js` to your document or link to javascript files at the bottom of your page (before the closing body tag for best results - jQuery CDN, [**jQuery fallback**](http://css-tricks.com/snippets/jquery/fallback-for-cdn-hosted-jquery/), and `rrssb.min.js`): ```html ``` + -#### Configure URL and Share Text with Javascript -Instead of editing each `href` by hand, you can call some Javascript to set the URLs on each social button automatically. +**Optional: Configure URL and share text with javascript:**
Instead of editing each `href` by hand, you can call some Javascript to set the URLs on each social button automatically. -This is optional. Note, to support users who have disabled Javascript, you still need to edit the `href`s by hand. +Note: to support users who have disabled Javascript, you still need to edit the `href`s by hand. Paste the following before the closing body tag, after the scripts you added in the last section: @@ -88,7 +86,7 @@ jQuery(document).ready(function ($) { ``` -### Other install options: +## Other install options: Service | Link :--------------------------- | :---------------------------------------------------------------------------------------------------------------- @@ -100,18 +98,18 @@ CDN * | [**OSSCDN by MaxCDN**](http://osscdn.com/#/rrssb) * Managed by 3rd parties. Please contact project hosts for support. -### Support +## Support Currently tested between [**140px**](https://www.dropbox.com/s/2k6lcebg2887ge3/Screenshot%202014-02-18%2009.45.45.png) and [**15,465px**](https://www.dropbox.com/s/1juq03011lixk3r/Screenshot%202014-02-18%2009.43.57.png) on current versions of Chrome 33, Safari 7.0.2, Firefox 27, Opera 20, and IE9+. Requires [**SVG**](http://caniuse.com/svg) -### Contributing +## Contributing Thanks for helping! Pull requests are welcomed. -#### Build setup: +### Build setup: - Make sure [gulp](http://gulpjs.com/) is installed globally: `npm install -g gulp` (May require `sudo`.) - run `npm install` to install the dependencies for this project. - run `gulp` to create a local server at `localhost:3000` and watch for file changes. -### About +## About RRSSB is a [**KNI Labs freebie**](http://kurtnoble.com/) crafted by [**@dbox**](http://www.twitter.com/dbox) and [**@joshuatuscan**](http://www.twitter.com/joshuatuscan). diff --git a/css/demo.css b/css/demo.css index 8c63982..cb328dc 100755 --- a/css/demo.css +++ b/css/demo.css @@ -1 +1 @@ -.clearfix:after,.share-container:after{clear:both}.clearfix:after,.clearfix:before,.share-container:after,.share-container:before{content:' ';display:table}body{overflow-x:hidden}a{color:#0a88ff;font-weight:500;text-decoration:none}a:hover{color:#0061bd}.main-container{padding:1% 6%}.main-container h1{-webkit-transition:all .2s ease;transition:all .2s ease;color:#444;letter-spacing:-.03em;margin:20px 0 10px}@media screen and (min-width:1024px){.main-container h1{font-size:40px}}.main-container h2{color:#444}.main-container p{font-size:16px;line-height:1.4em}@media screen and (min-width:1024px){.main-container p{font-size:20px}}.main-container .rrssb-preview{-webkit-transition:all .2s ease;transition:all .2s ease;float:right;height:auto;margin:0 0 1% 1%;width:40%}@media screen and (max-width:400px){.main-container .rrssb-preview{width:60%}}.main-container small{color:#999;display:block;font-size:12px;margin:40px 0}hr{background-color:#ddd;border:0;height:1px;margin:0 0 10px}.share-container{padding:0 0 25px;position:relative}@media screen and (max-width:320px){.share-container{padding:0 0 12px}}.share-container .label{color:#777;display:block;float:left;font-size:14px;padding:10px 0 0;width:115px}.share-container .rrssb-buttons{float:left;width:calc(100% - 116px)}@media screen and (max-width:400px){.share-container .label{display:none}.share-container .rrssb-buttons{clear:both;float:none;width:100%}} \ No newline at end of file +.clearfix:after,.share-container:after{clear:both}.clearfix:after,.clearfix:before,.share-container:after,.share-container:before{content:' ';display:table}body{overflow-x:hidden;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif}a{color:#0a88ff;font-weight:500;text-decoration:none}a:hover{color:#0061bd}.main-container{padding:1% 6%}.main-container h1{-webkit-transition:all .2s ease;transition:all .2s ease;color:#444;letter-spacing:-.03em;margin:20px 0 10px}@media screen and (min-width:1024px){.main-container h1{font-size:40px}}.main-container h2{color:#444}.main-container p{font-size:16px;line-height:1.4em}@media screen and (min-width:1024px){.main-container p{font-size:20px}}.main-container .rrssb-preview{-webkit-transition:all .2s ease;transition:all .2s ease;float:right;height:auto;margin:0 0 1% 1%;width:40%}@media screen and (max-width:400px){.main-container .rrssb-preview{width:60%}}.main-container small{color:#999;display:block;font-size:12px;margin:40px 0}hr{background-color:#ddd;border:0;height:1px;margin:0 0 10px}.share-container{padding:0 0 25px;position:relative}@media screen and (max-width:320px){.share-container{padding:0 0 12px}}.share-container .label{color:#777;display:block;float:left;font-size:14px;padding:10px 0 0;width:115px}@media screen and (max-width:400px){.share-container .label{display:none}} \ No newline at end of file diff --git a/css/rrssb.css b/css/rrssb.css index b95d442..f9e09a4 100755 --- a/css/rrssb.css +++ b/css/rrssb.css @@ -1 +1 @@ -.rrssb-buttons{box-sizing:border-box;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;height:36px;margin:0;padding:0;width:100%;font-size:12px}.rrssb-buttons:after{clear:both}.rrssb-buttons:after,.rrssb-buttons:before{content:' ';display:table}.rrssb-buttons li{box-sizing:border-box;float:left;height:100%;line-height:13px;list-style:none;margin:0;padding:0 2px}.rrssb-buttons li.rrssb-email a{background-color:#0a88ff}.rrssb-buttons li.rrssb-email a:hover{background-color:#006ed6}.rrssb-buttons li.rrssb-facebook a{background-color:#306199}.rrssb-buttons li.rrssb-facebook a:hover{background-color:#244872}.rrssb-buttons li.rrssb-tumblr a{background-color:#32506d}.rrssb-buttons li.rrssb-tumblr a:hover{background-color:#22364a}.rrssb-buttons li.rrssb-linkedin a{background-color:#007bb6}.rrssb-buttons li.rrssb-linkedin a:hover{background-color:#005983}.rrssb-buttons li.rrssb-twitter a{background-color:#26c4f1}.rrssb-buttons li.rrssb-twitter a:hover{background-color:#0eaad6}.rrssb-buttons li.rrssb-googleplus a{background-color:#e93f2e}.rrssb-buttons li.rrssb-googleplus a:hover{background-color:#ce2616}.rrssb-buttons li.rrssb-youtube a{background-color:#df1c31}.rrssb-buttons li.rrssb-youtube a:hover{background-color:#b21627}.rrssb-buttons li.rrssb-reddit a{background-color:#8bbbe3}.rrssb-buttons li.rrssb-reddit a:hover{background-color:#62a3d9}.rrssb-buttons li.rrssb-pinterest a{background-color:#b81621}.rrssb-buttons li.rrssb-pinterest a:hover{background-color:#8a1119}.rrssb-buttons li.rrssb-pocket a{background-color:#ed4054}.rrssb-buttons li.rrssb-pocket a:hover{background-color:#e4162d}.rrssb-buttons li.rrssb-github a{background-color:#444}.rrssb-buttons li.rrssb-github a:hover{background-color:#2b2b2b}.rrssb-buttons li.rrssb-instagram a{background-color:#517fa4}.rrssb-buttons li.rrssb-instagram a:hover{background-color:#406582}.rrssb-buttons li.rrssb-delicious a{background-color:#0B79E5}.rrssb-buttons li.rrssb-delicious a:hover{background-color:#095fb4}.rrssb-buttons li.rrssb-vk a{background-color:#4d71a9}.rrssb-buttons li.rrssb-vk a:hover{background-color:#3d5a86}.rrssb-buttons li.rrssb-hackernews a{background-color:#f60}.rrssb-buttons li.rrssb-hackernews a:hover{background-color:#cc5200}.rrssb-buttons li a{background-color:#ccc;border-radius:2px;box-sizing:border-box;display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-weight:700;height:100%;padding:11px 7px 12px 27px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;-webkit-transition:background-color .2s ease-in-out;transition:background-color .2s ease-in-out;width:100%}.rrssb-buttons li a .rrssb-icon{display:block;left:10px;padding-top:9px;position:absolute;top:0;width:10%}.rrssb-buttons li a .rrssb-icon svg{height:17px;width:17px}.rrssb-buttons li a .rrssb-icon svg path{fill:#fff}.rrssb-buttons li a .rrssb-text{color:#fff}.rrssb-buttons li a:active{box-shadow:inset 1px 3px 15px 0 rgba(22,0,0,.25)}.rrssb-buttons li.small a{padding:0}.rrssb-buttons li.small a .rrssb-icon{left:auto;margin:0 auto;overflow:hidden;position:relative;top:auto;width:100%}.rrssb-buttons li.small a .rrssb-text{visibility:hidden}.rrssb-buttons.large-format,.rrssb-buttons.large-format li{height:auto}.rrssb-buttons.large-format li a{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:.2em;padding:8.5% 0 8.5% 12%}.rrssb-buttons.large-format li a .rrssb-icon{height:100%;left:7%;padding-top:0;width:12%}.rrssb-buttons.large-format li a .rrssb-icon svg{height:100%;position:absolute;top:0;width:100%}.rrssb-buttons.large-format li a .rrssb-text{-webkit-backface-visibility:hidden;backface-visibility:hidden}.rrssb-buttons.small-format{padding-top:5px}.rrssb-buttons.small-format li{height:80%;padding:0 1px}.rrssb-buttons.small-format li a .rrssb-icon{height:100%;padding-top:0}.rrssb-buttons.small-format li a .rrssb-icon svg{height:48%;position:relative;top:6px;width:80%}.rrssb-buttons.tiny-format{height:22px;position:relative}.rrssb-buttons.tiny-format li{padding-right:7px}.rrssb-buttons.tiny-format li a{background-color:transparent;padding:0}.rrssb-buttons.tiny-format li a .rrssb-icon svg{height:70%;width:100%}.rrssb-buttons.tiny-format li a:active,.rrssb-buttons.tiny-format li a:hover{background-color:transparent}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg path{fill:#0a88ff}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg path{fill:#0054a3}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg path{fill:#306199}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg path{fill:#18304b}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg path{fill:#32506d}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg path{fill:#121d27}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg path{fill:#007bb6}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg path{fill:#003650}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg path{fill:#26c4f1}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg path{fill:#0b84a6}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg path{fill:#e93f2e}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg path{fill:#a01e11}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg path{fill:#df1c31}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg path{fill:#84111d}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg path{fill:#8bbbe3}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg path{fill:#398bcf}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg path{fill:#b81621}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg path{fill:#5d0b11}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg path{fill:#ed4054}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg path{fill:#b61124}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg path{fill:#444}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg path{fill:#111}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg path{fill:#517fa4}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg path{fill:#2f4a60}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon svg path{fill:#0B79E5}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon:hover .rrssb-icon svg path{fill:#064684}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon svg path{fill:#4d71a9}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon:hover .rrssb-icon svg path{fill:#2d4263}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon svg path{fill:#f60}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon:hover .rrssb-icon svg path{fill:#993d00} \ No newline at end of file +.rrssb-buttons{box-sizing:border-box;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;height:36px;margin:0;padding:0;width:100%}.rrssb-buttons:after{clear:both}.rrssb-buttons:after,.rrssb-buttons:before{content:' ';display:table}.rrssb-buttons li{box-sizing:border-box;float:left;height:100%;line-height:13px;list-style:none;margin:0;padding:0 2px}.rrssb-buttons li.rrssb-email a{background-color:#0a88ff}.rrssb-buttons li.rrssb-email a:hover{background-color:#006ed6}.rrssb-buttons li.rrssb-facebook a{background-color:#306199}.rrssb-buttons li.rrssb-facebook a:hover{background-color:#244872}.rrssb-buttons li.rrssb-tumblr a{background-color:#32506d}.rrssb-buttons li.rrssb-tumblr a:hover{background-color:#22364a}.rrssb-buttons li.rrssb-linkedin a{background-color:#007bb6}.rrssb-buttons li.rrssb-linkedin a:hover{background-color:#005983}.rrssb-buttons li.rrssb-twitter a{background-color:#26c4f1}.rrssb-buttons li.rrssb-twitter a:hover{background-color:#0eaad6}.rrssb-buttons li.rrssb-googleplus a{background-color:#e93f2e}.rrssb-buttons li.rrssb-googleplus a:hover{background-color:#ce2616}.rrssb-buttons li.rrssb-youtube a{background-color:#df1c31}.rrssb-buttons li.rrssb-youtube a:hover{background-color:#b21627}.rrssb-buttons li.rrssb-reddit a{background-color:#8bbbe3}.rrssb-buttons li.rrssb-reddit a:hover{background-color:#62a3d9}.rrssb-buttons li.rrssb-pinterest a{background-color:#b81621}.rrssb-buttons li.rrssb-pinterest a:hover{background-color:#8a1119}.rrssb-buttons li.rrssb-pocket a{background-color:#ed4054}.rrssb-buttons li.rrssb-pocket a:hover{background-color:#e4162d}.rrssb-buttons li.rrssb-github a{background-color:#444}.rrssb-buttons li.rrssb-github a:hover{background-color:#2b2b2b}.rrssb-buttons li.rrssb-instagram a{background-color:#125688}.rrssb-buttons li.rrssb-instagram a:hover{background-color:#0c3a5b}.rrssb-buttons li.rrssb-delicious a{background-color:#0b79e5}.rrssb-buttons li.rrssb-delicious a:hover{background-color:#095fb4}.rrssb-buttons li.rrssb-vk a{background-color:#4d71a9}.rrssb-buttons li.rrssb-vk a:hover{background-color:#3d5a86}.rrssb-buttons li.rrssb-hackernews a{background-color:#f60}.rrssb-buttons li.rrssb-hackernews a:hover{background-color:#cc5200}.rrssb-buttons li a{background-color:#ccc;border-radius:2px;box-sizing:border-box;display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-weight:700;height:100%;padding:11px 7px 12px 27px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;-webkit-transition:background-color .2s ease-in-out;transition:background-color .2s ease-in-out;width:100%}.rrssb-buttons li a .rrssb-icon{display:block;left:10px;padding-top:9px;position:absolute;top:0;width:10%}.rrssb-buttons li a .rrssb-icon svg{height:17px;width:17px}.rrssb-buttons li a .rrssb-icon svg path{fill:#fff}.rrssb-buttons li a .rrssb-text{color:#fff}.rrssb-buttons li a:active{box-shadow:inset 1px 3px 15px 0 rgba(22,0,0,.25)}.rrssb-buttons li.small a{padding:0}.rrssb-buttons li.small a .rrssb-icon{left:auto;margin:0 auto;overflow:hidden;position:relative;top:auto;width:100%}.rrssb-buttons li.small a .rrssb-text{visibility:hidden}.rrssb-buttons.large-format,.rrssb-buttons.large-format li{height:auto}.rrssb-buttons.large-format li a{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:.2em;padding:8.5% 0 8.5% 12%}.rrssb-buttons.large-format li a .rrssb-icon{height:100%;left:7%;padding-top:0;width:12%}.rrssb-buttons.large-format li a .rrssb-icon svg{height:100%;position:absolute;top:0;width:100%}.rrssb-buttons.large-format li a .rrssb-text{-webkit-backface-visibility:hidden;backface-visibility:hidden}.rrssb-buttons.small-format{padding-top:5px}.rrssb-buttons.small-format li{height:80%;padding:0 1px}.rrssb-buttons.small-format li a .rrssb-icon{height:100%;padding-top:0}.rrssb-buttons.small-format li a .rrssb-icon svg{height:48%;position:relative;top:6px;width:80%}.rrssb-buttons.tiny-format{height:22px;position:relative}.rrssb-buttons.tiny-format li{padding-right:7px}.rrssb-buttons.tiny-format li a{background-color:transparent;padding:0}.rrssb-buttons.tiny-format li a .rrssb-icon svg{height:70%;width:100%}.rrssb-buttons.tiny-format li a:active,.rrssb-buttons.tiny-format li a:hover{background-color:transparent}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg path{fill:#0a88ff}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg path{fill:#0054a3}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg path{fill:#306199}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg path{fill:#18304b}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg path{fill:#32506d}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg path{fill:#121d27}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg path{fill:#007bb6}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg path{fill:#003650}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg path{fill:#26c4f1}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg path{fill:#0b84a6}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg path{fill:#e93f2e}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg path{fill:#a01e11}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg path{fill:#df1c31}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg path{fill:#84111d}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg path{fill:#8bbbe3}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg path{fill:#398bcf}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg path{fill:#b81621}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg path{fill:#5d0b11}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg path{fill:#ed4054}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg path{fill:#b61124}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg path{fill:#444}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg path{fill:#111}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg path{fill:#125688}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg path{fill:#061d2e}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon svg path{fill:#0b79e5}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon:hover .rrssb-icon svg path{fill:#064684}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon svg path{fill:#4d71a9}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon:hover .rrssb-icon svg path{fill:#2d4263}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon svg path{fill:#f60}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon:hover .rrssb-icon svg path{fill:#993d00} \ No newline at end of file diff --git a/icons/delicious.min.svg b/icons/delicious.min.svg index 990850a..741ca3b 100644 --- a/icons/delicious.min.svg +++ b/icons/delicious.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/github.min.svg b/icons/github.min.svg index fd9f64e..d107246 100755 --- a/icons/github.min.svg +++ b/icons/github.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/hackernews.min.svg b/icons/hackernews.min.svg index 5d4f7d3..e0da2db 100644 --- a/icons/hackernews.min.svg +++ b/icons/hackernews.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/instagram.min.svg b/icons/instagram.min.svg index 490fb52..90be638 100755 --- a/icons/instagram.min.svg +++ b/icons/instagram.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/pocket.min.svg b/icons/pocket.min.svg index 70415f6..4a11823 100755 --- a/icons/pocket.min.svg +++ b/icons/pocket.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/reddit.min.svg b/icons/reddit.min.svg index 22de3ed..d8c0030 100755 --- a/icons/reddit.min.svg +++ b/icons/reddit.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/reddit.svg b/icons/reddit.svg index 752e2a8..f66e699 100755 --- a/icons/reddit.svg +++ b/icons/reddit.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/icons/tumblr.min.svg b/icons/tumblr.min.svg index f63154d..907dabe 100755 --- a/icons/tumblr.min.svg +++ b/icons/tumblr.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/twitter.min.svg b/icons/twitter.min.svg index 71891a7..7bc2ea0 100755 --- a/icons/twitter.min.svg +++ b/icons/twitter.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/youtube.min.svg b/icons/youtube.min.svg index a1c8afe..0292dcb 100755 --- a/icons/youtube.min.svg +++ b/icons/youtube.min.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/index.html b/index.html index 1a02936..bf92065 100755 --- a/index.html +++ b/index.html @@ -8,14 +8,14 @@ - + - + @@ -23,197 +23,160 @@ - - + - + - - - - - - - -
-

Ridiculously Responsive Social Sharing Buttons

-
- -
- share this page: - - - - -
- -

- Love them or hate them, social sharing buttons appear to be with us for a while. It seemed like we were constantly making custom buttons for every single project, so we decided to create a super flexible system that would work in any container.

- -

RRSSB is built with SASS, so you can easily customize it by tweaking a few variables. SVGs allow for tiny file size and retina support. Add or remove icons as you see fit — the rest will fill in automagically - in the container.

- -

Resize this page for demo. Currently tested between 130px and 15,465px on current versions of Chrome 33, Safari 7.0.2, Firefox 27, Opera 20, and IE9+. Requires SVG support.

- -

Grab the code on Github here →

- - RRSSB is a KNI Labs freebie crafted by @dbox and @joshuatuscan. + +

RRSSB - All sites

+

Copy only the li's that you need:

+ +
+ +
- - - diff --git a/js/rrssb.js b/js/rrssb.js index fdf272d..6996f28 100755 --- a/js/rrssb.js +++ b/js/rrssb.js @@ -144,7 +144,7 @@ self.css('font-size', ''); } - if (containerWidth < buttonCountSmall * 20) { + if (containerWidth < buttonCountSmall * 25) { self.removeClass('small-format').addClass('tiny-format'); } else { self.removeClass('tiny-format'); diff --git a/js/rrssb.min.js b/js/rrssb.min.js index 8a0161c..cdc40cb 100755 --- a/js/rrssb.min.js +++ b/js/rrssb.min.js @@ -1 +1 @@ -+function(t,e,i){"use strict";var s={calc:!1};e.fn.rrssb=function(t){var s=e.extend({description:i,emailAddress:i,emailBody:i,emailSubject:i,image:i,title:i,url:i},t);s.emailSubject=s.emailSubject||s.title,s.emailBody=s.emailBody||(s.description?s.description:"")+(s.url?"\n\n"+s.url:"");for(var r in s)s.hasOwnProperty(r)&&s[r]!==i&&(s[r]=n(s[r]));s.url!==i&&(e(this).find(".rrssb-facebook a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+s.url),e(this).find(".rrssb-tumblr a").attr("href","http://tumblr.com/share/link?url="+s.url+(s.title!==i?"&name="+s.title:"")+(s.description!==i?"&description="+s.description:"")),e(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+s.url+(s.title!==i?"&title="+s.title:"")+(s.description!==i?"&summary="+s.description:"")),e(this).find(".rrssb-twitter a").attr("href","https://twitter.com/intent/tweet?text="+(s.description!==i?s.description:"")+"%20"+s.url),e(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+s.url+(s.title!==i?"&text="+s.title:"")),e(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+s.url+(s.description!==i?"&text="+s.description:"")+(s.title!==i?"&title="+s.title:"")),e(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(s.description!==i?s.description:"")+"%20"+s.url),e(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+s.url+(s.image!==i?"&media="+s.image:"")+(s.description!==i?"&description="+s.description:"")),e(this).find(".rrssb-pocket a").attr("href","https://getpocket.com/save?url="+s.url),e(this).find(".rrssb-github a").attr("href",s.url)),(s.emailAddress!==i||s.emailSubject)&&e(this).find(".rrssb-email a").attr("href","mailto:"+(s.emailAddress?s.emailAddress:"")+"?"+(s.emailSubject!==i?"subject="+s.emailSubject:"")+(s.emailBody!==i?"&body="+s.emailBody:""))};var r=function(){var t=e("
"),i=["calc","-webkit-calc","-moz-calc"];e("body").append(t);for(var r=0;r170&&1>n){i.addClass("large-format");var a=r/12+"px";i.css("font-size",a)}else i.removeClass("large-format"),i.css("font-size","");20*n>s?i.removeClass("small-format").addClass("tiny-format"):i.removeClass("tiny-format")})},o=function(){e(".rrssb-buttons").each(function(t){var i=e(this),s=e("li",i),r=s.filter(".small"),n=0,a=0,l=r.eq(0),o=parseFloat(l.attr("data-size"))+55,c=r.length;if(c===s.length){var h=42*c,u=i.width();u>h+o&&(i.removeClass("small-format"),r.eq(0).removeClass("small"),d())}else{s.not(".small").each(function(t){var i=e(this),s=parseFloat(i.attr("data-size"))+55,r=parseFloat(i.width());n+=r,a+=s});var m=n-a;m>o&&(l.removeClass("small"),d())}})},c=function(t){e(".rrssb-buttons").each(function(t){var i=e(this),s=e("li",i);e(s.get().reverse()).each(function(t,i){var r=e(this);if(r.hasClass("small")===!1){var n=parseFloat(r.attr("data-size"))+55,a=parseFloat(r.width());if(n>a){var l=s.not(".small").last();e(l).addClass("small"),d()}}--i||o()})}),t===!0&&u(d)},d=function(){e(".rrssb-buttons").each(function(t){var i,r,n,l,o,c=e(this),d=e("li",c),h=d.filter(".small"),u=h.length;u>0&&u!==d.length?(c.removeClass("small-format"),h.css("width","42px"),n=42*u,i=d.not(".small").length,r=100/i,o=n/i,s.calc===!1?(l=(c.innerWidth()-1)/i-o,l=Math.floor(1e3*l)/1e3,l+="px"):l=s.calc+"("+r+"% - "+o+"px)",d.not(".small").css("width",l)):u===d.length?(c.addClass("small-format"),a()):(c.removeClass("small-format"),a())}),l()},h=function(){e(".rrssb-buttons").each(function(t){e(this).addClass("rrssb-"+(t+1))}),r(),a(),e(".rrssb-buttons li .rrssb-text").each(function(t){var i=e(this),s=i.width();i.closest("li").attr("data-size",s)}),c(!0)},u=function(t){e(".rrssb-buttons li.small").removeClass("small"),c(),t()},m=function(e,s,r,n){var a=t.screenLeft!==i?t.screenLeft:screen.left,l=t.screenTop!==i?t.screenTop:screen.top,o=t.innerWidth?t.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=t.innerHeight?t.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,d=o/2-r/2+a,h=c/3-n/3+l,u=t.open(e,s,"scrollbars=yes, width="+r+", height="+n+", top="+h+", left="+d);u&&u.focus&&u.focus()},f=function(){var t={};return function(e,i,s){s||(s="Don't call this twice without a uniqueId"),t[s]&&clearTimeout(t[s]),t[s]=setTimeout(e,i)}}();e(document).ready(function(){try{e(document).on("click",".rrssb-buttons a.popup",{},function(t){var i=e(this);m(i.attr("href"),i.find(".rrssb-text").html(),580,470),t.preventDefault()})}catch(i){}e(t).resize(function(){u(d),f(function(){u(d)},200,"finished resizing")}),h()}),t.rrssbInit=h}(window,jQuery); \ No newline at end of file ++function(t,e,i){"use strict";var s={calc:!1};e.fn.rrssb=function(t){var s=e.extend({description:i,emailAddress:i,emailBody:i,emailSubject:i,image:i,title:i,url:i},t);s.emailSubject=s.emailSubject||s.title,s.emailBody=s.emailBody||(s.description?s.description:"")+(s.url?"\n\n"+s.url:"");for(var r in s)s.hasOwnProperty(r)&&s[r]!==i&&(s[r]=n(s[r]));s.url!==i&&(e(this).find(".rrssb-facebook a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+s.url),e(this).find(".rrssb-tumblr a").attr("href","http://tumblr.com/share/link?url="+s.url+(s.title!==i?"&name="+s.title:"")+(s.description!==i?"&description="+s.description:"")),e(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+s.url+(s.title!==i?"&title="+s.title:"")+(s.description!==i?"&summary="+s.description:"")),e(this).find(".rrssb-twitter a").attr("href","https://twitter.com/intent/tweet?text="+(s.description!==i?s.description:"")+"%20"+s.url),e(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+s.url+(s.title!==i?"&text="+s.title:"")),e(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+s.url+(s.description!==i?"&text="+s.description:"")+(s.title!==i?"&title="+s.title:"")),e(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(s.description!==i?s.description:"")+"%20"+s.url),e(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+s.url+(s.image!==i?"&media="+s.image:"")+(s.description!==i?"&description="+s.description:"")),e(this).find(".rrssb-pocket a").attr("href","https://getpocket.com/save?url="+s.url),e(this).find(".rrssb-github a").attr("href",s.url)),(s.emailAddress!==i||s.emailSubject)&&e(this).find(".rrssb-email a").attr("href","mailto:"+(s.emailAddress?s.emailAddress:"")+"?"+(s.emailSubject!==i?"subject="+s.emailSubject:"")+(s.emailBody!==i?"&body="+s.emailBody:""))};var r=function(){var t=e("
"),i=["calc","-webkit-calc","-moz-calc"];e("body").append(t);for(var r=0;r170&&1>n){i.addClass("large-format");var a=r/12+"px";i.css("font-size",a)}else i.removeClass("large-format"),i.css("font-size","");25*n>s?i.removeClass("small-format").addClass("tiny-format"):i.removeClass("tiny-format")})},o=function(){e(".rrssb-buttons").each(function(t){var i=e(this),s=e("li",i),r=s.filter(".small"),n=0,a=0,l=r.eq(0),o=parseFloat(l.attr("data-size"))+55,c=r.length;if(c===s.length){var h=42*c,u=i.width();u>h+o&&(i.removeClass("small-format"),r.eq(0).removeClass("small"),d())}else{s.not(".small").each(function(t){var i=e(this),s=parseFloat(i.attr("data-size"))+55,r=parseFloat(i.width());n+=r,a+=s});var m=n-a;m>o&&(l.removeClass("small"),d())}})},c=function(t){e(".rrssb-buttons").each(function(t){var i=e(this),s=e("li",i);e(s.get().reverse()).each(function(t,i){var r=e(this);if(r.hasClass("small")===!1){var n=parseFloat(r.attr("data-size"))+55,a=parseFloat(r.width());if(n>a){var l=s.not(".small").last();e(l).addClass("small"),d()}}--i||o()})}),t===!0&&u(d)},d=function(){e(".rrssb-buttons").each(function(t){var i,r,n,l,o,c=e(this),d=e("li",c),h=d.filter(".small"),u=h.length;u>0&&u!==d.length?(c.removeClass("small-format"),h.css("width","42px"),n=42*u,i=d.not(".small").length,r=100/i,o=n/i,s.calc===!1?(l=(c.innerWidth()-1)/i-o,l=Math.floor(1e3*l)/1e3,l+="px"):l=s.calc+"("+r+"% - "+o+"px)",d.not(".small").css("width",l)):u===d.length?(c.addClass("small-format"),a()):(c.removeClass("small-format"),a())}),l()},h=function(){e(".rrssb-buttons").each(function(t){e(this).addClass("rrssb-"+(t+1))}),r(),a(),e(".rrssb-buttons li .rrssb-text").each(function(t){var i=e(this),s=i.width();i.closest("li").attr("data-size",s)}),c(!0)},u=function(t){e(".rrssb-buttons li.small").removeClass("small"),c(),t()},m=function(e,s,r,n){var a=t.screenLeft!==i?t.screenLeft:screen.left,l=t.screenTop!==i?t.screenTop:screen.top,o=t.innerWidth?t.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,c=t.innerHeight?t.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,d=o/2-r/2+a,h=c/3-n/3+l,u=t.open(e,s,"scrollbars=yes, width="+r+", height="+n+", top="+h+", left="+d);u&&u.focus&&u.focus()},f=function(){var t={};return function(e,i,s){s||(s="Don't call this twice without a uniqueId"),t[s]&&clearTimeout(t[s]),t[s]=setTimeout(e,i)}}();e(document).ready(function(){try{e(document).on("click",".rrssb-buttons a.popup",{},function(t){var i=e(this);m(i.attr("href"),i.find(".rrssb-text").html(),580,470),t.preventDefault()})}catch(i){}e(t).resize(function(){u(d),f(function(){u(d)},200,"finished resizing")}),h()}),t.rrssbInit=h}(window,jQuery); \ No newline at end of file diff --git a/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js b/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js deleted file mode 100755 index 302f461..0000000 --- a/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/* Modernizr 2.6.2 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load - */ -;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); - -/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ -(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); \ No newline at end of file diff --git a/media/README.md b/media/README.md deleted file mode 100755 index d60090b..0000000 --- a/media/README.md +++ /dev/null @@ -1 +0,0 @@ -Only needed for demo. diff --git a/media/facebook-share.jpg b/media/facebook-share.jpg deleted file mode 100755 index 5739f1f..0000000 Binary files a/media/facebook-share.jpg and /dev/null differ diff --git a/media/favicon.png b/media/favicon.png deleted file mode 100755 index 8a5eedf..0000000 Binary files a/media/favicon.png and /dev/null differ diff --git a/media/rrssb-preview.gif b/media/rrssb-preview.gif deleted file mode 100755 index 59a9767..0000000 Binary files a/media/rrssb-preview.gif and /dev/null differ diff --git a/media/rrssb-preview.png b/media/rrssb-preview.png deleted file mode 100755 index ce7d186..0000000 Binary files a/media/rrssb-preview.png and /dev/null differ diff --git a/package.json b/package.json index 6707ef2..ad4d6d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rrssb", - "version": "1.9.1", + "version": "1.9.2", "author": "Daniel Box (http://github.com/kni-labs)", "contributors": [ "(Joshua Tuscan )", diff --git a/scss/demo.scss b/scss/demo.scss deleted file mode 100755 index b57e1d4..0000000 --- a/scss/demo.scss +++ /dev/null @@ -1,132 +0,0 @@ -// Styles for demo page only. Not needed for rrssb. - -$heading-color: #444; -$link-color: #0a88ff; -$small-color: #999; -$label-color: #777; -$hr-color: #ddd; - -$border-radius: 2px; - -$main-font: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - - -// some generic classes -.clearfix { - - &:after { - clear: both; - } - - &:before, - &:after { - content: ' '; - display: table; - } -} - -body { - overflow-x: hidden; -} - -a { - color: $link-color; - font-weight: 500; - text-decoration: none; - - &:hover { - color: darken($link-color, 15%); - } -} - -.main-container { - padding: 1% 6%; - - h1 { - transition: all .2s ease; - color: $heading-color; - letter-spacing: -.03em; - margin: 20px 0 10px; - - - @media screen and (min-width: 1024px) { - font-size: 40px; - } - - } - - h2 { - color: $heading-color; - } - - p { - font-size: 16px; - line-height: 1.4em; - - @media screen and (min-width: 1024px) { - font-size: 20px; - } - } - - .rrssb-preview { - transition: all .2s ease; - float: right; - height: auto; - margin: 0 0 1% 1%; - width: 40%; - - @media screen and (max-width: 400px) { - width: 60%; - // width: 100%; - // margin: -25px 0 15px 0; - } - } - - small { - color: $small-color; - display: block; - font-size: 12px; - margin: 40px 0; - } -} - -hr { - background-color: $hr-color; - border: 0; - height: 1px; - margin: 0 0 10px; -} - -.share-container { - padding: 0 0 25px; - position: relative; - @extend .clearfix; - - @media screen and (max-width: 320px) { - padding: 0 0 12px; - } - - .label { - color: $label-color; - display: block; - float: left; - font-size: 14px; - padding: 10px 0 0; - width: 115px; - - @media screen and (max-width: 400px) { - display: none; - } - } - - .rrssb-buttons { - float: left; - width: calc(100% - 116px); - - @media screen and (max-width: 400px) { - clear: both; - float: none; - width: 100%; - } - } -} diff --git a/scss/rrssb.scss b/scss/rrssb.scss index 35bddbe..b85ed20 100755 --- a/scss/rrssb.scss +++ b/scss/rrssb.scss @@ -31,9 +31,9 @@ $rrssb-youtube: #df1c31 !default; $rrssb-pinterest: #b81621 !default; $rrssb-pocket: #ed4054 !default; $rrssb-github: #444 !default; -$rrssb-instagram: #517fa4 !default; +$rrssb-instagram: #125688 !default; $rrssb-hackernews: #ff6600 !default; -$rrssb-delicious: #0B79E5 !default; +$rrssb-delicious: #0b79e5 !default; $rrssb-vk: #4d71a9 !default; // Set the border radius for the buttons @@ -41,17 +41,17 @@ $rrssb-border-radius: 2px !default; $rrssb-main-font: "Helvetica Neue", Helvetica, Arial, sans-serif !default; // Variable list for all social button colors to be iterated over. -$social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb-tumblr $rrssb-tumblr, rrssb-linkedin $rrssb-linkedin, rrssb-twitter $rrssb-twitter, rrssb-googleplus $rrssb-googleplus, rrssb-youtube $rrssb-youtube, rrssb-reddit $rrssb-reddit, rrssb-pinterest $rrssb-pinterest, rrssb-pocket $rrssb-pocket, rrssb-github $rrssb-github, rrssb-instagram $rrssb-instagram, rrssb-delicious $rrssb-delicious, rrssb-vk $rrssb-vk, rrssb-hackernews $rrssb-hackernews ); +$social-list: (rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb-tumblr $rrssb-tumblr, rrssb-linkedin $rrssb-linkedin, rrssb-twitter $rrssb-twitter, rrssb-googleplus $rrssb-googleplus, rrssb-youtube $rrssb-youtube, rrssb-reddit $rrssb-reddit, rrssb-pinterest $rrssb-pinterest, rrssb-pocket $rrssb-pocket, rrssb-github $rrssb-github, rrssb-instagram $rrssb-instagram, rrssb-delicious $rrssb-delicious, rrssb-vk $rrssb-vk, rrssb-hackernews $rrssb-hackernews); // The meat and potatoes .rrssb-buttons { box-sizing: border-box; font-family: $rrssb-main-font; + font-size: 12px; height: 36px; margin: 0; padding: 0; width: 100%; - font-size: 12px; // clearfix buttons for large-format &:after { @@ -78,7 +78,7 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- &.#{nth($s-name, 1)} { a { background-color: nth($s-name, 2); - + &:hover { background-color: darken(nth($s-name, 2), 10%); } @@ -86,6 +86,7 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- } } // end @each directive + a { background-color: #ccc; border-radius: $rrssb-border-radius; @@ -110,14 +111,17 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- position: absolute; top: 0; width: 10%; + svg { height: 17px; width: 17px; + path { fill: $rrssb-txt; } } } + .rrssb-text { color: $rrssb-txt; } @@ -130,6 +134,7 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- &.small { a { padding: 0; + .rrssb-icon { left: auto; margin: 0 auto; @@ -145,6 +150,7 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- } } } + &.large-format { height: auto; @@ -169,12 +175,14 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- width: 100%; } } + .rrssb-text { backface-visibility: hidden; } } } } + &.small-format { padding-top: 5px; @@ -197,6 +205,7 @@ $social-list: ( rrssb-email $rrssb-email, rrssb-facebook $rrssb-facebook, rrssb- } } } + &.tiny-format { height: 22px; position: relative;