Moved emojis to assets

main
Igor Scheller 6 years ago
parent c1a1180d1f
commit 8456a3cf6f

@ -482,7 +482,7 @@ function ReplaceSmilies($msg)
) {
$msg = str_ireplace($search, sprintf(
'<img src="%s">',
sprintf($assets->getAsset('emojis/%s.gif'), $replace)
sprintf($assets->getAsset('assets/emojis/%s.gif'), $replace)
), $msg);
}

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 498 B

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 485 B

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

@ -22,7 +22,7 @@ class Response extends SymfonyResponse implements ResponseInterface
public function __construct(
$content = '',
int $status = 200,
array $headers = array(),
array $headers = [],
Renderer $view = null
) {
$this->view = $view;

@ -23,6 +23,11 @@ for (let i = 0; i < 7; i++) {
themeEntries[`theme${i}`] = `./resources/assets/themes/theme${i}.less`;
}
const emojis = {};
for (let emoji of ['redface', 'wind', 'smile', 'sad', 'lol', 'cry', 'rolleyes', 'evil', 'mad', 'question']){
emojis[`${emoji}`] = `./resources/assets/emojis/${emoji}.gif`;
}
module.exports = {
context: __dirname,
resolve: {
@ -31,6 +36,7 @@ module.exports = {
entry: {
...themeEntries,
vendor: './resources/assets/js/vendor.js',
...emojis,
},
output: {
path: path.resolve('public/assets'),
@ -46,6 +52,7 @@ module.exports = {
query: { cacheDirectory: true },
},
{ test: /\.(eot|ttf|otf|svg|woff2?)(\?.*)?$/, loader: 'file-loader' },
{ test: /\.gif$/, loader: 'file-loader?name=emojis/[name].[ext]' },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.less$/, use: ExtractTextPlugin.extract({

Loading…
Cancel
Save