diff --git a/.gitignore b/.gitignore index 9bea433..646ac51 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ - .DS_Store +node_modules/ diff --git a/Gulpfile.js b/Gulpfile.js new file mode 100644 index 0000000..1a85e87 --- /dev/null +++ b/Gulpfile.js @@ -0,0 +1,52 @@ +var gulp = require('gulp'), + sass = require('gulp-sass'), + uglify = require('gulp-uglify'), + autoprefixer = require('gulp-autoprefixer'), + minifyCss = require('gulp-minify-css'), + rename = require('gulp-rename'), + filter = require('gulp-filter'), + util = require('gulp-util'), + imagemin = require('gulp-imagemin'), + browserSync = require('browser-sync').create(); + +gulp.task('build', ['sass', 'uglify', 'svg']); + +gulp.task('serve', ['sass', 'uglify', 'svg'], function() { + + browserSync.init({ + server: "." + }); + + gulp.watch("scss/*.scss", ['sass']); + gulp.watch("*.html").on('change', browserSync.reload); + gulp.watch("*.js").on('change', browserSync.reload); +}); + +gulp.task('sass', function() { + gulp.src(['scss/*.scss']) + .pipe(sass()) + .on('error', util.log) + .pipe(autoprefixer()) + .pipe(minifyCss()) + .pipe(gulp.dest('css/')) + .pipe(filter('**/*.css')) + .pipe(browserSync.reload({stream:true})); +}); + +gulp.task('uglify', function() { + gulp.src(['js/rrssb.js']) + .on('error', util.log) + .pipe(gulp.dest('js')); +}); + +gulp.task('svg', function() { + gulp.src(['icons/*.svg', '!icons/*.min.svg']) + .pipe(imagemin()) + .on('error', util.log) + .pipe(rename({ + extname: '.min.svg' + })) + .pipe(gulp.dest('icons/')); +}); + +gulp.task('default', ['serve']); diff --git a/README.md b/README.md index 5cc6463..b7cf1be 100755 --- a/README.md +++ b/README.md @@ -24,52 +24,40 @@ RRSSB is built with [**SASS**](http://sass-lang.com/), so you can easily customi ```html ``` - -- Only copy the `li`s of the buttons you want (index.html has examples of all available types). +- Only copy the `
  • `s of the buttons you want (index.html has examples of all available types). - Adding a class of `popup` to the anchor tag for each share button will make the share dialog open in a popup, rather than a new window. (Good for Facebook, Twitter, Google Plus, etc.) + - Buttons will automatically flow to the size of the ul `rrssb-buttons`. If fixed sized buttons are needed, nest `rrssb-buttons` in a fixed-width container. + - 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/). + - Optionally, all share meta and links can be configured in `rrssb.js` @@ -82,11 +70,11 @@ RRSSB is built with [**SASS**](http://sass-lang.com/), so you can easily customi ``` -#### Other install options: +### Other install options: | Service | Link | | :--------------------------------- | :------- | -| [**Bower**](http://bower.io) | `bower search rrssb` | +| [**Bower**](http://bower.io) | `bower install rrssb` | | Rails * | [**Rails Setup by @rimkashox**](http://www.simplehacks.com/web-dev/how-to-use-rrssb-with-rails/) | | Wordpress * | [**Wordpress plugin by @aarreedd**](http://wordpress.org/plugins/ridiculously-responsive-social-sharing-buttons/) | | Drupal * | [**Drupal Install Instructions**](https://drupal.org/project/rrssb) | @@ -102,8 +90,9 @@ Requires [**SVG**](http://caniuse.com/svg) ### Version Notes -| Version | Note | Issue | Backwards compatible? -| :--- | :------- | :------- | :------- | +| Version | Note | Issue(s) | Backwards compatible? +| :--- | :------- | :------- | :-------: | +| 1.8.0 | Shiny new gulp/browser-sync dev environment /via @connorwyatt, updated Facebook icon, fixed TypeError: $ in js /via @QWp6t . | [(#93)](https://github.com/kni-labs/rrssb/issues/93), [(#97)](https://github.com/kni-labs/rrssb/issues/97) | ✓ | 1.7.6 | Fixed an issue where icon hit areas were breaking out of containers | [(#94)](https://github.com/kni-labs/rrssb/issues/94) | ✓ | 1.7.5 | Flexible Large Format icons text-size based on sibling count. Switched to MIT license. | [(#18)](https://github.com/kni-labs/rrssb/issues/18) | ✓ | 1.7.2 | Better calc detection & fallback /via @IanCaunce | [(#89)](https://github.com/kni-labs/rrssb/pull/89) | ✓ @@ -116,6 +105,13 @@ Requires [**SVG**](http://caniuse.com/svg) Thanks for helping! Please use [**dev branch**](https://github.com/kni-labs/rrssb/tree/dev) for all pull requests. +##### 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 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/bower.json b/bower.json index a00f3a0..3e63972 100755 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { - "name": "RRSSB", - "version": "1.7.7", + "name": "rrssb", + "version": "1.8.0", "authors": [ "(Joshua Tuscan )", "(Daniel Box )" diff --git a/config.codekit b/config.codekit deleted file mode 100755 index 873c007..0000000 --- a/config.codekit +++ /dev/null @@ -1,903 +0,0 @@ -{ -"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit", -"creatorBuild": "16828", -"files": { - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/demo.css": { - "fileType": 16, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/demo.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/normalize.min.css": { - "fileType": 16, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/normalize.min.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/rrssb.css": { - "fileType": 16, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/rrssb.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/facebook-share.jpg": { - "fileType": 16384, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 278392, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/facebook-share.jpg", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/facebook-share.jpg", - "outputPathIsSetByUser": 0, - "processed": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/favicon.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 1568, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/favicon.png", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/favicon.png", - "outputPathIsSetByUser": 0, - "processed": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/icons\/README.md": { - "enableFootnoteSupport": 0, - "enableSmartyPants": 1, - "expandTabs": 1, - "fileType": 4096, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/icons\/README.md", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/icons\/README.html", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/index.html": { - "fileType": 8192, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/index.html", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/rrssb.js": { - "fileType": 64, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/rrssb.js", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/min\/rrssb-ck.js", - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/rrssb.min.js": { - "fileType": 64, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/rrssb.min.js", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/min\/rrssb.min-ck.js", - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/jquery-1.9.1.min.js": { - "fileType": 64, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/jquery-1.9.1.min.js", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/min\/jquery-1.9.1.min-ck.js", - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/modernizr-2.6.2-respond-1.1.0.min.js": { - "fileType": 64, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/modernizr-2.6.2-respond-1.1.0.min.js", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/js\/vendor\/min\/modernizr-2.6.2-respond-1.1.0.min-ck.js", - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/README.md": { - "enableFootnoteSupport": 0, - "enableSmartyPants": 1, - "expandTabs": 1, - "fileType": 4096, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/README.md", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/README.html", - "outputPathIsSetByUser": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/scss\/demo.scss": { - "createSourceMap": 0, - "debugStyle": 0, - "decimalPrecision": 5, - "fileType": 4, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/scss\/demo.scss", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/demo.css", - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "useLibsass": 0 - }, - "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/scss\/rrssb.scss": { - "createSourceMap": 0, - "debugStyle": 0, - "decimalPrecision": 5, - "fileType": 4, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/scss\/rrssb.scss", - "outputAbbreviatedPath": "\/Users\/joshuatuscan\/Dropbox\/Sites\/kni\/labs\/rrssb\/build\/css\/rrssb.css", - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "useLibsass": 0 - } - }, -"hooks": [ - ], -"lastSavedByUser": "Joshua Tuscan", -"manualImportLinks": { - }, -"projectAttributes": { - "bowerAbbreviatedPath": "", - "displayValue": "RRSSB", - "displayValueWasSetByUser": 1, - "iconImageName": "harddrive_orange" - }, -"projectSettings": { - "alwaysUseExternalServer": 0, - "animateCSSInjections": 1, - "autoApplyPSLanguageSettingsStyle": 0, - "autoprefixerBrowserString": "> 1%, last 2 versions, ff 17, opera 12.1", - "autoSyncProjectSettingsFile": 1, - "browserRefreshDelay": 0, - "coffeeAutoOutputPathRelativePath": "", - "coffeeAutoOutputPathReplace1": "", - "coffeeAutoOutputPathReplace2": "", - "coffeeAutoOutputPathStyle": 0, - "coffeeCreateSourceMap": 0, - "coffeeLintFlags2": { - "arrow_spacing": { - "active": 0, - "flagValue": -1 - }, - "camel_case_classes": { - "active": 1, - "flagValue": -1 - }, - "colon_assignment_spacing": { - "active": 0, - "flagValue": 1 - }, - "cyclomatic_complexity": { - "active": 0, - "flagValue": 10 - }, - "duplicate_key": { - "active": 1, - "flagValue": -1 - }, - "empty_constructor_needs_parens": { - "active": 0, - "flagValue": -1 - }, - "indentation": { - "active": 1, - "flagValue": 2 - }, - "line_endings": { - "active": 0, - "flagValue": 0 - }, - "max_line_length": { - "active": 0, - "flagValue": 150 - }, - "missing_fat_arrows": { - "active": 0, - "flagValue": -1 - }, - "newlines_after_classes": { - "active": 0, - "flagValue": 3 - }, - "no-unnecessary_fat_arrows": { - "active": 1, - "flagValue": -1 - }, - "no_backticks": { - "active": 1, - "flagValue": -1 - }, - "no_empty_param_list": { - "active": 0, - "flagValue": -1 - }, - "no_implicit_braces": { - "active": 1, - "flagValue": -1 - }, - "no_implicit_parens": { - "active": 0, - "flagValue": -1 - }, - "no_plusplus": { - "active": 0, - "flagValue": -1 - }, - "no_stand_alone_at": { - "active": 1, - "flagValue": -1 - }, - "no_tabs": { - "active": 1, - "flagValue": -1 - }, - "no_throwing_strings": { - "active": 1, - "flagValue": -1 - }, - "no_trailing_semicolons": { - "active": 1, - "flagValue": -1 - }, - "no_trailing_whitespace": { - "active": 1, - "flagValue": -1 - }, - "non_empty_constructor_needs_parens": { - "active": 0, - "flagValue": -1 - }, - "space_operators": { - "active": 0, - "flagValue": -1 - } - }, - "coffeeMinifyOutput": 1, - "coffeeOutputStyle": 0, - "coffeeSyntaxCheckerStyle": 1, - "externalServerAddress": "http:\/\/localhost:8888", - "externalServerPreviewPathAddition": "", - "genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp", - "hamlAutoOutputPathRelativePath": "", - "hamlAutoOutputPathReplace1": "", - "hamlAutoOutputPathReplace2": "", - "hamlAutoOutputPathStyle": 0, - "hamlEscapeHTMLCharacters": 0, - "hamlNoEscapeInAttributes": 0, - "hamlOutputFormat": 2, - "hamlOutputStyle": 0, - "hamlUseCDATA": 0, - "hamlUseDoubleQuotes": 0, - "hamlUseUnixNewlines": 0, - "jadeAutoOutputPathRelativePath": "", - "jadeAutoOutputPathReplace1": "", - "jadeAutoOutputPathReplace2": "", - "jadeAutoOutputPathStyle": 0, - "jadeCompileDebug": 1, - "jadeOutputStyle": 0, - "javascriptAutoOutputPathRelativePath": "\/min", - "javascriptAutoOutputPathReplace1": "", - "javascriptAutoOutputPathReplace2": "", - "javascriptAutoOutputPathStyle": 2, - "javascriptCreateSourceMap": 1, - "javascriptOutputStyle": 1, - "javascriptOutputSuffix": "-ck", - "javascriptSyntaxCheckerStyle": 1, - "jsCheckerReservedNamesString": "", - "jsHintFlags2": { - "asi": { - "active": 0, - "flagValue": -1 - }, - "bitwise": { - "active": 1, - "flagValue": -1 - }, - "boss": { - "active": 0, - "flagValue": -1 - }, - "browser": { - "active": 1, - "flagValue": -1 - }, - "camelcase": { - "active": 0, - "flagValue": -1 - }, - "couch": { - "active": 0, - "flagValue": -1 - }, - "curly": { - "active": 1, - "flagValue": -1 - }, - "debug": { - "active": 0, - "flagValue": -1 - }, - "devel": { - "active": 0, - "flagValue": -1 - }, - "dojo": { - "active": 0, - "flagValue": -1 - }, - "eqeqeq": { - "active": 1, - "flagValue": -1 - }, - "eqnull": { - "active": 0, - "flagValue": -1 - }, - "es3": { - "active": 0, - "flagValue": -1 - }, - "esnext": { - "active": 0, - "flagValue": -1 - }, - "evil": { - "active": 0, - "flagValue": -1 - }, - "expr": { - "active": 0, - "flagValue": -1 - }, - "forin": { - "active": 0, - "flagValue": -1 - }, - "freeze": { - "active": 1, - "flagValue": -1 - }, - "funcscope": { - "active": 0, - "flagValue": -1 - }, - "gcl": { - "active": 0, - "flagValue": -1 - }, - "globalstrict": { - "active": 0, - "flagValue": -1 - }, - "immed": { - "active": 0, - "flagValue": -1 - }, - "indent": { - "active": 0, - "flagValue": 4 - }, - "iterator": { - "active": 0, - "flagValue": -1 - }, - "jquery": { - "active": 1, - "flagValue": -1 - }, - "lastsemic": { - "active": 0, - "flagValue": -1 - }, - "latedef": { - "active": 1, - "flagValue": -1 - }, - "laxbreak": { - "active": 0, - "flagValue": -1 - }, - "laxcomma": { - "active": 0, - "flagValue": -1 - }, - "loopfunc": { - "active": 0, - "flagValue": -1 - }, - "maxcomplexity": { - "active": 0, - "flagValue": 10 - }, - "maxdepth": { - "active": 0, - "flagValue": 3 - }, - "maxlen": { - "active": 0, - "flagValue": 150 - }, - "maxparams": { - "active": 0, - "flagValue": 3 - }, - "maxstatements": { - "active": 0, - "flagValue": 4 - }, - "mootools": { - "active": 0, - "flagValue": -1 - }, - "moz": { - "active": 0, - "flagValue": -1 - }, - "multistr": { - "active": 0, - "flagValue": -1 - }, - "newcap": { - "active": 1, - "flagValue": -1 - }, - "noarg": { - "active": 1, - "flagValue": -1 - }, - "node": { - "active": 0, - "flagValue": -1 - }, - "noempty": { - "active": 0, - "flagValue": -1 - }, - "nonbsp": { - "active": 0, - "flagValue": -1 - }, - "nonew": { - "active": 1, - "flagValue": -1 - }, - "nonstandard": { - "active": 0, - "flagValue": -1 - }, - "notypeof": { - "active": 1, - "flagValue": -1 - }, - "noyield": { - "active": 0, - "flagValue": -1 - }, - "onecase": { - "active": 0, - "flagValue": -1 - }, - "onevar": { - "active": 0, - "flagValue": -1 - }, - "phantom": { - "active": 0, - "flagValue": -1 - }, - "plusplus": { - "active": 0, - "flagValue": -1 - }, - "proto": { - "active": 0, - "flagValue": -1 - }, - "prototypejs": { - "active": 0, - "flagValue": -1 - }, - "regexp": { - "active": 1, - "flagValue": -1 - }, - "rhino": { - "active": 0, - "flagValue": -1 - }, - "scripturl": { - "active": 0, - "flagValue": -1 - }, - "shadow": { - "active": 0, - "flagValue": -1 - }, - "shelljs": { - "active": 0, - "flagValue": -1 - }, - "smarttabs": { - "active": 0, - "flagValue": -1 - }, - "strict": { - "active": 0, - "flagValue": -1 - }, - "sub": { - "active": 0, - "flagValue": -1 - }, - "supernew": { - "active": 0, - "flagValue": -1 - }, - "trailing": { - "active": 1, - "flagValue": -1 - }, - "typed": { - "active": 0, - "flagValue": -1 - }, - "undef": { - "active": 1, - "flagValue": -1 - }, - "unused": { - "active": 1, - "flagValue": -1 - }, - "white": { - "active": 0, - "flagValue": -1 - }, - "withstmt": { - "active": 0, - "flagValue": -1 - }, - "worker": { - "active": 0, - "flagValue": -1 - }, - "wsh": { - "active": 0, - "flagValue": -1 - }, - "yui": { - "active": 0, - "flagValue": -1 - } - }, - "jsLintFlags2": { - "ass": { - "active": 0, - "flagValue": -1 - }, - "bitwise": { - "active": 0, - "flagValue": -1 - }, - "browser": { - "active": 1, - "flagValue": -1 - }, - "closure": { - "active": 0, - "flagValue": -1 - }, - "continue": { - "active": 0, - "flagValue": -1 - }, - "debug": { - "active": 0, - "flagValue": -1 - }, - "devel": { - "active": 0, - "flagValue": -1 - }, - "eqeq": { - "active": 0, - "flagValue": -1 - }, - "evil": { - "active": 0, - "flagValue": -1 - }, - "forin": { - "active": 0, - "flagValue": -1 - }, - "indent": { - "active": 0, - "flagValue": 4 - }, - "maxlen": { - "active": 0, - "flagValue": 150 - }, - "newcap": { - "active": 0, - "flagValue": -1 - }, - "node": { - "active": 0, - "flagValue": -1 - }, - "nomen": { - "active": 0, - "flagValue": -1 - }, - "plusplus": { - "active": 0, - "flagValue": -1 - }, - "properties": { - "active": 0, - "flagValue": -1 - }, - "regexp": { - "active": 0, - "flagValue": -1 - }, - "rhino": { - "active": 0, - "flagValue": -1 - }, - "sloppy": { - "active": 0, - "flagValue": -1 - }, - "stupid": { - "active": 0, - "flagValue": -1 - }, - "sub": { - "active": 0, - "flagValue": -1 - }, - "todo": { - "active": 0, - "flagValue": -1 - }, - "unparam": { - "active": 0, - "flagValue": -1 - }, - "vars": { - "active": 0, - "flagValue": -1 - }, - "white": { - "active": 0, - "flagValue": -1 - } - }, - "kitAutoOutputPathRelativePath": "", - "kitAutoOutputPathReplace1": "", - "kitAutoOutputPathReplace2": "", - "kitAutoOutputPathStyle": 0, - "lessAllowInsecureImports": 0, - "lessAutoOutputPathRelativePath": "..\/css", - "lessAutoOutputPathReplace1": "less", - "lessAutoOutputPathReplace2": "css", - "lessAutoOutputPathStyle": 2, - "lessCreateSourceMap": 0, - "lessDisableJavascript": 0, - "lessIeCompatibility": 1, - "lessOutputStyle": 0, - "lessRelativeURLS": 0, - "lessStrictImports": 0, - "lessStrictMath": 0, - "lessStrictUnits": 0, - "markdownAutoOutputPathRelativePath": "", - "markdownAutoOutputPathReplace1": "", - "markdownAutoOutputPathReplace2": "", - "markdownAutoOutputPathStyle": 0, - "markdownEnableFootnotes": 0, - "markdownEnableSmartyPants": 1, - "markdownExpandTabs": 1, - "reloadFileURLs": 0, - "sassAutoOutputPathRelativePath": "..\/css", - "sassAutoOutputPathReplace1": "sass", - "sassAutoOutputPathReplace2": "css", - "sassAutoOutputPathStyle": 2, - "sassCreateSourceMap": 0, - "sassDebugStyle": 0, - "sassDecimalPrecision": 5, - "sassOutputStyle": 0, - "sassUseLibsass": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "skippedItemsString": ".svn, .git, .hg, log, _logs, _cache, cache, logs", - "slimAutoOutputPathRelativePath": "", - "slimAutoOutputPathReplace1": "", - "slimAutoOutputPathReplace2": "", - "slimAutoOutputPathStyle": 0, - "slimCompileOnly": 0, - "slimLogicless": 0, - "slimOutputStyle": 1, - "slimRailsCompatible": 0, - "stylusAutoOutputPathRelativePath": "..\/css", - "stylusAutoOutputPathReplace1": "stylus", - "stylusAutoOutputPathReplace2": "css", - "stylusAutoOutputPathStyle": 2, - "stylusDebugStyle": 0, - "stylusImportCSS": 0, - "stylusOutputStyle": 0, - "stylusResolveRelativeURLS": 0, - "typescriptAutoOutputPathRelativePath": "\/js", - "typescriptAutoOutputPathReplace1": "", - "typescriptAutoOutputPathReplace2": "", - "typescriptAutoOutputPathStyle": 2, - "typescriptCreateDeclarationFile": 0, - "typescriptCreateSourceMap": 0, - "typescriptMinifyOutput": 0, - "typescriptModuleType": 0, - "typescriptNoImplicitAny": 0, - "typescriptNoResolve": 0, - "typescriptRemoveComments": 0, - "typescriptTargetECMAVersion": 0, - "uglifyDefinesString": "", - "uglifyFlags2": { - "ascii-only": { - "active": 0, - "flagValue": -1 - }, - "booleans": { - "active": 1, - "flagValue": -1 - }, - "bracketize": { - "active": 0, - "flagValue": -1 - }, - "cascade": { - "active": 1, - "flagValue": -1 - }, - "comments": { - "active": 1, - "flagValue": -1 - }, - "comparisons": { - "active": 1, - "flagValue": -1 - }, - "compress": { - "active": 1, - "flagValue": -1 - }, - "conditionals": { - "active": 1, - "flagValue": -1 - }, - "dead_code": { - "active": 0, - "flagValue": -1 - }, - "drop_debugger": { - "active": 1, - "flagValue": -1 - }, - "eval": { - "active": 0, - "flagValue": -1 - }, - "evaluate": { - "active": 1, - "flagValue": -1 - }, - "hoist_funs": { - "active": 1, - "flagValue": -1 - }, - "hoist_vars": { - "active": 0, - "flagValue": -1 - }, - "if_return": { - "active": 1, - "flagValue": -1 - }, - "indent-level": { - "active": 0, - "flagValue": 4 - }, - "indent-start": { - "active": 0, - "flagValue": 0 - }, - "inline-script": { - "active": 0, - "flagValue": -1 - }, - "join_vars": { - "active": 1, - "flagValue": -1 - }, - "loops": { - "active": 1, - "flagValue": -1 - }, - "mangle": { - "active": 1, - "flagValue": -1 - }, - "max-line-len": { - "active": 1, - "flagValue": 32000 - }, - "properties": { - "active": 1, - "flagValue": -1 - }, - "quote-keys": { - "active": 0, - "flagValue": -1 - }, - "screw-ie8": { - "active": 0, - "flagValue": -1 - }, - "semicolons": { - "active": 1, - "flagValue": -1 - }, - "sequences": { - "active": 1, - "flagValue": -1 - }, - "sort": { - "active": 0, - "flagValue": -1 - }, - "space-colon": { - "active": 1, - "flagValue": -1 - }, - "toplevel": { - "active": 0, - "flagValue": -1 - }, - "unsafe": { - "active": 0, - "flagValue": -1 - }, - "unused": { - "active": 0, - "flagValue": -1 - }, - "warnings": { - "active": 0, - "flagValue": -1 - }, - "width": { - "active": 1, - "flagValue": 80 - } - }, - "uglifyReservedNamesString": "$", - "websiteRelativeRoot": "" - }, -"settingsFileVersion": "2" -} diff --git a/css/demo.css b/css/demo.css index e57900f..13f4953 100755 --- a/css/demo.css +++ b/css/demo.css @@ -1 +1 @@ -body{overflow-x:hidden}a{text-decoration:none;font-weight:500;color:#0a88ff}a:hover{color:#043d72}.main-container{padding:1% 6%}.main-container h1{letter-spacing:-.03em;color:#444;margin:20px 0 10px 0;-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;-o-transition:all 0.2s ease;transition:all 0.2s ease}@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 img.rrssb-preview{width:40%;height:auto;float:right;margin:0 0 1% 1%;-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;-o-transition:all 0.2s ease;transition:all 0.2s ease}@media screen and (max-width: 400px){.main-container img.rrssb-preview{width:60%}}.main-container small{display:block;margin:40px 0;font-size:12px;color:#999}hr{background-color:#ddd;border:0;height:1px;margin:0 0 10px 0}.share-container{position:relative;padding:0 0 25px}@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}}.share-container .rrssb-buttons{float:left;width:calc(100% - 116px)}@media screen and (max-width: 400px){.share-container .rrssb-buttons{width:100%;float:none;clear:both}} +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 diff --git a/css/rrssb.css b/css/rrssb.css index c084f34..2b9358f 100755 --- a/css/rrssb.css +++ b/css/rrssb.css @@ -1 +1 @@ -.rrssb-buttons.large-format li a,.rrssb-buttons.large-format li a .rrssb-text{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden}.rrssb-buttons,.rrssb-buttons li,.rrssb-buttons li a{-moz-box-sizing:border-box;box-sizing:border-box}.clearfix{*zoom:1}.clearfix:after{clear:both}.clearfix:before,.clearfix:after{content:" ";display:table}.rrssb-buttons{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;height:36px;margin:0;padding:0;width:100%}.rrssb-buttons li{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 a{background-color:#ccc;border-radius:2px;display:block;font-size:11px;font-weight:bold;height:100%;padding:11px 7px 12px 27px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:background-color 0.2s ease-in-out;-moz-transition:background-color 0.2s ease-in-out;-o-transition:background-color 0.2s ease-in-out;transition:background-color 0.2s ease-in-out}.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,.rrssb-buttons li a .rrssb-icon svg polygon{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,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{height:auto}.rrssb-buttons.large-format li{height:auto}.rrssb-buttons.large-format li:first-child:nth-last-child(1) a{font-size:20px;font-size:4vw}.rrssb-buttons.large-format li:first-child:nth-last-child(2) a,.rrssb-buttons.large-format li:first-child:nth-last-child(2) ~ li a{font-size:16px;font-size:2vw}.rrssb-buttons.large-format li:first-child:nth-last-child(3) a,.rrssb-buttons.large-format li:first-child:nth-last-child(3) ~ li a{font-size:14px;font-size:1.7vw}.rrssb-buttons.large-format li:first-child:nth-last-child(4) a,.rrssb-buttons.large-format li:first-child:nth-last-child(4) ~ li a{font-size:13px;font-size:1.4vw}.rrssb-buttons.large-format li:first-child:nth-last-child(5) a,.rrssb-buttons.large-format li:first-child:nth-last-child(5) ~ li a{font-size:13px;font-size:1.2vw}.rrssb-buttons.large-format li:first-child:nth-last-child(6) a,.rrssb-buttons.large-format li:first-child:nth-last-child(6) ~ li a{font-size:12px;font-size:1.05vw}.rrssb-buttons.large-format li:first-child:nth-last-child(7) a,.rrssb-buttons.large-format li:first-child:nth-last-child(7) ~ li a{font-size:11px;font-size:.9vw}.rrssb-buttons.large-format li:first-child:nth-last-child(8) a,.rrssb-buttons.large-format li:first-child:nth-last-child(8) ~ li a{font-size:11px;font-size:.8vw}.rrssb-buttons.large-format li:first-child:nth-last-child(9) a,.rrssb-buttons.large-format li:first-child:nth-last-child(9) ~ li a{font-size:11px;font-size:.7vw}.rrssb-buttons.large-format li:first-child:nth-last-child(10) a,.rrssb-buttons.large-format li:first-child:nth-last-child(10) ~ li a{font-size:11px;font-size:.6vw}.rrssb-buttons.large-format li:first-child:nth-last-child(11) a,.rrssb-buttons.large-format li:first-child:nth-last-child(11) ~ li a{font-size:11px;font-size:.5vw}.rrssb-buttons.large-format li a{border-radius:0.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%;width:100%;position:absolute;top:0}.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:hover,.rrssb-buttons.tiny-format li a:active{background-color:transparent}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg polygon{fill:#0a88ff}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#0054a3}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg polygon{fill:#306199}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#18304b}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg polygon{fill:#32506d}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#121d27}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg polygon{fill:#007bb6}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#003650}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg polygon{fill:#26c4f1}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#0b84a6}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg polygon{fill:#e93f2e}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#a01e11}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg polygon{fill:#df1c31}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#84111d}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg polygon{fill:#8bbbe3}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#398bcf}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg polygon{fill:#b81621}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#5d0b11}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg polygon{fill:#ed4054}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#b61124}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg polygon{fill:#444}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#111}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg polygon{fill:#517fa4}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#2f4a60} +.clearfix:after{clear:both}.clearfix:after,.clearfix:before{content:' ';display:table}.rrssb-buttons{box-sizing:border-box;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;height:36px;margin:0;padding:0;width:100%}.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;font-size:11px;-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,.rrssb-buttons li a .rrssb-icon svg polygon{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:first-child:nth-last-child(1) a{font-size:20px;font-size:4vw}.rrssb-buttons.large-format li:first-child:nth-last-child(2) a,.rrssb-buttons.large-format li:first-child:nth-last-child(2)~li a{font-size:16px;font-size:2vw}.rrssb-buttons.large-format li:first-child:nth-last-child(3) a,.rrssb-buttons.large-format li:first-child:nth-last-child(3)~li a{font-size:14px;font-size:1.7vw}.rrssb-buttons.large-format li:first-child:nth-last-child(4) a,.rrssb-buttons.large-format li:first-child:nth-last-child(4)~li a{font-size:13px;font-size:1.4vw}.rrssb-buttons.large-format li:first-child:nth-last-child(5) a,.rrssb-buttons.large-format li:first-child:nth-last-child(5)~li a{font-size:13px;font-size:1.2vw}.rrssb-buttons.large-format li:first-child:nth-last-child(6) a,.rrssb-buttons.large-format li:first-child:nth-last-child(6)~li a{font-size:12px;font-size:1.05vw}.rrssb-buttons.large-format li:first-child:nth-last-child(7) a,.rrssb-buttons.large-format li:first-child:nth-last-child(7)~li a{font-size:11px;font-size:.9vw}.rrssb-buttons.large-format li:first-child:nth-last-child(8) a,.rrssb-buttons.large-format li:first-child:nth-last-child(8)~li a{font-size:11px;font-size:.8vw}.rrssb-buttons.large-format li:first-child:nth-last-child(9) a,.rrssb-buttons.large-format li:first-child:nth-last-child(9)~li a{font-size:11px;font-size:.7vw}.rrssb-buttons.large-format li:first-child:nth-last-child(10) a,.rrssb-buttons.large-format li:first-child:nth-last-child(10)~li a{font-size:11px;font-size:.6vw}.rrssb-buttons.large-format li:first-child:nth-last-child(11) a,.rrssb-buttons.large-format li:first-child:nth-last-child(11)~li a{font-size:11px;font-size:.5vw}.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,.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg polygon{fill:#0a88ff}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#0054a3}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg polygon{fill:#306199}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#18304b}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg polygon{fill:#32506d}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#121d27}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg polygon{fill:#007bb6}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#003650}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg polygon{fill:#26c4f1}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#0b84a6}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg polygon{fill:#e93f2e}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#a01e11}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg polygon{fill:#df1c31}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#84111d}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg polygon{fill:#8bbbe3}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#398bcf}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg polygon{fill:#b81621}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#5d0b11}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg polygon{fill:#ed4054}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#b61124}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg polygon{fill:#444}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#111}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg polygon{fill:#517fa4}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#2f4a60}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon svg polygon{fill:#0B79E5}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#064684}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon svg polygon{fill:#4d71a9}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#2d4263}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon svg polygon{fill:#f60}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon:hover .rrssb-icon svg path,.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon:hover .rrssb-icon svg polygon{fill:#993d00} \ No newline at end of file diff --git a/icons/README.md b/icons/README.md index c56572e..c3d0c5b 100755 --- a/icons/README.md +++ b/icons/README.md @@ -1 +1,3 @@ -These are for reference only. Not needed in the build. +These are for reference only. This folder is not needed in the build. Copy and paste the minimized version directly into your markup. + +To add a new icon, drag it to this folder, then restart gulp and it will be minimized. Used minimized code in markup. diff --git a/icons/delicious.min.svg b/icons/delicious.min.svg new file mode 100644 index 0000000..1687bb6 --- /dev/null +++ b/icons/delicious.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/delicious.svg b/icons/delicious.svg new file mode 100644 index 0000000..cd335b2 --- /dev/null +++ b/icons/delicious.svg @@ -0,0 +1,5 @@ + + + diff --git a/icons/facebook.min.svg b/icons/facebook.min.svg new file mode 100644 index 0000000..d70f4f5 --- /dev/null +++ b/icons/facebook.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/facebook.svg b/icons/facebook.svg old mode 100755 new mode 100644 index 0fe86bc..66a7ea7 --- a/icons/facebook.svg +++ b/icons/facebook.svg @@ -1,8 +1,3 @@ - - - - - + + + diff --git a/icons/github.min.svg b/icons/github.min.svg new file mode 100755 index 0000000..009b035 --- /dev/null +++ b/icons/github.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/google_plus.min.svg b/icons/google_plus.min.svg new file mode 100755 index 0000000..5194ce7 --- /dev/null +++ b/icons/google_plus.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/hackernews.min.svg b/icons/hackernews.min.svg new file mode 100644 index 0000000..e9045f4 --- /dev/null +++ b/icons/hackernews.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/hackernews.svg b/icons/hackernews.svg new file mode 100644 index 0000000..fb5bbbc --- /dev/null +++ b/icons/hackernews.svg @@ -0,0 +1 @@ + diff --git a/icons/instagram.min.svg b/icons/instagram.min.svg new file mode 100755 index 0000000..2436dfd --- /dev/null +++ b/icons/instagram.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/linkedin.min.svg b/icons/linkedin.min.svg new file mode 100755 index 0000000..aeb9ad1 --- /dev/null +++ b/icons/linkedin.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/mail.min.svg b/icons/mail.min.svg new file mode 100755 index 0000000..a44e69c --- /dev/null +++ b/icons/mail.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/pinterest.min.svg b/icons/pinterest.min.svg new file mode 100755 index 0000000..8d4feb2 --- /dev/null +++ b/icons/pinterest.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/pocket.min.svg b/icons/pocket.min.svg new file mode 100755 index 0000000..c9b56b4 --- /dev/null +++ b/icons/pocket.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/reddit.min.svg b/icons/reddit.min.svg new file mode 100755 index 0000000..ea27051 --- /dev/null +++ b/icons/reddit.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/tumblr.min.svg b/icons/tumblr.min.svg new file mode 100755 index 0000000..dca8d7b --- /dev/null +++ b/icons/tumblr.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/twitter.min.svg b/icons/twitter.min.svg new file mode 100755 index 0000000..fd77187 --- /dev/null +++ b/icons/twitter.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/vk.min.svg b/icons/vk.min.svg new file mode 100644 index 0000000..f90a353 --- /dev/null +++ b/icons/vk.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/vk.svg b/icons/vk.svg new file mode 100644 index 0000000..6862b77 --- /dev/null +++ b/icons/vk.svg @@ -0,0 +1,20 @@ +image/svg+xml diff --git a/icons/youtube.min.svg b/icons/youtube.min.svg new file mode 100755 index 0000000..da84783 --- /dev/null +++ b/icons/youtube.min.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html index 76bbf51..7955953 100755 --- a/index.html +++ b/index.html @@ -1,237 +1,244 @@ - - - - Ridiculously Responsive Social Sharing Buttons by KNI Labs - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Ridiculously Responsive Social Sharing Buttons

    -
    - - - -

    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.  v 1.7.7 - -
    - - - - - - - - - - + + + + + Ridiculously Responsive Social Sharing Buttons by KNI Labs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Ridiculously Responsive Social Sharing Buttons

    +
    + + + +

    + 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.   + v 1.8.0 + + +
    + + + + + + + + + + + + diff --git a/js/rrssb.js b/js/rrssb.js index eae7fd4..ba48804 100755 --- a/js/rrssb.js +++ b/js/rrssb.js @@ -17,7 +17,7 @@ \__\/ \__\/ */ -+(function(window, jQuery, undefined) { ++(function(window, $, undefined) { 'use strict'; var support = { @@ -28,10 +28,10 @@ * Public Function */ - jQuery.fn.rrssb = function( options ) { + $.fn.rrssb = function( options ) { // Settings that $.rrssb() will accept. - var settings = jQuery.extend({ + var settings = $.extend({ description: undefined, emailAddress: undefined, emailBody: undefined, @@ -49,20 +49,20 @@ }; if (settings.url !== undefined) { - jQuery(this).find('.rrssb-facebook a').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + settings.url); - jQuery(this).find('.rrssb-tumblr a').attr('href', 'http://tumblr.com/share/link?url=' + settings.url + (settings.title !== undefined ? '&name=' + settings.title : '') + (settings.description !== undefined ? '&description=' + settings.description : '')); - jQuery(this).find('.rrssb-linkedin a').attr('href', 'http://www.linkedin.com/shareArticle?mini=true&url=' + settings.url + (settings.title !== undefined ? '&title=' + settings.title : '') + (settings.description !== undefined ? '&summary=' + settings.description : '')); - jQuery(this).find('.rrssb-twitter a').attr('href', 'http://twitter.com/home?status=' + (settings.description !== undefined ? settings.description : '') + '%20' + settings.url); - jQuery(this).find('.rrssb-hackernews a').attr('href', 'https://news.ycombinator.com/submitlink?u=' + settings.url + (settings.title !== undefined ? '&text=' + settings.title : '')); - jQuery(this).find('.rrssb-reddit a').attr('href', 'http://www.reddit.com/submit?url=' + settings.url + (settings.description !== undefined ? '&text=' + settings.description : '') + (settings.title !== undefined ? '&title=' + settings.title : '')); - jQuery(this).find('.rrssb-googleplus a').attr('href', 'https://plus.google.com/share?url=' + (settings.description !== undefined ? settings.description : '') + '%20' + settings.url); - jQuery(this).find('.rrssb-pinterest a').attr('href', 'http://pinterest.com/pin/create/button/?url=' + settings.url + ((settings.image !== undefined) ? '&media=' + settings.image : '') + (settings.description !== undefined ? '&description=' + settings.description : '')); - jQuery(this).find('.rrssb-pocket a').attr('href', 'https://getpocket.com/save?url=' + settings.url); - jQuery(this).find('.rrssb-github a').attr('href', settings.url); + $(this).find('.rrssb-facebook a').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + settings.url); + $(this).find('.rrssb-tumblr a').attr('href', 'http://tumblr.com/share/link?url=' + settings.url + (settings.title !== undefined ? '&name=' + settings.title : '') + (settings.description !== undefined ? '&description=' + settings.description : '')); + $(this).find('.rrssb-linkedin a').attr('href', 'http://www.linkedin.com/shareArticle?mini=true&url=' + settings.url + (settings.title !== undefined ? '&title=' + settings.title : '') + (settings.description !== undefined ? '&summary=' + settings.description : '')); + $(this).find('.rrssb-twitter a').attr('href', 'http://twitter.com/home?status=' + (settings.description !== undefined ? settings.description : '') + '%20' + settings.url); + $(this).find('.rrssb-hackernews a').attr('href', 'https://news.ycombinator.com/submitlink?u=' + settings.url + (settings.title !== undefined ? '&text=' + settings.title : '')); + $(this).find('.rrssb-reddit a').attr('href', 'http://www.reddit.com/submit?url=' + settings.url + (settings.description !== undefined ? '&text=' + settings.description : '') + (settings.title !== undefined ? '&title=' + settings.title : '')); + $(this).find('.rrssb-googleplus a').attr('href', 'https://plus.google.com/share?url=' + (settings.description !== undefined ? settings.description : '') + '%20' + settings.url); + $(this).find('.rrssb-pinterest a').attr('href', 'http://pinterest.com/pin/create/button/?url=' + settings.url + ((settings.image !== undefined) ? '&media=' + settings.image : '') + (settings.description !== undefined ? '&description=' + settings.description : '')); + $(this).find('.rrssb-pocket a').attr('href', 'https://getpocket.com/save?url=' + settings.url); + $(this).find('.rrssb-github a').attr('href', settings.url); } if (settings.emailAddress !== undefined) { - jQuery(this).find('.rrssb-email a').attr('href', 'mailto:' + settings.emailAddress + '?' + (settings.emailSubject !== undefined ? 'subject=' + settings.emailSubject : '') + (settings.emailBody !== undefined ? '&body=' + settings.emailBody : '')); + $(this).find('.rrssb-email a').attr('href', 'mailto:' + settings.emailAddress + '?' + (settings.emailSubject !== undefined ? 'subject=' + settings.emailSubject : '') + (settings.emailBody !== undefined ? '&body=' + settings.emailBody : '')); } }; @@ -106,9 +106,9 @@ var setPercentBtns = function() { // loop through each instance of buttons - jQuery('.rrssb-buttons').each(function(index) { - var self = jQuery(this); - var buttons = jQuery('li:visible', self); + $('.rrssb-buttons').each(function(index) { + var self = $(this); + var buttons = $('li:visible', self); var numOfButtons = buttons.length; var initBtnWidth = 100 / numOfButtons; @@ -119,14 +119,14 @@ var makeExtremityBtns = function() { // loop through each instance of buttons - jQuery('.rrssb-buttons').each(function(index) { - var self = jQuery(this); + $('.rrssb-buttons').each(function(index) { + var self = $(this); //get button width var containerWidth = self.width(); - var buttonWidth = jQuery('li', self).not('.small').first().width(); + var buttonWidth = $('li', self).not('.small').first().width(); // enlarge buttons if they get wide enough - if (buttonWidth > 170 && jQuery('li.small', self).length < 1) { + if (buttonWidth > 170 && $('li.small', self).length < 1) { self.addClass('large-format'); } else { self.removeClass('large-format'); @@ -142,10 +142,10 @@ var backUpFromSmall = function() { // loop through each instance of buttons - jQuery('.rrssb-buttons').each(function(index) { - var self = jQuery(this); + $('.rrssb-buttons').each(function(index) { + var self = $(this); - var buttons = jQuery('li', self); + var buttons = $('li', self); var smallButtons = buttons.filter('.small'); var totalBtnSze = 0; var totalTxtSze = 0; @@ -166,7 +166,7 @@ } else { buttons.not('.small').each(function(index) { - var button = jQuery(this); + var button = $(this); var txtWidth = parseFloat(button.attr('data-size')) + 55; var btnWidth = parseFloat(button.width()); @@ -186,17 +186,15 @@ var checkSize = function(init) { // loop through each instance of buttons - jQuery('.rrssb-buttons').each(function(index) { + $('.rrssb-buttons').each(function(index) { - var self = jQuery(this); - var buttons = jQuery('li', self); - var elems = buttons.nextAll(); - var count = elems.length; + var self = $(this); + var buttons = $('li', self); // get buttons in reverse order and loop through each - jQuery(buttons.get().reverse()).each(function(index, count) { + $(buttons.get().reverse()).each(function(index, count) { - var button = jQuery(this); + var button = $(this); if (button.hasClass('small') === false) { var txtWidth = parseFloat(button.attr('data-size')) + 55; @@ -204,7 +202,7 @@ if (txtWidth > btnWidth) { var btn2small = buttons.not('.small').last(); - jQuery(btn2small).addClass('small'); + $(btn2small).addClass('small'); sizeSmallBtns(); } } @@ -221,14 +219,14 @@ var sizeSmallBtns = function() { // loop through each instance of buttons - jQuery('.rrssb-buttons').each(function(index) { - var self = jQuery(this); + $('.rrssb-buttons').each(function(index) { + var self = $(this); var regButtonCount; var regPercent; var pixelsOff; var magicWidth; var smallBtnFraction; - var buttons = jQuery('li', self); + var buttons = $('li', self); var smallButtons = buttons.filter('.small'); // readjust buttons for small display @@ -270,8 +268,8 @@ }; var rrssbInit = function() { - jQuery('.rrssb-buttons').each(function(index) { - jQuery(this).addClass('rrssb-'+(index + 1)); + $('.rrssb-buttons').each(function(index) { + $(this).addClass('rrssb-'+(index + 1)); }); detectCalcSupport(); @@ -279,8 +277,8 @@ setPercentBtns(); // grab initial text width of each button and add as data attr - jQuery('.rrssb-buttons li .rrssb-text').each(function(index) { - var buttonTxt = jQuery(this); + $('.rrssb-buttons li .rrssb-text').each(function(index) { + var buttonTxt = $(this); var txtWdth = buttonTxt.width(); buttonTxt.closest('li').attr('data-size', txtWdth); }); @@ -290,7 +288,7 @@ var rrssbMagicLayout = function(callback) { //remove small buttons before each conversion try - jQuery('.rrssb-buttons li.small').removeClass('small'); + $('.rrssb-buttons li.small').removeClass('small'); checkSize(); @@ -330,19 +328,19 @@ })(); // init load - jQuery(document).ready(function(){ + $(document).ready(function(){ /* * Event listners */ - jQuery('.rrssb-buttons a.popup').on('click', function(e){ - var self = jQuery(this); + $('.rrssb-buttons a.popup').on('click', function(e){ + var self = $(this); popupCenter(self.attr('href'), self.find('.rrssb-text').html(), 580, 470); e.preventDefault(); }); // resize function - jQuery(window).resize(function () { + $(window).resize(function () { rrssbMagicLayout(sizeSmallBtns); diff --git a/js/rrssb.min.js b/js/rrssb.min.js index 5c15250..3bde420 100644 --- a/js/rrssb.min.js +++ b/js/rrssb.min.js @@ -15,4 +15,4 @@ \ \:\ \ \:\ /__/:/ \ \:\ \ \:\ \__\/ \__\/ \__\/ -*/+function(e,t,n){"use strict";var r={calc:!1};t.fn.rrssb=function(e){var r=t.extend({description:n,emailAddress:n,emailBody:n,emailSubject:n,image:n,title:n,url:n},e);for(var i in r)r.hasOwnProperty(i)&&r[i]!==n&&(r[i]=s(r[i]));if(r.url!==n){t(this).find(".rrssb-facebook a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+r.url);t(this).find(".rrssb-tumblr a").attr("href","http://tumblr.com/share/link?url="+r.url+(r.title!==n?"&name="+r.title:"")+(r.description!==n?"&description="+r.description:""));t(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+r.url+(r.title!==n?"&title="+r.title:"")+(r.description!==n?"&summary="+r.description:""));t(this).find(".rrssb-twitter a").attr("href","http://twitter.com/home?status="+(r.description!==n?r.description:"")+"%20"+r.url);t(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+r.url+(r.title!==n?"&text="+r.title:""));t(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+r.url+(r.description!==n?"&text="+r.description:"")+(r.title!==n?"&title="+r.title:""));t(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(r.description!==n?r.description:"")+"%20"+r.url);t(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+r.url+(r.image!==n?"&media="+r.image:"")+(r.description!==n?"&description="+r.description:""));t(this).find(".rrssb-pocket a").attr("href","https://getpocket.com/save?url="+r.url);t(this).find(".rrssb-github a").attr("href",r.url)}r.emailAddress!==n&&t(this).find(".rrssb-email a").attr("href","mailto:"+r.emailAddress+"?"+(r.emailSubject!==n?"subject="+r.emailSubject:"")+(r.emailBody!==n?"&body="+r.emailBody:""))};var i=function(){var e=$("
    "),t=["calc","-webkit-calc","-moz-calc"];$("body").append(e);for(var n=0;n170&&t("li.small",n).length<1?n.addClass("large-format"):n.removeClass("large-format");r<200?n.removeClass("small-format").addClass("tiny-format"):n.removeClass("tiny-format")})},a=function(){t(".rrssb-buttons").each(function(e){var n=t(this),r=t("li",n),i=r.filter(".small"),s=0,o=0,u=i.first(),a=parseFloat(u.attr("data-size"))+55,f=i.length;if(f===r.length){var c=f*42,h=n.width();if(c+ao){var u=r.not(".small").last();t(u).addClass("small");l()}}--n||a()})});e===!0&&h(l)},l=function(){t(".rrssb-buttons").each(function(e){var n=t(this),i,s,u,a,f,l=t("li",n),c=l.filter(".small"),h=c.length;if(h>0&&h!==l.length){n.removeClass("small-format");c.css("width","42px");u=h*42;i=l.not(".small").length;s=100/i;f=u/i;if(r.calc===!1){a=(n.innerWidth()-1)/i-f;a=Math.floor(a*1e3)/1e3;a+="px"}else a=r.calc+"("+s+"% - "+f+"px)";l.not(".small").css("width",a)}else if(h===l.length){n.addClass("small-format");o()}else{n.removeClass("small-format");o()}});u()},c=function(){t(".rrssb-buttons").each(function(e){t(this).addClass("rrssb-"+(e+1))});i();o();t(".rrssb-buttons li .rrssb-text").each(function(e){var n=t(this),r=n.width();n.closest("li").attr("data-size",r)});f(!0)},h=function(e){t(".rrssb-buttons li.small").removeClass("small");f();e()},p=function(t,r,i,s){var o=e.screenLeft!==n?e.screenLeft:screen.left,u=e.screenTop!==n?e.screenTop:screen.top,a=e.innerWidth?e.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,f=e.innerHeight?e.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,l=a/2-i/2+o,c=f/3-s/3+u,h=e.open(t,r,"scrollbars=yes, width="+i+", height="+s+", top="+c+", left="+l);e.focus&&h.focus()},d=function(){var e={};return function(t,n,r){r||(r="Don't call this twice without a uniqueId");e[r]&&clearTimeout(e[r]);e[r]=setTimeout(t,n)}}();t(document).ready(function(){t(".rrssb-buttons a.popup").on("click",function(e){var n=t(this);p(n.attr("href"),n.find(".rrssb-text").html(),580,470);e.preventDefault()});t(e).resize(function(){h(l);d(function(){h(l)},200,"finished resizing")});c()});e.rrssbInit=c}(window,jQuery); \ No newline at end of file +*/+function(t,e,r){"use strict";var s={calc:!1};e.fn.rrssb=function(t){var s=e.extend({description:r,emailAddress:r,emailBody:r,emailSubject:r,image:r,title:r,url:r},t);for(var i in s)s.hasOwnProperty(i)&&s[i]!==r&&(s[i]=a(s[i]));s.url!==r&&(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!==r?"&name="+s.title:"")+(s.description!==r?"&description="+s.description:"")),e(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+s.url+(s.title!==r?"&title="+s.title:"")+(s.description!==r?"&summary="+s.description:"")),e(this).find(".rrssb-twitter a").attr("href","http://twitter.com/home?status="+(s.description!==r?s.description:"")+"%20"+s.url),e(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+s.url+(s.title!==r?"&text="+s.title:"")),e(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+s.url+(s.description!==r?"&text="+s.description:"")+(s.title!==r?"&title="+s.title:"")),e(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(s.description!==r?s.description:"")+"%20"+s.url),e(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+s.url+(s.image!==r?"&media="+s.image:"")+(s.description!==r?"&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!==r&&e(this).find(".rrssb-email a").attr("href","mailto:"+s.emailAddress+"?"+(s.emailSubject!==r?"subject="+s.emailSubject:"")+(s.emailBody!==r?"&body="+s.emailBody:""))};var i=function(){var t=e("
    "),r=["calc","-webkit-calc","-moz-calc"];e("body").append(t);for(var i=0;i170&&e("li.small",r).length<1?r.addClass("large-format"):r.removeClass("large-format"),200>s?r.removeClass("small-format").addClass("tiny-format"):r.removeClass("tiny-format")})},o=function(){e(".rrssb-buttons").each(function(t){var r=e(this),s=e("li",r),i=s.filter(".small"),a=0,n=0,l=i.first(),o=parseFloat(l.attr("data-size"))+55,c=i.length;if(c===s.length){var d=42*c,m=r.width();m>d+o&&(r.removeClass("small-format"),i.first().removeClass("small"),h())}else{s.not(".small").each(function(t){var r=e(this),s=parseFloat(r.attr("data-size"))+55,i=parseFloat(r.width());a+=i,n+=s});var u=a-n;u>o&&(l.removeClass("small"),h())}})},c=function(t){e(".rrssb-buttons").each(function(t){var r=e(this),s=e("li",r);e(s.get().reverse()).each(function(t,r){var i=e(this);if(i.hasClass("small")===!1){var a=parseFloat(i.attr("data-size"))+55,n=parseFloat(i.width());if(a>n){var l=s.not(".small").last();e(l).addClass("small"),h()}}--r||o()})}),t===!0&&m(h)},h=function(){e(".rrssb-buttons").each(function(t){var r,i,a,l,o,c=e(this),h=e("li",c),d=h.filter(".small"),m=d.length;m>0&&m!==h.length?(c.removeClass("small-format"),d.css("width","42px"),a=42*m,r=h.not(".small").length,i=100/r,o=a/r,s.calc===!1?(l=(c.innerWidth()-1)/r-o,l=Math.floor(1e3*l)/1e3,l+="px"):l=s.calc+"("+i+"% - "+o+"px)",h.not(".small").css("width",l)):m===h.length?(c.addClass("small-format"),n()):(c.removeClass("small-format"),n())}),l()},d=function(){e(".rrssb-buttons").each(function(t){e(this).addClass("rrssb-"+(t+1))}),i(),n(),e(".rrssb-buttons li .rrssb-text").each(function(t){var r=e(this),s=r.width();r.closest("li").attr("data-size",s)}),c(!0)},m=function(t){e(".rrssb-buttons li.small").removeClass("small"),c(),t()},u=function(e,s,i,a){var n=t.screenLeft!==r?t.screenLeft:screen.left,l=t.screenTop!==r?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,h=o/2-i/2+n,d=c/3-a/3+l,m=t.open(e,s,"scrollbars=yes, width="+i+", height="+a+", top="+d+", left="+h);t.focus&&m.focus()},f=function(){var t={};return function(e,r,s){s||(s="Don't call this twice without a uniqueId"),t[s]&&clearTimeout(t[s]),t[s]=setTimeout(e,r)}}();e(document).ready(function(){e(".rrssb-buttons a.popup").on("click",function(t){var r=e(this);u(r.attr("href"),r.find(".rrssb-text").html(),580,470),t.preventDefault()}),e(t).resize(function(){m(h),f(function(){m(h)},200,"finished resizing")}),d()}),t.rrssbInit=d}(window,jQuery); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..a5b6726 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "RRSSB", + "version": "1.7.7", + "authors": [ + "(Joshua Tuscan )", + "(Daniel Box )" + ], + "description": "Ridiculously Responsive Social Sharing Buttons", + "main": [ + "js/rrssb.js", + "css/rrssb.css" + ], + "keywords": [ + "ridiculously", + "RRSSB", + "rrssb", + "responsive", + "sharing", + "social", + "buttons" + ], + "repository": { + "type": "git", + "url": "https://github.com/kni-labs/rrssb" + }, + "license": "MIT", + "homepage": "http://kurtnoble.com/labs/rrssb/", + "readme": "ERROR! No readme found!", + "devDependencies": { + "gulp": "*", + "gulp-sass": "*", + "gulp-uglify": "*", + "gulp-filter": "*", + "gulp-util": "*", + "gulp-rename": "*", + "gulp-minify-css": "*", + "gulp-autoprefixer": "*", + "gulp-imagemin": "*", + "browser-sync": "*" + } +} diff --git a/scss/demo.scss b/scss/demo.scss index e46dfec..efccc60 100755 --- a/scss/demo.scss +++ b/scss/demo.scss @@ -1,129 +1,117 @@ -@import "bourbon"; - -// config settings -$button-contents: #fff; -$email: #0a88ff; -$facebook: #306199; -$linkedin: #007bb6; -$twitter: #26c4f1; -$googleplus: #e93f2e; -$youtube: #df1c31; -$pinterest: #b81621; -$github: #444; -$pocket: #ED4054; +// 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; -@mixin transition-all($time) { - -webkit-transition: all $time+s ease; - -moz-transition: all $time+s ease; - -o-transition: all $time+s ease; - transition: all $time+s ease; -} body { - overflow-x: hidden; + overflow-x: hidden; } a { - text-decoration: none; - font-weight: 500; - color: $email; + color: $link-color; + font-weight: 500; + text-decoration: none; - &:hover { - color: shade($email, 55%); - } + &:hover { + color: darken($link-color, 15%); + } } .main-container { - padding: 1% 6%; - - h1 { - letter-spacing: -.03em; - color: #444; - margin: 20px 0 10px 0; - @include transition-all(0.2); - - - @media screen and (min-width: 1024px) { - font-size: 40px; - } - - } - - h2 { - color: #444; - } - - p { - font-size: 16px; - line-height: 1.4em; - - @media screen and (min-width: 1024px) { - font-size: 20px; - } - } - img.rrssb-preview { - width: 40%; - height: auto; - float: right; - margin: 0 0 1% 1%; - @include transition-all(0.2); - - @media screen and (max-width: 400px) { - // width: 100%; - width: 60%; - // margin: -25px 0 15px 0; - } - - } - small { - display: block; - margin: 40px 0; - font-size: 12px; - color: #999; - } + 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: #ddd; - border: 0; - height: 1px; - margin: 0 0 10px 0; + background-color: $hr-color; + border: 0; + height: 1px; + margin: 0 0 10px; } .share-container { - position: relative; - padding: 0 0 25px; - - @media screen and (max-width: 320px) { - padding: 0 0 12px; - } - - .label { - color: #777; - 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) { - width: 100%; - float: none; - clear: both; - } - } + padding: 0 0 25px; + position: relative; + + @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 81c44a9..6853274 100755 --- a/scss/rrssb.scss +++ b/scss/rrssb.scss @@ -16,22 +16,26 @@ // \__\/ \__\/ -// How to use: Add/remove buttons from config settings and $social-list. - -// Config settings -$rrssb-txt: #ffffff !default; -$rrssb-email: #0a88ff !default; -$rrssb-facebook: #306199 !default; -$rrssb-tumblr: #32506d !default; -$rrssb-linkedin: #007bb6 !default; -$rrssb-twitter: #26c4f1 !default; -$rrssb-googleplus: #e93f2e !default; -$rrssb-reddit: #8bbbe3 !default; -$rrssb-youtube: #df1c31 !default; -$rrssb-pinterest: #b81621 !default; -$rrssb-pocket: #ED4054 !default; -$rrssb-github: #444444 !default; -$rrssb-instagram: #517fa4 !default; +// Note: You can and should add or remove buttons from config settings and +// $social-list based on your specific needs. + +// config settings +$rrssb-txt: #fff !default; +$rrssb-email: #0a88ff !default; +$rrssb-facebook: #306199 !default; +$rrssb-tumblr: #32506d !default; +$rrssb-linkedin: #007bb6 !default; +$rrssb-twitter: #26c4f1 !default; +$rrssb-googleplus: #e93f2e !default; +$rrssb-reddit: #8bbbe3 !default; +$rrssb-youtube: #df1c31 !default; +$rrssb-pinterest: #b81621 !default; +$rrssb-pocket: #ed4054 !default; +$rrssb-github: #444 !default; +$rrssb-instagram: #517fa4 !default; +$rrssb-hackernews: #ff6600 !default; +$rrssb-delicious: #0B79E5 !default; +$rrssb-vk: #4d71a9 !default; // Set the border radius for the buttons $rrssb-border-radius: 2px !default; @@ -40,341 +44,327 @@ $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-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 ); -@mixin transition($expression) { - -webkit-transition: $expression; - -moz-transition: $expression; - -o-transition: $expression; - transition: $expression; -} - -%backface-visibility { - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; -} - -%border-box { - -moz-box-sizing:border-box; - box-sizing: border-box; -} - // some generic classes .clearfix { - *zoom: 1; - &:after { - clear: both; - } + &:after { + clear: both; + } - &:before, - &:after { - content: " "; - display: table; - } + &:before, + &:after { + content: ' '; + display: table; + } } // The meat and potatoes .rrssb-buttons { - @extend %border-box; - font-family: $rrssb-main-font; - height: 36px; - margin: 0; - padding: 0; - width: 100%; - - li { - @extend %border-box; - float: left; - height: 100%; - line-height: 13px; - list-style: none; - margin: 0; - padding: 0 2px; - - // This generates individual button classes for each item in social list on line 39. - @each $s-name in $social-list { - - &.#{nth($s-name, 1)} { - a { - background-color: nth($s-name, 2); - - &:hover { - background-color: darken(nth($s-name, 2), 10%); - } - } - } - - } // end @each directive - - a { - @extend %border-box; - background-color: #ccc; - border-radius: $rrssb-border-radius; - display: block; - font-size: 11px; - font-weight: bold; - height: 100%; - padding: 11px 7px 12px 27px; - position: relative; - text-align: center; - text-decoration: none; - text-transform: uppercase; - width: 100%; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - @include transition(background-color 0.2s ease-in-out); - - .rrssb-icon { - display: block; - left: 10px; - padding-top: 9px; - position: absolute; - top: 0; - width: 10%; - - svg { - height: 17px; - width: 17px; - - path, polygon { - fill: $rrssb-txt; - } - } - } - - .rrssb-text { - color: $rrssb-txt; - } - - &:active { - box-shadow:inset 1px 3px 15px 0 rgba(022,0,0,.25); - } - } - - &.small { - a { - padding: 0; - - .rrssb-icon { - left: auto; - margin: 0 auto; - overflow: hidden; - position: relative; - top: auto; - width: 100%; - } - .rrssb-text { - visibility: hidden; - } - } - } - } - - &.large-format { - height: auto; - - li { - height: auto; - - // Determine font-size based on number of siblings - &:first-child:nth-last-child(1) { - a { - font-size: 20px; //fallback - font-size: 4vw; - } - } - - &:first-child:nth-last-child(2), - &:first-child:nth-last-child(2) ~ li { - a { - font-size: 16px; //fallback - font-size: 2vw; - } - } - - &:first-child:nth-last-child(3), - &:first-child:nth-last-child(3) ~ li { - a { - font-size: 14px; //fallback - font-size: 1.7vw; - } - } - - &:first-child:nth-last-child(4), - &:first-child:nth-last-child(4) ~ li { - a { - font-size: 13px; //fallback - font-size: 1.4vw; - } - } - - &:first-child:nth-last-child(5), - &:first-child:nth-last-child(5) ~ li { - a { - font-size: 13px; //fallback - font-size: 1.2vw; - } - } - - &:first-child:nth-last-child(6), - &:first-child:nth-last-child(6) ~ li { - a { - font-size: 12px; //fallback - font-size: 1.05vw; - } - } - - &:first-child:nth-last-child(7), - &:first-child:nth-last-child(7) ~ li { - a { - font-size: 11px; //fallback - font-size: .9vw; - } - } - - &:first-child:nth-last-child(8), - &:first-child:nth-last-child(8) ~ li { - a { - font-size: 11px; //fallback - font-size: .8vw; - } - } - - &:first-child:nth-last-child(9), - &:first-child:nth-last-child(9) ~ li { - a { - font-size: 11px; //fallback - font-size: .7vw; - } - } - - &:first-child:nth-last-child(10), - &:first-child:nth-last-child(10) ~ li { - a { - font-size: 11px; //fallback - font-size: .6vw; - } - } - - &:first-child:nth-last-child(11), - &:first-child:nth-last-child(11) ~ li { - a { - font-size: 11px; //fallback - font-size: .5vw; - } - } - - a { - border-radius: 0.2em; - padding: 8.5% 0 8.5% 12%; - @extend %backface-visibility; - - .rrssb-icon { - height: 100%; - left: 7%; - padding-top: 0; - width: 12%; - - svg { - height: 100%; - width: 100%; - position: absolute; - top:0; - } - } - - .rrssb-text { - @extend %backface-visibility; - } - } - } - } - - &.small-format { - padding-top: 5px; - - li { - height: 80%; - padding: 0 1px; - - a { - .rrssb-icon { - height: 100%; - padding-top: 0; - - svg { - height: 48%; - position: relative; - top: 6px; - width: 80%; - } - } - } - } - } - - &.tiny-format { - height: 22px; - position: relative; - - li { - padding-right: 7px; - - a { - background-color: transparent; - padding: 0; - - .rrssb-icon { - svg { - height: 70%; - width: 100%; - } - } - - &:hover, &:active { - background-color: transparent; - } - } - - // This generates individual button classes for each item in social list on line 39. - @each $s-name in $social-list { - - &.#{nth($s-name, 1)} { - a { - .rrssb-icon { - svg { - path, polygon { - fill: nth($s-name, 2); - } - } - - &:hover { - .rrssb-icon { - svg { - path, polygon { - fill: darken(nth($s-name, 2), 20%); - } - } - } - } - } - } - } - } // end @each directive - } - } + box-sizing: border-box; + font-family: $rrssb-main-font; + height: 36px; + margin: 0; + padding: 0; + width: 100%; + + li { + box-sizing: border-box; + float: left; + height: 100%; + line-height: 13px; + list-style: none; + margin: 0; + padding: 0 2px; + + // This generates individual button classes for each item in social list on line 39. + @each $s-name in $social-list { + + &.#{nth($s-name, 1)} { + a { + background-color: nth($s-name, 2); + + &:hover { + background-color: darken(nth($s-name, 2), 10%); + } + } + } + + } // end @each directive + + a { + background-color: #ccc; + border-radius: $rrssb-border-radius; + box-sizing: border-box; + display: block; + font-size: 11px; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-weight: bold; + height: 100%; + padding: 11px 7px 12px 27px; + position: relative; + text-align: center; + text-decoration: none; + text-transform: uppercase; + transition: background-color .2s ease-in-out; + width: 100%; + + .rrssb-icon { + display: block; + left: 10px; + padding-top: 9px; + position: absolute; + top: 0; + width: 10%; + + svg { + height: 17px; + width: 17px; + + path, polygon { + fill: $rrssb-txt; + } + } + } + + .rrssb-text { + color: $rrssb-txt; + } + + &:active { + box-shadow: inset 1px 3px 15px 0 rgba(22, 0, 0, .25); + } + } + + &.small { + a { + padding: 0; + + .rrssb-icon { + left: auto; + margin: 0 auto; + overflow: hidden; + position: relative; + top: auto; + width: 100%; + } + + .rrssb-text { + visibility: hidden; + } + } + } + } + + &.large-format { + height: auto; + + li { + height: auto; + + // Determine font-size based on number of siblings + &:first-child:nth-last-child(1) { + a { + font-size: 20px; //fallback + font-size: 4vw; + } + } + + &:first-child:nth-last-child(2), + &:first-child:nth-last-child(2) ~ li { + a { + font-size: 16px; //fallback + font-size: 2vw; + } + } + + &:first-child:nth-last-child(3), + &:first-child:nth-last-child(3) ~ li { + a { + font-size: 14px; //fallback + font-size: 1.7vw; + } + } + + &:first-child:nth-last-child(4), + &:first-child:nth-last-child(4) ~ li { + a { + font-size: 13px; //fallback + font-size: 1.4vw; + } + } + + &:first-child:nth-last-child(5), + &:first-child:nth-last-child(5) ~ li { + a { + font-size: 13px; //fallback + font-size: 1.2vw; + } + } + + &:first-child:nth-last-child(6), + &:first-child:nth-last-child(6) ~ li { + a { + font-size: 12px; //fallback + font-size: 1.05vw; + } + } + + &:first-child:nth-last-child(7), + &:first-child:nth-last-child(7) ~ li { + a { + font-size: 11px; //fallback + font-size: .9vw; + } + } + + &:first-child:nth-last-child(8), + &:first-child:nth-last-child(8) ~ li { + a { + font-size: 11px; //fallback + font-size: .8vw; + } + } + + &:first-child:nth-last-child(9), + &:first-child:nth-last-child(9) ~ li { + a { + font-size: 11px; //fallback + font-size: .7vw; + } + } + + &:first-child:nth-last-child(10), + &:first-child:nth-last-child(10) ~ li { + a { + font-size: 11px; //fallback + font-size: .6vw; + } + } + + &:first-child:nth-last-child(11), + &:first-child:nth-last-child(11) ~ li { + a { + font-size: 11px; //fallback + font-size: .5vw; + } + } + + a { + backface-visibility: hidden; + border-radius: .2em; + padding: 8.5% 0 8.5% 12%; + + .rrssb-icon { + height: 100%; + left: 7%; + padding-top: 0; + width: 12%; + + svg { + height: 100%; + position: absolute; + top: 0; + width: 100%; + } + } + + .rrssb-text { + backface-visibility: hidden; + } + } + } + } + + &.small-format { + padding-top: 5px; + + li { + height: 80%; + padding: 0 1px; + + a { + .rrssb-icon { + height: 100%; + padding-top: 0; + + svg { + height: 48%; + position: relative; + top: 6px; + width: 80%; + } + } + } + } + } + + &.tiny-format { + height: 22px; + position: relative; + + li { + padding-right: 7px; + + a { + background-color: transparent; + padding: 0; + + .rrssb-icon { + svg { + height: 70%; + width: 100%; + } + } + + &:hover, + &:active { + background-color: transparent; + } + } + + // This generates individual button classes for each item in social list on line 39. + @each $s-name in $social-list { + + &.#{nth($s-name, 1)} { + a { + .rrssb-icon { + svg { + path, polygon { + fill: nth($s-name, 2); + } + } + + &:hover { + .rrssb-icon { + svg { + path, polygon { + fill: darken(nth($s-name, 2), 20%); + } + } + } + } + } + } + } + } // end @each directive + } + } }