Adding Emoji One
|
@ -1,5 +1,10 @@
|
|||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import emojione from 'emojione';
|
||||
|
||||
emojione.imageType = 'png';
|
||||
emojione.sprites = false;
|
||||
emojione.imagePathPNG = '/emoji/';
|
||||
|
||||
const StatusContent = React.createClass({
|
||||
|
||||
|
@ -55,7 +60,7 @@ const StatusContent = React.createClass({
|
|||
},
|
||||
|
||||
render () {
|
||||
const content = { __html: this.props.status.get('content') };
|
||||
const content = { __html: emojione.unicodeToImage(this.props.status.get('content')) };
|
||||
return <div className='status__content' dangerouslySetInnerHTML={content} />;
|
||||
},
|
||||
|
||||
|
|
|
@ -71,6 +71,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
.emojione {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
vertical-align: middle;
|
||||
margin: -.2ex .15em .2ex;
|
||||
|
||||
img {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.status__content, .reply-indicator__content {
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
|
@ -78,6 +89,11 @@
|
|||
font-weight: 300;
|
||||
overflow: hidden;
|
||||
|
||||
.emojione {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
|
||||
|
@ -110,6 +126,11 @@
|
|||
.status__content {
|
||||
font-size: 19px;
|
||||
line-height: 24px;
|
||||
|
||||
.emojione {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Rails.application.config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
# Rails.application.config.assets.paths << 'node_modules'
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
"sinon": "^1.17.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"emojione": "^2.2.6",
|
||||
"react-autosuggest": "^7.0.1",
|
||||
"react-responsive": "^1.1.5",
|
||||
"react-router-scroll": "^0.3.2"
|
||||
|
|
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 645 B |
After Width: | Height: | Size: 560 B |
After Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 644 B |
After Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 577 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 612 B |
After Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 608 B |
After Width: | Height: | Size: 646 B |
After Width: | Height: | Size: 607 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 547 B |
After Width: | Height: | Size: 951 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 385 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 396 B |
After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 486 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 511 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 942 B |
After Width: | Height: | Size: 913 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 514 B |
After Width: | Height: | Size: 997 B |
After Width: | Height: | Size: 657 B |
After Width: | Height: | Size: 975 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 962 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 496 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 593 B |
After Width: | Height: | Size: 795 B |
After Width: | Height: | Size: 554 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 819 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 851 B |
After Width: | Height: | Size: 707 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 586 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 443 B |