├── .gitignore ├── LICENSE ├── README.md ├── analysis.json ├── bower.json ├── build.sh ├── demo └── index.html ├── emoji-rain.html ├── index.html ├── test ├── basic.html └── index.html └── twemoji-script-holder.html /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bower_components 3 | deploy 4 | emoji-rain 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Monica Dinculescu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # :sparkles: emoji-rain :sparkles: 2 | 3 | `` is a Polymer element that makes it rain emoji on any page. Because it can. 4 | 5 | emoji rain 6 | 7 | ☔️ The number of drops is configurable (by default it's set to 250). The `active` 8 | attribute determines whether the emoji are raining, but you can also manually 9 | `start()` and `stop()` the rain. 10 | 11 | Example: 12 | 25 | ```html 26 | 27 | ``` 28 | 29 | 💸️ Optionally, you can also use the Twitter emoji instead of the native ones. 30 | `twemoji.js` and all its images will only be loaded on demand, so if you don't 31 | want to eat the performance cost, you don't have to: 32 | ```html 33 | 34 | ``` 35 | 36 | ## Usage 37 | Install with bower: 38 | ``` 39 | mkdir emoji-rain-demo && cd emoji-rain-demo 40 | bower install emoji-rain 41 | ``` 42 | Drop it in a page, next to the newly created `bower_components` folder: 43 | ```html 44 | 45 | 46 | 47 | 48 | zomg 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | ``` 57 | 58 | # :sparkles::umbrella::joy_cat: 59 | -------------------------------------------------------------------------------- /analysis.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notwaldorf/emoji-rain/acfad4b5d9dbaed8fce28d7062b4138d217e9a31/analysis.json -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "emoji-rain", 3 | "version": "2.0.0", 4 | "description": "A polymer element that makes it rain emoji", 5 | "main": "emoji-rain.html", 6 | "author": [ 7 | "Monica Dinculescu " 8 | ], 9 | "license": "MIT", 10 | "keywords": [ 11 | "web-components", 12 | "polymer", 13 | "emoji", 14 | "rain" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/notwaldorf/emoji-rain.git" 19 | }, 20 | "dependencies": { 21 | "polymer": "Polymer/polymer#^2.0.0" 22 | }, 23 | "devDependencies": { 24 | "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0", 25 | "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1", 26 | "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", 27 | "web-component-tester": "^6.0.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # @license 4 | # Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 5 | # This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 6 | # The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 7 | # The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 8 | # Code distributed by Google as part of the polymer project is also 9 | # subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 10 | # 11 | 12 | # This script pushes a demo-friendly version of your element and its 13 | # dependencies to gh-pages. 14 | 15 | # Run in a clean directory passing in a GitHub org and repo name 16 | org="notwaldorf" 17 | repo="emoji-rain" 18 | branch="master" # default to master when branch isn't specified 19 | 20 | # make folder (same as input, no checking!) 21 | mkdir $repo 22 | git clone https://github.com/$org/$repo.git --single-branch 23 | 24 | # switch to gh-pages branch 25 | pushd $repo >/dev/null 26 | git checkout --orphan gh-pages 27 | 28 | # remove all content 29 | git rm -rf -q . 30 | 31 | # use bower to install runtime deployment 32 | bower cache clean $repo # ensure we're getting the latest from the desired branch. 33 | git show ${branch}:bower.json > bower.json 34 | echo "{ 35 | \"directory\": \"components\" 36 | } 37 | " > .bowerrc 38 | bower install 39 | bower install $org/$repo#$branch 40 | git checkout ${branch} -- demo 41 | rm -rf components/$repo/demo 42 | mv demo components/$repo/ 43 | 44 | # redirect by default to the component folder 45 | echo "" >index.html 46 | 47 | # send it all to github 48 | git add -A . 49 | git commit -am 'seed gh-pages' 50 | git push -u origin gh-pages --force 51 | 52 | popd >/dev/null 53 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | emoji-rain 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

What is this even

19 |

This is a Polymer element that you can drop on any web page and make it rain emoji. 20 | Because, seriously, why wouldn't you? 21 |

22 |
23 | 24 |
25 | 26 | 27 | with Twitter emoji 28 |
29 | 30 | 34 |
35 | 36 | 37 | 109 | 110 | 127 | 128 | -------------------------------------------------------------------------------- /emoji-rain.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 34 | 35 | 308 | 309 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | emoji-rain 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | emoji-rain tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /twemoji-script-holder.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | --------------------------------------------------------------------------------